Agent
13 pages.
An `agent` is a declaration — instructions, tools, model — and calling it is calling a name. The first-day mistake is treating the call as a chat:…
Call an agent you declared the way you would call anything else you declared — by name. You hand it the turns you want it to see: the question, the…
A conversation is stored as a `ChatSession` plus its `ChatMessage` turns, so an agent asked a follow-up can refer back to what was said earlier. Both…
An agent that needs something only a person can supply does not guess and does not fail — it asks, and its work PARKS. The wait becomes a modelled…
`app.Models` declares more than one model your app may use, each under a name you choose. The name is what your code and your users refer to —…
Declares the app's default LLM — the provider, model, API-key secret, and optional endpoint — as a single app-level config. `Provider` is one of…
End a task and everything beneath it, including the model call it is in the middle of. Answers whether a live run was actually interrupted, as…
The workflow an agent's work runs INSIDE. A step of it means "run the agent until it finishes or asks for help" — the workflow supplies durability…
Every piece of work an agent does is recorded as an `AgentTask` — which agent, what set it going, when it started and finished, and what came of it…
Everything a task has done so far, then everything it does next, as one stream that ends when the task does. A watcher can arrive late, leave, and…
Every model call an agent task paid for, read off the task itself — the model, the turn, the tokens, the cache hits, the cost, how long it took, and…
An agent presents its outcome as a LIST of deliverables, not a sentence: documents it wrote, files it produced, and records it created, in the order…
What an agent's model calls actually contained — the system prompt as the model received it, the messages sent, the response that came back, and…