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
38 lines
577 B
Text
38 lines
577 B
Text
# Core AI orchestration
|
|
langgraph>=0.2.0
|
|
langchain>=0.2.0
|
|
langchain-anthropic>=0.1.0
|
|
langchain-openai>=0.1.0
|
|
|
|
# Backend API
|
|
fastapi>=0.111.0
|
|
uvicorn[standard]>=0.30.0
|
|
websockets>=12.0
|
|
python-multipart>=0.0.9
|
|
|
|
# Database
|
|
asyncpg>=0.29.0
|
|
sqlalchemy[asyncio]>=2.0.0
|
|
alembic>=1.13.0
|
|
|
|
# Vector DB (PDF tool)
|
|
chromadb>=0.5.0
|
|
pypdf>=4.0.0
|
|
|
|
# Search tool
|
|
tavily-python>=0.3.0
|
|
|
|
# Utilities
|
|
python-dotenv>=1.0.0
|
|
pydantic>=2.0.0
|
|
pydantic-settings>=2.0.0
|
|
|
|
# Linting and formatting
|
|
ruff>=0.4.0
|
|
black>=24.0.0
|
|
|
|
# Testing
|
|
pytest>=8.0.0
|
|
pytest-asyncio>=0.23.0
|
|
pytest-mock>=3.14.0
|
|
httpx>=0.27.0
|