Docs › OpenAI Agents SDK scheduled run monitoring with RunVouch

OpenAI Agents SDK scheduled run monitoring with RunVouch

OpenAI Agents SDK scheduled run monitoring below the turn limit: the Agents SDK stops a run at max_turns and raises. Everything below that limit, including a run that spent $30 calling the same function, is a normal completion.

How it runs on OpenAI Agents SDK

Around Runner.run() with the Python client; report each tool call from the run result's new items.

Store the key

An environment variable on the host that runs the script.

Wrap the job

import asyncio, runvouch
from agents import Agent, Runner

async def main():
    res = None
    with runvouch.vouch("morning-briefing",
                        evidence=lambda: {"briefing": len(res.final_output) > 300},
                        cost=lambda: res.context_wrapper.usage.total_tokens * 0.000004) as run:   # your price per token
        res = await Runner.run(agent, "Write today's briefing", max_turns=20)
        for item in res.new_items:
            if item.type == "tool_call_item":
                run.tool(item.raw_item.name, {"args": item.raw_item.arguments})

asyncio.run(main())

rv fails open: if RunVouch is unreachable the job still runs and you get one warning line.

Register the cadence and caps

rv agent nightly-report --cadence 24h --grace 30m --max-runtime 1h --evidence --cap-run-cost 2

Register the agent once, from anywhere with the key. Cadence is what turns a schedule that stopped into an alert; --evidence makes a run without evidence a failure; the caps pause the agent when it overspends.

What goes silent on OpenAI Agents SDK

What OpenAI Agents SDK does not tell you

The Agents SDK raises MaxTurnsExceeded at the turn limit and sends traces to the OpenAI dashboard, where you can read them afterwards. Token usage is on the run result. There is no budget, no schedule awareness and no alerting in the SDK; a final output that is an apology is a completed run.

What RunVouch detects

AlertWhat it means here
MISSEDcadence plus grace passed and no run started
FAILEDnon-zero exit or a reported failure, with the stderr excerpt
NO_EVIDENCEthe run said ok but the file, URL or assertion you required is missing
STALLEDa run started and never ended within max runtime
RETRY_STORMthe same tool called with identical input many times in one run
BUDGET_RUN / BUDGET_DAYcost cap crossed; the agent is paused until you resume it
DRIFTduration or output size far off its 7-run baseline

Set up in two minutes

  1. Get a free key (3 agents, no card) and store it where this page says.
  2. wrap the job: copy the snippet above into the scheduled job.
  3. Register the cadence once: rv agent nightly-report --cadence 24h --grace 30m --evidence, or let the first run create the agent and set the cadence on the dashboard.
  4. Send one test alert: curl -X POST https://api.runvouch.com/v1/settings/test-alert -H "X-API-Key: $RUNVOUCH_KEY". The next missed, failed or empty run reaches the same channels.

Also running agent frameworks?

Pydantic AI and smolagents. Dify and Flowise. Ollama and local LLM batch jobs. OpenClaw (verified-run skill). The full list of runtimes is on integrations, and the same agent can report from several of them: one job, one cadence, wherever it happens to run.


Need a key? Get a free key · Stuck? contact