What problem does it solve?
Rust developers building Golem agents need a structured way to pass validated, typed configuration values into agent constructors instead of relying on untyped environment variables or ad-hoc parsing.
Core Features & Use Cases
- Typed Config Structs: Derive
ConfigSchema on Rust structs, including nested structs via #[config_schema(nested)] and optional Option<T> fields.
- Constructor Injection: Inject
Config<T> into the agent constructor with the required #[agent_config] annotation, with lazy loading via .get().
- Multi-Source Configuration: Set defaults in
golem.yaml under agents.<Name>.config, override via golem agent new --config CLI flags, or override at call time with the generated *ConfigRpc type and get_with_config.
- Use Case: You are building a Rust Golem agent that needs a numeric threshold, a string endpoint, and nested feature flags. Define a
ConfigSchema struct, add Config<MyAgentConfig> to the constructor, and supply values through golem.yaml or CLI flags.
Quick Start
Ask the AI to add typed configuration with a ConfigSchema struct and an #[agent_config] Config<T> constructor parameter to your Rust Golem agent.