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.

IPCRecoveryClient

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

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,
)

# 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)
)