Expand description
Intelligence wire types — the provider-neutral representation the agentic loop reasons over. RFC 0006.
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. Keeping the neutral model here (not a provider
struct) is what holds the two-adapters-and-no-more line (RFC 0006 §wire).
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/list(RFC 0004) plus agentd’s self-tools (RFC 0005). - Usage
- Token accounting from one model call. Summed into the run budget by the supervisor (RFC 0003 §hierarchical-accounting).
Enums§
- Message
- One conversation message.
Assistantmay carry tool calls;ToolResultfeeds a tool’s output back as the next observation (RFC 0007 §loop). - Stop
Reason - Why the model stopped — drives the loop’s branch (tool-use vs final) and
the
exhausted_tokensterminal status (RFC 0007 §3.4).