Skip to main content

Benzi

Benzi
by Variant Technologies

Benzi is a compiler-backed coding agent that compiles your codebase into a resolved, queryable map of calls, data flow, control flow and class hierarchy first; then it reads, explains, runs, edits and verifies your code using it. Includes a runtime tracer that settles what static analysis can't. The Benzi compiler also works as an MCP server.

Benzi is free to use — actively in development, a work in progress.

Full README, benchmarks, and demos on GitHub


What is Benzi

Most AI coding agents dump a repository into a context window and hope the model finds what matters. Benzi works differently: before answering anything, a real compiler — built on tree-sitter — parses every file in the project and resolves it into a precise, queryable map. Every symbol, every call edge, every reference, every class in its inheritance chain. One pass, done.

Call flow and data flow are joined at every call site, so a bad value traces to its origin in one tool call. Claude Code greps; Cursor embeds; Aider maps signatures; Benzi resolves — and answers in O(1). Ten languages so far, plus a second engine for markup (HTML, CSS, DOM-JS).

What people say

"78.2% for $37 is a slap in the face to the 'brute force wins' school." — Alex Xiang, zicode (translated)

"Benzi is proving that the core competency of coding tools is shifting from simple 'reading comprehension' to 'structural grasping ability.'" — Gi Pyeong Lee, Tech Blog

"Fewer tokens, no context drift. Wild idea, honestly." — prompt 🤖 AI News

"It analyzes changes before writing them — and beats Claude Code on benchmarks." — Ponte al dIA (translated)

SWE-bench Verified

The full SWE-bench Verified set — 500 real GitHub issues from twelve Python repositories — run end to end on DeepSeek v4-flash, one attempt per instance, graded by the official swebench.harness.run_evaluation inside its own per-instance Docker images, with network access to GitHub and PyPI blocked inside every container.

Resolved 391 / 500 — 78.2%
Total cost, all 500 instances $37.33
Cost per instance resolved $0.095
Source lines read (total / median) 231,574 / 379
Model turns (total / median) 16,091 / 27

Full technical report and per-instance breakdowns: GitHub.

How it works

  1. Compile. Tree-sitter parses every file; imports are resolved, class ancestry built, every identifier traced to its definition. The output is an index, not a blob of text.
  2. Query. The agent answers questions and plans edits through structured tools over that index — profile, get_callers, backflow, trace_path, skim_source, and ~30 more.
  3. Edit, gated. Every write passes syntax and semantic gates against the real language parser — a broken parse auto-reverts, checking blast radius before a change lands, not just after.
  4. Verify by running it. A focused repro runs under a runtime tracer — real argument values, real returns, real dispatch — which both proves the change and settles the map.
  5. Reindex, incrementally. The map follows the filesystem, never the agent's account of what it did — each turn re-parses only the files whose bytes actually moved.

Tools

A sample of Benzi's 35+ tools — the full list is on GitHub:

Tool What it answers
get_callers Every call site that reaches a function — the code that will feel a change.
call_tree The transitive call closure from one function, forward or in reverse.
trace_path The call chain connecting two functions, and the data carried along it.
backflow / forwardflow Where a wrong value came from / where a return value ends up.
profile The full 360 on one symbol in a single call.
search_symbols Case-insensitive substring search across every symbol in the repo.
get_hierarchy A type's resolved bases and its direct subclasses.
skim_source A body's one-level outline, so you know which lines are worth reading.
execute_from / execute_generated_testcase Runs code under the call tracer; writes and runs a self-contained repro.

Full list of 35+: GitHub.

Features

  • Six states, never a guess — every call site and file carries one: resolved, external, candidate, unresolved, observed, or unindexed. Whatever static analysis can't settle is flagged as unsettled, not guessed.
  • Runtime tracer — hooks every call during execution and overlays the observations back onto the static map.
  • Persistent memory — durable per-repo facts survive restarts.
  • Dual-engine: code + markup — a separate index for HTML/CSS/DOM-JS.
  • Model-agnostic — Anthropic, OpenAI, or any compatible API.

Language support

Python · JavaScript · TypeScript · Java · C# · C++ · C · Go · Rust · Ruby

One compiler, ten languages. Python is deepest — it's the only one with the runtime tracer. Depth varies elsewhere; see Language support on GitHub for specifics.

Install

pip install benzi

# one-time setup -- verify your email, then bring your own API key
benzi-login --login you@example.com
benzi-login --anthropic-key sk-ant-...       # or --nonanthropic-key for
                                              # groq/deepseek/kimi/etc

# then, from inside (or pointed at) any repo:
benzi-headless . "what does this repo do?"

This also installs benzi-mcp — the same compiled index exposed as tools over MCP, for whatever agent you already run (Claude Code, Cursor, your own harness). Point your MCP client at it after the same benzi-login step; output quality then depends on that harness, since this mode has no agentic loop of its own.

. means "the repo I'm standing in" — pass a path instead if you're running it from somewhere else. Your key stays on your own machine and talks to your model provider directly; Benzi's servers never see it or proxy the call. Run benzi-login with no flags any time to see what's currently saved, or benzi-headless --help for every option.

Benzi is also available as a live web demo (no install, no key needed) and a VS Code extension.

FAQ & comparisons

Do I need an API key? For the CLI, MCP, and the VS Code extension, yes — bring your own Anthropic or OpenAI-compatible key. Only the browser demo runs without one.

How is this different from Cursor, Copilot, or Claude Code? They find code by searching text — grep, or embedding similarity. Benzi resolves it first: a tree-sitter compiler builds a real index of symbols, call edges, inheritance and data flow, and the agent queries that index instead of guessing which files to read.

Full FAQ & comparisons (privacy, pricing, limits, and how Benzi compares to Claude Code, LSP servers, CodeQL and CodeGraph): GitHub.


Full README on GitHub — benchmarks, demos, and more.

Metadata

Release files for benzi 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for benzi 0.1.3
File
benzi-0.1.3-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
benzi-0.1.3-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details
benzi-0.1.3-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
benzi-0.1.3-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details
benzi-0.1.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
benzi-0.1.3-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
benzi-0.1.3-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
benzi-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
benzi-0.1.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
benzi-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
benzi-0.1.3-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
benzi-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
benzi-0.1.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
benzi-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
benzi-0.1.3-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
benzi-0.1.3-cp311-cp311-macosx_10_13_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.13+ x86-64 Details

Total release size: 47.0 MB

Release files / benzi-0.1.3-cp314-cp314-win_amd64.whl

Download URL benzi-0.1.3-cp314-cp314-win_amd64.whl
Size 2.4 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
75f56365a364daacdeea08e6deea0d28bc6dfe5511cecb96c5b304dfe12e30d6
BLAKE2b-256 checksum
How to use checksums
fd0111dee14aded557f5fa91e713de63c2e0cc3100e50300c50873a1c79a44c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL benzi-0.1.3-cp314-cp314-manylinux_2_34_x86_64.whl
Size 4.5 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
a97ff75bc4ce081cfccd9c93eba62f05c71623c3df8f7b074e2390879b1feec3
BLAKE2b-256 checksum
How to use checksums
71e8667f226a2035d8b7779b2ef10bef7a63c4ec0361eb29fc63d28fbb62b99d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp314-cp314-macosx_11_0_arm64.whl

Download URL benzi-0.1.3-cp314-cp314-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f8d1af597e6f83d435d36cdc66a9aae7dd740613ce9b0da62a009e170b339558
BLAKE2b-256 checksum
How to use checksums
38ac48c79ce8a5e801ed12e1a0a30eb269f1582a71bbc6014866ab50e2005e9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp314-cp314-macosx_10_15_x86_64.whl

Download URL benzi-0.1.3-cp314-cp314-macosx_10_15_x86_64.whl
Size 2.7 MB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
a1367f4cfe30acd2a25b605c996b9efe401a2c330e87e762d51a5c3dcef2828f
BLAKE2b-256 checksum
How to use checksums
68cec0b6324ea1c13967d25e6fee1b92f87541d1df3ed28444b356c22a1fb659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp313-cp313-win_amd64.whl

Download URL benzi-0.1.3-cp313-cp313-win_amd64.whl
Size 2.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
2b4e776715e6da2332e236873ce2b5b38523b778a5437a1ac742afc1f2ed36b0
BLAKE2b-256 checksum
How to use checksums
031f5ead2c81887a40ccc1353bf135ed9e860e67e2f57b65ad5a04f84c7fd4f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL benzi-0.1.3-cp313-cp313-manylinux_2_34_x86_64.whl
Size 4.4 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
91f6cb6e74cb3831f1a75290d5e20e934d61b53f97112fb006690888483c0cec
BLAKE2b-256 checksum
How to use checksums
471e60cd3ed4bbacd73328aeb18621aa260bbba424f0566c9a42b7d234110cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp313-cp313-macosx_11_0_arm64.whl

Download URL benzi-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
869381559f4c9abea0ff0b9f3beb46001f5b0474f775f4bdbf6038e2188cf6d1
BLAKE2b-256 checksum
How to use checksums
11d11483302e9f8623888b467c1d6000a7b3f0f8567608224cc10525df6006ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl

Download URL benzi-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl
Size 2.7 MB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
7f66c60e7fb34d8bdd96aa05681757e8da5ab591970d7b0f581b2794d2a74e83
BLAKE2b-256 checksum
How to use checksums
dc41f8378e04904d145ab799d27f7023f1ba869ed947f2d5e302872ea125bfdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp312-cp312-win_amd64.whl

Download URL benzi-0.1.3-cp312-cp312-win_amd64.whl
Size 2.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
5f7b0884cc0895c68dc004124b8f7ae15c6c729c7f27dc3ec5f6dd22d086ab71
BLAKE2b-256 checksum
How to use checksums
4b4928ae1cdb8d0cf30f80a557961d26c37e0543627d0c1aebb48f3ada4ea17a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL benzi-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl
Size 4.4 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
293622fd4c0585f722d54b116695c5fdc37dd4b2ccb8d8afcbbb31b7208ece11
BLAKE2b-256 checksum
How to use checksums
40acf2675a9837299454b3e78cf71d5371b40a2a7898914272844381588df670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp312-cp312-macosx_11_0_arm64.whl

Download URL benzi-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8a8c5d2dde0fb111fa8ca1ad4d468db258f0879d4f0237161b8f5f5e64c0fff2
BLAKE2b-256 checksum
How to use checksums
dc506bda6d57c0f1fd14642c9e2233b51828649bedc4977f2b8ad2fb8db0b92c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl

Download URL benzi-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl
Size 2.6 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
81015fe038760146fd3bf20626cf2233cd9fe5602c81903284694c954710ef56
BLAKE2b-256 checksum
How to use checksums
982eed8614db46ae46f7c050f3214d2a1801524d3219edc595b7cbf2aff0c7fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp311-cp311-win_amd64.whl

Download URL benzi-0.1.3-cp311-cp311-win_amd64.whl
Size 2.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9accb052f363b865ceb3ed193f3bd4328b2d2df348588e423356151347cbe294
BLAKE2b-256 checksum
How to use checksums
0d28b77f1d7f38cf58c9574b6567c71c7b1cf86c9f4c8971abc6bf531ca99c8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL benzi-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl
Size 4.0 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
3afafe3062e0b8e2bc99dd5b6f4a0145cb9c275f9b32ece6cbc02d2c97567df3
BLAKE2b-256 checksum
How to use checksums
5ea90373883bc8c7c7f729975dce5e9ce4bee503d4de813b2cbf758b3aa5327b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp311-cp311-macosx_11_0_arm64.whl

Download URL benzi-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
10ba5e0d378157c5c8a81e80fdb37169929a1e01dd6ef4015e3fe5313efd2812
BLAKE2b-256 checksum
How to use checksums
1689b0825f2968db2a5545d41f3552bb60a97dff8c44aa95060cf21114a2f50a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / benzi-0.1.3-cp311-cp311-macosx_10_13_x86_64.whl

Download URL benzi-0.1.3-cp311-cp311-macosx_10_13_x86_64.whl
Size 2.6 MB
Tags CPython 3.11 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
2674544196aaa8252f3a2e78b9b564d25652c889408c08db59b6422ed4fa6b0e
BLAKE2b-256 checksum
How to use checksums
ca379596bbcf3aa931c798a5931ab9128e115871d02ee06c79f77c51e4c32aa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.1.6

16 release files

0.1.5

16 release files

This release

0.1.3 This release

16 release files

0.1.1

8 release files

0.1.0

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page