vinv.ai/open source · Apache 2.0

autonomous swarm · closed loop · runs on your machine

An autonomous swarm that finds bugs, dead code and performance issues in your codebase — and fixes them with closed-loop RL.

Nine oracles hunt a real run of your code in parallel: endpoints and functions driven with inputs nobody wrote, adversarial-but-legal shapes at every dependency boundary, concurrent schedules, and every symbol no capture ever executed.

Findings go to the coding agent you already pay for. Nothing lands unless it survives acceptance tests written before the fix that the agent never sees — and every outcome trains what the swarm hunts next. Judgement comes from what the code actually did, not from what the agent claims.

Python first — services and plain libraries. TypeScript and Go next. Free and open source, Apache 2.0. No account, no API keys, no telemetry.

// install — pick your editoropens Vinv in your editor

Each button hands off to your editor and opens the Vinv page — one click to install. Deep link not working? Open the listing directly on Open VSX.

On first run Vinv builds its engines in a terminal you can watch, and fetches a one-time ~500 MB local embedding model. You need uv and Rust, plus a coding-agent CLI you already pay for. No account, no API keys, about four minutes. It all lives in one open repository.

From cold repo to production-ready: Vinv's nine stages around your coding agent — bring up, trace, index, map, exercise, find, dispatch, verify, learn — each annotated with what it does and which engine runs it
// one command starts it — Vinv drives the other eight stagesevery arrow is evidence

84% of developers use or plan to use AI coding tools, and more of them actively distrust the output (46%) than trust it (33%) — distrust nearly doubled in a year. The agent edits the wrong handler, invents return shapes, then grades its own homework while the server won't start.

We automated writing and left proving manual. So the work moved instead of disappearing. Meanwhile the repo fills up: duplication climbs, refactoring falls, and dead code accumulates — and every dead module competes for your agent's context window, making the next answer worse.

Vinv automates the proving. Then, and only then, the finding and the fixing.

A swarm with no structure is a slogan. Here is the roster — nine oracles, each with a distinct way of breaking your code, all writing into the same findings list and the same fix-dispatch path:

HTTP exerciserDrives every endpoint itself — schema-valid, boundary, negative, values mined from real traces, multi-step auth scenarios
Function harnessCalls your functions in process — no routes, no server. This is what makes a plain library testable
Differential oracleCompares a function against a reference implementation — for an evaluator or parser, CPython itself. Disagreement is the bug report
Fault injectionAdversarial-but-legal shapes at a dependency boundary, plus a sweep of every chunk-split point on a stream
Concurrency oracleDeterministic interleavings and timeout injection — shared state that corrupts in parallel, lock orderings that deadlock
Environment oracleA dependency-resolution matrix, and upstream symbols whose signature moved under you
Golden I/O baselinesA “faster” change that quietly dropped a response field or changed a status class
Dead codeUntraced islands — connected sections nothing executed in any recorded run — with the live callers that still reference them
Runtime analysisLatency hotspots, memory-leak suspects, duplicate recomputation worth caching, and the throughput ceiling

They don't all run flat out. One budget is allocated across every armed oracle by Thompson sampling over (target × technique × oracle). Cost is measured rather than assumed, so an oracle that takes forty seconds to find what another finds in one loses. Credit is paid once per defect signature, so a deterministic oracle can't re-earn credit for the same bug forever. The posteriors persist — which technique pays on your repo is learned across runs.

Code the purity guard can't verify runs behind a containment ladder: a kernel-enforced OS sandbox where your host offers one, otherwise a process shim — always with a disposable copy of the repo, redirected home and temp directories, and blocked network and subprocess spawning. Which tier you got is decided by a probe that checks a write outside the root really failed, and it is reported honestly.

Static tools can only prove “nothing statically references this.” They can't see dynamic dispatch, feature flags, registries or environment drift — so they emit candidates a human has to adjudicate, which is why the cleanup never happens.

Vinv can say: no capture ever executed this, here is what still references it, and here is the traced neighbourhood it would wire back into.

The unit is a section — a connected island of untraced symbols — not a lint row, because dead code is almost never one function. Each section carries its reachability evidence, which is the whole question: “live code references this and the path was never taken” and “nothing points at this at all” lead to opposite decisions. The live neighbourhood comes from a Personalized PageRank walk seeded at the section's symbols, keeping only traced neighbours — the place an integration would actually wire into.

Then your own agent reads it and returns a verdict — integrate, reimagine, delete, keep, or unclear — with what breaks if it goes. Sections travel five to a prompt so it can say “this is the older copy of the section below”, a judgment a per-section run structurally cannot reach. And if you want proof the code can execute at all, Vinv asks the agent for a driver, runs it under the tracer, and counts which symbols came alive.

Two things it refuses to do: call anything dead with no trace on disk — with zero captures every symbol is untraced, so the list would be your codebase — and drop anything silently. Both caps are shown, so “12 sections” is distinguishable from “12 is the cap and 300 were dropped.”

Vinv product journey — code graph, graph to source, Ask Vinv with runtime citations, diff impact, and the closed-loop verdict card
// the loop — explore, ask, fix, judge the verdict7 screens · live install

Static scanners guess. Vinv records a real run and ranks what failed, what never executed, and what was slow. No “possible issue” — every finding names a symbol, a line, and the trace behind it. A repo with nothing serving still gets hunted: the five service-free oracles need no port at all.

Findings become evidence packs and go to your own agent — Claude Code, Codex, Cursor, Gemini CLI, Copilot Chat, Windsurf Cascade. Your agent is Vinv's only LLM. No new bill, no model picker, no provider keys. The pack is composed from one context graph: your code, your traces, and the metrics derived from them, joined on the exact function that handled each request. The artefacts are commodities; the join is not.

Replayed start. Live port. Acceptance tests authored before the fix, stored outside the workspace under an opaque token, and required to fail deterministically twice on the broken code — a test that passes pre-fix is thrown away.

Around that: a static pre-gate before any test budget is spent, a deterministic anti-cheat audit over the diff and untracked files (test edits, swallowed exceptions, shadow modules — hard flags block eligibility outright), a bounded judge that can push toward scrutiny but can never rescue a failed gate, and a mutation smoke whose survivors are never revealed to the fixing agent. One click reverts everything an episode touched, untracked files included.

Two ledgers, both local, neither uploaded. What Vinv retrieves and what it packs into an evidence bundle are chosen by Thompson sampling with an exploration floor, and the exact propensity is logged with every decision — the requirement for an unbiased off-policy estimate later. Posteriors count only objective episodes: a user abort is not evidence about how good a context pack was. Attribution is an exact Shapley value, so “did runtime evidence help” is a computed number rather than a claim.

A retrieval configuration is promoted only when every gate holds — effective sample size, minimum support per compared action, a bootstrap 95% lower bound on the doubly-robust delta above zero, no clipped weights, and no epoch contradicting the pooled result. It then serves at 5% first and rolls back automatically after three consecutive negative rewards.

Run on this repository's own ledger — 800 logged decisions, 770 joined, 12 index epochs — the gate promoted top-k 10 (+0.173, 95% CI [+0.081, +0.317]) and blocked both other candidates: one for an uncertain lower bound, one for zero support. It admitted exactly the measured winner. The parts that are not online learning — the referee's thresholds, the oracle catalogue, the fault shapes — are fixed policy, deliberately. Full math with a file and line for every claim is in the repository.

Context beats model size. We took five real issues from fastapi/full-stack-fastapi-template (44k★) — four bugs and one performance problem, all found by Vinv itself. We handed all five to a frontier model working blind, then to a cheap commodity model holding Vinv's evidence. Same issues, same prompts, Vinv grading both:

Commodity model + Vinv4 bugs + 1 optimization
Frontier model, blind1 bug
Commodity model, blindnothing

One trial per condition — a demonstration, not a benchmark. The point isn't the model ranking. Blind, the commodity model scored zero. Hand it the failing frame, the caller chain, and the real argument values, and it beats a stronger model guessing from static code. The evidence is what moved, not the weights.

And the loop keeps finding real ones. On the same pristine template it later detected — from live traces alone — that the app's default database pool makes requests queue for connection checkouts under concurrent load, dispatched the pool-sizing fix, and proved it: sustained-load median 75.6ms → 41.2ms, 45.4% faster (95% CI [36.3%, 45.8%]), with responses byte-identical. Two earlier attempts whose measurement windows couldn't certify the win were auto-reverted — the accept landed only when the evidence did.

Vinv detects connection-pool starvation on the FastAPI template, dispatches the fix, and proves a 45.4% median improvement with a paired-bootstrap 95% confidence interval

Semantic code search

Ask by meaning, get ranked symbols with their bodies and line numbers. Embedded by a model that runs on your machine — no cloud keys.

Semantic code search: ask by meaning, get ranked symbols with line numbers

Code Graph

A persistent map of every symbol and call edge, updated as you save, with the runtime overlaid on top of it.

The interactive Code Graph with a live runtime overlay

Runtime tracing

Timing, memory, arguments, returns and errors for every call, joined back to the line that produced them. No SDK, no code changes.

Zero-edit Python tracing: timing, memory, arguments, returns and errors per call

Rank suspects

On any failure, symbols ranked by fault-localization score over real passing and failing requests, with the error messages attached.

Fault-ranked suspects over real pass and fail requests

Dead code

Connected sections nothing executed in any recorded run — split into never referenced and reachable but never taken, with the live callers that still point at them and a verdict on whether to cut or keep.

A dead-code section report: reachable but untested, the live code that references it, and the agent's keep-or-cut verdict with reasoning

Recoverable time

Latency hotspots ranked by the time you would actually get back, each one dispatched as a predicted-then-proven optimization rather than a guess about what is slow.

The Optimize panel: open opportunities, recoverable milliseconds, and per-call latency against the whole-flow ceiling

Verified fixes

Replayed start, live port, acceptance tests the agent never sees. One click reverts everything an episode touched.

Independent fix verification: replayed start, live port, unseen acceptance tests

Vinv runs your Python code under a zero-edit tracer and ties every runtime span back to the exact source symbol that produced it. Your code, your traces, and the metrics derived from them — joined on the function that handled each request. That single graph is what your agent queries, over MCP, through the agent CLI you already use. No cloud keys. The embedding model runs on your machine.

One run took the same template from 0 of 23 endpoints executed to 23 of 23 and surfaced four real bugs — all behind auth, which is why ordinary traffic never reached them:

  • GET /api/v1/users/ returns 500 — an invalid email stored by an unvalidated private endpoint poisons response serialization
  • POST /api/v1/private/users/ leaks a database integrity error as a 500 — untyped email field, no duplicate guard
  • POST /api/v1/utils/test-email/ crashes on an assert instead of degrading when email isn't configured
  • POST /api/v1/password-recovery-html-content/… kills the connection on an unsanitized header
Vinv Findings — issue clusters, optimization episodes with confidence intervals, regression kinds, latency profile, and the cleanup ledger
// findings — what it found, what it fixed, the evidencemachine-readable too

Every decision has a published method behind it, and each one exists to keep the loop honest rather than clever:

Which oracle gets the next unit of budgetThompson sampling over (target × technique × oracle), cost measured in probe-equivalents, credit paid once per defect signature
Which inputs to try nextThompson sampling over Beta posteriors, rewarded by oracle violations with new coverage worth only a 0.25 bonus, decayed by half each run so stale lessons expire
Which live code a dead section belongs toPersonalized PageRank seeded at the section's symbols, keeping traced neighbours
Accept or revert a speedupPaired bootstrap 95% CI plus a byte-identical behavior replay — faster-but-wrong never lands
Why throughput stops scalingUniversal Scalability Law fit over a bounded concurrency sweep — contention and coherency, not just a number
Behavioural invariantsDaikon-style dynamic invariants with Laplace confidence
Memory-leak suspectsTheil–Sen slope over per-session retention, robust to a noisy outlier
Breaking a stuck agentNash bargaining — continue only if an explorer and an auditor stance both beat asking you
Did the context pack helpExact Shapley attribution over the arm grid — a computed number, not an assertion
Promoting a retrieval configOff-policy evaluation gates, then a 5% canary with automatic rollback — the learner cannot grade its own homework either

The learning math, with a file and line behind every claim, and the full test walk — what exists, where it lives on disk, and the order an agent follows to know it covered everything — are both in the repository.

Vinv grades, and it doesn't take the agent's word. Acceptance tests are written before the fix and the agent never sees them. A change that alters any observable output is reverted automatically — even when it's faster. A speedup only lands when the behavior replays byte-identical and the statistics clear the bar. When an agent starts repeating itself, Vinv ends the loop and hands you a verdict instead of a token bonfire. And when a “verified” fix is still wrong, you can dispute it and the loop reopens — the verifier is accountable too.

Your agent says it's done. Vinv says prove it.

The full story, the methods, and the code are in the repository README.