Prerequisites
- Python 3.10 or newer.
uvfor dependency management.- Node.js and
pnpmfor the tldraw web frontend. - An OpenAI-compatible Chat Completions endpoint and API key.
1. Install
.env. Run any LM-hitting command with uv run --env-file .env.
Fleet Reasoner uses one model across all tiers: deepseek-v4-flash by default, addressed as openai/<model> through the OpenAI-compatible endpoint. Any OpenAI-compatible model id works via OPENAI_MODEL.
2. Verify without an API key
Stub-LM tests exercise every signature,Refine loop, and ReActV2 submission without needing credentials:
tests/helpers.py provides StubLM and field_response(...). Every output field must be present in a stubbed response, including reasoning (ChainOfThought adds it).
3. Serve the engine
POST /seed— prompt → graph withROOTplus the first decomposition layer.POST /engine— one reasoning step:(graph, active_node_id, action)→ expanded graph.POST /chat/stream— SSE: status and tool events, then adoneevent with the answer and post-chat graph.GET /config— the active model id (no credentials) for the web client.
4. Run the web frontend
web/src/state/graphStore.ts (zustand) holds the canonical GraphState, and web/src/canvas/sync.ts is the only writer of qlaw shapes and arrows. Set VITE_API_BASE in web/.env.local if the API port differs from http://localhost:8000.
5. Compile and evaluate
The compile pipeline turns the zero-shot engine into optimized artifacts underartifacts/:
--strategy omni — explore all engines on a small slice, continue from the validation winner), use the wrapper:
gepa engine’s proposals and evaluation both use the .env model by default. Pass --codex-model to switch to the native Codex agent proposer.
Next steps
- Architecture — the three tiers and DSPy 3.3.0 primitives that power them.
- Lenses — one optimizable module per agent.
- Engine and router — the reasoning cycle as one
dspy.Module. - Chat and tools — the multi-turn ReActV2 Co-Pilot with lenses as tools.
- API and streaming — the FastAPI endpoints, SSE frames, and error mapping.
- Optimization and evaluation — compile pipeline, trainsets, and metrics.
- Gotchas — DSPy 3.3.0 pitfalls that will cost you time.