What problem does it solve?
Defining a new durable, stateful agent in a MoonBit Golem project requires knowing the exact struct annotations, constructor conventions, and schema derivation rules. This Skill guides the creation of a correctly structured agent so it compiles and behaves properly on the Golem platform.
Core Features & Use Cases
- Agent Struct Definition: Creates a new agent file with a struct annotated with
#derive.agent, a constructor, and public methods.
- Custom Schema Types: Adds
#derive.golem_schema annotations to custom structs and enums used in method signatures.
- Error Handling Guidance: Distinguishes domain errors returned via
Result[T, E] from uncaught errors that trigger retries and agent failure.
- Use Case: When building a WebAssembly-based distributed application on Golem with MoonBit, use this Skill to add a new agent type such as a Wallet with deposit and withdraw methods that return typed domain errors.
Quick Start
Add a new MoonBit agent called Counter with an increment method to my Golem component and verify it builds.