Expand description
Intelligence wire types — the provider-neutral representation the agentic loop reasons over.
The loop builds a Request and consumes a Response without knowing
which provider answered. The intel/openai.rs and intel/anthropic.rs
adapters translate to/from the on-the-wire JSON dialects; a model lacking
native tool-calling falls back to the JSON-action shape parsed in
agentloop/action.rs. Because the neutral model lives here rather than in
one provider’s struct, supporting another provider costs one adapter and no
change to the loop — that is what keeps the adapter count from growing into
the rest of the runtime.
Structs§
- Request
- A request to the intelligence endpoint.
- Response
- A response from the intelligence endpoint, normalized across providers.
- Tool
Call - A model-requested tool invocation.
argumentsis already-parsed JSON. - ToolDef
- A tool advertised to the model in the request
toolsfield. Sourced from the scoped MCPtools/listplus agentd’s own self-tools. - Usage
- Token accounting from one model call. The supervisor sums these into the run’s budget, and a child’s usage also counts against its parent’s.
Enums§
- Message
- One conversation message.
Assistantmay carry tool calls;ToolResultfeeds a tool’s output back into the conversation as the next observation. - Stop
Reason - Why the model stopped — drives the loop’s branch (tool-use vs final) and
the
exhausted_tokensterminal status.