Skip to content

API Reference

Every page in this section documents one exported primitive, with its real signature and a minimal working example drawn from src/index.ts and examples/*.ts. Every primitive listed here — including team() — is on master today. See Status & Roadmap for what’s type-checked versus what’s still a runtime stub.

Export What it makes
tool(def) A model-less Step — a capability with declared dependencies.
agent(def) A model-owning Step — a think→act→observe loop with tools and, optionally, handoff targets.
workflow(def).nodes(...).flow(...) An explicit graph of Step nodes with a typed, data-driven router.
team(def).writes(...).router(...) Agents as nodes, a shared transcript, and handoff sugar — the multi-agent primitive.
Export What it makes
io<Out, In>() A Standard-Schema-shaped carrier for a static input/output type.
lastChannel(init) / listChannel() / inputChannel() Typed state slots with a declared reducer.
END The sentinel a router (or a passTo-free agent) returns to terminate a run.
Export What it makes
defineLoopy(def) The registry — converges every dependency requirement, then types run.
loopy(def).provide(...) The progressive-injection variant of the registry.