Skip to content
Kavach Labs
How it worksAtlasAtlasPricingPricingDocsDocsBlogBlogReleasesReleases
3
Esc

    ↑ ↓ to move↵ to open

    Get started

    • Overview
    • Installation
    • Quickstart
    • Concepts

    Guides

    • Instrument a service
    • Fix an incident
    • Build a feature
    • Write invariants
    • Run in CI
    • Flow maps
    • Use with AI agents

    SDKs

    • Overview
    • Go
    • Python
    • TypeScript
    • Other languages
    • No SDK? Use the protocols

    Reference

    • CLI
    • Verdicts
    • MCP tools
    • map.json
    • Journal format
    • Troubleshooting

    Benchmark

    • Methodology

    Enterprise

    • Overview
    • Install and upgrade
    • Deploy
    • Storage
    • Operations
    • Security
    • Data handling
    DocsUse with AI agents

    Get started

    • Overview
    • Installation
    • Quickstart
    • Concepts

    Guides

    • Instrument a service
    • Fix an incident
    • Build a feature
    • Write invariants
    • Run in CI
    • Flow maps
    • Use with AI agents

    SDKs

    • Overview
    • Go
    • Python
    • TypeScript
    • Other languages
    • No SDK? Use the protocols

    Reference

    • CLI
    • Verdicts
    • MCP tools
    • map.json
    • Journal format
    • Troubleshooting

    Benchmark

    • Methodology

    Enterprise

    • Overview
    • Install and upgrade
    • Deploy
    • Storage
    • Operations
    • Security
    • Data handling
    Kavach Labs

    A flight recorder for production software.

    Product

    How it worksPricingFor agentsAgent benchmarkRelease notes

    Developers

    DocsQuickstartSDKsCLI referenceAgent skillsEnterpriseBenchmarksSource

    Project

    BlogLicenseReport a bug
    © 2026 Kavach LabsPre-alpha · Apache 2.0
    Docs/Guides

    Use Kavach with AI agents

    Give coding agents a fixture to reproduce and an objective check on their fix. Install the five agent skills and register the MCP server in Claude Code, Codex, OpenCode, Cursor or Antigravity.

    kavach v0.2.0

    A coding agent that fixes production bugs from logs is guessing. With Kavach it has the exact failing input to reproduce, and a check (kavach diff) that tells it, without reasoning, whether its fix holds. A fix the agent only fitted to the recorded event fails on a variant, and the agent sees which one.

    Install#

    The install script copies the skills into every agent it finds. Or install only the skills:

    npx skills add kavachlabs/kavach

    Register the MCP server#

    kavach mcp serves the same checks as structured JSON over the Model Context Protocol.

    claude mcp add kavach -- kavach mcp
    ~/.codex/config.toml
    [mcp_servers.kavach]
    command = "kavach"
    args = ["mcp"]
    ~/.gemini/config/mcp_config.json
    {
      "mcpServers": {
        "kavach": { "command": "/Users/you/.local/bin/kavach", "args": ["mcp"] }
      }
    }

    Antigravity starts MCP servers without your shell's PATH, so give it the full path that command -v kavach prints. Other MCP clients take the same command: kavach mcp, on stdin and stdout.

    Zero-install public Atlas MCP (https://mcp.kavachlabs.dev/mcp)#

    To query AST-verified invariants, causal traces, and starter contracts for public GitHub repositories without installing anything locally, connect over Streamable HTTP:

    claude mcp add --transport http kavach-atlas https://mcp.kavachlabs.dev/mcp

    See the Visual Invariant Atlas for one-click Cursor/VS Code install links and the MCP reference for the full tool list.

    The five skills#

    Skill What it teaches the agent
    /kavach-fix Reproduce a .kavach crash, fix the handler, and generalise until kavach diff returns fixed across every incident and regression variant.
    /kavach-implement Build a feature contract-first: record traffic, declare invariants from the spec, stop for your approval, then iterate until kavach contract check returns pass.
    /kavach-setup Map the service's state boundaries into .kavach/plan/state-map.md, then instrument the handler with the right SDK, or build a host harness, in any of the 12 languages.
    /kavach-invariants Propose invariants and planned mutants in .kavach/plan/invariants.md, declare them, and mutation-test each in milliseconds.
    /kavach-verify Check another agent's fix or feature and post the verdict without touching the code: the verifier in a multi-agent pipeline.

    The skills write plans (state-map.md, invariants.md, map.json) under .kavach/plan/ for you to review before they change code.

    Starter prompts#

    /kavach-fix Reproduce the crash in testdata/null-amount.kavach and fix the handler until kavach diff reports verdict: fixed.
    /kavach-setup Map the order-matching handler in internal/matcher/ into .kavach/plan/state-map.md and instrument it with the Kavach Go SDK so it records production failures and runs as a kavach-host for replay.
    /kavach-implement Implement the feature described in docs/spec.md contract-first with Kavach. Stop after kavach contract show so I can approve the contract before you write the implementation.
    /kavach-invariants Write .kavach/plan/invariants.md for the ledger service, declare the invariants on the handler, and falsify each one by mutation-testing it against a recorded journal.
    /kavach-verify Check the ledger worker's fix in #12 against testdata/null-amount.kavach and post the verdict.

    Agent teams#

    In a team of agents, give one the verifier role with /kavach-verify. It never edits code, fixtures or contracts; it builds what the author built, runs Kavach, and posts one result:

    @coordinator [done] [kavach] fixed · null-amount.kavach · re #12
    old still_failing@32 → new fixed · variants 51/51 · regressions 47/47

    In an Antigravity /swarm:

    /swarm Fix the incident in testdata/null-amount.kavach. Add a worker named verifier whose brief is: load the kavach-verify skill and check every [done] post from the fixer.

    Rules every agent follows#

    These are in the skills; state them in your own agent instructions if you drive Kavach without them.

    • Reproduce before fixing. If kavach replay does not reproduce the failure, stop and report it.
    • Never edit, regenerate or delete a fixture to make a check pass. It is a record of production.
    • Never approve a contract. A person runs kavach contract approve.
    • A fix counts only at fixed. unverified is not fixed; variant_failed(3)@15 is not "mostly works".
    • Report verdicts exactly as Kavach prints them.
    • Generalise; never special-case a variant.

    The MCP tools#

    Tool Does
    kavach_list_incidents Finds every *.kavach under a directory, with each failure's kind, seq and message.
    kavach_replay Replays a fixture or variant on a host command.
    kavach_time_travel Replays up to a seq and sends probe inputs to the live handler.
    kavach_diff Verifies a fix across variants and regression variants.
    kavach_contract_show Shows a feature contract and its lock.
    kavach_contract_check Checks a build against an approved contract.
    kavach_map Builds a flow map summary, or writes the HTML.

    There is no tool to approve a contract. Arguments and results are in the MCP reference.

    Slash command without skills#

    For agents that read Markdown commands but not skills, /kavach-implement also ships as a plain command file with $ARGUMENTS. Copy commands/kavach-implement.md from the Kavach repository into .claude/commands/ (Claude Code) or .opencode/command/ (OpenCode).

    Something wrong or missing on this page? Report it on GitHub, or write to hello@thekavachlabs.com.

    PreviousFlow mapsNextOverview

    On this page

    1. Install
    2. The five skills
    3. Starter prompts
    4. Agent teams
    5. Rules every agent follows
    6. The MCP tools
    7. Slash command without skills
    View as Markdown