Install
A minimal worker
Run blocks and manages the whole lifecycle — register, heartbeat, hold the reverse channel, claim
work, dispatch it — until the context is cancelled. Returning the output map completes the run;
returning an error fails it, and a panic is recovered into a run failure.
Output convention, same as every other surface: a
text key in the returned map is the run’s
descriptive output — what a person sees as the answer — and every other key is structured detail.Configuration
Config fields fall back to environment variables when unset:
Two more are worth knowing:
MaxConcurrent(AGENTOPS_MAX_CONCURRENT, default 1) — how many runs the worker handles at once. One at a time is the default; raise it for I/O-bound agents whose runs can overlap, and each run still gets its ownRunand its own goroutine.DrainTimeout(default 30s) — how long an in-flight run may continue after shutdown begins before its context is cancelled.
AGENTOPS_CLUSTER_NAME, AGENTOPS_NAMESPACE, and
AGENTOPS_POD_NAME when they are set.
What the agent advertises
Config.Agent is the worker’s self-description, sent once at registration and surfaced in the
fleet:
Skills and UseCases are easy to confuse and are not the same thing. A skill is know-how the
agent reads; a use case is an entry point something else can call, and a handler branches on
run.UseCase() to tell which one it was invoked for.Inside a handler
Next steps
Python SDK
The same contract in Python, with framework adapters.
Agent identity
Where the worker token comes from.
Triggers & schedules
What a declared trigger becomes on the platform side.
Runs & evidence
Where the spans and messages you stream end up.