
An external runtime failure management layer for LLM agents.
Detect execution failures, guide recovery, and learn reusable lessons from verified recoveries.
Sentry runs alongside your agent loop without replacing the agent, environment, or evaluator.
Quick Start | Paper (arXiv) | License
Sentry is an external runtime failure management layer for LLM agents. It helps agents fix invalid actions and recover when they get stuck in loops, drift from the task, or make unsupported assumptions. Unlike typical runtime monitors with fixed advice, Sentry learns and evolves from recoveries that work. By detecting failures, guiding recovery, and checking that the repair worked, Sentry helps agents become more reliable across tasks without cluttering their context.

Sentry requires Python 3.10 or later.
git clone https://github.com/nuglifeleoji/Sentry.git
cd Sentry
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
sentry-validate configs/paper.yaml
Configure a model provider, then submit each completed agent-environment cycle to Sentry:
from Sentry import SentryRunner, agent_step_from_parts
runner = SentryRunner.from_yaml("configs/providers/openai_compatible.yaml")
runner.start_task(
objective=task_objective,
action_schema=environment_action_schema,
)
try:
step = agent_step_from_parts(
step_id=0,
reasoning=reasoning,
raw_action=raw_action,
tool_name=tool_name,
tool_args=tool_args,
observation=observation,
parsed_ok=True,
schema_valid=True,
accepted_by_environment=True,
)
repair = runner.step(step, terminal=False)
if repair is not None:
agent_messages.append(repair.prompt_text)
finally:
runner.finalize()
Your application remains responsible for generating, validating, and executing actions. See the integration guide for the full lifecycle and validity rules.
AppWorld is the included reference integration:
python3.11 -m venv .venv-appworld
source .venv-appworld/bin/activate
python -m pip install -e '.[appworld]'
appworld install
export APPWORLD_ROOT="$PWD/outputs/appworld-root"
appworld download data
export OPENROUTER_API_KEY="your-api-key"
sentry run appworld --config configs/providers/openrouter.yaml
See the AppWorld guide for environment setup, credentials, and run limits.

This repository currently contains the project overview and paper. We are finalizing our code and documentation and plan to release the full version in 2-3 weeks.

An external runtime failure management layer for LLM agents.
Detect execution failures, guide recovery, and learn reusable lessons from verified recoveries.
Sentry runs alongside your agent loop without replacing the agent, environment, or evaluator.
Quick Start | Paper (arXiv) | License
Sentry is an external runtime failure management layer for LLM agents. It helps agents fix invalid actions and recover when they get stuck in loops, drift from the task, or make unsupported assumptions. Unlike typical runtime monitors with fixed advice, Sentry learns and evolves from recoveries that work. By detecting failures, guiding recovery, and checking that the repair worked, Sentry helps agents become more reliable across tasks without cluttering their context.

Sentry requires Python 3.10 or later.
git clone https://github.com/nuglifeleoji/Sentry.git
cd Sentry
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
sentry-validate configs/paper.yaml
Configure a model provider, then submit each completed agent-environment cycle to Sentry:
from Sentry import SentryRunner, agent_step_from_parts
runner = SentryRunner.from_yaml("configs/providers/openai_compatible.yaml")
runner.start_task(
objective=task_objective,
action_schema=environment_action_schema,
)
try:
step = agent_step_from_parts(
step_id=0,
reasoning=reasoning,
raw_action=raw_action,
tool_name=tool_name,
tool_args=tool_args,
observation=observation,
parsed_ok=True,
schema_valid=True,
accepted_by_environment=True,
)
repair = runner.step(step, terminal=False)
if repair is not None:
agent_messages.append(repair.prompt_text)
finally:
runner.finalize()
Your application remains responsible for generating, validating, and executing actions. See the integration guide for the full lifecycle and validity rules.
AppWorld is the included reference integration:
python3.11 -m venv .venv-appworld
source .venv-appworld/bin/activate
python -m pip install -e '.[appworld]'
appworld install
export APPWORLD_ROOT="$PWD/outputs/appworld-root"
appworld download data
export OPENROUTER_API_KEY="your-api-key"
sentry run appworld --config configs/providers/openrouter.yaml
See the AppWorld guide for environment setup, credentials, and run limits.

This repository currently contains the project overview and paper. We are finalizing our code and documentation and plan to release the full version in 2-3 weeks.