Skip to main content

Module intel

Module intel 

Source
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.
ToolCall
A model-requested tool invocation. arguments is already-parsed JSON.
ToolDef
A tool advertised to the model in the request tools field. Sourced from the scoped MCP tools/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. Assistant may carry tool calls; ToolResult feeds a tool’s output back as the next observation (RFC 0007 §loop).
StopReason
Why the model stopped — drives the loop’s branch (tool-use vs final) and the exhausted_tokens terminal status (RFC 0007 §3.4).