Skip to content

Feature Request: Add Agent Client Protocol (ACP) Support #67

@omarluq

Description

@omarluq

Problem

The Freelens AI extension currently supports LLM providers through LangChain (OpenAI, Google Gemini) and external tools via MCP servers. However, there's no way to leverage powerful agentic coding tools like Claude Code, Gemini CLI, or OpenAI Codex CLI that offer superior code understanding and autonomous task execution.

These tools use the Agent Client Protocol (ACP) — an emerging standard for editor-agent communication that's gaining rapid adoption across Zed, JetBrains, Neovim, and others.

Proposed Solution

Implement ACP client support, allowing Freelens to spawn and communicate with external ACP-compliant agents as model providers.

FreeLens (ACP Client) ──stdio (JSON-RPC)──▶ External Agent (ACP Server)
                                            • Claude Code
                                            • Gemini CLI  
                                            • Codex CLI
                                            • Goose, Aider, etc.

Benefits

  • Access to agentic tools: Use Claude Code, Gemini CLI, Codex CLI directly within FreeLens
  • Future-proof: ACP is becoming the standard (like LSP for AI agents)
  • User choice: Switch agents without switching tools
  • Builds on existing patterns: Similar to current MCP Agent configuration

Suggested Implementation

1. Configuration (similar to existing mcpServers)

{
  "acpAgents": {
    "Claude Code": {
      "command": "npx",
      "args": ["@zed-industries/claude-code-acp"]
    },
    "Gemini CLI": {
      "command": "gemini",
      "args": ["--acp"]
    }
  }
}

2. Core Components

Component Description
ACP Client Wraps @zed-industries/agent-client-protocol SDK for agent spawning and JSON-RPC communication
Agent Selector UI to choose between LangChain providers and ACP agents
Permission Handler Extends existing interrupt patterns for ACP permission requests

3. Key ACP Features to Support

  • Session management (session/new, session/prompt)
  • Streaming responses (session/update)
  • Permission requests (file writes, command execution)
  • MCP server pass-through to agents

Prior Art

Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions