What problem does it solve?
Defining a new durable, stateful agent in a Rust Golem component requires following specific conventions—annotated traits, implementation structs, Schema-derived types, and correct error handling—that are easy to get wrong without guidance.
Core Features & Use Cases
- Agent scaffolding: Guides creation of the agent module, the
#[agent_definition] trait, the #[agent_implementation] struct, and re-exports from lib.rs.
- Custom type support: Shows how to derive
Schema, Serialize, and Deserialize so custom parameter and return types work with agent methods.
- Domain error handling: Explains returning
Result<T, E> for expected failures versus uncaught errors that trigger retries and agent failure.
- Use Case: When building a Golem application, ask to add a new
Wallet agent with deposit and withdraw methods, and get a complete, buildable Rust implementation verified with golem build.
Quick Start
Add a new Rust agent named Counter with increment and get methods to my Golem component.