Skip to content
Kavachकवच

What Kavach Does for You

Also known as: features why kavach benefits smart defaults safety speed

● Beginner8 min

The things Kavach does without being asked: fewer mistakes, exact numbers, clear messages, speed and safety. Each one links to its proof.

Much of what makes Kavach pleasant never shows in your code: the compiler and the runtime do it for you. Here is all of it in one place. Each item also appears on the page that teaches it.

Fewer mistakes

Numbers and types

Clear messages

Fast without effort

Safe by default

  • There is no null

    A value that may be missing says so in its type, User?, and the compiler makes you handle the missing case. A null pointer error can't happen.

    spec 2.7Learn it: Optionals →

  • Copies are safe, and cheap

    Assigning a list gives an independent value, so changing one never changes another. It is only really copied if one of them changes.

    spec 6.1Learn it: Values, Not References →

  • Failure is part of the type

    A function that can fail says so in its signature, and the caller must deal with it. No exceptions flying past.

    decision 0007Learn it: Errors →

  • Tests write themselves

    kavach test tests a function from its types and contracts alone; a failure comes with the seed to replay it.

    decision 0010Learn it: Testing →

  • Code can only touch what it declares

    A function that reads files or the network says so with uses; the compiler and the runtime hold it to that.

    decision 0008Learn it: Capabilities →

  • Look-alike names are flagged

    A name mixing letters from two scripts (a Latin a and a Cyrillic а) gets a warning, so hidden look-alikes can't sneak in.

    spec 1.5Learn it: Syntax: Names →

  • Maps can't be attacked through their keys

    Map hashing is seeded fresh for every run, so nobody can send keys built to make your maps slow.

    hash-maps.mdLearn it: Maps →

  • No data races

    Tasks can't change the same value at the same time: the compiler refuses code that could.

    spec 9.5Learn it: No Data Races →

  • Tasks take turns in a fixed order

    The order in which tasks take turns is defined, so a concurrent program prints the same thing on every run, and a bug shows up every time.

    decision 0020Learn it: Taking Turns →

  • Agents survive a crash

    A durable agent writes a journal and, after a crash, replays it to carry on where it stopped, without doing anything twice.

    decision 0025Learn it: Durable Agents →

  • Agent rules the model can't talk its way past

    What an agent may touch is checked when compiling, and its limits and approvals on every call, outside anything the AI model can influence.

    spec 8.3Learn it: Agents →

  • AI answers are typed, not text

    ask<T> checks the model's answer against the type T and asks again when it doesn't fit, so code never parses loose text.

    spec 8.4Learn it: ask<T> →

  • Every agent call is audited

    Each capability call an agent makes is written down with its verdict and result, refused ones too, without a line of logging code.

    spec 8.6Learn it: Audit Log →

  • Secrets stay secret

    A secret prints as <secret> and can't reach logs or messages unless you reveal it on purpose.

    spec 8.7Learn it: Secrets →