What problem does it solve?
Defining a new durable, stateful agent in a Scala Golem project requires correctly pairing an annotated trait with an implementation class, handling identity constructors, schema derivation, and error semantics. This Skill guides that process so the agent compiles and behaves correctly under Golem's invocation model.
Core Features & Use Cases
- Agent Scaffolding: Create the
@agentDefinition trait extending BaseAgent and the matching @agentImplementation() class with correct constructor identity via the inner class Id(...).
- Typed APIs and Errors: Define custom case classes with
derives Schema from zio.blocks.schema, and model domain failures as Future[Either[E, A]] instead of failed futures that trigger retries.
- HTTP Endpoints: Expose agent methods as HTTP routes using
@endpoint and @header annotations.
- Use Case: When asked to add a
CounterAgent with increment and getCount methods to a Scala Golem component, this Skill produces the trait, implementation, and build verification steps.
Quick Start
Add a new Scala agent named CounterAgent with increment and getCount methods to my Golem component.