Skip to content

dkod-io/dkod-engine

Repository files navigation

dkod — Agent-native code platform

Multiple AI agents. One codebase. Zero conflicts.

License Rust Website Discord Twitter

Documentation  •  Quickstart  •  Blog  •  Discord


The Problem

You deploy 3 AI agents on the same repo. Agent A refactors auth. Agent B adds an endpoint. Agent C writes tests. They all finish in 2 minutes.

Then you spend 45 minutes resolving merge conflicts.

AI agents are fast. Your infrastructure isn't built for them.

The Fix

dkod is an open-source platform purpose-built for concurrent AI code collaboration. It replaces the bottleneck — not the agents.


Session Isolation

This is not a worktree, not a fork, not a workspace, and not a clone for each agent.

Each agent gets an isolated session overlay on top of the shared repo. Writes go to the overlay, reads fall through to the base. dkod uses AST-level symbol tracking (via tree-sitter) to understand exactly which functions, classes, and methods each agent is touching — zero-copy, zero-clone, zero-coordination.

No clones. No locks. No waiting.

10 agents editing simultaneously, each in their own sandbox.

Semantic Merging

Forget line-based diffs. dkod detects conflicts at the symbol level — functions, types, constants.

Two agents editing different functions in the same file? No conflict.

Two agents rewriting the same function? Caught instantly, with a precise report.

Verification Pipeline

Every changeset passes through lint → type-check → test gates before it touches main.

Agents get structured failure data — not log dumps — so they fix issues and retry autonomously.

Average time to verified merge: < 30 seconds.

Agent Protocol

A gRPC protocol designed for machines, not humans:

CONNECT → CONTEXT → SUBMIT → VERIFY → MERGE

Structured requests. Structured responses. No parsing logs. No guessing.

Works with any MCP-compatible agent.


Supported Agents

  Cursor      Claude Code      Cline      Windsurf      Codex      Any MCP Agent  


Quick Start

Install the CLI

cargo install --git https://github.com/dkod-io/dkod-engine dk-cli

Connect and ship

dk login
dk init my-org/my-repo --intent "add user authentication"
dk cat src/main.rs
dk add src/main.rs --content "fn main() { /* ... */ }"
dk commit -m "feat: add auth module"
dk check
dk push
 Use with Claude Code (MCP)

For cloud (dkod.io):

claude mcp add --transport http dkod https://api.dkod.io/mcp

For other MCP-compatible agents, add to your MCP config:

{
  "mcpServers": {
    "dkod": {
      "url": "https://api.dkod.io/mcp"
    }
  }
}

For self-hosted:

claude mcp add --transport http dkod http://localhost:8080/mcp

Your agent gets these tools:

Tool Purpose
dk_connect Open a session for a repo
dk_context Semantic code search
dk_file_read Read a file from session workspace
dk_file_write Write a file to session overlay
dk_file_list List files in workspace
dk_submit Submit a changeset
dk_verify Run the verification pipeline
dk_merge Merge verified changes to main
dk_push Push changes to GitHub (branch or PR)
dk_status Get session state and info
dk_watch Subscribe to real-time codebase events
 Use with Cursor, Cline, or Windsurf

Each editor connects through the same MCP bridge. See the agent setup docs for per-editor instructions.


How It Works

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#06b6d4', 'primaryTextColor': '#f0f0f3', 'lineColor': '#06b6d4' }}}%%
sequenceDiagram
    participant A as Agent A
    participant P as dkod
    participant B as Agent B

    A->>P: connect (repo)
    B->>P: connect (repo)

    Note over A,P: Isolated overlays created

    A->>P: write auth.rs → submit
    B->>P: write api.rs → submit

    A->>P: verify ✓ → merge ✓
    P-->>B: file changed event
    B->>P: verify ✓ → merge ✓

    Note over A,B: Different symbols — zero conflicts
Loading

Architecture

dkod-engine
├── dk-core            shared types and error handling
├── dk-engine          git storage + semantic graph (tree-sitter, tantivy)
├── dk-protocol        agent protocol grpc server
├── dk-runner          verification pipeline runner
├── dk-agent-sdk       rust sdk for building agents
├── dk-cli             human-facing cli
├── dk-server          reference server binary
├── sdk/python         python sdk
└── proto/             protobuf definitions

Build

Requires Rust 1.88+ • PostgreSQL 16+ • protoc

cargo build --workspace
cargo test --workspace

Contributing

We welcome contributions. See open issues to get started.


Community

Discord    Twitter


License

MIT — free to use, fork, and build on.


Built for the age of agent-native development • dkod.io

About

Agent-native code storage engine — Git-compatible + semantic graph. The open-source foundation of dkod.io

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages