← All posts

From Dashboards to Pull Requests: What Closing the Loop Actually Means

Close the loop on AI agents by going from a production signal to a merged change. Why the real unit of progress is a pull request, not a dashboard chart.

Closing the loop on an AI agent means going from a signal in real production conversations all the way to a merged change that fixes the underlying problem. A dashboard tells you something is wrong. Closing the loop means something is now different in your system prompt, your harness, or your config because of what you learned. The unit of progress is a merged PR, not a chart that went red.

Most teams stop at the chart. That is the entire problem.

Why your dashboard is lying to you (a little)

Dashboards are great at one thing: telling you that a number moved. Resolution rate dropped from 71% to 64%. Average turns per conversation crept up. Containment fell off a cliff on Tuesday. Cool. Now what?

The dashboard does not know why. It does not know that 40% of your failed conversations are users asking for a CSV export you do not have. It does not know that your refund flow breaks the moment someone mentions a second order. It just knows a line went down.

Here is the gap nobody talks about. There is a long, expensive, deeply human chain between “a number moved” and “the agent got better”:

  1. Someone notices the chart.
  2. Someone exports a few hundred transcripts and starts reading.
  3. Someone clusters the failures into themes by hand or with a half-baked script.
  4. Someone forms a hypothesis about the root cause.
  5. Someone writes the prompt change or harness fix.
  6. Someone reviews it, tests it, and ships it.

Steps 1 through 4 are where weeks disappear. And in most companies, steps 5 and 6 never happen for the long tail of problems, because the person who noticed the chart is not the person who can fix the prompt, and they have a roadmap to ship.

So the loop stays open. Forever. You have observability and zero improvement.

What “closing the loop” actually requires

Closing the loop is not a fancier dashboard. It is the machinery that carries a signal across that entire chain and lands it as a diff someone can read and merge.

Three things have to be true:

  • The signal has to be structured, not raw. “Conversation #88213 failed” is useless. “Users keep asking for an export feature, 312 times this month, here are the transcripts” is a ticket.
  • The diagnosis has to be specific. Not “improve refund handling.” Instead: “the system prompt has no instruction for multi-order refunds, so the agent guesses and gets it wrong 60% of the time.”
  • The fix has to arrive as a reviewable change. A pull request against the actual artifact that controls behavior. Your system prompt. Your tool definitions. Your retrieval config. Not a Slack message saying “we should look into refunds.”

If any one of these is missing, you do not have a loop. You have a really nice rear-view mirror.

A concrete walkthrough: from signal to merged PR

Let me make this real with an example I have seen play out dozens of times.

You run a B2B SaaS product with a support agent. It handles onboarding, billing, and how-to questions. Things look fine on the surface. Containment is 68%, CSAT is okay.

The signal. Reading conversations (or having something read them for you), a pattern surfaces: 287 conversations this month where users hit the same wall during setup. They connect their data source, the agent walks them through it, and then they ask “okay so how do I export this to a sheet?” The agent says some version of “I’m not able to help with that” and the conversation dies. No rage, no ticket, they just leave. This never shows up as an error. It shows up as silence.

The diagnosis. This splits into two distinct findings, and the difference matters:

FindingTypeOwner
Users want a CSV export feature that does not existFeature requestProduct
The agent dead-ends instead of offering the API workaround that does existPrompt gapAgent / fix now

The first one is a roadmap conversation. The second one is fixable today. The agent could tell users about the existing API export endpoint, but its system prompt never mentions it, so it doesnt know to offer it.

The fix. This becomes a pull request against the system prompt. Something like adding a block: “If a user asks about exporting data and a native export is unavailable, proactively explain the /v1/export API endpoint and link the docs. Do not say you are unable to help.” Maybe it also adds a tool that fetches the docs link so the answer stays current.

The review and merge. A human reads the diff. Is the wording right? Does it match brand voice? Does the API actually do what the prompt claims? Yes. Merge. Now the next 287 users who hit that wall get a real answer.

That is the whole loop. Signal, diagnosis, PR, review, merge. The chart was step zero. The merged PR was the point.

This is, frankly, why we built Agnost AI the way we did. It connects to your agent, reads every conversation, auto-generates custom intents for your product (feature requests, setup friction, churn risk, bug reports), tracks them live to show why users stall, and then opens pull requests against your system prompts, harness, and W&B configs to fix what it finds. You review and merge. The agent self-improves; Agnost is the infrastructure underneath that makes it happen.

The unit of progress is a merged PR

I want to hammer this because it changes how you run the whole operation.

If your metric for “are we improving the agent” is “we have a dashboard,” your real improvement velocity is whatever your most overloaded engineer can squeeze in between sprints. Which is roughly zero for anything that is not on fire.

If your metric is “merged PRs against agent behavior per week,” everything reorients. You start counting fixes, not findings. You can look at a week and say “we shipped four changes that closed four distinct failure patterns affecting 1,900 conversations.” That is a number you can take to a standup and a board meeting.

Charts measure the disease. Merged PRs measure the cure. Track the cure.

A quick gut check for any agent improvement tool you are evaluating:

  • Does it produce a change, or just a chart?
  • Is the change a diff a human can read, or a vague recommendation?
  • Does it touch the actual artifact that controls behavior (prompt, harness, config), or a parallel system you then have to translate by hand?
  • Who reviews and merges, and how long does that take?

If the answer to the first question is “just a chart,” you are buying a mirror. Mirrors are useful. They are not improvement.

Where this is heading

The next two years of agent tooling are going to split hard into two camps. One camp keeps building prettier observability: more charts, more traces, more filters. The other camp builds the machinery that turns those traces into merged changes with a human in the loop.

The first camp is a feature. The second is infrastructure. Production agents drift, products change, user intent shifts weekly, and no static prompt survives contact with real traffic for long. The teams that win will be the ones whose agents improve on a weekly cadence without a human spending three days reading transcripts first. Not because a model magically rewrites itself in the dark, but because the path from signal to PR got short enough that improvement became routine instead of heroic.

FAQ

What is the difference between observability and closing the loop for AI agents?

Observability tells you what happened: traces, metrics, failed conversations, latency. Closing the loop means taking those signals and turning them into a concrete, merged change to your agent’s behavior. Observability ends at a dashboard. Closing the loop ends at a pull request your team reviewed and shipped. You need observability to close the loop, but observability alone never improves the agent.

Does closing the loop mean the agent changes itself automatically?

Not in any responsible setup. The good version keeps a human in the loop: the system detects the pattern, diagnoses the root cause, and proposes a change as a pull request. A person reviews the diff, checks it against brand voice and reality, and merges it. The automation is in the detection and the diagnosis and the drafting, which is where the weeks of manual effort actually live. The judgment stays with you.

How do I measure whether I am actually closing the loop?

Count merged changes against agent behavior over time, not the number of dashboards you have. A healthy operation can point to specific failure patterns it detected and the specific PRs that resolved them, with rough conversation volume attached to each. If you cannot trace a single recent prompt or harness change back to a production signal, your loop is open no matter how nice your charts look.

Closing

The hard part of agent improvement was never the chart. It was the long, manual stretch between noticing a problem and shipping a fix, and that is exactly the stretch most tools leave for you to do by hand. If you want to see what it looks like when a production signal arrives as a reviewable pull request instead of just another red line, that is the loop Agnost AI was built to close.