Sets up the full backend foundation for CouncilOS:
- CouncilState TypedDict with all required fields and LangGraph reducers
- Three agent nodes: master_agent (drafts), critic_agent (scores + routes),
writer_agent (final polish)
- LangGraph graph with cyclic rework loop: Master → Critic → (score < 8:
back to Master | score ≥ 8: Writer → END)
- Safety valve: MAX_ITERATIONS=5 prevents infinite loops
- FastAPI app with REST endpoints (POST /api/councils/run, GET /api/councils/run/{id})
and WebSocket endpoint (/ws/council/{run_id}) for real-time agent status events
- In-memory RunStore for Phase 1 (PostgreSQL-backed in Phase 3)
- pytest test suite: state, routing logic, critic parser, agent nodes, API endpoints
- .env.example, .gitignore, docker-compose.yml, Dockerfile
https://claude.ai/code/session_01RfMpt3TbMjZEtK3CAyP5iQ
45 lines
1.6 KiB
Text
45 lines
1.6 KiB
Text
# CouncilOS — Environment Variables Template
|
|
# Copy this file to .env and fill in your actual values.
|
|
# NEVER commit the .env file to version control.
|
|
|
|
# =============================================================================
|
|
# LLM API Keys
|
|
# =============================================================================
|
|
|
|
# Anthropic Claude API key (required)
|
|
ANTHROPIC_API_KEY=
|
|
|
|
# OpenAI GPT-4o API key (optional for Phase 1, required from Phase 3)
|
|
OPENAI_API_KEY=
|
|
|
|
# Tavily Search API key (required for Phase 4 web-search tool)
|
|
TAVILY_API_KEY=
|
|
|
|
# =============================================================================
|
|
# Database
|
|
# =============================================================================
|
|
|
|
# PostgreSQL connection string (required from Phase 2)
|
|
DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/councilOS
|
|
|
|
# =============================================================================
|
|
# Vector Database (ChromaDB)
|
|
# =============================================================================
|
|
|
|
# Local directory to persist ChromaDB embeddings (required for Phase 4 PDF tool)
|
|
CHROMA_PERSIST_DIR=./chroma_db
|
|
|
|
# =============================================================================
|
|
# Application Settings
|
|
# =============================================================================
|
|
|
|
# FastAPI server host and port
|
|
HOST=0.0.0.0
|
|
PORT=8000
|
|
|
|
# Log level: DEBUG | INFO | WARNING | ERROR
|
|
LOG_LEVEL=INFO
|
|
|
|
# CORS: comma-separated list of allowed frontend origins in production
|
|
# Example: https://my-app.vercel.app,https://www.my-domain.com
|
|
CORS_ORIGINS=http://localhost:3000
|