Skip to main content
Source Code: src/gaia/api/
The GAIA API Server exposes GAIA agents as “models” through an OpenAI-compatible REST API, enabling integration with VSCode extensions and other OpenAI-compatible clients.
Technical Specifications: API Server Specification

Quick Start

The server exposes one model, gaia — the flagship agent. Capability that used to mean picking a different agent is now a skill it loads on demand. Register more in AGENT_MODELS (src/gaia/api/agent_registry.py); see Adding New Agents.
1

Start GAIA API Server

This brings up Lemonade Server through the daemon, at the context size your device profile pins — nothing to start beforehand.
2

Test the Server

The health response includes API, Lemonade LLM, and RAG component status. A running API returns HTTP 200 with top-level status degraded when Lemonade is unavailable or has no LLM loaded.

Prerequisites

GAIA Installation

Install GAIA with API support:
Installs FastAPI and Uvicorn required for the API server.

Lemonade Server

Must be installed — the API server starts it through the daemon and sizes the context from your device profile:
Required Models: Download Gemma-4-E4B-it-GGUF via Lemonade’s model manager

Server Management

Start Server

Start in foreground:

Check Status

Stop Server


Usage Examples

Python (OpenAI Client)


JavaScript/Node.js


cURL


Available Models

Register additional agents in AGENT_MODELS (src/gaia/api/agent_registry.py) to expose them as selectable models. How to add one: API Server Specification → Adding New Agents

Troubleshooting

Check if port is in use:
Try different port:
Verify server is running:
Check health endpoint:
Check components.llm when the top-level status is degraded.
Check Lemonade is running:
Start it if it isn’t:
Enable debug mode:

Common Issues

More help: FAQ

VSCode Integration

VSCode Extension

Use a registered GAIA agent directly in Visual Studio Code with the Language Model Provider extension
Quick Setup:
1

Start the API Server

It brings up Lemonade Server through the daemon, so this is the only command you need:
2

Install Extension

Build and install the GAIA VSCode extension→ VSCode Integration Guide
3

Select Model

Select GAIA models from VSCode’s model picker

Technical Documentation

API Specification

Complete API reference with request/response formats

Development Guide

Development and contribution guidelines