What problem does it solve?
It solves the problem of adding new agent behavior to a Golem TypeScript component so that users can define a durable, stateful computation unit and make it available for invocation through the Golem runtime.
Core Features & Use Cases
- Creates a new agent type: Define an agent class decorated with
@agent() that extends BaseAgent.
- Wires the agent into the build: Ensure
src/main.ts imports the agent module for side effects so registration occurs.
- Designs safe failure semantics: Return domain errors via
Result<T, E> to produce observable failures without triggering retries/crashes.
Use Case: You want to introduce a new TypeScript agent that manages business state (for example, a wallet that supports withdraw) and have callers receive structured, expected failure outcomes like insufficient funds without crashing the agent.
Quick Start
Add an agent class to your TypeScript Golem project and register it by importing its module from src/main.ts, then run golem build to verify the wiring.