Skip to content

yaonyan/droid-acp

Repository files navigation

Droid ACP Agent

ACP (Agent Client Protocol) adapter for Factory Droid CLI.

npm version

This agent bridges the ACP protocol with Factory Droid, allowing ACP clients (like Zed Editor) to use Droid as their AI coding backend.

Good News: ACP is now officially supported in Droid; go use it https://docs.factory.ai/changelog/cli-updates#new-features! Note: This is a community implementation using Droid's stream-jsonrpc mode. We still look forward to an official ACP implementation from Factory.

Installation

# From npm (after published)
npm install -g @yaonyan/droid-acp

# From source
git clone <repo>
cd droid-acp
pnpm install
pnpm build

Prerequisites

  1. Droid CLI installed: curl -fsSL https://app.factory.ai/cli | sh
  2. Factory API Key: Get from Factory Settings
export FACTORY_API_KEY=fk-...

Usage

With Zed Editor

Add to your Zed settings:

{
  "agents": {
    "droid": {
      "command": "droid-acp",
      "env": {
        "FACTORY_API_KEY": "fk-..."
      }
    }
  }
}

Standalone

# Run directly
node dist/index.mjs

Features

  • Full model support: Claude Opus/Sonnet/Haiku, GPT-5.1, Gemini 3 Pro
  • Autonomy levels: Low (read-only), Medium (dev ops), High (production ops)
  • Session management: Persistent sessions with conversation history
  • Tool execution: File operations, command execution, code search

Architecture

┌──────────────┐   ACP/NDJSON    ┌─────────────────┐
│  ACP Client  │ ◄─────────────► │  Droid ACP      │
│  (Zed/etc)   │                 │  Adapter        │
└──────────────┘                 └────────┬────────┘
                                          │ spawn
                                          ▼
                                 ┌──────────────────┐
                                 │  droid exec      │
                                 │  --stream-jsonrpc│
                                 └──────────────────┘

Development

# Build
pnpm build

# Watch mode
pnpm dev

# Type check
pnpm typecheck

# Test
pnpm test

MCP Server Support (Workaround)

Droid CLI doesn't support passing MCP servers via command-line. As a workaround, the adapter writes mcpServers from session/new to .factory/mcp.json with unique keys ({name}-{sessionId}), then cleans up on session end.

License

MIT

About

ACP Agent adapter for Factory Droid CLI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published