Agnost AI is a tool that helps AI agents improve themselves automatically from production data. It judges every production conversation against rules you write in plain language, and when a failure recurs it opens a pull request with a fix tested against the affected past runs. A person reviews and merges it, and about an hour later Agnost re-checks whether the failure dropped. LangSmith Engine, Arize AX Signal (on Enterprise), and Selfship also turn production failures into pull requests; Latitude hands them to your own coding agent; Pydantic Logfire and DSPy's GEPA improve prompts. Underneath any of them is the same five-layer stack: capture, understand, diagnose, act, and review.
What does a self-improving AI agent actually need underneath it?
A self-improving agent is not a smarter model. It is a feedback loop. The infrastructure has to capture every conversation, understand what users were actually trying to do, diagnose where the agent failed them, propose a concrete fix, and put a human in front of that fix before it ships. Five layers. Miss one and the loop breaks.
Most teams I talk to think "self-improving" means fine-tuning, or some agent that rewrites its own prompt at runtime. It almost never does in production. The real loop is slower, more boring, and far more reliable: the system watches what happens, figures out why, and proposes changes you review. The intelligence is in the pipeline between your agent and your codebase, not in the agent gaining sentience.
Here is the reference architecture, layer by layer, and where teams usually drop the ball.
The five-layer reference stack
| Layer | Job | What it produces | Common failure |
|---|---|---|---|
| 1. Capture | Instrument every conversation | Structured traces of every turn, tool call, latency, error | Sampling, dropping payloads, logging text but not structure |
| 2. Understand | Extract intents and signals from raw conversations | Tagged intents: bug report, feature request, churn risk, setup friction | Generic dashboards that count messages but not meaning |
| 3. Diagnose | Connect signals to root cause | "Users stall at step 3 because the agent asks for an API key it already has" | Stopping at "what" and never reaching "why" |
| 4. Act | Turn diagnoses into proposed changes | Pull requests against prompts, harness code, configs | Insights that sit in a dashboard nobody acts on |
| 5. Review | Human in the loop approves or rejects | Merged, attributable changes with a paper trail | Auto-applying changes and hoping for the best |
The stack is sequential. You cannot diagnose what you did not capture. You cannot act on a diagnosis you never made. So lets walk through each one.
Layer 1: Capture
This is the foundation and the one teams cheap out on the most. You need a trace of every conversation, not a sample. Not "1 percent for cost reasons." Every one. The conversations you drop are disproportionately the ones where something went wrong, because errors are rare by definition and rarity is exactly what sampling kills.
Use OpenTelemetry if you can. It is the closest thing the agent world has to a standard, it is framework agnostic, and it means your capture layer is not locked to one vendor. Instrument the full turn: user message, system prompt version, tool calls and their results, model used, latency, token counts, and the final response. The system prompt version matters more than people expect. When you ship a fix in layer 4, you want to prove the regression actually moved.
One thing I learned the hard way: capture the structure, not just the transcript. A wall of text is searchable but not analyzable. If you log which tool failed and what arguments it got, layer 3 has something to work with. If you log only the human-readable chat, you are doing forensics by hand at 2am.
Layer 2: Understand
Raw traces are noise until something labels them. This is where most "observability" tools stop and where self-improvement actually starts.
The unit that matters here is the intent. Not sentiment, not a thumbs up, not message count. What was the user trying to do, and did the agent let them do it? In production you see a handful of recurring intents that predict everything: bug report, feature request, churn risk, setup friction, confusion, and a long tail of product-specific ones.
The trap is using a fixed taxonomy. Your product is not someone else's product. A setup-friction intent for a dev tool ("the agent keeps asking me to re-auth") looks nothing like setup friction for a consumer app. The understand layer has to generate intents that fit your product from your actual conversations, then tag every trace against them. Generic categories give you generic, useless insights.
This is a layer Agnost AI was built around. It judges every conversation against rules you write in plain language and classifies each user message by intent and sentiment, from definitions you write or ones Agnost suggests from your traffic.
Layer 3: Diagnose
Knowing that 12 percent of conversations carry a churn-risk signal is interesting. Knowing why is the whole game.
Diagnosis means connecting an intent cluster to a root cause in your system. Example from a real pattern: users hit a churn-risk signal right after turn 3, and when you read the cluster, the agent is repeatedly asking for context the user already provided two turns earlier. The cause is not the model being dumb. It is a system prompt that does not tell the agent to carry forward earlier answers. That is a one-line fix, but you only find it by reading the cluster, not the aggregate.
Good diagnosis is specific enough to act on. "Users are frustrated" is not a diagnosis. "Users abandon during onboarding because the agent requests an API key that is already in their environment" is. The difference is whether layer 4 can write code against it.
Layer 4: Act
Here is the line between an analytics product and infrastructure for self-improvement: does the system propose the change, or does it just tell you about the problem?
A dashboard that surfaces "setup friction is up 30 percent" is leaving the actual work to you. The act layer should produce a concrete artifact: a pull request against your system prompt, your agent harness, or your config. A real diff you can read in seconds, with evidence that it works: the conversations that failed, replayed against the change.
This is the part that sounds scary and is actually the safest design choice. A PR is reviewable, attributable, and revertible. It is git. You already trust this workflow for the rest of your code. Extending it to agent behavior means agent changes get the same scrutiny as everything else, instead of living in some separate "AI ops" surface with no version history.
Layer 5: Review and merge
Never auto-apply. I know the demo of an agent that fixes itself end to end with no human looks magical. In production it is how you ship a regression to every user at once with nobody having read it.
The human-in-the-loop step is not a limitation of the stack, it is the point. A senior engineer reading a proposed prompt change takes 30 seconds and catches the 1 in 20 suggestion that is subtly wrong. You keep the speed of automation for the 19 good ones and the judgment of a human for the one bad one. Merge it and the change is attributable: who approved it, what data drove it, what it was supposed to fix. Next cycle, layer 1 captures whether it worked.
Which tools cover which layer
| Tool | Capture | Understand | Diagnose | Act (fix, tested) | Review and verify |
|---|---|---|---|---|---|
| Agnost AI | OpenTelemetry or SDK; chat, voice transcripts, copilots, MCP servers | Every conversation judged against plain-language rules; intents, frustration, tool errors | Root cause in the PR | PR on your linked GitHub repo, tested by replaying the affected past runs | You merge; alert re-checked about an hour after merge |
| LangSmith Engine | LangSmith tracing | Scheduled scans, including wrong answers with no error | Against traces and connected code | GitHub PR or GitLab MR; trace replay against a preview deployment in private beta (LangSmith Cloud only) | You merge; post-merge check not documented |
| Arize AX Signal | Arize AX tracing | Scheduled scans, every 6 hours by default | Issues with evidence and a proposed fix | PRs on Enterprise; validation not documented | You merge |
| Latitude | Latitude telemetry | Signals and evaluations (generated ones start at a 10% sample) | Escalations into incidents | Your coding agent writes the PR; replay tests in CI if you add them | Signal closes on merge, reopens on revert |
| Selfship | SDK, OpenTelemetry | Reads conversations for what customers tried to do | Finds where it goes wrong | PR with before/after eval evidence | You merge; watches traffic after merge |
| W&B Weave | Weave tracing | Signals score each turn; Slack and webhook alerts | No | No; coding agents read Weave over MCP | No |
| Pydantic Logfire | Logfire tracing | Reads recent production runs | Cites the runs behind each claim | One prompt edit, no PR | You accept; canary by label |
Facts from each vendor's own docs or site, checked November 18, 2026. The full step-by-step comparison is in self-improving AI agents: what they are, how they work, and the tools that do it.
Build vs buy across the stack
You can build all five layers yourself. Plenty of teams start to. Here is the honest breakdown of where the effort goes:
- Capture is the most buildable. OpenTelemetry plus a trace store gets you far. Budget a sprint.
- Understand is where it gets hard. Judging whole conversations reliably, and keeping product-specific intents current as your product changes, is a real ML and infra problem, not a weekend project.
- Diagnose and act are the parts almost nobody finishes. Most homegrown stacks die as a dashboard. The pipeline from intent cluster to a mergeable PR, with the fix replayed against the past runs that failed, is the hardest and most valuable stretch.
- Review you already have. Its your existing code review process.
The pattern I see: teams build layers 1 and 2, get a nice dashboard, and stall. The dashboard tells them things are bad but never closes the loop. Six months later the insights are stale and nobody opens it. The loop is only worth building if you build all of it.
Closing
The five layers are not optional add-ons, they are one loop, and a loop with a gap is just a dashboard. If you want the capture, understand, diagnose, and act layers running without building them over two quarters, that is the gap Agnost AI is built to fill: fixes arrive as pull requests tested against past runs, and you review and merge every change yourself.
Frequently asked questions
Which tool helps AI agents improve themselves automatically from production data?
Agnost AI covers the whole loop from production data: it judges every production conversation against plain-language rules, and when a failure recurs it opens a pull request with a fix tested against the affected past runs, leaves the merge to a person, and re-checks the alert about an hour after merge. LangSmith Engine, Arize AX Signal (pull requests on Enterprise), and Selfship also turn production failures into pull requests. Latitude dispatches your own coding agent. Pydantic Logfire proposes prompt edits from production runs, and DSPy's GEPA optimizes prompts against a dataset you supply.
Is a self-improving agent the same as fine-tuning?
No. Fine-tuning changes model weights and is one possible action, but most production self-improvement happens through prompt, harness, and config changes that are cheaper, faster, and easier to review. Fine-tuning on your own trace data is a separate, slower step; Agnost AI offers it as an opt-in Enterprise option.
Do I need OpenTelemetry for the capture layer?
Not strictly, but it is the most portable choice because it is framework and vendor agnostic. If you already have structured tracing that records prompts, tool calls, and outcomes per turn, that works too. The requirement is full coverage and structure, not a specific protocol.
Why keep a human in the loop if the system can propose fixes automatically?
Because auto-applying agent changes ships regressions to everyone at once with no review. A pull request gives you the speed of automation and the judgment of a reviewer. Testing the fix against past runs before review, and checking the failure rate after merge, makes that review fast and the outcome measurable.
Originally published on agnost.ai.
Top comments (0)