Key Features
Full-Stack Generation
Prisma Data Modeling
Validated APIs
Type-Safe UI
Iterative Fixes
CLI Control
Quick Start
Prerequisite: Install Node.js v20.19.x- Download from nodejs.org (Windows Installer for v20.19.x LTS)
- Verify installation:
node --version(should show v20.19.x) - Node.js is required to build and run the web application that the GAIA Code Agent generates.
Clone the repository
Install development dependencies
Start Lemonade server (local LLM)
Generate an app
Run the generated app
Basic Examples
- Workout Tracker
- Restaurant Reviews
- AI Tool Leaderboard
- Simple Todos
- Interactive Mode
Next.js Full-Stack App Generation
The Code Agent outputs a complete Next.js project with Prisma, Zod, and Tailwind baked in.- Next.js with the App Router
- TypeScript + strict typing
- Prisma ORM with SQLite
- REST API routes validated with Zod
- Tailwind CSS styling for layouts, forms, and states
Debug and Trace Options
Debug Logging
JSON Trace
Full Debug
JSON Output Structure
The--trace flag saves a complete trace with detailed information:
API & VSCode Integration
gaia-code model, providing an OpenAI-compatible REST API for IDEs and automation.Quick Start
Start Lemonade server
Install API dependencies
Start GAIA API server
Call the model
- Linux/macOS
- PowerShell
API Highlights
- OpenAI Compatible: Works with OpenAI clients and compatible tooling
- Streaming Support: Real-time updates while generating
- Multi-Turn: Maintain context across requests
VSCode Integration Guide
API Server Documentation
Workflow Capabilities
Analyze Requirements
Generate Prisma Schema
Build API Routes
Create React Pages
Apply Styling
Validate & Build
Auto-Fix Loop
Available Tools
Project Bootstrap & Processes
Project Bootstrap & Processes
run_cli_command- Execute npm/yarn commands and capture outputcleanup_all_processes/stop_process/list_processes- Manage background runs
Data Modeling & APIs
Data Modeling & APIs
manage_data_model- Create or update Prisma modelsmanage_api_endpoint- Generate REST routes with Zod validationvalidate_crud_structure- Ensure CRUD files exist for each resource
UI & Styling
UI & Styling
manage_react_component- Generate list, form, detail React pagessetup_app_styling- Apply Tailwind design system and globalsupdate_landing_page- Wire navigation and landing content
Validation & Quality
Validation & Quality
validate_typescript- Run TypeScript compiler checkstest_crud_api- Smoke-test CRUD endpointsvalidate_styles- Check CSS and design consistency
Debugging & Error Fixes
Debugging & Error Fixes
fix_code- LLM-driven targeted file fix for validation/build errors (used in remediation checklists)
Tooling Setup
Tooling Setup
setup_prisma- Initialize Prisma and database configsetup_nextjs_testing- Configure Vitest where needed
External Information Lookup
The agent can optionally use web search (Perplexity) whenPERPLEXITY_API_KEY is set in .env to unblock documentation or best-practice questions.
Troubleshooting
LLM server not running
LLM server not running
TypeScript or build errors keep returning
TypeScript or build errors keep returning
- Ensure dependencies are installed:
npm install - Regenerate Prisma client:
npx prisma generate - Push schema:
npx prisma db push - Re-run the agent with
--debug --traceto inspect fixes
Agent gets stuck on a simple bug
Agent gets stuck on a simple bug
- Occasionally the agent can loop on a minor issue; try rerunning the command
- If it persists, update the prompt to call out the failing component or file
Prisma client issues
Prisma client issues
- Check
prisma/schema.prismafor typos - Delete
node_modulesand reinstall - Verify
DATABASE_URL(if using a custom provider)
Port already in use
Port already in use
- Stop existing dev servers or run
npm run dev -- --port 3001
VS Code Debugging (Developers)
Use the existing launch configurations to step through the agent when it generates Next.js projects.Available Debug Configurations
Available Debug Configurations
- Code Agent Debug - Next.js App - Full project generation workflow
- Code Agent Debug - REST API - Focus on API route generation
- Code Agent Debug - Interactive - Step through with
--step-through - Code Agent Debug - With Breakpoint ⭐ - Stops before execution for setting breakpoints
hub/agents/python/code/gaia_agent_code/agent.py- Agent initialization and orchestrationhub/agents/python/code/gaia_agent_code/tools/typescript_tools.py- TypeScript/Next.js toolinghub/agents/python/code/gaia_agent_code/orchestration/checklist_executor.py- Full-stack checklist workflowsrc/gaia/agents/base/agent.py- Base agent loop
Best Practices
Be Specific
Run Setup Commands
cd <path> and run npm run dev (the agent installs dependencies for you)