4.8 KiB
🔥 Troubleshooting Guide
Common issues and solutions for the Antigravity Brain system.
🚨 API Errors
Error: 429 RESOURCE_EXHAUSTED (Quota Exceeded)
Symptoms:
- Agents stuck in retry loop
- "You exceeded your current quota" in logs
Causes:
- API rate limit hit (especially with Gemini 2.0-flash-exp: only 10 RPM!)
- Memory tools calling API too fast
Solutions:
-
Switch to higher-quota model:
LLM_MODEL_FAST=gemini-2.5-flash-lite-preview-06-17 # 4000 RPM -
Wait for quota reset (typically 1 minute)
-
Check current quota:
Error: OPENAI_API_KEY must be set
Symptoms:
- Memory tools fail with "api_key client option must be set"
Cause:
- Mem0's LLM configuration missing
Solution:
- Ensure
src/config.pyhas LLM config inget_mem0_config() - Check that
LLM_PROVIDERin.envmatches a supported provider
Error: Template variable 'X' not found
Symptoms:
- Agent crashes when loading knowledge
Cause:
{variable}syntax in markdown files interpreted as CrewAI template
Solution:
- Escape braces in code examples: use
PATH_VARinstead of{path} - Check
src/knowledge/standards/*.mdfor unescaped{}
🐳 Docker Issues
Container keeps restarting
Check logs:
docker logs antigravity_brain --tail 100
Common causes:
- Missing
.envfile - Invalid API key
- Python import errors
Qdrant connection refused
Symptoms:
- "Connection refused" to port 6333
Solutions:
-
Check Qdrant is running:
docker ps | findstr qdrant -
Check host configuration:
QDRANT_HOST=qdrant # Docker service name, NOT localhost -
Restart Qdrant:
docker-compose restart qdrant
Changes not reflected
Problem: Code changes don't appear after saving
Solution:
docker-compose restart app
Or for full rebuild:
docker-compose build --no-cache app
docker-compose up -d
🤖 Agent Issues
Agent not found
Error: No persona found matching 'agent-name'
Solutions:
-
Check filename matches:
src/agents/personas/persona-<exact-name>.md -
Use correct search pattern:
# This searches for *agent-name* in filename AgentFactory.create_agent("agent-name")
Agent loads but doesn't respond
Possible causes:
- LLM API error - Check logs for 429/401
- Empty backstory - Ensure persona has content
- Tool errors - Check if tools are raising exceptions
Debug:
docker logs antigravity_brain 2>&1 | findstr "Error ERROR Exception"
Agent using wrong model
Check: Ensure model_tier is set correctly:
agent = AgentFactory.create_agent("name", model_tier="smart") # Uses LLM_MODEL_SMART
agent = AgentFactory.create_agent("name", model_tier="fast") # Uses LLM_MODEL_FAST
🧠 Memory Issues
Memory not saving
Check Qdrant dashboard:
http://localhost:6333/dashboard
Verify collection exists: Should see itguys_antigravity_v1 (or your MEMORY_PROJECT_ID)
Memory search returns nothing
Possible causes:
- Embedding mismatch - Don't change
MEMORY_EMBEDDING_PROVIDERafter data exists - Wrong project ID - Check
MEMORY_PROJECT_IDmatches - Qdrant empty - No memories saved yet
🌐 Web UI Issues
Chainlit not loading
Check port:
netstat -an | findstr 8000
Check container:
docker logs antigravity_brain | findstr -i "error"
"Could not reach server" toast
Cause: Usually LLM API timeout or error
Solution: Check API key and quota
📋 Quick Diagnostic Commands
# Check all containers
docker ps
# View real-time logs
docker logs antigravity_brain -f
# Check for errors only
docker logs antigravity_brain 2>&1 | findstr "ERROR Error error Exception"
# Restart everything
docker-compose down && docker-compose up -d
# Full rebuild
docker-compose build --no-cache && docker-compose up -d
# Check Qdrant health
curl http://localhost:6333/health
# Test Gemini API
curl -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite-preview-06-17:generateContent?key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"Hello"}]}]}'
🆘 Getting Help
- Check logs first - 90% of issues are in Docker logs
- Verify .env - Most config issues are environment variables
- Test API separately - Ensure your API key works outside the app
- Check quotas - Rate limits are the #1 cause of failures