Guardians for
autonomous AI agents.

Detect failures, halt runaways, and route the first occurrence to your team the moment it happens.

Twenty-plus failure classes

Agents fail in patterns.
Mesedi catalogs them.

Every detector below ships on every tier, including Self-Hosted. Multi-agent topology, human-in-the-loop lifecycle, and OpenTelemetry parallel emission are included too.

What this would have caught

Real incidents.
Each one mapped to a class.

Every case below is a publicly-reported AI-agent failure. The chip on each card is the Mesedi failure class that would have flagged it the first time it happened, once per pattern, not once per occurrence.

cost_velocity+ step_count+ loops+ time_budget

An enterprise client billed $500M on Claude in a single month with no spending caps

An AI consultant reported to Axios that one enterprise gave employees unrestricted access to Anthropic's Claude with no budget, no usage limits, and no dashboards. Agentic workflows running across thousands of employees compounded into a half-billion-dollar bill in 30 days. Microsoft has since capped internal Claude Code licenses ($500-$2K per engineer), and Uber burned its entire 2026 AI budget by April.

Mesedi would catch this: Mesedi's cost_velocity detector fires the first time per-project burn rate exceeds the configured threshold, and the hard-halt mechanism (local SDK + remote SSE) can stop the agent before the next billable call lands. Step_count and loop detectors catch the agentic runaway patterns underneath that drove the total.

tool_failures+ validator_failures

Replit's AI agent deleted a production database during a code freeze

An AI coding assistant ran an unauthorized destructive command on a live database, wiping records for 1,200 executives and 1,190 companies. It then fabricated 4,000 fake users and falsely told its operator the rollback was impossible.

Mesedi would catch this: Mesedi flags a destructive tool call (db.drop / rm -rf / DELETE without WHERE) as a tool_failures event the first time it fires, and the hard-halt mechanism can stop the agent before the next destructive call lands.

drift+ validator_failures

Cursor's support bot 'Sam' fabricated a single-device policy that wasn't real

Customers were getting mysteriously logged out and emailed 'Sam' for help. 'Sam' — actually an unlabeled AI — told them Cursor was now one-device-per-subscription. The policy didn't exist. Users canceled. Cursor refunded and labeled all AI responses going forward.

Mesedi would catch this: Mesedi's drift detector fires when output content diverges from the project's established baseline (in this case, the documented support policy). First occurrence pages the on-call once instead of accumulating angry tweets.

cost_velocity+ loops

A $500/month POC became $847,000/month once it shipped to users

A documented 717× cost runaway, traced to context-accumulation inside agent loops: every retry sends the entire conversation history again, so by step 20 you pay for the same system prompt 20 times. Another team's $500/mo budget hit $4,200 in two weeks.

Mesedi would catch this: Mesedi's cost_velocity detector fires on per-execution spend above your configured $/minute threshold, and identical_call / similar_call loop detectors catch the underlying retry pattern before it compounds into a five-figure invoice.

These are reported events. Mesedi would have detected the pattern; whether the team would have acted on the alert is a separate question.

How it works

Drop-in adoption.
Three steps.

01Install

Add the SDK to your existing project. Self-hosters can run the backend on their own infrastructure; the MIT-licensed source is on GitHub.

Python
pip install mesedi
TypeScript
npm install mesedi
02Wrap your agent

One decorator (Python) or one function call (Node) per agent. Frameworks like LangChain, CrewAI, and Vercel AI SDK have first-class adapters.

Python
from mesedi import wrap

@wrap()
def my_agent(query: str) -> str:
    # your agent code
    return result
TypeScript
import { wrap } from "mesedi";

export const myAgent = wrap(
  async (query: string) => {
    // your agent code
    return result;
  }
);
03Watch for failures

Open the dashboard or wire a webhook. First time a new failure class appears, you get paged once. Never again when it repeats.

Python
# open https://app.mesedi.ai
# or POST a webhook in Settings → Routing
TypeScript
// open https://app.mesedi.ai
// or POST a webhook in Settings → Routing

Why this exists

You can't debug what you
can't see fail.

Production AI agents fail in patterns, not in one-offs. The same loop that ate $40 in tokens this morning will eat $400 next week if nothing catches it. The same prompt-injection vector your agent fell for on Tuesday will land on a quieter target on Friday.

Most agent observability is trace-first, a Datadog for AI calls. You get a firehose of spans and have to build your own alerts to find the patterns that matter. Mesedi is alert-first, a PagerDuty for AI agents. Twenty-plus failure-class detectors run against the event stream as it arrives, cluster related failures into named groups, and fire a webhook the first time a new pattern shows up, with a Tier 1 Playbook describing the standard fix attached.

The backend, SDKs, and dashboard are all open-source under MIT. The full repo lives on GitHub at mesedi-ai/mesedi. Python and Node packages are live on PyPI and npm. The hosted service runs on Fly.io. Self-host if you want to, or use the hosted service if you don't.