API Reference

Complete reference documentation for all jaato classes, methods, and types.

Core Classes

JaatoClient

The main entry point for the framework. Handles connection to AI providers, tool configuration, message sending, and conversation history management.

IPCClient

The recommended Python entry path. Facade for talking to a running jaato daemon over IPC — IPCClient.session(...) yields a Session whose ask / complete / stream methods own the send-and-wait recipe. The module-level ask() is a one-shot helper.

IPCRecoveryClient

IPC client with automatic connection recovery. Wraps IPCClient with reconnection, session reattachment, and status callbacks for resilient client applications.

WSClient

The remote-daemon transport — IPCClient with the transport swapped from a Unix socket to a WebSocket (ws:// / wss://), bearer-authenticated. It subclasses IPCClient, so the same facade-client API and the Session methods apply; construct via jaato.session(mode="ws", url=…, token=…) or WSClient.session(…). For a self-signed / dev wss:// cert, pass ssl= (an ssl.SSLContext, or True/False) or ca= (a CA-bundle path) — scoped per connection, never os.environ. Needs the jaato-sdk[ws] extra (pip install 'jaato-sdk[ws]').

WSRecoveryClient

WebSocket client with automatic connection recovery — the WSClient counterpart to IPCRecoveryClient, offering identical reconnection, session reattachment, exponential backoff, and on_status_change callbacks over ws:// / wss:// (with the same ssl= / ca= TLS knobs as WSClient). Reach for it via jaato.session(mode="ws", recovery=True, …) or WSRecoveryClient.session(…). Needs the jaato-sdk[ws] extra.

InProcessClient

The embedded transport — runs the agent in your own process with no daemon, exposing the same Session facade (ask / complete / stream) as the daemon clients. Construct via jaato.session(mode="in_process", profile={…}). It is the in-process analog of an IPC session, replicating the daemon's session setup (tools, profiles, agent personas, plugin parity) locally.

PluginRegistry

Discovers and manages plugins. Controls which tools are exposed to the model and provides access to tool schemas and executors.

ToolExecutor

Executes tool calls with permission checking and auto-backgrounding support. Maps tool names to callable functions.

Type System

Provider-Agnostic Types

Abstract types that work across all AI providers. Includes Message, Part, ToolSchema, ProviderResponse, and more.

Built-in Plugins

Plugin Description
cli Execute shell commands
mcp Model Context Protocol server tools
file_edit File editing capabilities
permission Permission control for tool execution
todo Task/todo list management
web_search Web search functionality
session Session persistence
gc_truncate Context truncation GC strategy
gc_summarize Summarization GC strategy

Import Patterns

Public APIs are exported from the jaato module. Internal APIs (runtime, provider management) are in the shared module. Use the patterns shown on the right for clean imports.

Recommended imports
# Public API (from jaato package)
from jaato import (
    # Core client
    JaatoClient,

    # Plugin system
    PluginRegistry,

    # Type system
    Message,
    Part,
    Role,
    ToolSchema,
    ToolResult,
    FunctionCall,
    ProviderResponse,
    TokenUsage,
    FinishReason,
    Attachment,
    CancelToken,
    CancelledException,

    # Presentation
    PresentationContext,
    ClientType,
)

# Daemon facade (from jaato_sdk package) — the
# recommended Python entry path. Talks to a running
# jaato daemon over IPC.
from jaato_sdk import IPCClient, ask

# Internal API (from shared package)
from shared import (
    PermissionPlugin,
    ToolExecutor,
    TokenLedger,
    ModelProviderPlugin,
    ProviderConfig,
    load_provider,
    discover_providers,
)
Quick reference
# Minimal setup
from jaato import JaatoClient, PluginRegistry

client = JaatoClient()
client.connect()  # Reads JAATO_PROVIDER and MODEL_NAME from env

registry = PluginRegistry(model_name=client.model_name)
registry.discover()
registry.expose_tool("cli")

client.configure_tools(registry)

response = client.send_message(
    "Hello!",
    on_output=lambda s, t, m: print(t)
)