SuperAPIAI Directory

agent-retry-rodeo

github.com · AI agents

Agent Retry Rodeo is a local testbed for AI agent recovery capabilities, offering fault injection, replay, and recovery-aware baselines. Through a deterministic synthetic ticket simulator, it lets naive strategies fail under faults, then replays the same faults with a recovery baseline and generates interactive replays and JSON evidence that can be opened offline. The built-in examples require no API key, support adding fault scenarios via YAML, integrating custom agent adapters or external processes, and provide regression comparison and JUnit XML export for checking adapter regressions in CI.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose Agent Retry Rodeo is a local testbed for observing and testing how AI agents recover after tool call failures. The project emphasizes that "Done does not equal success": an agent claiming completion does not mean the persisted state meets requirements. Through fault injection, replay, and recovery-aware baselines, it helps developers understand why naive retry strategies fail confidently.

Key capabilities

  • Fault injection and deterministic replay: Based on YAML scenarios and synthetic ticket state, inject built-in faults or use schema v2 declarative custom fault plans, covering pre-call failures and post-call acknowledgment loss. The same scenario and seed reproduce the same trajectory.
  • Dual baseline comparison: The built-in naive baseline and recovery baseline are both scripted teaching baselines, not LLMs. The naive baseline deliberately ignores update failures, and the recovery baseline is tailored to these scenarios.
  • State assertion scoring: Final results are judged based on persisted simulator state, recording duplicate comments, incomplete steps, and false completions, without using LLM judging.
  • Offline interactive replay: Open rodeo-output/index.html to view it in a browser, with no server, CDN, account, or API calls required; compare strategies, inspect tool calls one by one, check persisted state, and export each run as JSON.
  • Custom scenarios: Copy a YAML file in scenarios/ and give it a unique id, use built-in faults or schema v2 custom fault plans, set the initial ticket state and target state/comments, run validate and unit tests, then submit. YAML uses safe loading and a strict field schema, with a size limit of 64 KB.
  • Custom agent adapters: Copy examples/my_agent.py and export create_agent() to return a new object with name and run(call, goal) -> bool. The agent only receives tool observations and the goal, and its completion claims are checked against persisted simulator state. Adapter exceptions and non-boolean results are recorded as run errors, with partial evidence preserved.
  • External agent processes: Bridge agents written in any language via a small JSON-lines bridge. --agent-command must be placed last, followed by a list of executable arguments, with no shell expansion. The parent process scores based on actual simulator state, and each test case runs a new child process.
  • Tool call budget: Custom runs default to at most 100 simulator tool calls per scenario, adjustable positive budget; the next call that exceeds the budget throws ToolCallLimitError before changing state, and failed runs still export partial replay and JSON evidence.
  • Regression comparison: save the current adapter run, and after modification compare the two single-adapter reports under the same fixtures and seeds. A compare exit code of 0 means no directional regression, 1 means regression, and 2 means the report is invalid or incomparable. Checks cover lost successes, newly added false completions, newly added adapter errors, increased duplicate comments, and increased incomplete steps.
  • JUnit XML export: optionally generate JUnit XML with one test case per scenario and seed, listing specific regression names in failed test cases for easy display by CI tools.

Usage

  1. After obtaining the Python dependencies, the built-in demo can run offline.
  2. Open rodeo-output/index.html in a browser to view the self-contained replay; you can also use python -m agent_retry_rodeo.cli demo to run the demo as a module.
  3. When adding a scenario, copy the YAML in scenarios/, assign a unique id, set the initial state and goal, run retry-rodeo validate and python -m unittest discover -s tests -v, then run retry-rodeo demo to check the evidence.
  4. When integrating a custom agent, copy examples/my_agent.py and implement create_agent(). Tool parameters must be exact: read_ticket accepts no parameters, append_comment accepts only text, and set_status accepts only status and a positive integer expected_version; options such as idempotency keys or force are not supported, and rejected calls still consume the tool call budget.
  5. In the external process mode, replace the decision loop of the built-in script client and map the agent tools to the protocol. The parent process enforces by default a 30-second wall-clock deadline, a tool call budget, a 64 KB per-frame and 4 MB per-case total stdout/stderr budget; on POSIX, the child process group is terminated when the case ends or fails.
  6. For regression checks, first save a baseline report, then modify the adapter and compare; when comparison fails, the report is still written, so the CI script must preserve that report before comparing.

Applicable scenarios Suitable for verifying, in local development and CI, an agent's recovery logic under operational problems such as tool call failures, lost confirmations, and version conflicts; suitable for teaching and demonstrating differences in retry strategies through reproducible synthetic ticket scenarios; suitable for extending custom failure scenarios and agent adapters by forking.

Limitations

  • The built-in agent is a scripted teaching baseline, not an LLM; the eight-run demonstration is not an empirical agent benchmark.
  • The recovery baseline is customized for the built-in scenarios and does not constitute a general exactly-once guarantee; content matching is not an idempotency solution for legitimate duplicate comments or concurrent writes in production systems.
  • Custom adapters load explicitly selected trusted local Python code; they are not a sandbox, do not prevent network or file access, and cannot terminate arbitrary infinite loops; do not load adapters from strangers.
  • External commands inherit the environment, working directory, and operating system permissions, and can access files, networks, secrets, and paid APIs; use only trusted code, synthetic data, and your own cost controls. Commands, credentials, and stderr logs are not copied into the report.
  • The tool call budget only limits the number of calls entering the simulator; it does not limit Python execution time, memory, network, or code between calls; adapters that hang or loop infinitely after catching an exception still require an external process timeout.
  • The seed only changes synthetic concurrent worker event identifiers; it does not change model behavior or failure probabilities, and does not imply statistical comparisons across seeds.
  • Fingerprints are not signatures; manually edited reports may be distorted; changes to the simulator/runner also require re-establishing the baseline. Directional checks are based on synthetic fixtures and do not prove production reliability, model provenance, or statistical improvement.
  • Passing test cases in JUnit XML only indicate no directional regression; they do not indicate that the adapter ran successfully; the XML contains only scenario IDs, seeds, regression names, and scope descriptions, and does not contain traces, commands, or adapter exception details.
  • The project does not include model connectors or paid calls, does not verify model identity and reproducibility, and does not include live model measurements.
  • This is a synthetic ticket environment and cannot replace any production application.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools