https://github.com/yaonyan/droid-acp
ACP Agent adapter for Factory Droid CLI
https://github.com/yaonyan/droid-acp
acp ai cli droid
Last synced: about 2 months ago
JSON representation
ACP Agent adapter for Factory Droid CLI
- Host: GitHub
- URL: https://github.com/yaonyan/droid-acp
- Owner: yaonyan
- Created: 2025-12-11T16:23:47.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-01-30T04:12:26.000Z (5 months ago)
- Last Synced: 2026-01-30T20:31:30.484Z (5 months ago)
- Topics: acp, ai, cli, droid
- Language: TypeScript
- Homepage:
- Size: 63.5 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Droid ACP Agent
ACP (Agent Client Protocol) adapter for [Factory Droid CLI](https://docs.factory.ai/cli/droid-exec/overview).
[](https://www.npmjs.com/package/@yaonyan/droid-acp)
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
```bash
# From npm (after published)
npm install -g @yaonyan/droid-acp
# From source
git clone
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](https://app.factory.ai/settings/api-keys)
```bash
export FACTORY_API_KEY=fk-...
```
## Usage
### With Zed Editor
Add to your Zed settings:
```json
{
"agents": {
"droid": {
"command": "droid-acp",
"env": {
"FACTORY_API_KEY": "fk-..."
}
}
}
}
```
### Standalone
```bash
# 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
```bash
# 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