codegraff
Open gateway
Docs/Getting Started/Overview

Overview

Codegraff is the project behind Graff, the free open-source evolutionary coding harness for AI agents. Graff is a self-improving coding harness that executes real repository tasks, evaluates outcomes, and improves which agent strategies get reused. CodeDB is a separate free local code-intelligence layer that works with Graff or another supported coding agent.

Quickstart

Three steps, about two minutes. Each command has a Copy button.

  1. Install the CLI

    bash
    curl -fsSL https://codegraff.com/install-graff.sh | bash

    On Windows, from PowerShell (graff runs natively, no WSL needed):

    powershell
    irm https://codegraff.com/install.ps1 | iex
  2. Sign in and pick a model

    bash
    graff login
    bash
    graff models
  3. Your first prompt (no edits)

    bash
    MODEL="your-model-id"
    graff route "$MODEL"
    graff --model "$MODEL" -p "Explain this repository and identify its documented test commands. Do not edit files or run tests."

Where to next

How the pieces fit

Run + evolve

Graff

The free self-improving coding agent harness that runs repository tasks, evaluates outcomes, and evolves agent strategies.

Map

CodeDB

Free local code intelligence that works out of the box with supported coding agents.

Open the CodeDB repository

Move

CodeDB Pro

The paid local toolchain with a persistent daemon, batching, and higher-leverage edits.

See CodeDB Pro

Connect

Gateway

OpenAI-compatible inference, hosted tools, credits, keys, and usage in one account.

Open the gateway guide

The evolutionary loop

Graff is not only an execution wrapper. It can turn completed work into fitness, retain useful agent variants, and use that archive to guide future runs.

01

Run

Try agent strategies against real repository work.

02

Score

Measure success, cost, speed, and errors as fitness.

03

Select

Keep strong variants in a diverse MAP-Elites archive.

04

Reuse

Sample better strategies more often on future runs.

This evolutionary loop belongs to Graff. CodeDB supplies structural repository context, and CodeDB Pro accelerates local reads, searches, diffs, and edits.

Choose a surface

  • The Graff CLI : the agent in your terminal, driven by the : shell shortcut.
  • The TypeScript and Python SDKs. Embed the same agent in your app and stream events through one loop.
  • The OpenAI-compatible gateway . Use the models with any existing OpenAI client and a cg_sk_ key.