Expand description
oxicode SDK - Programmatic API for building AI agents
§Example
use oxicode_sdk::{OxicodeBuilder, AgentConfig};
let oxicode = OxicodeBuilder::new().with_builtins().build();
let agent = oxicode.agent(AgentConfig {
model_id: "anthropic/claude-sonnet-4-20250514".into(),
..Default::default()
}).build().unwrap();Re-exports§
pub use agent_builder::AgentBuilder;pub use agent_group::AgentGroup;pub use agent_group::AgentGroupOutput;pub use agent_group::GroupResult;pub use agent_group::GroupStrategy;pub use builder::Oxicode;pub use builder::OxicodeBuilder;pub use delegation::SdkSubagentRunner;pub use url_resolver::SdkUrlResolver;pub use workflow_engine::StepOutput;pub use workflow_engine::WorkflowEngine;pub use workflow_engine::WorkflowResult;pub use closure_tool::ClosureTool;pub use message_bus::InterAgentMessage;pub use message_bus::LagAwareReceiver;pub use message_bus::MessageBus;pub use message_bus::PublishResult;pub use metrics::AgentMetrics;pub use metrics::MetricsSnapshot;pub use ports::AccessGate as AccessGatePort;pub use ports::EventBus as EventBusPort;pub use ports::MemoryEntry as MemoryEntryPort;pub use ports::AccessDecision;pub use ports::AuthMethod;pub use ports::AuthProvider;pub use ports::CapabilityResolver;pub use ports::ConfigStore;pub use ports::CronJob;pub use ports::CronScheduler;pub use ports::EventPayload;pub use ports::EventTopic;pub use ports::InMemoryEventBus;pub use ports::MemoryStore;pub use ports::NoopAuthProvider;pub use ports::NoopConfigStore;pub use ports::NoopCronScheduler;pub use ports::NoopEventBus;pub use ports::NoopMemoryStore;pub use ports::NoopPersonaProvider;pub use ports::NoopResourceMonitor;pub use ports::NoopSkillLoader;pub use ports::NoopStateStore;pub use ports::OAuthToken;pub use ports::Persona;pub use ports::PersonaProvider;pub use ports::PortId;pub use ports::PortRegistry;pub use ports::PortValue;pub use ports::ResourceMonitor;pub use ports::ResourceUsage;pub use ports::Skill;pub use ports::SkillLoader;pub use ports::SkillMeta;pub use ports::StateStore;pub use ports::SubscriptionHandle;pub use ports::ToolCallRequest;pub use ports::hooks::HookContext;pub use ports::hooks::HookEvent;pub use ports::hooks::HookOutcome;pub use ports::hooks::HookRunner;pub use ports::hooks::HookSpec;pub use ports::hooks::NoopHookRunner;pub use ports::catalog::CatalogEvent;pub use ports::catalog::CatalogModelEntry;pub use ports::catalog::CatalogProtocol;pub use ports::catalog::CatalogProviderEntry;pub use ports::catalog::CatalogSource;pub use ports::catalog::ModelCatalog;pub use ports::catalog::NoopModelCatalog;pub use ports::catalog::RefreshOutcome;pub use event_bus::EventBus;pub use error::SdkError;pub use error::SdkResult;pub use lifecycle::AgentHandle;pub use lifecycle::AgentLifecycleEvent;pub use lifecycle::AgentPool;pub use lifecycle::AgentSnapshot;pub use lifecycle::AgentStatus;pub use lifecycle::AgentSupervisor;pub use lifecycle::FileSnapshotStore;pub use lifecycle::HubKind;pub use lifecycle::HubStatus;pub use lifecycle::RestartBackoff;pub use lifecycle::SnapshotStore;pub use lifecycle::SupervisorPolicy;pub use lifecycle::ToolManifest;pub use middleware::Middleware;pub use middleware::MiddlewareContext;pub use middleware::MiddlewareData;pub use middleware::MiddlewarePhase;pub use middleware::MiddlewarePipeline;pub use middleware::MiddlewareResult;pub use middleware::build_hooks;pub use observability::AuditAction;pub use observability::AuditEntry;pub use observability::AuditError;pub use observability::AuditFilter;pub use observability::AuditLog;pub use observability::AuditPersistence;pub use observability::AuditTrail;pub use observability::CostBreakdown;pub use observability::CostSnapshot;pub use observability::CostTracker;pub use observability::CostTrackerConfig;pub use observability::EventQuery;pub use observability::EventStore;pub use observability::EventStoreConfig;pub use observability::GlobalCostSnapshot;pub use observability::HashDigest;pub use observability::Span;pub use observability::SpanContext;pub use observability::SpanGuard;pub use observability::SpanId;pub use observability::SpanKind;pub use observability::SpanStatus;pub use observability::StoredEvent;pub use observability::TokenUsage;pub use observability::TraceId;pub use observability::Tracer;pub use observability::TrailEntry;pub use security::AccessDenied;pub use security::AccessGate;pub use security::Action;pub use security::AgentContext;pub use security::AgentPermissions;pub use security::AllowlistMode;pub use security::ApprovalStatus;pub use security::AuditEvent;pub use security::AuditSink;pub use security::Authorizer;pub use security::Capability;pub use security::CapabilitySet;pub use security::CapabilitySubject;pub use security::CheckRequest;pub use security::DefaultPolicy;pub use security::DenyLayer;pub use security::ExecPolicy;pub use security::PathMode;pub use security::PendingApproval;pub use security::PermAuditEntry;pub use security::PermissionUpdate;pub use security::RbacAuditEntry;pub use security::RbacManager;pub use security::RbacPolicy;pub use security::Role;pub use security::SecurityMiddleware;pub use security::StringPattern;pub use security::Subject;pub use security::TracingAuditSink;pub use security::TrailAuditSink;pub use coordination::Consensus;pub use coordination::CoordinatedGroup;pub use coordination::CoordinatedGroupBuilder;pub use coordination::MemoryEntry;pub use coordination::MemoryEvent;pub use coordination::MemoryKey;pub use coordination::VoteResult;pub use coordination::WorkEvent;pub use coordination::WorkItem;pub use coordination::WorkQueue;pub use coordination::WorkQueueConfig;pub use coordination::WorkQueueStats;pub use coordination::WorkResult;pub use coordination::WorkStatus;pub use routing::RoutingControl;pub use crate::port_memory_backend::PortMemoryBackend;
Modules§
- agent_
builder - AgentBuilder — Fluent API for creating agents
- agent_
definition - Agent definition file parsing and validation.
- agent_
group - Agent group — multi-agent orchestration primitives.
- bridge
- Bridge layer: convert catalog port entries into
oxicode_aitypes. - builder
- OxicodeBuilder and Oxicode — SDK entry point
- closure_
tool - ClosureTool — ergonomic custom tool from a closure
- coordination
- Inter-agent coordination primitives.
- delegation
- Library-native sub-agent delegation (issue #28 gap 3).
- error
- oxicode-sdk error types
- event_
bus - Generic event bus for pub/sub communication.
- kernel_
bridge - Kernel tool bridge — allows oxios kernel tools to be plugged into the SDK.
- lifecycle
- Lifecycle module — agent lifecycle management.
- message_
bus - Inter-agent message bus for multi-agent communication.
- metrics
- Agent execution metrics.
- middleware
- Middleware module — Hook chain management
- observability
- Observability layer — tracing, audit, cost tracking, and event sourcing.
- port_
memory_ backend - SDK-provided
MemoryBackendadapter bridging the SDK’sMemoryStore+ optionalEmbeddingProviderports into the agent’smemory_*tools. - ports
- Port traits for product-specific adapters.
- prelude
- Convenience re-exports:
oxicode_sdk::fs::*,oxicode_sdk::inmem::*. Commonly used types - router
- Unstable (feature: router) — may change or be removedModel auto-routing for oxicode.
- routing
- Runtime routing control — dynamic model routing and fallback management.
- security
- Capability-based security module.
- snapcompact_
compactor SnapcompactCompactor—oxicode-ai::Compactorimplementation backed by the snapcompact PNG renderer inoxicode-snapcompact.- tool_
factory - Tool factories for common tool sets
- url_
resolver - Adapter bridging the SDK’s
InternalUrlRouterport to oxicode-agent’sUrlResolvercapability. - workflow_
dsl - Declarative workflow DSL — YAML definitions that map to existing coordination APIs.
- workflow_
engine - Workflow execution engine.
Structs§
- Advise
Tool - Unstable (feature: advisor) — may change or be removedThe `advise` agent tool.
- Advisor
Emission Guard - Unstable (feature: advisor) — may change or be removedDecides whether an advisor `advise()` call should reach the primary agent. omp `AdvisorEmissionGuard`.
- Advisor
Note - Unstable (feature: advisor) — may change or be removedOne queued advice note. omp `AdvisorNote`.
- Advisor
Runtime - Unstable (feature: advisor) — may change or be removedDrives the advisor agent. Construct via [`AdvisorRuntime::new`], wrap in `Arc`, then call [`AdvisorRuntime::install_self`] so it can self-spawn its drain task.
- Agent
- Stable since 0.63.0Agent runtime.
- Agent
Advisor - Unstable (feature: advisor) — may change or be removedAn [`AdvisorAgent`] backed by a concrete [`Agent`].
- Agent
Config - Stable since 0.63.0Agent runtime configuration
- Agent
Hooks - Stable since 0.63.0Callback hooks for the agent loop.
- Agent
Info - Unstable (feature: agent-hub) — may change or be removedAgent-pool source for Hub display + todo sub-agent matching. Read-only agent info for Hub display.
- Agent
Loop - Stable since 0.63.0AgentLoop.
- Agent
Loop Config - Stable since 0.63.0Configuration for an [`crate::AgentLoop`] instance.
- Agent
State - Stable since 0.63.0Agent execution state
- Agent
Tool Result - Stable since 0.63.0Result of tool execution
- Auth
Store - Stable since 0.63.0The on-disk auth file structure: a map from provider name to token bundle.
- Bash
Tool - Stable since 0.63.0`BashTool` (read/write/edit/grep/find/ls are already re-exported above and bundled by `coding_tools()`). BashTool.
- Builtin
Model Entry - Stable since 0.63.0A single built-in model entry.
- Builtin
Provider - Stable since 0.63.0Metadata for a built-in provider.
- Builtin
Provider Entry - Stable since 0.63.0A single built-in provider entry, deserialized from `data/catalog/providers.toml`.
- Compacted
Context - Stable since 0.63.0CompactedContext.
- Consent
Manager - Stable since 0.63.0In-memory + on-disk consent manager.
- Context
- Stable since 0.63.0Conversation context for LLM interactions.
- Cost
- Stable since 0.63.0Cost structure – prices per million tokens.
- Default
Circuit Breaker - Unstable (feature: circuit-breaker) — may change or be removedSDK reference implementation: threshold-based with half-open state machine.
- Delivery
Opts - Unstable (feature: advisor) — may change or be removedInputs to [`crate::advisor::channels::resolve_delivery_channel`]. omp `resolveAdvisorDeliveryChannel` opts.
- Direct
Tool Def - Stable since 0.63.0Definition for a tool to be registered as a direct `AgentTool` (Phase 3).
- Edit
Tool - Stable since 0.63.0EditTool.
- Find
Tool - Stable since 0.63.0FindTool.
- GetSearch
Results Tool - Stable since 0.63.0Tool for retrieving cached search results by ID.
- Grep
Tool - Stable since 0.63.0GrepTool.
- LsTool
- Stable since 0.63.0LsTool.
- McpCall
Result - Stable since 0.63.0Result of an MCP tool call.
- McpConfig
- Stable since 0.63.0Root MCP configuration.
- McpDashboard
Data - Stable since 0.63.0The full structured snapshot consumed by the TUI dashboard (Phase 2).
- McpDirect
Tool - Stable since 0.63.0An individual MCP tool registered as a first-class `AgentTool`.
- McpManager
- Stable since 0.63.0Central manager for all MCP server connections.
- McpSampling
Request - Stable since 0.63.0MCP sampling request — server asks oxicode to make an LLM call.
- McpServer
Info - Stable since 0.63.0One server's information for the TUI dashboard (Phase 2).
- McpSettings
- Stable since 0.63.0Global MCP settings.
- McpSettings
View - Stable since 0.63.0Settings summary for the dashboard header.
- McpTool
- Stable since 0.63.0The unified MCP gateway tool.
- McpTool
Def - Stable since 0.63.0Tool definition discovered from an MCP server.
- McpTool
Info - Stable since 0.63.0One tool's information for the TUI dashboard (Phase 2).
- Memory
Edit Tool - Unstable (feature: memory) — may change or be removedThe `memory_*` + `subagent` tool structs (register directly if desired). Tool that updates an existing memory item or deletes it when no new content is supplied.
- Memory
Item - Unstable (feature: memory) — may change or be removedMemory backend trait + item — implement to back the `memory_*` tools, or use [`PortMemoryBackend`] to bridge the SDK's `MemoryStore` port. A single memory item returned by [`MemoryBackend`].
- Memory
Recall Tool - Unstable (feature: memory) — may change or be removedThe `memory_*` + `subagent` tool structs (register directly if desired). Tool that searches the configured `MemoryBackend` for memories matching a query and returns the matches in a compact, model-friendly format.
- Memory
Reflect Tool - Unstable (feature: memory) — may change or be removedThe `memory_*` + `subagent` tool structs (register directly if desired). Tool that stores a session reflection/summary to the configured `MemoryBackend`.
- Memory
Retain Tool - Unstable (feature: memory) — may change or be removedThe `memory_*` + `subagent` tool structs (register directly if desired). Tool that persists a memory item (content, kind, importance) to the configured `MemoryBackend`.
- Metadata
Cache - Stable since 0.63.0In-memory + on-disk metadata cache.
- Model
- Stable since 0.63.0LLM model definition.
- Model
Registry - Stable since 0.63.0Lightweight model registry for SDK/engine usage.
- Noop
Spawn Validator - Unstable (feature: mcp-spawn-validator) — may change or be removedDefault no-op validator — preserves current behavior (no validation, no env scrubbing). Use this when no consumer-supplied policy is registered.
- Open
AiProvider - Stable since 0.63.0OpenAI-compatible provider
- Open
AiResponses Provider - Stable since 0.63.0OpenAI Responses API provider
- Override
File - Stable since 0.63.0User override container.
- Provider
Options - Stable since 0.63.0Per-provider options for fine-grained control.
- Provider
Registry - Stable since 0.63.0Runtime registry for providers (custom + built-in resolution).
- Read
Tool - Stable since 0.63.0ReadTool.
- Resolved
Content - Stable since 0.63.0URL resolver trait + resolved content — implement for internal-URL dispatch. Content resolved from an internal protocol URL (e.g. `skill://`, `issue://`).
- Role
Registry - Unstable (feature: role-routing) — may change or be removedRole registry: maps role names to configured model patterns, with `pi/
` alias expansion and cycle detection. - Role
Routing Provider - Unstable (feature: role-routing) — may change or be removedA [`Provider`] wrapper that routes each request to the model selected by the role-switching layer.
- Role
Signals - Unstable (feature: role-switching) — may change or be removedObservable signals for a turn, used to decide the active role.
- Search
Cache - Stable since 0.63.0In-memory cache for search results, keyed by search ID.
- Server
Entry - Stable since 0.63.0MCP server configuration entry.
- Shared
State - Stable since 0.63.0Thread-safe agent state wrapper.
- Stdio
Transport - Unstable (feature: mcp-transport) — may change or be removedStdio transport for a spawned MCP server process.
- Stream
Options - Stable since 0.63.0Options for streaming requests
- Streamable
Http Transport - Unstable (feature: mcp-transport) — may change or be removedStreamable HTTP transport.
- Structured
Output - Stable since 0.63.0Structured output extractor.
- Subagent
Tool - Unstable (feature: memory) — may change or be removedThe `memory_*` + `subagent` tool structs (register directly if desired). Subagent tool for delegating tasks to specialized agents.
- Todo
Item - Stable since 0.63.0A single task within a phase.
- Todo
Phase - Stable since 0.63.0A named group of related tasks within a todo list.
- Todo
Tool - Stable since 0.63.0`todo` agent tool. 상태 비저장 (상태는 `TodoStateProvider`가 보유).
- Todo
Update Result - Stable since 0.63.0Result of applying a batch of todo ops.
- Token
Bundle - Stable since 0.63.0An OAuth token bundle as stored on disk.
- Tool
- Stable since 0.63.0Tool definition with JSON Schema parameters
- Tool
Call - Stable since 0.63.0Tool call content block emitted by the model.
- Tool
Context - Stable since 0.63.0Context passed to tools at execution time.
- Tool
Metadata - Stable since 0.63.0Cached tool metadata with server association and naming.
- Tool
Registry - Stable since 0.63.0Tool registry for managing available tools
- Tool
Result - Stable since 0.63.0Tool result returned by agent tool execution.
- User
Message - Stable since 0.63.0User message sent to the model.
- WebSearch
Tool - Stable since 0.63.0Multi-engine web search tool using oxibrowser's search module.
- Write
Tool - Stable since 0.63.0WriteTool.
Enums§
- Advisor
Delivery Channel - Unstable (feature: advisor) — may change or be removedHow an advisor note reaches the primary agent. omp `AdvisorDeliveryChannel`.
- Advisor
Severity - Unstable (feature: advisor) — may change or be removedAdvisor note severity. omp `AdvisorSeverity`. Omitting it (in the tool schema) is treated as a plain `nit`.
- Agent
Error - Stable since 0.63.0Agent-specific errors
- Agent
Event - Stable since 0.63.0Events emitted during agent execution.
- Agent
HubStatus - Unstable (feature: agent-hub) — may change or be removedAgent-pool source for Hub display + todo sub-agent matching. Hub display status.
- Agent
Kind - Unstable (feature: agent-hub) — may change or be removedAgent-pool source for Hub display + todo sub-agent matching. Agent kind for Hub display.
- Api
- Stable since 0.63.0Provider API identifier.
- Breaker
Error - Unstable (feature: circuit-breaker) — may change or be removedError returned when the circuit is open.
- Breaker
State - Unstable (feature: circuit-breaker) — may change or be removedObservable breaker state. Returned by [`DefaultCircuitBreaker::state`].
- Browse
Progress - Stable since 0.63.0Structured progress event for browser tool execution.
- Compaction
Event - Stable since 0.63.0CompactionEvent.
- Compaction
Strategy - Stable since 0.63.0Compaction strategy determining when to compact
- Consent
State - Stable since 0.63.0MCP consent state.
- Content
Block - Stable since 0.63.0Content block union (untagged for flexibility).
- Direct
Tools Config - Stable since 0.63.0Configuration for direct tool registration (Phase 3).
- Input
Modality - Stable since 0.63.0Input modalities
- Lifecycle
Mode - Stable since 0.63.0Server lifecycle modes.
- LspAction
- Unstable (feature: lsp) — may change or be removedLSP capability — implement to back the `lsp` tool. LSP action enum — the operations the `lsp` tool supports.
- McpConnection
Status - Stable since 0.63.0Connection status of an MCP server (Phase 2).
- McpContent
- Stable since 0.63.0Content types returned by MCP tool calls.
- Message
- Stable since 0.63.0Message union tagged by role.
- Message
Content - Stable since 0.63.0Message content – either a plain text string or a list of structured blocks.
- Mode
- Stable since 0.63.0Agent autonomy mode.
- Model
Role - Unstable (feature: role-routing) — may change or be removedThe 10 built-in model roles, ported verbatim from omp's `ModelRole`.
- OAuth
Error - Stable since 0.63.0Errors produced by the OAuth subsystem.
- Output
Mode - Stable since 0.63.0Output mode for agent responses.
- Provider
Error - Stable since 0.63.0Provider-specific errors. `#[non_exhaustive]` — consumers MUST add a catch-all `_ =>` arm in their `match` expressions. Existing named variants are frozen; their meaning does not change between releases (see `docs/release-process.md`).
- Provider
Event - Stable since 0.63.0Streaming events emitted by providers
- Stream
Delta - Stable since 0.63.0Typed incremental delta for [`AgentEvent::MessageUpdate`].
- Structured
Output Error - Stable since 0.63.0Errors during structured output extraction.
- Thinking
Level - Stable since 0.63.0Model thinking/reasoning level
- TodoOp
- Stable since 0.63.0Operations that can be applied to a todo list.
- Todo
Status - Stable since 0.63.0Status of a single todo task.
- Tool
Call Context - Stable since 0.63.0Semantic context for a tool execution event.
- Tool
Call Type - Stable since 0.63.0ToolCallType.
- Tool
Execution Mode - Stable since 0.63.0How tool calls are executed within a single assistant turn.
- Tool
Prefix - Stable since 0.63.0Tool name prefix strategy.
- Tool
Validation Error - Stable since 0.63.0Validation error
- Visit
Reason - Stable since 0.63.0Reason for visiting a page.
Constants§
- ADVISOR_
GUIDANCE - Unstable (feature: advisor) — may change or be removedomp `ADVISOR_GUIDANCE` — behavioral framing carried as a tag attribute on every rendered `
` block. The primary agent's system prompt never mentions advisories, so this is its only cue for how to treat them. - ADVISOR_
READONLY_ TOOL_ NAMES - Unstable (feature: advisor) — may change or be removedTool names handed to the advisor agent — side-effect-free investigation only. omp `ADVISOR_READONLY_TOOL_NAMES` is `read`/`grep`/`glob`; oxicode's glob equivalent is `find`.
- ADVISOR_
SYSTEM_ PROMPT - Unstable (feature: advisor) — may change or be removedThe advisor agent's system prompt (omp `prompts/advisor/system.md`). The host assembles the full advisor system prompt from this + optional context-files/watchdog blocks.
Traits§
- Advisor
Agent - Unstable (feature: advisor) — may change or be removedMinimal slice of an agent the runtime drives. omp `AdvisorAgent`. Satisfied by `oxicode_agent::Agent` via a host adapter; tests hand-roll a fake.
- Advisor
Runtime Host - Unstable (feature: advisor) — may change or be removedHost callbacks the runtime needs. omp `AdvisorRuntimeHost`.
- Agent
Pool Provider - Unstable (feature: agent-hub) — may change or be removedAgent-pool source for Hub display + todo sub-agent matching. Agent pool access capability. Implemented by the composition root to expose live sub-agent info to the Hub overlay and todo matching.
- Agent
Tool - Stable since 0.63.0Core trait for all agent tools
- Circuit
Breaker - Unstable (feature: circuit-breaker) — may change or be removedBehavior contract for circuit-breaking resilience.
- LspProvider
- Unstable (feature: lsp) — may change or be removedLSP capability — implement to back the `lsp` tool. LSP access capability. Implemented by an `oxicode-lsp` crate (feature-gated) or stubbed with `None` when LSP is disabled.
- McpTransport
- Unstable (feature: mcp-transport) — may change or be removedMCP transport layer.
- Memory
Backend - Unstable (feature: memory) — may change or be removedMemory backend trait + item — implement to back the `memory_*` tools, or use [`PortMemoryBackend`] to bridge the SDK's `MemoryStore` port. Memory backend for the `memory_*` tools. The composition root implements this, bridging to `oxicode_sdk::ports::MemoryStore` + `EmbeddingProvider`.
- Provider
- Stable since 0.63.0LLM provider trait
- Provider
Resolver - Stable since 0.63.0Trait for resolving providers and models within an Agent.
- Spawn
Validator - Unstable (feature: mcp-spawn-validator) — may change or be removedValidates MCP server spawn commands and environment.
- Subagent
Runner - Unstable (feature: subagent) — may change or be removedIn-process subagent runner trait (see [`crate::delegation::SdkSubagentRunner`]). In-process sub-agent runner — the library-native delegation backend.
- Todo
State Provider - Stable since 0.63.0Todo state access capability. Implemented by the composition root (oxicode-cli) bridging to the session-scoped todo state. Used by the `todo` agent tool and the TUI sticky panel.
- UrlResolver
- Stable since 0.63.0URL resolver trait + resolved content — implement for internal-URL dispatch. URL resolver for internal protocol schemes. The composition root implements this, bridging to `oxicode_sdk::ports::InternalUrlRouter`.
Functions§
- apply_
model_ overrides - Stable since 0.63.0Apply user overrides to a model map in-place.
- apply_
provider_ overrides - Stable since 0.63.0Apply user overrides to a provider list in-place.
- builtin_
model_ count - Stable since 0.63.0Always returns 0 — models are loaded from the materialize pipeline. Retained for SDK backwards compatibility.
- builtin_
providers_ count - Stable since 0.63.0Number of built-in providers.
- create_
builtin_ provider - Stable since 0.63.0Create a built-in provider by name.
- create_
builtin_ provider_ with_ options - Stable since 0.63.0Create a built-in provider with optional credential and base URL overrides.
- custom_
provider_ names - Stable since 0.63.0Return the set of currently registered custom provider names (global registry).
- decide_
role - Unstable (feature: role-switching) — may change or be removedDecide the active role from signals, in priority order.
- default_
auth_ path - Stable since 0.63.0Returns the default path for the auth store.
- discover_
all - Stable since 0.63.0Discover all Layer 3 sources: local servers + authenticated cloud.
- discover_
all_ authenticated - Stable since 0.63.0Discover models from authenticated cloud providers whose API key is in the environment.
- discover_
all_ local - Stable since 0.63.0Discover models from all known local-runtime providers in parallel.
- discover_
models - Stable since 0.63.0Discover models from a single OpenAI-compatible endpoint.
- dynamic_
models - Stable since 0.63.0Get all dynamically registered models.
- fetch_
models_ async - Stable since 0.63.0Fetch the model list from an OpenAI-compatible `/v1/models` endpoint asynchronously.
- fetch_
models_ blocking - Stable since 0.63.0Fetch the model list from an OpenAI-compatible `/v1/models` endpoint using the shared `reqwest::blocking` client.
- find_
env_ keys - Stable since 0.63.0Get environment variables that can provide an API key for a provider
- find_
override_ files - Stable since 0.63.0Find all override files in priority order (lowest to highest).
- format_
advisory_ batch - Unstable (feature: advisor) — may change or be removedRender a batch of advisor notes as the agent-facing message body: one `
` element per note, `severity` as an attribute (omitted for a plain nit), `guidance` always present. omp `formatAdvisorBatchContent`. - get_
all_ env_ keys - Stable since 0.63.0Get all providers with environment variable credentials
- get_
all_ provider_ aliases - Stable since 0.63.0Get all provider names including aliases.
- get_
all_ provider_ names - Stable since 0.63.0Get all provider names (primary names only).
- get_
api_ mappings - Stable since 0.63.0Get all API-to-provider mappings.
- get_
builtin_ provider - Stable since 0.63.0Look up a built-in provider by name or alias.
- get_
builtin_ providers - Stable since 0.63.0Get all built-in providers, built lazily from the catalog TOML.
- get_
env_ api_ key - Stable since 0.63.0Get API key from environment variables for a provider
- get_
model - Stable since 0.63.0Convenience function to get a model (static registry only – use [`lookup_model`] for dynamic too)
- get_
models - Stable since 0.63.0Get all models from a provider
- get_
provider - Stable since 0.63.0Get a provider by name
- get_
provider_ api - Stable since 0.63.0Get the API type for a provider by name or alias.
- get_
provider_ arc - Stable since 0.63.0Get a provider by name, returning Arc (for router delegation).
- get_
provider_ base_ url - Stable since 0.63.0Get the default base URL for a provider.
- get_
provider_ env_ key - Stable since 0.63.0Get the environment variable name for a provider.
- get_
provider_ env_ keys - Stable since 0.63.0Get all environment variable names for a provider (primary + extras).
- has_
env_ key - Stable since 0.63.0Check if any environment variable is set for a provider
- is_
builtin_ provider - Stable since 0.63.0Check if a provider name or alias is a known built-in.
- is_
immune_ turn_ active - Unstable (feature: advisor) — may change or be removedHalf-open turn-count fence `[start, start + turns)` for the post-interrupt cooldown. omp `isAdvisorInterruptImmuneTurnActive`.
- is_
interrupting_ severity - Unstable (feature: advisor) — may change or be removedWhether advice at this severity should interrupt the running agent (delivered via the steering channel) rather than ride the non-interrupting aside queue. `concern` and `blocker` interrupt; a plain `nit` queues. omp `isInterruptingSeverity`.
- live_
role_ registry - Unstable (feature: role-routing) — may change or be removedAccess the live role registry, if installed.
- load_
auth_ store - Stable since 0.63.0Load the auth store from disk.
- load_
builtin_ providers - Stable since 0.63.0Load all built-in providers from the materialized models.dev snapshot.
- load_
overrides - Stable since 0.63.0Apply a list of override files to a catalog snapshot.
- load_
token - Stable since 0.63.0Convenience: load a token for a provider key (e.g. "anthropic").
- lookup_
model - Stable since 0.63.0Look up a model by provider and model ID, checking both dynamic and static registries.
- normalize_
advisor_ note - Unstable (feature: advisor) — may change or be removedCase-insensitive, punctuation-folded normalization. Lowercases, applies NFKC, collapses every run of non-letter / non-digit characters into a single space, and trims — so `"Stop."`, `"*Stop*"`, and `" stop "` all key to `stop`, while `"No issue; continue."` keys to `no issue continue`. omp `normalizeAdvisorNote`.
- register_
model - Stable since 0.63.0Register a model at runtime.
- register_
provider - Stable since 0.63.0Register a custom provider at runtime (global registry).
- remove_
token - Stable since 0.63.0Remove a stored token.
- resolve_
delivery_ channel - Unstable (feature: advisor) — may change or be removedDecide how one advisor note reaches the primary agent. omp `resolveAdvisorDeliveryChannel`.
- resolve_
provider_ name - Stable since 0.63.0Resolve a provider name/alias to its canonical name.
- resolve_
role_ to_ model - Unstable (feature: role-switching) — may change or be removedResolve a role to a concrete [`Model`] via the registry + model registry.
- role_
for_ tool - Unstable (feature: role-switching) — may change or be removedMap a tool name to the role it should run under, if it declares one.
- save_
auth_ store - Stable since 0.63.0Persist the auth store to disk with mode 0o600 where possible.
- save_
token - Stable since 0.63.0Convenience: save a token for a provider key.
- set_
live_ role_ registry - Unstable (feature: role-routing) — may change or be removedInstall the live role registry. Called once at bootstrap; subsequent calls are no-ops (the first installation wins).
- unregister_
provider - Stable since 0.63.0Unregister a previously registered custom provider (global registry).
- validate_
args - Stable since 0.63.0Validate tool arguments against a JSON Schema
Type Aliases§
- Browse
Progress Callback - Stable since 0.63.0Callback type for structured browse progress events.
- Compaction
Hook - Stable since 0.63.0Async hook invoked after context compaction completes.
- Enqueue
Advice Fn - Unstable (feature: advisor) — may change or be removedHost callback invoked for each *dedupe-passing* note. The host's [`crate::advisor::emission_guard::AdvisorEmissionGuard`] (not this tool) is the final accept/reject authority; this callback only fires when this tool's own severity-rank gate admits the note.
- Progress
Callback - Stable since 0.63.0Callback type for progress updates
- Shared
Breaker - Unstable (feature: circuit-breaker) — may change or be removedShared ownership helper for `AgentLoopConfig.circuit_breaker`.
- Tool
Error - Stable since 0.63.0Result type for tool execution