FastAPI API + LangGraph PoC for learning
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| .python-version | ||
| AGENTS.md | ||
| chat_service.py | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
FastAPI API + LangGraph PoC for learning
Proof-of-concept RAG and agent orchestration using FastAPI, LangGraph, and OpenRouter.
Setup Instructions
1. Install Python
Ensure you have Python 3.11+ installed.
2. Install uv using Homebrew
uv is used for fast dependency and workspace management:
brew install uv
3. Install Dependencies
Initialize the virtual environment and sync dependencies:
uv sync
4. Configure Environment
Create a .env file in the root directory and specify your OPENROUTER_API_KEY:
OPENROUTER_API_KEY="your-openrouter-api-key-here"
5. Start the Server
Start the development server with:
fastapi dev
Alternatively, you can run:
uv run fastapi dev
Testing the API
Once the server is running, you can test the /chat endpoint using the following curl command:
curl -X POST localhost:8000/chat \
-H "Content-Type: application/json" \
-d '{"message":"When was Steve Jobs born?"}'