What the agent runtime does today. Each capability is a small, testable unit of the loop.
Loop
Stream → extract tool calls → execute → feed back → repeat until the model stops.
Independent tool calls in a turn run concurrently; sequential mode is available. Parallel is the default.
Control
Interrupt the current turn mid-flight and skip its remaining tool calls.
Inject the next instruction after the turn completes, with ALL / ONE_AT_A_TIME draining.
abort() / reset_abort() drive an asyncio.Event that unwinds the loop.
Ten typed events (message update, tool start/end, turn end…) let a UI observe a run.
Extensibility
before_tool_call / after_tool_call, transform_context, and convert_to_llm hook points around the loop.
Tool arguments are validated against the JSON schema before execute is called.
A tool's on_update callback streams progress while it runs.
A tool_ctx dict threads state between tools and back to the caller (the sink pattern).
Built-in tools
read / write / delete / edit / ls / grep / find as one multi-action tool.
Run shell commands from the agent.
Inject the current time.
Schema-validated structured output — the agent returns a typed object, not prose.