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.
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
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 managerServer Management
Start Server
- Basic
- Background
- Debug
- Custom
Start in foreground:
Check Status
Stop Server
Usage Examples
Python (OpenAI Client)
JavaScript/Node.js
cURL
- Non-Streaming
- Streaming
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
Server Won't Start
Server Won't Start
Check if port is in use:Try different port:
- Mac/Linux
- Windows
Connection Refused
Connection Refused
Verify server is running:Check health endpoint:Check
components.llm when the top-level status is degraded.Agent Errors
Agent Errors
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
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