Most agentic apps fail not because of bad models, but bad system design. Here's the five-layer framework that actually works.
The core argument: just like Bell Labs discovered in the 1940s that you can't optimize a telephone network by optimizing individual components, you can't build good agentic software by only thinking about the agent layer. The whole system matters.
He breaks it into five layers every agentic system needs:
The five layers every agentic system needs — optimizing one without the others creates cascading failures.
A team of agents is better than one. A Leader routes requests to specialists, each scoped by what their tools actually allow, not by what they're prompted to do.
A Leader routes requests to specialists scoped by what their DB connection allows, not by what they're prompted to do.
Raw LLMs writing SQL hit a wall fast. The data layer solves this with six layers of grounded context that get richer over time, plus a learning loop: the agent hits an error, diagnoses the fix, saves it. Query 100 is better than Query 1 without retraining the model.
Six layers of grounded context. The learning loop means Query 100 is better than Query 1 without retraining the model.
Read-only access is a PostgreSQL connection parameter. The database rejects writes regardless of what the model generates. One user's context leaking into another's is a data breach, not a bug.
Security enforced at three tiers. Request isolation between users is a legal requirement, not a nice-to-have.
Every surface (REST, Slack, Web UI, CLI) has its own identity scheme. The interface layer maps them all to your internal auth before the request reaches the agent.
Every surface has its own identity scheme — the interface layer maps them all to your internal auth before the agent sees the request.
Bedi's open-source project Dash demonstrates all five layers in one working system: a natural-language data agent you can clone, run with docker compose up, and have a fully working product.
The Dash open-source agent — all five layers working together in one deployable system.
The tldr: agentic software is just regular software with business logic replaced by agents, so use the engineering disciplines that already exist.
Have a perspective on this piece? Reach out — the best writing comes from good conversation.