Reinforcement Loop

Reinforcement Loop turns production agent traces into evidence-backed findings, diagnosed causes, and fixes you can act on.

Reinforcement Loop finds what's quietly breaking your agents, then closes the loop. It investigates the conversations behind your agent's issues, traces each one to its root cause in the agent's own setup, and carries it through to a fix — so improving an agent doesn't start with reading traces one at a time.

Monitors and evals tell you that something went wrong. Reinforcement Loop tells you why, and what to change. It works from your agent's Issue clusters — including clusters built on eval monitors, whether or not those monitors alerted. It investigates every Issue cluster by default, and you can narrow it to the ones you care about.

Findings appear on the Reinforcement loop tab of any agent on the Agents page, filterable by time range, priority, and workflow, and searchable across findings.

How Reinforcement Loop works

Every finding moves through the same cycle: drawn from your agent's Issue clusters, diagnosed against the agent's own configuration, turned into a fix, and followed as new matching conversations arrive.

StageWhat Reinforcement Loop does
DetectIdentifies a recurring problem across your agent's conversations and groups it into a single finding
VerifyChecks it against runtime evidence and against your agent's source configuration and recently merged pull requests
DiagnoseEstablishes the cause where the evidence supports one, with the contributing traces attached
FixProduces a fix you can open as a draft pull request, send to your issue tracker, or hand to your coding agent
TrackAdds new matching traces to the finding as they arrive, so it reflects current behavior rather than a point-in-time snapshot
flowchart LR
    surface["Surfaces a recurring problem"] --> verify["Verifies it against evidence"]
    verify --> explain["Explains the cause"]
    explain --> fix["Produces a fix"]
    fix --> follow["Follows new matching traces"]
    follow -->|"recurs"| surface

Findings are categorized by failure type and prioritized by severity.

How it runs

Reinforcement Loop runs on a recurring schedule per agent, investigating new conversations in the agent’s Issue clusters — including clusters built on eval monitors, whether or not they alerted. By default it covers every cluster. To focus it on the problems you care about, choose which clusters to use as input in Settings on the Reinforcement loop tab.

Every finding is grounded in what real users experienced in production — not scores against a curated dataset, which is what surfaces the failure modes no one could have written a dataset for. Models interpret and explain that evidence; they don't originate a finding or manufacture the evidence behind it.

Analysis runs against trace content under your existing Agent Observability settings — see Agent Observability Overview for where trace content is stored and what Monte Carlo receives.

Reinforcement Loop never changes a running agent. It analyzes traces and proposes changes — as a draft pull request, a ticket, or a prompt you can take into your AI tool of choice — and nothing lands without your team reviewing and merging it.

Connecting your agent's definitions

Reinforcement Loop finds the cause by checking what your agent is actually built from. What it reads depends on the agent.

Snowflake Cortex agents

Reinforcement Loop reads the agent configuration, the semantic views, the Cortex Search services the agent's tools use and it's skills, so it can name exactly what to change. The Monte Carlo's service account role must be able to describe those objects. See Required Snowflake permissions.

Custom agents

For agents you build yourself, Reinforcement Loop diagnoses against the agent's code. Connecting the repository (GitHub, GitLab, or Azure DevOps) is what makes that possible.

  • Code-level diagnosis — the cause is identified in the code that produced the behavior, not inferred from the trace alone.
  • Merged-PR cross-check — findings are cross-referenced against merged pull requests, so problems you've already fixed stop being raised.
  • Draft pull requests — a finding's suggested change can be opened as a draft PR against your repository, for your team to review and merge.

Reviewing a finding

Open a finding and it tells you what happened, what it led to, what caused it, and exactly how to fix it. Where the evidence doesn't establish a cause, the finding says so rather than asserting one.

Each finding links to the specific spans, traces and conversations it was built from, so you can check any claim against the content underneath it.

Acting on a finding

Each finding carries a suggested change. Route it wherever your team already works:

  • Draft a pull request — with a repository connected, open the suggested change as a draft PR against your own codebase, for your team to review and merge.
  • Issue tracker — send a finding to Jira, Linear, or ServiceNow, where the integration is configured.
  • Coding agent — pass the finding straight to the AI tool your team already uses. It arrives as a prompt carrying the summary, evidence, trace links, and suggested actions — everything needed to start the change in your own codebase. Connect the Monte Carlo MCP server once and your tool can query Monte Carlo directly as it works.

Scheduled digests

Findings can be delivered to a team on a schedule. From Scheduled digests on the Reinforcement loop tab, add a digest with:

FieldWhat it sets
CadenceHow often the digest is delivered
AudienceAn existing audience with at least one email or Slack recipient
NameShown in the digest list, and used as the title of the delivered message

Digests are configured per agent, so agents owned by different teams can route to different audiences.

Supported agent frameworks

Reinforcement Loop runs on agents connected to Agent Observability.

Your agentSetup guide
Built on any framework, against any model, instrumented with the Monte Carlo SDK or Google ADKInstrumenting your agent
Snowflake Cortex AgentsSnowflake Cortex
Databricks AI/BI Genie agentsAI/BI Genie
Databricks Agent Bricks or custom Mosaic AI agentsAgent Bricks and custom agents

FAQ

Why has Reinforcement loop found no issues?

Reinforcement Loop needs enough trace volume to establish a pattern. Confirm traces are arriving on the Agents Summary or Traces tab first.

For a Snowflake Cortex agent, also check that Monte Carlo's service account role can describe the semantic views and Cortex Search services the agent's tools use. Diagnosis reads those definitions, and MONITOR on the agent does not grant access to them — so an agent whose traces arrive normally can still produce no findings. See Required Snowflake permissions.

How often does it run?

On a recurring schedule, per agent. Each finding shows when the pattern was last seen.

Can I be notified of findings?

Yes — set up a scheduled digest to an email or Slack audience. See Scheduled digests.



Did this page help you?