Who it is forA developer building an LLM agent that sometimes repeats actions, drifts from the task, or emits invalid actions.
The problemThe agent gets stuck or produces actions the environment rejects, and the loop has no built-in way to detect or repair these failures.
The outcomeSentry runs alongside the agent loop, flags failed steps, and returns repair prompt text that the app can add to the agent messages.
What you need first
- Python 3.10 or later, and git
- A model provider configuration, such as an OpenAI-compatible or OpenRouter config file
- For the AppWorld benchmark: Python 3.11, an OPENROUTER_API_KEY, and enough disk space for the AppWorld data download
- For the paper summary: a web browser to open the arXiv link
Steps
- Clone the repo with
git clone https://github.com/nuglifeleoji/Sentry.git - Enter the checkout with
cd Sentry - Create and activate a virtual environment with
python -m venv .venvandsource .venv/bin/activate - Install the package with
python -m pip install -e . - Check the install with
sentry-validate configs/paper.yaml - In your agent loop, load the provider config with SentryRunner.from_yaml, call runner.start_task, submit each cycle with runner.step, append repair.prompt_text when it is not None, and call runner.finalize in a finally block
Prompt for your agent
Using the Sentry repo at github.com/nuglifeleoji/Sentry, wire SentryRunner into the agent loop in <agent-repo-path>. Submit each completed agent-environment cycle with agent_step_from_parts and append repair.prompt_text to the agent messages when it is present. Report which file you changed and confirm that runner.finalize() runs in a finally block; first verify that sentry-validate configs/paper.yaml runs without error.
Caveat. The README says the full code and documentation are still being finalized for a release planned in 2-3 weeks, so these install and integration steps may not work yet.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for nuglifeleoji/Sentry and "Add runtime failure recovery to an agent loop"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer