Codebuff & Freebuff

By: CodebuffAI GitHub: CodebuffAI/codebuff CLI: npm install -g codebuff SDK: npm install @codebuff/sdk Free version: npm install -g freebuff

Open-source AI coding assistant that edits your codebase through natural language instructions. Uses multi-agent architecture instead of a single model for everything.

Beats Claude Code

Codebuff beats Claude Code 61% vs 53% on their evals across 175+ coding tasks over multiple open-source repos simulating real-world tasks.

Multi-Agent Architecture

When you ask Codebuff to “add authentication to my API,” it invokes:

  1. File Picker Agent — scan codebase, understand architecture, find relevant files
  2. Planner Agent — plan which files need changes and in what order
  3. Editor Agent — make precise edits
  4. Reviewer Agent — validate changes

Each agent uses the model best suited for its task.

Quick Start

npm install -g codebuff
cd your-project
codebuff
# Just tell it what you want

Custom Agents (TypeScript)

Run /init inside Codebuff to scaffold agent definitions in .agents/:

  • knowledge.md — project context
  • TypeScript definition files with generators
  • Full control over agent behavior, tools, and prompts

Example agent:

export default {
  id: 'git-committer',
  displayName: 'Git Committer',
  model: 'openai/gpt-5-nano',
  toolNames: ['read_files', 'run_terminal_command', 'end_turn'],
  instructionsPrompt: 'You create meaningful git commits...',
  async *handleSteps() {
    yield { tool: 'run_terminal_command', command: 'git diff' }
    yield { tool: 'run_terminal_command', command: 'git log --oneline -5' }
    yield 'STEP_ALL'
  },
}

SDK (Production Use)

import { CodebuffClient } from '@codebuff/sdk'
 
const client = new CodebuffClient({
  apiKey: 'your-api-key',
  cwd: '/path/to/your/project',
})
 
const result = await client.run({
  agent: 'base',
  prompt: 'Add error handling to all API endpoints',
  handleEvent: (event) => console.log('Progress', event),
})

Freebuff (Free Tier)

npm install -g freebuff
cd your-project
freebuff

Ad-supported, no subscription, no credits, no configuration. Built-in web research and browser use.

Why Codebuff

  • Any model on OpenRouter — Claude, GPT, Qwen, DeepSeek, etc. Switch per task
  • Custom workflows — TypeScript generators mix AI with programmatic control
  • Agent Store — Reuse published agents (codebuff.com/store)
  • SDK — Embed coding assistance into products, CI/CD pipelines

Resources