The Open-Source AI Coding Agent That Outperforms Claude Code
Features | Swarms | Installation | Quick Start | SDK | Docs | Contributing
Note (2026-08-20): Remote master was backed up to branch
backup-2026-08-20before this push.
LevelCode is an open-source AI coding assistant that edits your codebase through natural language instructions. Unlike single-model tools, LevelCode coordinates specialized agents that work together to understand your project and make precise changes.
LevelCode beats Claude Code at 61% vs 53% on our evaluations across 175+ coding tasks over multiple open-source repos that simulate real-world tasks.
| Agent | Success Rate | Token Efficiency | Speed |
|---|---|---|---|
| LevelCode | 61% | 45k avg | 32s avg |
| Claude Code | 53% | 62k avg | 45s avg |
| Aider | 48% | 38k avg | 28s avg |
| Continue | 42% | 51k avg | 38s avg |
When you ask LevelCode to "add authentication to my API," it coordinates:
- File Picker Agent - Scans your codebase to understand the architecture and find relevant files
- Planner Agent - Plans which files need changes and in what order
- Editor Agent - Makes precise, contextual edits
- Reviewer Agent - Validates changes before applying
This multi-agent approach delivers:
- Better context understanding
- More accurate edits
- Fewer errors compared to single-model tools
Unlike Claude Code which locks you into Anthropic's models, LevelCode supports any model on OpenRouter:
- Claude (Opus, Sonnet, Haiku)
- GPT-4o, GPT-5
- DeepSeek (V3, Coder)
- Qwen (Coder, 2.5)
- Gemini (Pro, Flash)
- Llama 3.3, Mistral
- And 200+ more models...
Build LevelCode into your applications with our production-ready SDK:
import{LevelCodeClient}from'@levelcode/sdk';constclient=newLevelCodeClient({apiKey: process.env.OPENROUTER_API_KEY,// or ANTHROPIC_API_KEYcwd: '/path/to/project',});constresult=awaitclient.run({agent: 'base',prompt: 'Add error handling to all API endpoints',handleEvent: (event)=>console.log(event),});Create your own specialized agents with TypeScript generators:
exportdefault{id: 'git-committer',displayName: 'Git Committer',model: 'openai/gpt-4o',toolNames: ['read_files','run_terminal_command','end_turn'],instructionsPrompt:
'Create meaningful git commits by analyzing changes and crafting clear commit messages.',async*handleSteps(){yield{tool: 'run_terminal_command',command: 'git diff'};yield{tool: 'run_terminal_command',command: 'git log --oneline -5'};yield'STEP_ALL';},};Scale beyond a single agent. LevelCode's Agent Swarm system lets you spin up an entire coordinated development team that works together on complex tasks -- each agent with a specialized role, communicating through a structured message protocol.
# Enable swarms
levelcode
> /team:enable
# Create a team with a project brief> /team:create name="auth-team" brief="Build OAuth2 login with Google and GitHub providers"# Monitor your swarm in real time> /team:statusThe swarm system automatically assigns agents to the right development phase and coordinates handoffs between them:
| Capability | Details |
|---|---|
| 24 Specialized Roles | From intern to CTO -- each with calibrated autonomy, tools, and review requirements |
| 6 Development Phases | Requirements, Design, Implementation, Testing, Review, Deployment -- with automatic phase gating |
| Real-Time TUI Panel | Live dashboard showing agent status, messages, tasks, and phase progress |
| Structured Messaging | Agents communicate via a typed protocol with inbox polling and message routing |
| Task Assignment | Hierarchical task breakdown with dependency tracking and automatic delegation |
| File Locking | Prevents conflicts when multiple agents edit the same files concurrently |
See the full Agent Swarms Guide for configuration, role definitions, custom team templates, and advanced workflows.
# Using npm (recommended)
npm install -g @levelcode/cli
# Using npx (no install needed)
npx @levelcode/cli
# Using bun
bun install -g @levelcode/cli# Using npm
npm install @levelcode/sdk
# Using bun
bun add @levelcode/sdk# Clone the repository
git clone https://github.com/yethikrishna/levelcode.git
cd levelcode
# Install dependencies
bun install
# Run in development mode
bun dev- Node.js 18+ or Bun 1.3.5+
- Git (optional, for version control features)
- Terminal with ANSI color support
LevelCode works fully standalone — no backend server, no account, no login required. Just set your API key and start coding.
Choose one of the following:
# Option A: OpenRouter (200+ models including Claude, GPT, Gemini, DeepSeek, etc.)export OPENROUTER_API_KEY="sk-or-v1-..."# Option B: Anthropic (Claude models directly)export ANTHROPIC_API_KEY="sk-ant-..."Get your key from OpenRouter or Anthropic.
# Navigate to your projectcd your-project
# Start LevelCode
levelcodeThat's it. No sign-up, no backend, no configuration needed.
Just tell LevelCode what you want:
- "Fix the SQL injection vulnerability in user registration"
- "Add rate limiting to all API endpoints"
- "Refactor the database connection code for better performance"
- "Add unit tests for the authentication module"
LevelCode will find the right files, make changes across your codebase, and validate everything works.
# Use FREE mode (lightweight, lower cost)
levelcode --free
# Use MAX mode (most capable)
levelcode --max
# Run in a specific directory
levelcode --cwd /path/to/project
# Continue a previous conversation
levelcode --continue
# Show all options
levelcode --helpimport{LevelCodeClient}from'@levelcode/sdk';// Works standalone — just provide your API keyconstclient=newLevelCodeClient({apiKey: process.env.OPENROUTER_API_KEY,// or ANTHROPIC_API_KEYcwd: process.cwd(),});// Run a coding taskconstresult=awaitclient.run({agent: 'base',prompt: 'Add TypeScript types to all function parameters',handleEvent: (event)=>{if(event.type==='file_edit'){console.log(`Edited: ${event.filePath}`);}},});console.log('Output:',result.output);import{LevelCodeClient,AgentDefinition}from'@levelcode/sdk';constcodeReviewer: AgentDefinition={id: 'code-reviewer',displayName: 'Code Reviewer',model: 'anthropic/claude-3-opus',toolNames: ['read_files','grep','end_turn'],instructionsPrompt: `You are a senior code reviewer. Focus on security, performance, and maintainability. Provide actionable feedback with code examples.`,};constclient=newLevelCodeClient({apiKey: '...'});constreview=awaitclient.run({agent: 'code-reviewer',agentDefinitions: [codeReviewer],prompt: 'Review the recent changes in src/auth/',handleEvent: console.log,});# .github/workflows/levelcode-review.ymlname: AI Code Reviewon: [pull_request]jobs:
review:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- name: Setup Bunuses: oven-sh/setup-bun@v1
- name: Install LevelCoderun: bun install -g @levelcode/cli
- name: Run AI Reviewenv:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}run: levelcode "Review changes and suggest improvements" --output review.md
- name: Post Reviewuses: actions/github-script@v7with:
script: | const review = require('fs').readFileSync('review.md', 'utf8'); github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: review });levelcode/
├── cli/ # Terminal UI application
│ ├── src/ # CLI source code
│ ├── bin/ # CLI binaries
│ └── scripts/ # Build scripts
├── sdk/ # TypeScript SDK
│ ├── src/ # SDK source code
│ └── e2e/ # End-to-end tests
├── agents/ # Multi-agent system
│ ├── base2/ # Base agent configurations
│ ├── editor/ # Code editing agents
│ ├── file-explorer/ # File discovery agents
│ ├── researcher/ # Documentation research
│ ├── reviewer/ # Code review agents
│ └── thinker/ # Planning agents
├── common/ # Shared utilities
├── packages/ # Internal packages
│ ├── agent-runtime/ # Agent execution runtime
│ └── internal/ # Internal utilities
├── web/ # Web dashboard (optional)
├── evals/ # Evaluation benchmarks
└── docs/ # Documentation
Create a levelcode.config.ts in your project root:
import{defineConfig}from'@levelcode/sdk';exportdefaultdefineConfig({// Default modelmodel: 'anthropic/claude-3.5-sonnet',// Per-agent model overridesagents: {editor: {model: 'anthropic/claude-3-opus',maxTokens: 8000,},filePicker: {model: 'anthropic/claude-3-haiku',},},// Files to ignoreignore: ['node_modules/**','*.lock','dist/**','.git/**',],// Custom tools (optional)tools: [],});| Variable | Description | Required |
|---|---|---|
OPENROUTER_API_KEY | OpenRouter API key (200+ models) | One of these |
ANTHROPIC_API_KEY | Anthropic API key (Claude direct) | is required |
LEVELCODE_MODEL | Default model to use | No |
LEVELCODE_DEBUG | Enable debug logging | No |
Standalone Mode: LevelCode runs fully standalone by default. No backend server, database, or account is needed. Just set one API key above and you're ready to go.
Hosted Mode: For team features, billing, and the agent marketplace, visit levelcode.ai.
| Document | Description |
|---|---|
| Installation Guide | Detailed installation instructions |
| Configuration | All configuration options |
| SDK Reference | Complete SDK API documentation |
| Custom Agents | Creating custom agents |
| Custom Tools | Building custom tools |
| Agent Swarms | Multi-agent team coordination and swarm workflows |
| Architecture | How LevelCode works |
We love contributions from the community! Whether you're fixing bugs, creating agents, or improving docs.
# Clone the repo
git clone https://github.com/yethikrishna/levelcode.git
cd levelcode
# Install dependencies
bun install
# Run in development mode
bun dev
# Run tests
bun test# Type check
bun typecheck- Bug Fixes - Help us squash bugs
- New Agents - Create specialized agents for specific tasks
- Model Support - Add new model provider integrations
- Documentation - Improve guides and examples
- Benchmarks - Add new evaluation tasks
See CONTRIBUTING.md for detailed guidelines.
- Standalone Mode (no backend required)
- Direct OpenRouter/Anthropic API support
- VS Code Extension
- JetBrains Plugin
- Web Interface
- Team Collaboration
- Self-Hosted Server Mode
- Plugin Marketplace
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: yethikrishnarcvn7a@gmail.com
LevelCode is open-source software licensed under the Apache License 2.0.
- Inspired by Claude Code, Aider, and Continue
- Powered by models from OpenRouter
- Thanks to all our contributors
Created by Yethikrishna R
If you find LevelCode useful, please consider giving it a star!


