Skip to content

feat: add Qwen Code (Qwen3) ACP agent support #55

@tboydar-agent

Description

@tboydar-agent

Summary

Add support for Qwen Code as an ACP-compatible agent backend.

Motivation

Qwen Code is a powerful open-source coding CLI optimized for Qwen3-Coder models. It already has native ACP support via the --experimental-acp flag, making it an excellent candidate for integration with agent-broker.

Benefits:

  • Open-source alternative to Claude Code / Codex
  • Cost-effective for teams already using Qwen models
  • Multi-agent ecosystem - expands broker's agent options
  • Already ACP-compatible - minimal integration effort required

Technical Feasibility

Qwen Code ACP Support

Qwen Code supports the Agent Communication Protocol (ACP):

  • Native support via qwen --experimental-acp flag
  • Follows JSON-RPC 2.0 over stdio (same as Claude Code, Codex, Gemini)
  • Community-verified: successfully integrated with Zed editor and Neovim

Related discussions:

Integration Approach

Since agent-broker is agent-agnostic (only requires ACP compatibility), integration is straightforward:

Option 1: Native Qwen Code (recommended)

[agent]
command = "qwen"
args = ["--experimental-acp", "--trust-all-tools"]
working_dir = "/home/agent"
env = { QWEN_API_KEY = "${QWEN_API_KEY}" }

Option 2: Using acp-qwen-code bridge

[agent]
command = "acp-qwen-code"
args = []
working_dir = "/home/agent"
env = { 
  ACP_PATH_TO_QWEN_CODE_EXECUTABLE = "qwen",
  ACP_PERMISSION_MODE = "bypassPermissions"
}

Optional Enhancements

  1. Dockerfile.qwen - Similar to existing Dockerfile.claude, Dockerfile.codex
  2. Helm preset - Add qwen preset to charts for easy deployment
  3. Documentation - Add Qwen to the "Pluggable Agent Backends" table in README

Proposed Changes

  1. Add configuration example to config.toml.example
  2. (Optional) Add Dockerfile.qwen
  3. (Optional) Add Helm preset for Qwen
  4. Update README.md to list Qwen as supported backend

Testing Plan

  • Verify qwen --experimental-acp works with broker's ACP protocol handling
  • Test tool calling, streaming, and session management
  • Verify emoji reactions work correctly
  • Test in Kubernetes environment (if Helm preset added)

Additional Context


I'm happy to submit a PR for this if there's interest from the maintainers. The integration should be minimal since Qwen already speaks ACP natively. 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurep3Low — nice to have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions