Skip to main content

Module backend

Module backend 

Source
Expand description

Unified execution backend for AI agent tasks.

Provides the [AgentBackend] trait that abstracts over different execution modes (direct API, CLI subprocess, simulated) behind a single interface. Unified execution backend for AI agent tasks.

Provides the [AgentBackend] trait that abstracts over different execution modes:

  • Direct API calls to LLM providers
  • CLI subprocess spawning (Claude Code, OpenCode, Cursor)
  • Simulated execution for testing and dry-runs

All callers interact through the same interface regardless of how the underlying LLM execution happens.

Modules§

cli
CLI subprocess backend.
direct
Direct API backend.
simulated
Simulated backend for testing and dry-runs.

Structs§

AgentHandle
Handle to a running agent execution.
AgentRequest
Request to execute an agent task.
AgentResult
Result of an agent execution.
TokenUsage
Token usage statistics.
ToolCallRecord
Record of a single tool call during execution.

Enums§

AgentEvent
Events emitted during agent execution.
AgentStatus
Status of an agent execution.

Traits§

AgentBackend
A backend that can execute an AI agent task.

Functions§

create_backend
Create a backend from a harness specification.
create_simulated_backend
Create a simulated backend for testing and dry-runs.