golem-add-agent-ts

Create and register durable TypeScript agents in Golem components.

Updated May 17, 2026
One-click install
npx skills add https://github.com/Rust-soham/golem-claw --skill golem-add-agent-ts-rust-soham
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-add-agent-ts
Source: https://github.com/Rust-soham/golem-claw/tree/main/packages/golem/.agents/skills/golem-add-agent-ts
Command: npx skills add https://github.com/Rust-soham/golem-claw --skill golem-add-agent-ts-rust-soham

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about golem-add-agent-ts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a durable TypeScript agent to a Golem component?

To add a durable TypeScript agent to a Golem component, define an agent class decorated with `@agent()` that extends `BaseAgent`, then import its module for side effects in `src/main.ts` to ensure registration before running golem build.

How does stateful agent failure handling work in Golem TypeScript?

Stateful agent failure handling in Golem TypeScript uses typed method signatures returning `Result<T, E>` to surface domain errors like insufficient funds as observable failures, preventing unexpected agent crashes and avoiding automatic runtime retries.

What constraints apply to TypeScript agent constructor identity types in Golem?

TypeScript agent constructor identity types in Golem must be serializable, and you cannot use TypeScript enums in your agent definitions to ensure the durable state remains compatible with the Golem runtime serialization requirements.

Why does my Golem TypeScript agent not register when I run golem build?

Your Golem TypeScript agent may not register if its module is not imported for side effects in `src/main.ts`; this side-effect import is required to wire the agent into the build before you run golem build to verify the setup.

What is the best way to expose new agent capabilities in a Golem TypeScript project?

The best way to expose new agent capabilities in a Golem TypeScript project is to create an agent class inheriting from `BaseAgent`, use the `@agent()` decorator, and define typed methods so callers can invoke the new stateful computation unit through the Golem runtime.