FastAPI API + LangGraph PoC for learning
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-01 23:36:06 +02:00
.gitignore Add FastAPI 2026-07-01 15:11:28 +02:00
.python-version Add FastAPI 2026-07-01 15:11:28 +02:00
AGENTS.md Initial commit 2026-07-01 14:33:16 +02:00
chat_service.py Clean up and fix errors + decline path 2026-07-01 23:36:06 +02:00
main.py Clean up and fix errors + decline path 2026-07-01 23:36:06 +02:00
pyproject.toml Add langgraph and langchain and basic model call 2026-07-01 15:26:27 +02:00
README.md Add README and prepare for LangGraph StateGraph use 2026-07-01 15:48:01 +02:00
uv.lock Add langgraph and langchain and basic model call 2026-07-01 15:26:27 +02:00

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?"}'