Skip to main content

Crate agent_call

Crate agent_call 

Source
Expand description

One-shot Rust adapters for Claude, Codex, Devin, and OpenCode v2 CLIs.

Each call runs a fresh CLI process and returns the completed assistant text. Authentication and model defaults come from the installed CLI unless the caller chooses a model explicitly.

Structs§

AgentCli
A local CLI adapter. Each run starts a fresh process and returns one result.
EventHandler
Receives AgentEvents; called from the task reading the CLI’s output, so keep it quick.
McpServer
An MCP server (streamable HTTP) the agent may use during a run.
OpenCodeV2
A verified OpenCode v2 executable.
ProviderError
An adapter error with the selected provider preserved for callers.
RunRequest
A single, fresh CLI run.
RunResult
Result of one CLI run.
TokenUsage
Token accounting reported by the CLI.

Enums§

AgentEvent
Progress reported while a run is going (see RunRequest::on_event).
Error
Provider
ToolPolicy
Which tools the agent may use during a run.