Universal multi-LLM coordination for shared codebases
LACP enables multiple AI assistants (Claude Code, Gemini, GPT, etc.) to work on the same codebase without conflicts. It uses file-based communication that any LLM can read and write.
🤖 Multi-Agent Development: Coordinate Claude, Gemini, GPT, and other LLMs on the same project 🔒 Conflict Prevention: File claims ensure agents don't overwrite each other's work 📝 Context Sharing: Activity logs keep all agents informed about what's been done 🤝 Work Delegation: Handoffs enable agents to request help from each other's specialties 📂 No Special Infrastructure: Works through simple JSON files - no servers, no APIs
Without LACP:
❌ Claude edits auth.ts while Gemini is also modifying it → merge conflict
❌ GPT finishes a feature but Claude doesn't know → duplicated work
❌ No context about what was done → confusion and wasted effort
With LACP:
✅ Claude claims auth.ts → Gemini sees it's claimed and works on UI instead
✅ Activity log shows completed work → everyone stays in sync
✅ Handoffs provide clear context → seamless collaboration
npm install -g lacpOr use locally in a project:
npm install lacp
npx lacp initcd your-project
lacp initThis creates:
.lacp/- Coordination files (tracked in git).lacp-state/- Ephemeral state (gitignored)
# Before starting work
lacp claim "src/auth/*" --agent claude-cursor --task "Implement OAuth"
# Check coordination status
lacp status
# When done
lacp done "src/auth/*" --agent claude-cursor --summary "OAuth implemented with Google provider"
# Request another agent's help
lacp handoff create --from claude-cursor --to gemini-antigravity --task "Review OAuth UI"Initialize LACP in the current project.
lacp init
lacp init --force # ReinitializeShow current coordination state: active claims, online agents, pending handoffs.
lacp status
lacp status --json # JSON output for programmatic use
lacp status --agent claude-cursor # Agent-specific viewClaim files before modifying them. Prevents conflicts with other agents.
lacp claim "src/auth/*" --agent claude-cursor --task "Implement OAuth"
lacp claim "*.test.ts" --agent claude-cursor --task "Fix tests" --duration 30Release claims when work is complete.
lacp release "src/auth/*" --agent claude-cursor
lacp release --agent claude-cursor --all # Release all claimsCreate and manage work handoffs between agents.
# Create a handoff
lacp handoff create \
--from claude-cursor \
--to gemini-antigravity \
--task "Review and improve UI styling" \
--context "OAuth flow is working, needs visual polish" \
--files "src/auth/LoginForm.tsx,src/auth/styles.css"
# List pending handoffs
lacp handoff list
lacp handoff list --agent gemini-antigravity # For specific agent
# Accept a handoff
lacp handoff accept <handoff-id> --agent gemini-antigravity
# Complete a handoff
lacp handoff complete <handoff-id>View and add activity log entries.
# View recent activity
lacp log view
lacp log view --count 50
lacp log view --agent claude-cursor
# Add log entries
lacp log add --agent claude-cursor --action start --scope "src/*" --task "Refactoring"
lacp log add --agent claude-cursor --action complete --scope "src/*" --summary "Refactored auth"
lacp log add --agent claude-cursor --action note --summary "Found potential bug in validation"# Start work (claim + log)
lacp start "src/auth/*" --agent claude-cursor --task "OAuth implementation"
# Finish work (log complete + release)
lacp done "src/auth/*" --agent claude-cursor --summary "OAuth completed"Remove expired claims and stale agents.
# Remove expired claims
lacp cleanup
# Remove stale agents (inactive >30 minutes)
lacp cleanup --stale 30m
# Preview without making changes
lacp cleanup --stale 1h --dry-runWatch mode for long-running agents: auto-heartbeat and surface relevant handoffs.
# Start watch mode for your agent
lacp watch --agent jeeves-openclaw
# Custom heartbeat interval (default: 30s)
lacp watch --agent claude-cursor --interval 60Install git pre-commit hook that warns when committing files claimed by other agents.
# Install the hook
lacp install-hooks
# Overwrite existing hook
lacp install-hooks --forceproject/
├── .lacp/ # Tracked in git
│ ├── PROTOCOL.md # Protocol specification
│ ├── claims.json # Current file claims
│ ├── activity.jsonl # Activity log (append-only)
│ ├── handoffs/ # Handoff requests
│ │ └── {id}.json
│ └── instructions/ # LLM-specific instructions
│ └── template.md
└── .lacp-state/ # Gitignored
└── agents/ # Agent presence/heartbeat
└── {agent-id}.json
Add to your CLAUDE.md:
## Multi-LLM Coordination (LACP)
Before modifying files:
1. Read `.lacp/claims.json` - Check for conflicts
2. Claim files before modifying
3. Log activity in `.lacp/activity.jsonl`
Your Agent ID: `claude-cursor`- Copy
.lacp/instructions/template.mdto your LLM's instruction file - Replace
{AGENT_ID}with your agent's ID - Follow the protocol in
.lacp/PROTOCOL.md
Format: {llm}-{ide}
Examples:
claude-cursor- Claude Code in Cursorgemini-antigravity- Gemini in Antigravitygpt-vscode- GPT in VS Codeclaude-terminal- Claude Code in terminal
- Claims prevent conflicts: Agents must claim files before modifying
- Activity log provides context: All significant actions are logged
- Handoffs enable delegation: Agents can request work from each other
- Files are the universal interface: Any LLM that can read/write files can participate
First-Write-Wins Policy: When two agents race to claim the same files, the first to write claims.json wins. The second agent will detect the conflict and must wait for release or work on different files.
Claim Timeouts: All claims expire after a timeout (default: 60 minutes). This prevents crashed agents from blocking files indefinitely. Use lacp cleanup to remove expired claims.
Stale Agents: Agents inactive for >15 minutes are considered offline. Use lacp cleanup --stale 30m to remove stale agent presence files.
Check out examples/simple-coordination/ for a complete walkthrough of Claude and Gemini coordinating on an authentication feature.
- Feature Development: Backend agent builds API, frontend agent builds UI
- Code Reviews: Security agent audits auth code, performance agent checks queries
- Debugging: Multiple agents investigate different hypotheses in parallel
- Refactoring: One agent updates types, another updates implementations
- Cross-Platform: iOS agent works on Swift, web agent works on TypeScript
See CONTRIBUTING.md for development setup and guidelines.
- Claude Code: AI coding assistant from Anthropic
- Gemini: Google's AI assistant
- Cursor: AI-first code editor
MIT - See LICENSE for details.
Built for the OpenClaw community 🐾
Share your multi-LLM coordination stories! Open an issue or PR to showcase your setup.