Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/docs/src/sections/ai/ExternalAgents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function ExternalAgents() {
<ol className="list-decimal space-y-2 pl-5 text-[15px] leading-relaxed text-gray-700">
<li>
<strong>Install an ACP-compatible agent.</strong> Huabu automatically
detects these nine ACP-capable agent commands or adapters after
detects these ten ACP-capable agent commands or adapters after
installation:{' '}
<DocLink href="https://www.npmjs.com/package/@github/copilot">
GitHub Copilot
Expand Down Expand Up @@ -97,6 +97,10 @@ export default function ExternalAgents() {
<DocLink href="https://cursor.com/docs/cli/installation">
Cursor
</DocLink>
,{' '}
<DocLink href="https://www.npmjs.com/package/@tencent-ai/codebuddy-code">
CodeBuddy
</DocLink>
, and{' '}
<DocLink href="https://hermes-agent.nousresearch.com/docs/user-guide/features/acp">
Hermes Agent
Expand Down
7 changes: 7 additions & 0 deletions apps/server/src/modules/agent/acp/known-agents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ describe('KNOWN_CLIS', () => {
binary: 'agent',
acpArgs: ['acp'],
},
{
id: 'codebuddy',
displayName: 'CodeBuddy',
binary: 'codebuddy',
acpArgs: ['--acp'],
},
{
id: 'hermes',
displayName: 'Hermes Agent',
Expand Down Expand Up @@ -110,6 +116,7 @@ describe('KNOWN_CLIS', () => {
args: ['--yolo'],
position: 'before-acp',
},
codebuddy: null,
hermes: null,
});

Expand Down
16 changes: 16 additions & 0 deletions apps/server/src/modules/agent/acp/known-agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ export const KNOWN_CLIS: readonly KnownCli[] = [
},
installHint: 'Install from https://cursor.com/docs/cli/installation',
},
{
id: 'codebuddy',
displayName: 'CodeBuddy',
// Tencent Cloud's CodeBuddy Code CLI is built on the same
// architecture as Claude Code (same slash-command surface: /agents,
// /bashes, /compact, …) and speaks ACP natively via `--acp`, so no
// separate adapter binary is needed.
binary: 'codebuddy',
acpArgs: ['--acp'],
// Like Claude Code (which it is architecturally derived from),
// CodeBuddy delegates tool permission decisions to ACP requests
// rather than exposing a documented blanket auto-approve flag for
// `--acp` mode, so there is no official argument-based recipe.
autoApprove: null,
installHint: 'npm install -g @tencent-ai/codebuddy-code',
},
{
id: 'hermes',
displayName: 'Hermes Agent',
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/agent-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Chat context uses an **envelope-first submission boundary** (see [agent-context.

## 6. External agents (ACP)

[acp/](../../apps/server/src/modules/agent/acp) is the integration layer for external agents. Its trusted built-in catalogue detects and launches GitHub Copilot, Claude Agent, Gemini, Codex, Qwen Code, Kimi Code CLI, OpenCode, Cursor, and Hermes Agent; Manual setup remains available for other ACP-compatible agents and advanced launch commands. Presets with official argument-based full-auto modes expose an auto-approve toggle whose structured recipe controls both the arguments and whether global options precede the ACP subcommand; agents that require environment variables, configuration, or ACP session modes do not expose this launch-command toggle.
[acp/](../../apps/server/src/modules/agent/acp) is the integration layer for external agents. Its trusted built-in catalogue detects and launches GitHub Copilot, Claude Agent, Gemini, Codex, Qwen Code, Kimi Code CLI, OpenCode, Cursor, CodeBuddy, and Hermes Agent; Manual setup remains available for other ACP-compatible agents and advanced launch commands. Presets with official argument-based full-auto modes expose an auto-approve toggle whose structured recipe controls both the arguments and whether global options precede the ACP subcommand; agents that require environment variables, configuration, or ACP session modes do not expose this launch-command toggle.

- [service.ts](../../apps/server/src/modules/agent/acp/service.ts) `runAcpAgent()` is the external counterpart of `runAgent`: it performs host rendering, constructs the submission, snapshots a unified Agent Profile for a new thread, and drives one Agenetes turn. A fixed Agent Node may supply bounded launch overrides: `workingDirPath` replaces the effective workload cwd and the cwd embedded in command or manifest recipes, while `additionalInitialPreamble` follows the mandatory Huabu external-agent preamble. Agenetes keeps an already persisted WorkloadSpec authoritative, so later calls cannot mutate a realized thread's launch identity.
- [preprocessor.ts](../../apps/server/src/modules/agent/acp/preprocessor.ts) renders the shared `ChatEnvelope` into canonical `AgentInput[]`. Slash commands become one exclusive `AgentCommandInput`; selection and attachments ride its `context`.
Expand Down
Loading