Bootstrap that runs:
- LangGraph
- FastAPI WebSocket server
- React client (Next.js)
- Langfuse (web UI + ClickHouse + Postgres + Redis + MinIO)
Everything is wired together with Docker Compose.
- Docker & Docker Compose
- (Optional) Node 18+ if you want to run the client locally outside Docker
There are two places to configure env vars.
Create a root .env from the example and fill any # CHANGEME values:
cp .env.example .envOPENAI_API_KEY=sk-...
LANGFUSE_PUBLIC_KEY=... LANGFUSE_SECRET_KEY=... LANGFUSE_HOST=http://langfuse:3000
docker compose up- navigate in a browser window to Langfuse at http://localhost:3000 and "Sign up" for a new Langfuse account (create local account)
- create New Organization
- add Organization members
- create New Project "langgraph-react"
- Configure tracing -> Create new API key
- Copy Secret Key and Public Key to /modules/agent/.env PUBLIC_KEY and SECRET_KEY.. and maintain LANGFUSE_HOST="http://langfuse:3000"
- In order to capture these keys in the
agentcontainer, recreate theagentcontainer.. open a new WSL2 window, navigate tolanggraph-reactdirectory and run
docker compose up -d --no-deps --force-recreate agent- Open http://localhost:3001
- Send a message. You should see User bubble on the right, Bot streaming response on the left
- check the container log output.. it should emit something like
langfuse-worker-1 | 2025-10-23T23:34:33.552Z info Starting ClickhouseWriter. Max interval: 1000 ms, Max batch size: 1000- navigate to Langfuse at http://localhost:3000
- Select
Tracingand you should see a Timestamped trace displayed for the most recent message in the chat - Success! ✅🏆🎯💯🚀🎯
langgraph-reactis working with self-hosted Langfuse observability tracing.
| Service | URL / Port | Notes |
|---|---|---|
| LangGraph API (dev) | http://localhost:2024 | OpenAPI docs at /docs. |
| FastAPI WebSocket server | ws://localhost:8000/ws | React client connects here for streaming tokens. |
| React client (Next.js) | http://localhost:3001 | Chat UI that talks to the WS server. |
| Langfuse Web | http://localhost:3000 | UI for traces; initialize on first run. |
| MinIO (S3 API) | http://localhost:9090 | Used by Langfuse for storage. |
| Postgres / ClickHouse / Redis | loopback only | Bound to 127.0.0.1 inside Compose; not publicly exposed. |
- Open http://localhost:2024/docs for the dev API docs.
- Open http://localhost:3000
- Complete the initial setup
- Watch traces populate as you chat from the client