A next-generation LLM-native agent VM that combines:
- LLMVM's philosophy — the LLM is a programmer in a persistent Python REPL with LLM-native opcodes (
llm_call,llm_bind,llm_list_bind,coerce,guard,result). Interleaved natural language and code via<helpers>blocks, executed in continuation-passing style. - Claude Code's production substrate — unified
Toolinterface with capability sets, layered permission system with AST-based plan-mode enforcement, MCP integration, skills-as-data, sub-agent swarms with mailbox IPC, durable transcripts with compact boundaries, worktree isolation.
pip install -e .[all]
export ANTHROPIC_API_KEY=...
llmvm replSee docs/architecture.md or the source under src/llmvm2/:
core/— continuation loop, transcript, session, content/message/event typesproviders/— Anthropic, OpenAI, Gemini, Bedrock with stop-token normalizationcell/— sandboxed Python subprocess that executes<helpers>blocks, meta-primitivestools/— fs/shell/web/git/browser/etc. with declared capabilitiespermissions/— capability-set engine, modes, AST pre-checkskills/— markdown + YAML frontmatter, compatible with SKILL.mdmemory/— memdir with MEMORY.md index and post-turn auto-extractionmcp/— MCP client (stdio/SSE/HTTP/WS) + deferred tool searchswarm/— sub-agents, file-based mailboxes, worktree isolationcompile/— thread compilation with guard-based JIT respecializationgateway/— WebSocket JSON (no jsonpickle)cli/— REPL and one-shot pipe modes
Active development. See the plan in ~/.cursor/plans/llmvm_v2_architecture_*.plan.md.