Open source · v0.1.0-alpha.0 · Apache-2.0

AI writes the code.
Averri knows the rules.

Write down the rules of your software once: who is allowed to do what, and what must always be true. Averri turns them into facts your AI coding agent checks instead of guessing, and tests that prove they hold.

npx -y @averri/cli mcp

Works with Claude Code, Cursor and any MCP-compatible agent.

example session
  1. Add a button so admins can remove a team member.
What
Rules and tests for code written by AI
Price
Free, open source
Works with
Claude Code, Cursor, MCP agents
Stack
TypeScript · Prisma · Hono/Express · Zod

Why Averri exists

A brilliant new hire who is always on day one.

AI assistants now write a large share of the world's software. They are fast and talented. But every task starts like a first day at work: they don't know the unwritten rules.

  • Only managers can approve refunds.
  • A customer must never be charged twice.
  • The billing page is read-only.

Nobody wrote these down. They live in people's heads. So the AI does the job well and sometimes quietly breaks a rule it never knew existed. A smarter AI is still a new hire with no handbook.

Averri is the handbook, and the building inspector. You write the rules once. The AI reads them before it changes anything, and automatic tests check them every time.

Try a rule

“Only owners and admins can invite a team member.”

Pick who is trying. This is exactly the check Averri writes a test for, automatically, from one line of rule.

Choose someone

Averri generates one test per row of this table, so nobody has to remember to.

How it works

Three steps. No new language.

  1. 1

    Write the rules in plain TypeScript

    Next to the routes you already have. Who may call it, what must be true before and after, which event must fire.

    export const InviteMember = action("Team.inviteMember", {
      route: { method: "POST", path: "/teams/:teamId/invitations" },
      policy: OwnerOrAdmin,
      requires: { notAlreadyMember: db.none("membership", { … }) },
      ensures:  { eventEmitted: e.emitted(MemberInvited, 1) },
    });
  2. 2

    Averri builds a map of your system

    It reads your Prisma schema, routes, Zod schemas and rules, without ever running your code, and checks them against each other.

    • Every route matched to a rule, or flagged
    • Real database writes verified against what you declared
    • Any change that weakens a rule called out
  3. 3

    Agents ask. Tests prove.

    Your AI agent asks Averri before it edits, and generated tests check every rule on every change.

    • Auth matrix, preconditions, postconditions
    • Events, invariants, webhook pitfalls
    • Plain-English spec cards anyone can review

Eight tools your agent can call

  • overviewWhere am I?
  • findWhere is X?
  • inspectWhat is true about this?
  • impactWhat breaks if this changes?
  • checkIs my change correct?
  • explainWhy did this fail?
  • read_sourceShow me the code.
  • suggestDraft rules for me.

Proof, not promises

It caught a real bug on day one.

264tests generated on the example app
116hand-written tests running alongside
1,033automated tests checking Averri itself
8open-source packages on npm
Found by Averri

On our 38-route example app, built by an AI agent, the "view billing" page was quietly writing to the database. The app ran fine. The normal tests passed. Averri's compiler compared what the page claimed to do with what its code actually did, and flagged it.

An AI wrote the bug. A tool that gives AI the rules caught it.

For developers

Up and running in two minutes.

npm install --save-dev @averri/cli @averri/core @averri/contracts
npx averri init      # detects Prisma + Hono/Express + Zod, writes averri.config.ts
npx averri build     # builds the graph and reports diagnostics
npx averri testgen   # writes generated tests to tests/averri/
npx averri check     # typecheck + affected tests, structured output

Packages

Requirements

  • Node.js 20+
  • TypeScript 5
  • Prisma
  • Hono or Express
  • Zod
  • Vitest

Read next

Averri never executes your code at build time and sends no telemetry. Ever.

The story

I asked AI if I should build it.
It said no. I built it anyway.

  1. AgentLang

    What if a programming language were designed for AI agents first? Fewer wasted tokens, self-explaining errors, software that carries its own map.

  2. AI argued against the idea

    A research sweep, three competing strategies and six critics. It killed most of the idea: a brand-new language is the one language AI has never seen, so it makes more mistakes.

  3. The unwritten rules

    AI already writes code that runs. What it can't know is the rules nobody wrote down. That gap doesn't close as models get smarter, because the rules were never in the code.

  4. Three AI judges said pass

    About 70% confidence each, as a business. Crowded market, slow revenue. They were probably right about the business.

  5. Build it anyway, in the open

    No company, no paid tiers. A free tool, a public benchmark plan and written kill criteria: if agents don't measurably do better work with Averri, that result gets published too.

  6. Averri 0.1.0-alpha.0

    Eight packages on npm, verified from the public registry. The name took five tries: AgentLang, Warrant, Surety, Averr, Averri. From aver: to state something as true.

Read the full journey, including the "no"

Honest about what it isn't (yet)

  • Pre-alpha. Tested, but interfaces will change.
  • One stack for now. TypeScript with Prisma, Hono or Express, and Zod.
  • Not proven yet. The benchmark hasn't been run. The result will be published either way.
  • Not a company. Free and Apache-2.0, and it will stay that way.

An open invitation

Founders, explorers, researchers:
come try it. Test it. Break it.

Averri was argued over, torn down, rebuilt and tested more than a thousand times before its first release. It was built with care, with AI agents, for a future where AI writes most of our software. Now it needs people who will push it harder than we can.

Questions

Frequently asked

What is Averri?

Averri is a free, open-source tool that lets you write down the rules of your software, such as who is allowed to do what and what must always be true, so that AI coding agents check those rules instead of guessing them, and automatically generated tests prove the rules hold.

Who is Averri for?

Teams whose backend code is increasingly written by AI coding agents such as Claude Code or Cursor, and the founders, product managers, engineers and researchers who need to trust that code.

Is Averri free?

Yes. Averri is free and open source under the Apache-2.0 license. There is no paid tier, no telemetry and no hosted service.

How does Averri work with Claude Code and Cursor?

Averri runs as an MCP (Model Context Protocol) server. Add it with one command, for example claude mcp add averri -- npx -y @averri/cli mcp, and the agent can ask Averri about rules, dependencies, the impact of a change, and whether its change passes the generated tests.

Which tech stacks does Averri support?

Version 0.1 supports TypeScript backends on Node.js 20 or later that use Prisma, either Hono or Express, and Zod.

Do I have to rewrite my application?

No. In observe mode you add declarations next to your existing routes, and Averri checks them around your current code in tests. Nothing goes into your request path.

Does Averri run my code or send my data anywhere?

No. The Averri compiler reads your code statically and never executes it, and Averri sends no telemetry or usage data anywhere.

How is Averri different from AI code review tools?

AI code reviewers infer intent from a diff. Averri works from rules a human wrote and approved, turns them into deterministic tests and graph facts, and flags any change that weakens a rule, whether a human or an AI made it.

Is Averri a new programming language?

No. Averri began as AgentLang, an idea for a new language designed for AI agents. Research showed a new language would make AI agents less accurate, so Averri uses plain TypeScript instead.

Is Averri ready for production?

Not yet. Version 0.1.0-alpha.0 is a pre-alpha release. It is tested, with over a thousand automated tests, but its interfaces may change.

Who created Averri?

Averri was founded and curated by Abhijeeth Gadwal, an AI product manager, and built with the help of AI coding agents.