Vibe Virtual Machine — A language for agentic programs where the LLM is the runtime.
# A code review bot that iteratively improves until approved
agent coder(model="sonnet", prompt="Write clean, well-tested code.")
agent reviewer(model="opus", prompt="Review code critically. Find bugs and issues.")
def is_approved(code, i):
review = @reviewer `Review this code. Say APPROVED if production-ready.`(code)
return ?`contains APPROVED`(review)
def improve(code, i):
feedback = @reviewer `List specific issues with this code.`(code)
return @coder `Fix these issues: {feedback}`(pack(code, feedback))
final_code = refine(initial_code, max=5, done=is_approved, step=improve)
constrain final_code():
require ?`has error handling`
require ?`includes unit tests`
export final_code
A language model with tool access is a general-purpose computer. Not metaphorically. Literally.
Every time you use Claude Code, Cursor, or Codex, you're instructing a machine that reads files, writes code, executes commands, and iterates on its outputs. We've been calling these "assistants" because we didn't have better words. But assistants don't spawn subprocesses or manage their own control flow.
The problem with English. Simple tasks work fine—"refactor this function" needs no specification. Complex tasks fall apart. You want three analyses to run in parallel, feed into a synthesis, retry on failure, and only proceed if the output meets a quality bar. You can say that in English. But which parts are instructions and which are suggestions? Which are hard constraints and which are preferences? English handles intent well. It can't handle structure.
Inversion. Most frameworks (LangChain, etc.) put orchestration in your code and treat the model as a function to call. VVM inverts this. You write a program, hand it to the model, and the model becomes the runtime. The intelligence doesn't just execute steps—it interprets the program, manages dependencies, decides how to proceed when things go wrong.
Predicates that understand. When orchestration lives in Python, conditions must be things Python can compute—proxy metrics like if confidence_score > 0.8. When orchestration lives in the model, conditions can be semantic. "Is this production ready?" isn't a threshold. It's a question the runtime answers by reading and judging. The program operates in meaning-space.
VVM is open source and runtime-agnostic. Today it runs on Claude Code. Codex, Amp, and OpenCode support is planned.
VVM runs as a Claude Code plugin. To install:
# Add the plugin marketplace
claude plugin marketplace add https://github.com/karanchawla/vvm.git
# Install the plugin
claude plugin install vvm@vvmAfter installation, ask Claude to help you get started:
"Run my first VVM example and teach me how it works"
Claude will walk you through the language, run an example program, and explain the execution.
Named agents with models and system prompts:
agent researcher(model="sonnet", prompt="Research expert. Always cite sources.")
agent writer(model="opus", prompt="Technical writer. Clear and concise.")
research = @researcher `Find papers on quantum error correction.`(())
report = @writer `Summarize the key findings.`(research)
Conditions evaluated by the runtime's judgment, not regex:
if ?`contains sensitive information`(document):
document = @redactor `Remove PII and confidential data.`(document)
Route based on meaning:
match ticket:
case ?`billing or payment issue`:
team = "billing"
case ?`security concern`:
team = "security"
case _:
team = "general"
Requirements with automatic retry on failure:
constrain draft(attempts=3):
require ?`cites at least 3 sources`
require ?`no unsubstantiated claims`
require ?`professional tone`
Explicit, never implicit:
def translate(text):
return @translator `Translate to French.`(text)
translations = pmap(documents, translate) # Runs in parallel
Iterate until done:
final = refine(
seed=first_draft,
max=5,
done=is_publication_ready,
step=incorporate_feedback
)
- Parse — Read
.vvm, build AST - Validate — Check syntax, resolve references, verify constraints
- Execute — Run statements top-to-bottom, eagerly
- Spawn — Agent calls (
@agent) spawn subagents via Task tool - Evaluate — Semantic predicates (
?...``) judged by the runtime - Export — Return declared exports
┌─────────────────────────────────────────────────┐
│ VVM Runtime │
│ (Claude LLM) │
├─────────────────────────────────────────────────┤
│ .vvm Program │
│ ├── agent definitions │
│ ├── function definitions │
│ └── top-level statements │
├─────────────────────────────────────────────────┤
│ Execution │
│ ├── @agent calls → spawn subagent (Task tool) │
│ ├── ?`predicate` → local semantic judgment │
│ └── control flow → sequential, explicit │
└─────────────────────────────────────────────────┘
| Command | Description |
|---|---|
/vvm-boot |
Initialize VVM, create first program |
/vvm-compile <file> |
Validate without running |
/vvm-run <file> |
Execute a program |
The examples/ directory has 23 programs, progressively introducing features:
- 01-08: Basics (agents, predicates, control flow)
- 09-15: Intermediate (parallelism, modules, error handling)
- 16-23: Advanced (constraints, refinement loops, full pipelines)
This is experimental. The language spec will change. Breaking changes are likely. Pin versions if you care about stability.
You own your agents. VVM programs spawn AI agents that can read files, make network requests, and execute code. Review what you're running. Test in sandboxes first. The authors disclaim liability for agent behavior—this is on you.
This repository contains the core VVM language:
vvm/
├── skills/vvm/ # Language specification (spec.md, vvm.md)
├── examples/ # 23 tutorial programs
├── commands/ # Claude Code slash commands
├── .claude/ # Claude Code integration
└── .claude-plugin/ # Plugin manifest
The website and application live in a separate repository: vvm-app
MIT