Agent.define(config) takes the Loop core minus everything
that serves convergence — no verify, no rounds, no Lock, no Record, no Persist —
and agent.run() runs Execute once and returns.
run accepts the other’s config.
AgentConfig
Onlygoal is required.
agent.run
run(options?) returns an AgentRun — the same handle shape as a Loop’s Run, over the
Agent’s leaner event and exit types:
fresh, force, rounds, or deadline — there is nothing to resume, take over, or
slice. Startup failures never include LoopBusy (there is no Lock); if two Agent runs
share a Workspace, serializing them is the caller’s job.
AgentExit
finished: true means the agent reached a terminal stop — ungraded, not a “done”
claim. Nothing judged the work; if “done” must be proven, that is what a
Loop is for.
AgentEvent
The stream is content + cost + a terminalexit — its own clean type, not a subset of
LoopEvent. There are no phases, so the envelope is a bare { seq }; there is no
phase-start and no verdict. The event kinds it shares with the Loop stream
(text, text-delta, reasoning, tool-call, tool-result, cost) carry the same
payloads — see Events.
No status()
An Agent run keeps no Record, so there is nothing to read back —AgentDefinition has no
status(). For a Loop’s disk snapshot, see definition.status.