API Reference¶
This section documents the agentabi public API.
Core API¶
- Session — The primary interface for interacting with agent CLIs. Provides
run()andstream()methods. - Providers — The Provider protocol and registry system that connects Session to agent backends.
IR (Intermediate Representation)¶
- IR Events — All event types produced by
stream(), normalized across agents. - IR Types —
TaskConfig,SessionResult,AgentCapabilities, and supporting types.
Quick Import Reference¶
# Consumer API
from agentabi import Session, run_sync
# Discovery
from agentabi import detect_agents, get_agent_capabilities, get_default_agent
# Provider access
from agentabi import get_provider, AgentNotAvailable
# IR Types
from agentabi import (
TaskConfig,
SessionResult,
AgentCapabilities,
IREvent,
SessionStartEvent,
MessageDeltaEvent,
MessageEndEvent,
ToolUseEvent,
ToolResultEvent,
UsageEvent,
ErrorEvent,
)