Agent observability that finds the bad run and stops the next one
Amiril ranks each run against its agent's own history and turns a repeat failure into a rule checked before the next tool call. Agent observability on OpenTelemetry.
Amiril ranks each run against its agent's own history and turns a repeat failure into a rule checked before the next tool call. Agent observability on OpenTelemetry.
A payments agent times out on issue_payment, retries, and pays the same invoice twice. Agent observability shows you that run in full, down to the two issue_payment spans that carry the same invoice_id a few seconds apart. Until someone changes the agent's code and ships it, the next timeout pays twice as well.
Most teams already have that much: in LangChain's State of Agent Engineering survey, published in June 2026, 89% of respondents had some observability for their agents, and 94% of those with agents in production did. Arize Phoenix will trace the double payment and grade it with an LLM evaluator. Datadog's docs now call its product Agent Observability, and its Insights feature goes as far as naming a recommended fix for each recurring problem it finds.
In Amiril the fix arrives as a rule, drafted from the issue's runs and tested on past calls, and the Amiril SDK checks it inside your agent before the next issue_payment runs.
Amiril is an OpenTelemetry destination. Your agent keeps exporting spans with OpenTelemetry's own SDK, and three standard variables point the exporter at Amiril:
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="<OpenTelemetry traces endpoint>" export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL="http/protobuf" export OTEL_EXPORTER_OTLP_TRACES_HEADERS="Authorization=Bearer <your API key>"
It reads the OpenTelemetry GenAI conventions, OpenInference and OpenLLMetry, so LLM tracing you set up with any of them needs no changes. There are guides for LangGraph, Google ADK, LiveKit, the OpenAI Agents SDK, CrewAI, the Anthropic SDK and the Claude Agent SDK. Each trace becomes one run, and each gen_ai.agent.name becomes an agent.
Teams on Langfuse can upload an export on the Data page instead of sending traces again. An upload brings in your older history too, so Amiril can compare new runs with your older ones from the first day. Where a framework has no AI agent tracing of its own, as with LangGraph, its guide in the docs installs OpenInference's instrumentation first; uploading from Langfuse has a guide of its own.
Amiril compares each run with the same agent's earlier runs in the same environment. A value, path or step order that was rare for that agent becomes a rarity factor, written as one sentence:
issue_payment was called more than once, which happened in 3 of 640 other runs calling it.
Each rarity factor is measured in bits. A run's three strongest add up to its rarity, shown as a standing such as "Top 1%" with the bits behind it. You set a review budget as runs a week or as a share of all runs, and Amiril sets each agent's anomaly bar from it. Runs that reach the bar wait for review, rarest first.
Checks read the conversation, and the grounding check catches a date, a time or a phone number the agent stated that no tool result or earlier message contains. Run topics group runs by their one-sentence summary, and turn topics group single turns by what was said.
Runs that share one problem become an issue, with a severity from Critical to Low. A grounding check issue starts at Critical from a single run. The double payments form an issue from three runs whose strongest rarity factor is that repeated issue_payment call, or from one run you confirm. Amiril's investigator reads a sample of the runs and writes up what they share. Connect Slack, and a channel gets a message when an issue forms at High or above, plus a daily digest.
When a rule could have stopped an issue's runs, Amiril drafts one with an AI model and tests it on past runs. It keeps the draft only if it catches some of the issue's runs and fires on at most one in a hundred of the agent's other runs. A kept draft shows as a rule suggestion, with a line such as "Would have blocked 4 of 5 runs", and Create rule opens it in Shadow. Some rarity factors carry Turn into a rule, which opens a rule already filled in from the value.
For the double payment, the rule looks like this:
@id("one-payment-per-invoice") @per("invoice_id") @sentence("issue_payment was already called for invoice {invoice} in this session") block ( agent == "payments", tool == "issue_payment" ) when { invoice = call.args.invoice_id; issue_payment[status == "any"]{} };
issue_payment[status == "any"]{} matches an earlier issue_payment call whatever it returned, a timeout included, and @per("invoice_id") keeps only those with this call's invoice_id, from any run in the same session. The first payment goes through. A timeout doesn't show whether the money moved, so the rule stops a second call for that invoice even when the first one errored, and the user is told the retry was not performed. On the retry, issue_payment never runs, and the model reads this instead of its result:
The call to issue_payment was not performed. Rule one-payment-per-invoice blocked it: issue_payment was already called for invoice INV-2207 in this session. Do not retry this call with different arguments or achieve the same outcome another way; tell the user it was not performed.
The check happens in the agent's own process, through the SDK, which wraps the tools of a LangGraph, Google ADK or LiveKit agent, or of a loop you wrote in Python or TypeScript. The SDK keeps the published rules in memory, so a check makes no network request. Once the SDK is in, a change you publish reaches running agents in about a minute with no redeploy, and an agent that can't reach Amiril goes on enforcing the last rules it had. A rule can also compare an argument with what an earlier tool returned, for example to block a refund larger than the order total that lookup_order reported.
A published rule starts in Shadow. It checks every call and counts the calls it would have stopped, and the call runs either way. Test on past calls replays any version of a rule, a draft included, over the last 24 hours, 7 days or 30 days of real calls and lists each one it would have fired on.
A rule has its own mode in each environment. Move the rule to Enforce in Development first, and in Production once the list holds only calls you meant to stop.
Once the rule is enforcing and your agent's SDK has fetched it, Amiril waits for 2 days with no new runs in the issue and then resolves it. If double payments come back, the issue reopens with a Back again badge. Its page then says when it was resolved and how many runs have had the problem since.
Amiril reads standard OpenTelemetry spans, so the instrumentation you have stays. If your traces are in Langfuse, upload an export and keep using Langfuse as before.
No. Amiril's AI agent observability runs on traces alone: rarity, issues, topics and Slack alerts. So do rule suggestions and the would-fire count of a rule in Shadow, which Amiril works out by replaying each new run. Add the SDK when you want a rule to block calls.
Phoenix and Datadog trace and evaluate runs. Amiril ranks them by rarity and turns an issue into a rule the SDK enforces. Our pages on Arize Phoenix and Datadog LLM Observability compare them feature by feature.
There is a free plan, and Team is $249 a month. Pricing lists what each plan includes.