Skip to main content

API Reference

Complete reference documentation for all Go-AI SDK APIs, types, and interfaces.

Core AI Functions​

High-level functions for working with AI models:

Tool & Helper APIs​

Functions for working with tools and utilities:

Type Definitions​

Core types used throughout the SDK:

  • Messages - Message types and structures
  • Tools - Tool definition types
  • Usage - Token usage tracking types
  • Errors - Error types and handling

Provider Interfaces​

Interfaces for implementing custom providers:

Middleware​

Middleware system for modifying model behavior:

Schema & Registry​

Schema validation and provider registry:

Error Types​

Comprehensive error reference:

Integrations (experimental)​

Adapters and experimental runtimes added in v0.5.0:

  • Code Mode - Run model-written JavaScript that calls host tools, in a QuickJS-on-WebAssembly sandbox
  • Harness Sandbox: Vercel - Run harness sandboxes on Vercel Sandbox
  • LlamaIndex Adapter - Convert a LlamaIndex chat-engine stream to UI message stream chunks

See Also​