AI Agents
The apps/graphs service is a Python LangGraph microservice for AI agent orchestration.
Architecture
NestJS API ──HTTP──▶ Python LangGraph Service
│
┌─────▼──────┐
│ StateGraph │
│ ┌──────┐ │
│ │search│ │
│ └──┬───┘ │
│ ┌──▼───┐ │
│ │ LLM │ │
│ └──────┘ │
└────────────┘
Setup
cd apps/graphs
pip install -r requirements.txt
Environment Variables
OPENAI_API_KEY=
TAVILY_API_KEY=
Running
pnpm graphs:dev
Key Files
apps/graphs/scraper_graph.py— Example graph (web search + LLM analysis)apps/graphs/langgraph.json— LangGraph config
Adding a New Graph
- Create a new Python file in
apps/graphs/ - Define a
StateGraphwith typed state (TypedDict) - Add nodes and edges
- Compile and expose via FastAPI or LangGraph server