RelAI
pip install relaiThe Scale of the Problem
FIELD REPORT // INTERNAL CLASSIFIED
BACKGROUND: Agentic AI is running at massive volume in production (billions of executions/year across frameworks like CrewAI and LangGraph). A meaningful share of runs fail and get restarted from zero — which means paying for the same work twice.
THE GAP: Coding assistants (Cursor, Copilot, Codex) don't solve this — they watch you write code, not a deployed agent running autonomously.
THE INADEQUACY OF OBSERVABILITY: Observability tools (LangSmith, AgentOps) log failures after the fact. They give you a beautiful post-mortem of why you just burned $5.00 on a single failed run.
▸ [SYS] RelAI is live, mid-run intervention active.
▸ [AGENT] "Executing action: search_web(query='...')"
▸ [DETECTOR] Drift detected. Agent deviating from goal trajectory.
▸ [RELAI] Injecting replan instruction into agent state...
▸ [AGENT] Course corrected. Resuming execution.
Watch
RelAI hooks into the agent framework's native callbacks. Zero extra API cost, ~2 lines to add.
Detect
After every step, three lightweight checks run in parallel to catch loop, drift, or false success.
Intervene
On a hit, RelAI writes a replan instruction straight into the agent's state before its next step.
Intervention Detectors.
Loop Detection.
Catches when the agent repeats a near-identical action worded slightly differently.
Drift Detection.
Catches when the agent's steps steadily stop serving the original goal.
False Success Detection.
Catches when the agent declares 'done' but the result doesn't actually answer what was asked.