Expand description
The agent loop (packages/agent/agent-loop.ts): stream an assistant response,
execute any tool calls, feed results back, and repeat until the model stops.
Structs§
- Agent
Loop Config - Configuration for the agent loop.
Functions§
- agent_
loop - Start an agent loop as a background task and return its event stream. The
loop appends
promptsto a copy of the context, runs to completion, and terminates with a singleAgentEvent::AgentEndcarrying the final transcript. Each run is independent (the caller owns the live transcript).
Type Aliases§
- Agent
Event Stream - A boxed async stream of agent events.