# Kavach developer docs

> Kavach is a flight recorder for production software. It records what a service does, turns a failure into a file you can replay on a laptop, and checks a fix before it counts.

When a production service crashes, the evidence is usually gone: logs are partial, the input is hard to find, and the state that caused the bug has moved on. Kavach keeps that evidence. It records every input, clock read, random read, external query and output a service makes. When a step fails, it writes a small `.kavach` file: a **fixture** that replays the failure byte for byte, with no broker, database or network.

With that file you, or a coding agent, can:

- **Reproduce** the crash in microseconds, as often as you like.
- **Fix** it and check the fix with `kavach diff`. A fix counts only when the recorded failure is gone and the fix also holds on at least 10 variants of the incident, so a patch that only handles the one recorded event fails.
- **Keep** the fixture as a regression test that runs in CI.
- **Build features** against a contract: recorded traffic, the steps a feature should change, and invariants from the spec.

Kavach works with services in 12 languages (Go, Python, TypeScript and JavaScript, Rust, Java, C and C++, Ruby, PHP, Elixir, Haskell, OCaml and Julia), and with any other language that speaks its two small protocols.

## What Kavach is for

Kavach fits **single-writer, journal-driven services**: one process consumes a stream of inputs (queue messages, commands, requests) one at a time and folds them into state. Ledgers, order books, schedulers, workflow engines, stream processors and many queue workers have this shape.

It is not a tool for multi-writer or shared-state services, and it does not record and replay network traffic as "tapes". Kavach re-derives state from inputs; it does not stub dependencies from recorded responses.

```callout
note | Status: pre-alpha
The journal format, the flight recorder, replay and the CLI work today. APIs and the file format will change before 1.0. The open-source core (CLI, recorder, replayer, MCP server) is Apache 2.0.
```

## How the docs are organised

- **Get started**: install Kavach, run the demo, learn the terms.
- **Guides**: one task each, from instrumenting a service to running Kavach in CI.
- **SDKs**: the API for each language, and how to integrate a language with no SDK.
- **Reference**: every CLI command and flag, every verdict, the MCP tools, the `map.json` schema and the journal format.
- **Enterprise**: the sidecar daemon, Kubernetes operator and self-healing control plane.

Every page is also available as plain markdown: add `.md` to its URL, or use the link beside each page. The whole set is listed in [/llms.txt](https://www.thekavachlabs.com/llms.txt) for AI assistants.

Source: https://www.thekavachlabs.com/docs
