All documentation pages

Contributing

AgentDuo is one repository: the duo CLI in apps/cli, the VS Code extension in apps/vscode, the desktop app in apps/desktop, the code they share in packages/ (the engine, the host that runs it in a worker, and the chat’s page) and this website in website/. All of them build with Node.js ≥ 22.12 and npm; the root’s npm workspaces link the packages.

On this page

Build the CLI from source

Terminal

git clone https://github.com/HaiTrieu247/agentduo.git
cd agentduo
npm ci
npm run build

npm run build bundles the CLI into apps/cli/dist/. Run it as node apps/cli/dist/cli.js, or run npm link in apps/cli to put duo and agentduo on your PATH.

Root scripts
CommandWhat it does
npm testUnit, workflow and UI tests (Vitest). Workflow scenarios drive a fake agent through real subprocesses, so they cost nothing.
npm run typecheckTypeScript, strict.
npm run test:packBuilds, packs and installs the package in a temporary prefix, then runs its binaries.
npm run demo:uiThe live terminal UI with scripted fake agents (free).
npm run smoke:realReal agents on a demo repository. It costs money.

The VS Code extension

The extension builds from the root, with the root’s toolchain:

Extension scripts
CommandWhat it does
npm run typecheck:vscodeChecks the extension’s TypeScript.
npm run build:vscodeBuilds apps/vscode/dist (host and webview) and runtime/ (the engine worker and schemas).
npm run test:vscodeA smoke test in a downloaded VS Code; on Linux, run it under xvfb-run.
npm run package:vscodeWrites apps/vscode/agentduo-vscode-<version>.vsix, for code --install-extension.
npm run test:pack:vscodePackages it, checks the VSIX contents and runs its worker outside the checkout.

To develop it, open the repository in VS Code and press F5 (Run agentduo extension): it builds the extension and opens an Extension Development Host.

The desktop app

The desktop package builds from the checkout with the root toolchain, so install the root first, then the desktop’s own development dependencies (Electron, electron-builder, @electron/fuses, electron-updater, Playwright):

Terminal

npm ci
npm ci --prefix apps/desktop
Desktop scripts (npm --prefix apps/desktop run …)
ScriptWhat it does
devBuilds, then opens the app from dist/.
buildBundles main, preload, renderer and the engine worker into dist/.
typecheckThe desktop’s TypeScript check.
testIts unit and integration tests.
test:e2eThe Electron end-to-end tests (Playwright): the real app with fake CLIs in a scratch Git project, driven as a user.
pack:dirAn unpacked app for this system under release/.
test:packChecks that unpacked app away from the checkout.
package:mac, package:win, package:linuxThe installers. Packages are native: build each system’s on that system.

When you change the desktop app, run typecheck, test, build and test:e2e. Its version follows the root’s; npm version keeps them together.

This website

The website is static HTML generated from website/content, in English and Vietnamese. It needs no install:

Terminal

cd website
npm run build
npm test
npm run preview

While writing a page, node scripts/check-page.mjs <page id> checks it in every language without building the site. Every section and sub-heading must exist in both languages.

Conventions

  • AgentDuo enforces nothing. It passes protocol flags only, plus your args and role_args; unexpected changes become warnings, never blocks. Permission rules belong to each CLI’s own configuration.
  • The published CLI’s runtime dependencies (apps/cli/package.json) are exactly ink, react, commander, yaml and ajv; the workspace packages are bundled into it. Ask before adding one.
  • Node ≥ 22.12, ESM, TypeScript strict. Relative imports end in .js, also for .ts and .tsx files.
  • Packages import each other by name (@agentduo/engine/…), in one direction: the engine, then the host, then the webview, then the apps; test/boundaries.test.ts checks it. What reaches the screen is an event, and human decisions come back through an interface.
  • A changed workflow transition gets a scenario in packages/engine/test/workflow/workflow.test.ts. Agent output schemas stay OpenAI-strict (every property required, no additional properties), which packages/engine/test/agents/schema.test.ts checks.
  • CI runs the tests on Linux, macOS and Windows. Build paths with join in tests, and never name the user config folder with XDG_CONFIG_HOME alone: Windows reads %APPDATA%.

The full list is in AGENTS.md at the root of the repository.

Report a problem

Open an issue on GitHub. Before you do, check Troubleshooting. Include:

  • The AgentDuo version (duo --version; the extension’s in VS Code’s Extensions view; the desktop app’s in Settings → General) and the versions of claude and codex.
  • Your operating system and its version, and which interface you used.
  • The output of duo doctor, or the desktop app’s Settings → Diagnostics export.
  • What you did, what you expected and what happened, with the warning or error text.

Warning

Issues are public. Before you post anything:

  • Replace email addresses, user names and home folder paths (for example with /repo or ~).
  • Remove tokens, API keys and anything from a credential file.
  • Do not attach a run folder or conversation from private code: it holds your prompts, the agents’ output and diffs of your files. Copy only the lines that show the problem.

License

AgentDuo is released under the MIT License (LICENSE in the repository).