Run your first agent
From a checkout of Orchagent, run the on-call example with Go 1.26.10 or later. Go downloads the module dependencies on the first build. The agent itself uses a scripted provider and in-memory stores.
git clone https://github.com/urmzd/orchagent.git
cd orchagent
go run ./flow/examples/downstream
The first line is the agent’s reply. The second includes a different run ID each time.
oncall answered on the house model (house-1).
run <run-id>: completed
Read the definition
Open oncall.agent.md. Its model.use value, house/house-1, selects the provider named house and its model named house-1. The Go program registers that provider. The limits.budget block bounds cost, model requests and tokens. A standalone session post requires a positive budget.
Change house/house-1 to house/house-2 and run the command again. The scripted reply now names house-2. The example embeds the definition at build time and creates fresh stores on each invocation.
Follow one message
orchagent.Newcomposes the app for tenantacme.app.Rundrives its workers.app.Definestores the agent document. Submitting identical content under the same name and version is idempotent.app.Sessionopens the on-call conversation underconsole://downstream.conversation.Postaccepts the message and returns a run ID.- The example subscribes to the session before posting, waits for the run’s completion and prints the assistant’s transcript entry.
Inspect the complete Go program, then retrieve a final answer from a session.