For agent builders

Your AI agents will hallucinate. Mimir catches them before users do.

Hallucination Guard API plugs into your agent's output pipeline. One call before you ship the response. Catches invented citations, statutes, policy refs, made-up sources.

Built for agent builders

Drop-in middleware. Three lines of code.

LangChain (TypeScript)ts
import { Mimir } from "@mimir/sdk";

const mimir = new Mimir({ apiKey: process.env.MIMIR_API_KEY });

const chain = ChatPromptTemplate.fromMessages([...])
  .pipe(model)
  .pipe(async (output) => {
    // Drop-in middleware before the user sees the response.
    const verified = await mimir.guard.verifyReferences({
      text: output.content,
      sources: state.retrievedDocs,
      domain: "legal",
    });
    return verified.flagged_text;
  });
LlamaIndex (Python)py
from mimir import Mimir

mimir = Mimir(api_key=os.environ["MIMIR_API_KEY"])

response = query_engine.query(user_query)
verified = mimir.guard.verify_references(
    text=response.response,
    sources=[node.text for node in response.source_nodes],
    domain="financial",
)
final_text = verified["flagged_text"]
Cursor / Cline / Replit Agentpy
# In your agent's tool list, register Mimir as a verifier
from mimir import Mimir

mimir = Mimir(api_key=os.environ["MIMIR_API_KEY"])

def verify_before_send(text: str, sources: list[str]) -> str:
    return mimir.guard.verify_references(
        text=text, sources=sources, domain="legal"
    )["flagged_text"]

# Your agent calls verify_before_send() right before the user sees
# any text that might cite a case, statute, or policy.

Your agent generates → Mimir verifies → user receives. The middleware adds ~150ms to the response and zero false-positive risk: existing [verify] markers are idempotent.

Why pick Mimir over rolling your own

Production-tested. Stateless. Yours.

Pre-tuned across legal / financial / insurance citation patterns

The regex set is the same one shipping in production across nine professional-vertical Mimir Core modules. You inherit the tuning instead of writing your own from scratch.

Idempotent

Safe to call multiple times on the same text. Existing [verify] markers don't get duplicated. Run it inside a retry loop without thinking.

Offset-safe

Won't corrupt mid-text. Pattern matches are sorted by offset; insertions happen in reverse. Concatenated outputs from multi-call agents stay coherent.

Stateless

No cross-tenant data, no learning from your inputs. Your sources stay yours. Per-key usage counts and timestamps are stored for cap enforcement; the inputs themselves are not.

Pricing for agent workloads

Hobbyist is free. Pay as you scale.

Same tiers as the public developer plan. Switch up at any time.

Hobbyist

$0

100 calls/mo

Prototyping

Most builders

Startup

$97/mo

10,000 calls/mo

Early production

Scale

$497/mo

100,000 calls/mo

Volume

Enterprise

Custom

Negotiated

Dedicated infra

Get an API key

Hobbyist tier needs no card. Sign in, generate a key, ship.

Verify your first response in five minutes.

The full API reference lives at /docs/api/hallucination-guard. Quickstart at /docs/quickstart.