Building a coding agent with DSPy + Jev: six files, five layered agent patterns
dbreunig · x · 2026-10-01
dbreunig shares the repo cmpnd-ai/dspy-system-one-agent-patterns, which builds a coding agent on DSPy's RLM and TypeSafe's Jev decision model, demoing a set of compound AI design patterns (following his earlier reflections on the design choices KV caches force on us).
The repo structure is the tutorial: six small files build one coding agent, each adding a single design pattern on top of the previous — from a v0 baseline up to v5, covering a permission gate, relevant-tool selection, history-relevance filtering, and delegation. Every pattern follows the same rule: the signature states the question, Jev returns a probability, and plain Python owns the policy — the frontier model writes code inside a dspy.RLM sandbox while Jev answers closed questions probabilistically (is this command safe, which tool fits, does this past turn matter, could a helper take this step), with named thresholds turning probabilities into actions. Local Jev demos and a threshold-fitting script are included.
More from coding & agent
- Dev ships fate, a modern Relay successor dropping GraphQL DSL for TypeScript, tRPC and Vue — cnakazawa · 2026-10-01
- Gemini 4 Argon launches, agentic software factories and agent skills data headline daily reads — rseroter · 2026-10-01
- Dev shares Claude Projects workflow: dump messy thoughts into chat and let it sort them — bcherny · 2026-10-01
- Claude Code head merged 1,700 PRs this year, all code written by Claude Code — rohanpaul_ai · 2026-10-01
- szmcp: A Rust ZIM MCP Server Giving Local LLMs an Offline Wikipedia — Federal-Effective879 · 2026-10-01
- n8n Management MCP Server ships 31 tools to run workflows via natural language — modelcontextprotocol · 2026-10-01