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
    DocsSDKs overview

    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/SDKs

    SDKs

    Kavach SDKs for 12 languages. Every one has the same three pieces, records to the same recorder and replays through the same CLI.

    kavach v0.2.0

    Language Requires Dependencies Page
    Go Go 1.23+ none Go
    Python Python 3.10+ standard library only Python
    TypeScript / JavaScript Node 22+ (ESM) none TypeScript
    Rust Rust 1.75+, Unix none Rust
    Java Java 21+ JDK only Java
    C and C++ C11 / C++17, POSIX libc, pthreads C and C++
    Ruby Ruby 3.1+ none Ruby
    PHP PHP 8.2+, CLI workers none PHP
    Elixir Elixir 1.15+ standard library only Elixir
    Haskell GHC 9.4+ boot packages only Haskell
    OCaml OCaml 5.1+ compiler distribution only OCaml
    Julia Julia 1.10+ standard library only Julia

    No SDK for your language? An SDK is a thin wrapper over two small protocols. See Integrate without an SDK.

    NoteInstalling SDKs

    The SDKs are not yet published to package registries. Install them from a checkout of the Kavach repository: each page shows the path. The Go SDK is a regular Go module.

    The same shape everywhere#

    Every SDK has three pieces:

    1. A handler, called once per input. It reads the clock, random bytes, external systems and config, and emits its effects, only through the env it is given.
    2. A recorder that wraps your consume loop: one step per input, with effects delivered after the step succeeds. It starts kavach-recorder as a child process (from $KAVACH_RECORDER, else PATH).
    3. A host mode: when the program is started with kavach-host as its last argument, it serves replays to the CLI instead of consuming. One call at the top of main does this.

    Optionally, a handler can provide snapshots (snapshot / restore), so fixtures start from recent state, and invariants, checked after every step, live and in replay.

    The env#

    Purpose Go Python TypeScript
    Clock env.Now() env.now(), env.now_ns() env.now(), env.nowNanos()
    Random bytes env.Read(buf) env.random(n) env.random(n)
    External query env.Query(gw, req) env.query(gw, req) await env.query(gw, req)
    Config / flag env.Config(key) env.config(key) env.config(key)
    Effect env.Emit(sink, data) env.emit(sink, data) env.emit(sink, data)

    Failures are recorded the same way#

    The handler Marker Message compared on replay
    panics / throws panic the panic value or ErrorName: message; the stack is marker data
    returns an error error the error's message
    ends ok but an invariant fails invariant the invariant's name
    dies mid-step (killed, out of memory, abort) crash written by the recorder, which sees the pipe close

    Keep paths, line numbers and addresses out of failure messages; they belong in marker data, which is not compared.

    Every SDK passes the same conformance suites#

    Each SDK passes the host-protocol transcripts and recorder cases in the Kavach repository's spec/ directory. Those suites are the contract: a fixture recorded by one SDK replays through the same CLI as any other, and verdicts mean the same thing in every language.

    Every SDK ships the demo#

    Each SDK includes a port of the quickstart ledger with the same "amount": null bug, and a flag (--fix or --fixed) that selects the fixed handler. Behaviour is always chosen by flag, never by environment variable, because environment values are served from the fixture on replay.

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

    PreviousUse with AI agentsNextGo

    On this page

    1. The same shape everywhere
    2. The env
    3. Failures are recorded the same way
    4. Every SDK passes the same conformance suites
    5. Every SDK ships the demo
    View as Markdown