Skip to main content

Crate oxi_agent

Crate oxi_agent 

Source
Expand description

oxi-agent: Agent runtime for oxi

Provides the core agent loop, tool execution, state management, and streaming event pipeline for the oxi coding agent.

Re-exports§

pub use agent::Agent;
pub use agent::ProviderResolver;
pub use agent_loop::AgentLoop;
pub use agent_loop::AgentLoopConfig;
pub use config::AfterToolCallContext;
pub use config::AfterToolCallResult;
pub use config::AgentConfig;
pub use config::AgentHooks;
pub use config::BeforeToolCallContext;
pub use config::BeforeToolCallResult;
pub use config::ShouldStopAfterTurnContext;
pub use config::ToolExecutionMode;
pub use error::AgentError;
pub use events::AgentEvent;
pub use compaction::CompactedContext;
pub use compaction::CompactionEvent;
pub use recovery::CircuitBreaker;
pub use recovery::CircuitOpenErrorLocal;
pub use state::AgentState;
pub use state::SharedState;
pub use structured_output::OutputMode;
pub use structured_output::StructuredOutput;
pub use structured_output::StructuredOutputError;
pub use mcp::McpConfig;
pub use mcp::McpManager;
pub use mcp::McpTool;
pub use tools::context7::Context7QueryDocsTool;
pub use tools::context7::Context7ResolveLibraryIdTool;
pub use tools::github::GitHubTool;
pub use tools::github_search::GitHubSearchTool;
pub use tools::questionnaire::QuestionnaireBridge;
pub use tools::questionnaire::QuestionnaireTool;
pub use tools::search_cache::GetSearchResultsTool;
pub use tools::search_cache::SearchCache;
pub use tools::subagent::SubagentTool;
pub use tools::web_search::WebSearchTool;
pub use tools::AgentTool;
pub use tools::AgentToolResult;
pub use tools::BashTool;
pub use tools::EditTool;
pub use tools::FindTool;
pub use tools::GrepTool;
pub use tools::LsTool;
pub use tools::ReadTool;
pub use tools::ToolContext;
pub use tools::ToolError;
pub use tools::ToolRegistry;
pub use tools::WriteTool;

Modules§

agent
Core agent implementation.
agent_loop
Agent loop – the main request/response cycle driver. Agent loop — the main request/response cycle driver.
compaction
Context compaction strategies and data types.
config
Agent configuration types.
error
Error types for agent operations. Error types for oxi-agent
events
Event types emitted during the agent loop.
mcp
MCP (Model Context Protocol) integration. MCP (Model Context Protocol) integration.
model_id
Model identifier constants and helpers.
prelude
Standard imports for oxi-agent usage.
recovery
Fault-recovery primitives (circuit breaker, fallback chains). Fault-recovery primitives — re-exported from oxi-ai.
state
Agent state machine and shared mutable state.
stream_retry
Shared streaming retry logic.
structured_output
Structured output extraction and validation.
tools
Built-in tool implementations and registry.
types
Shared type aliases and helpers.

Structs§

CircuitBreakerConfig
Fault-recovery primitives for resilient agent execution. Configuration parameters for a provider circuit breaker.
CircuitOpenErrorFromAi
Fault-recovery primitives for resilient agent execution. Error returned when attempting to make a request while the circuit is open.
CompactionManager
Context manager that handles compaction automatically
FallbackChain
Fault-recovery primitives for resilient agent execution. An ordered chain of models for sequential fallback on failure.
PartialResponse
Fault-recovery primitives for resilient agent execution. Partial response accumulator.

Enums§

CompactionStrategy
Compaction strategy determining when to compact