Langfuse integration: rules and issues from the traces you already collect
With the Langfuse integration, oversized refunds in last month's traces become an issue, and Amiril drafts the rule that blocks the next one.
Amiril integrations for LangGraph, Google ADK, LiveKit, the OpenAI Agents SDK, CrewAI, Langfuse and agents with no framework, with a setup guide for each.
With the Langfuse integration, oversized refunds in last month's traces become an issue, and Amiril drafts the rule that blocks the next one.
Amiril integrations work at two points in an agent. The SDK runs inside the agent's process and checks each tool call against your rules before the tool runs, so a blocked call never reaches the tool. Traces tell Amiril what the agent already did, and from them it ranks each run by rarity and groups the runs that share a problem into issues. Amiril drafts each rule suggestion for an issue it found in your runs. Suggestions start once the agent sends traces.
Export your observations from Langfuse as a JSONL file and upload it on the Data page. Each trace in the file becomes a run of the agent it names, old ones included, so issues can show up the day you upload with no change to the agent. The Langfuse integration page walks through the export. In the upload, a run that went wrong at normal speed and cost ranks as rare, though no Langfuse alert on p95 latency or cost fired for it.
LangGraph takes the SDK as create_agent middleware, first in the list. With it in place, a treasury agent's transfer_funds call for 25,000 is blocked while its usual transfers, all under 5,000, still run. On Google ADK the SDK goes in as the app's first plugin, in Python or TypeScript; if you already use before_tool_callback, a refund limit written as one can move into a rule that runs in Shadow before you enforce it.
LiveKit voice agents wrap their function tools in Python. On a salon's phone line, a rule blocks any booking with a discount over 20%. If you wrote the agent loop yourself, the core package wraps each tool function, in Python or TypeScript.
Published rules reach running agents within about a minute, with no redeploy. The SDK keeps a copy in the process and on disk, and goes on checking calls when Amiril is unreachable or the agent restarts. A new set of rules that fails validation is refused, and the SDK keeps the rules it already has.
All the Amiril integrations for live traces run on OpenTelemetry, and each framework name below links to its setup guide. The OpenAI Agents SDK records its own traces and OpenInference converts them, which the OpenAI Agents SDK guide sets up in Python or TypeScript. In Python the setup is one pip install and about ten lines at startup. CrewAI turns each kickoff into a run that holds every agent's tool calls, and in a crew run that loops, Amiril flags the agent that called fetch_page more often than in any of its earlier runs.
LangGraph traces come from OpenInference's LangChain instrumentation. Both calls in a double refund can come back normally, and Amiril flags the second because the agent almost never makes one. Google ADK has OpenTelemetry tracing built in, and its guide turns it on and points it at Amiril. LiveKit sends each voice session as one run with every turn in it, so you can read back the call where the agent confirmed a time the calendar never offered. The Anthropic SDK traces itself once OpenTelemetry is set up, and the Claude Agent SDK needs only environment variables. An agent on any other OpenTelemetry SDK sets three standard variables on its exporter and needs no Amiril code.
Claude Code, Cursor, VS Code and ChatGPT have Amiril integrations too. Each connects to Amiril's own MCP server and signs in with your Amiril account. From there they read your runs and issues, and write and test rules. The guide to connecting an AI assistant has the setup for each one.