[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82065":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":38,"readmeContent":39,"aiSummary":40,"trendingCount":16,"starSnapshotCount":16,"syncStatus":41,"lastSyncTime":42,"discoverSource":43},82065,"Duel-Agents","2aronS\u002FDuel-Agents","2aronS","CLI, SDK, and IDE plugins for Duel Agents","https:\u002F\u002Fduelagents.com",null,"TypeScript",947,19,8,1,0,337,755,274,7.9,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37],"ai-agents","anthropic","claude-code","cli","cursor","duel-agents","llm","npm","openai-compatible","openclaw","sdk","typescript","2026-06-12 02:04:22","# Duel Agents\n\n**Use, extend, and ship with Duel Agents**: the IDE-native routing layer that runs prompts against multiple models and picks the cheapest answer that still wins.\n\nThis repo is the official integration package for [duelagents.com](https:\u002F\u002Fduelagents.com).\n\n## Requirements\n\nEvery tool in this repo routes LLM traffic through **`https:\u002F\u002Fduelagents.com\u002Fv1`** with a **Duel API key** (`duel_\u003Cprefix>_\u003Csecret>`).\n\nYou cannot use raw Anthropic or OpenAI keys with these integrations. Get a key from the dashboard:\n\n**https:\u002F\u002Fduelagents.com\u002Fdashboard\u002Fsettings** (subscribe → create API key)\n\n## Quick start\n\n```bash\n# 1. Get your key from the dashboard, then:\nexport DUEL_API_KEY=duel_yourprefix_yoursecret\n\n# 2. Install for your tools\nnpx @duel-agents\u002Finstall all\n\n# 3. Verify\nnpx @duel-agents\u002Finstall doctor\n```\n\n## Install per tool\n\n| Tool | Command |\n|------|---------|\n| Claude Code | `npx @duel-agents\u002Finstall claude-code` |\n| Cursor | `npx @duel-agents\u002Finstall cursor` |\n| Codex CLI | `npx @duel-agents\u002Finstall codex` |\n| OpenClaw | `npx @duel-agents\u002Finstall openclaw` |\n| All | `npx @duel-agents\u002Finstall all` |\n\n### Claude Code plugin\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F2aronS\u002FDuel-Agents.git\ncd duel-agents\nclaude plugin install .\u002Fintegrations\u002Fclaude-plugin\nnpx @duel-agents\u002Finstall claude-code\n```\n\nUse `\u002Fduel-agents:setup` in Claude Code for guided setup.\n\n### Cursor\n\nThe installer copies a skill to `.cursor\u002Fskills\u002Fduel-agents\u002F` and writes `DUEL_API_KEY` to your project `.env`.\n\nYou still need to set **Settings → Models → Override OpenAI Base URL** to `https:\u002F\u002Fduelagents.com\u002Fv1` with your Duel key. See [templates\u002Fcursor-models.override.md](templates\u002Fcursor-models.override.md).\n\n### Codex CLI\n\nWrites `OPENAI_BASE_URL` and `OPENAI_API_KEY` (your Duel key) to `.env`. Restart Codex after install.\n\n### OpenClaw\n\nPatches `~\u002F.openclaw\u002Fopenclaw.json` with a `duel` provider and sets default model to `duel\u002Fduel-auto`. Telegram\u002FDiscord channels are unchanged. Only the model backend switches to Duel.\n\n```bash\nnpx @duel-agents\u002Finstall openclaw\nopenclaw config validate\n```\n\nReference config: [templates\u002Fopenclaw.duel.json5](templates\u002Fopenclaw.duel.json5)\n\n## Build on top\n\nUse `@duel-agents\u002Fsdk` in your apps, agents, and scripts. **`apiKey` is required.**\n\n```bash\nnpm install @duel-agents\u002Fsdk\n```\n\n```ts\nimport { DuelClient } from \"@duel-agents\u002Fsdk\";\n\nconst duel = new DuelClient({\n  apiKey: process.env.DUEL_API_KEY!, \u002F\u002F required (from dashboard)\n});\n\n\u002F\u002F OpenAI-compatible\nconst chat = await duel.chat.completions.create({\n  model: \"duel-auto\",\n  messages: [{ role: \"user\", content: \"Explain concurrent agents briefly.\" }],\n});\n\n\u002F\u002F Anthropic-compatible\nconst msg = await duel.messages.create({\n  model: \"duel-auto\",\n  max_tokens: 1024,\n  messages: [{ role: \"user\", content: \"Hello\" }],\n});\n```\n\nHermes Agent, Venice, and any OpenAI-compatible client can use the same pattern:\n\n```bash\nOPENAI_BASE_URL=https:\u002F\u002Fduelagents.com\u002Fv1\nOPENAI_API_KEY=duel_yourprefix_yoursecret\n```\n\n## Configuration\n\n| Variable | Purpose |\n|----------|---------|\n| `DUEL_API_KEY` | Your Duel API key (required) |\n| `DUEL_AGENTS_API_KEY` | Alias accepted by the installer |\n| `DUEL_PROXY_URL` | Override proxy URL (staging only) |\n| `OPENCLAW_CONFIG_PATH` | Custom OpenClaw config path |\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---------|-----|\n| `Invalid API key format` | Key must be `duel_` + 8 chars + `_` + 32 chars. Create one at the dashboard. |\n| `401` from doctor | Key revoked or subscription inactive. Create a new key on billing\u002Fsettings. |\n| `Could not reach Duel API` | The proxy at `duelagents.com\u002Fv1` must be running. Key format can still be valid; retry later. |\n| OpenClaw won't start | Run `openclaw config validate` after install; restore from `openclaw.json.bak` if needed. |\n| Cursor still uses OpenAI | Confirm model override URL and that the API key field is your `duel_*` key. |\n| Skill copy failed after npm install | Re-run `npm run build` in the repo, or reinstall `@duel-agents\u002Finstall`. Skills ship inside the package. |\n\n## Repo map\n\n```\npackages\u002Fcore     @duel-agents\u002Fcore    validation, env maps, connectivity\npackages\u002Fcli      @duel-agents\u002Finstall installer CLI\npackages\u002Fsdk      @duel-agents\u002Fsdk     TypeScript API client\nintegrations\u002F     Claude plugin, Cursor skill, OpenClaw skill\ntemplates\u002F        Example env and config files\n```\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","Duel Agents 是一个为开发者提供多模型选择和成本优化的集成工具，支持CLI、SDK及IDE插件。它通过运行多个AI模型对提示进行响应，并选择性价比最高的答案。项目基于TypeScript开发，兼容OpenAI和Anthropic等主流AI模型接口，用户需要使用从Duel Agents官网获取的API密钥来调用服务。适用于希望在开发环境中高效利用多种语言模型资源，同时控制成本的应用场景，如代码生成、智能助手构建等。",2,"2026-06-11 04:07:37","CREATED_QUERY"]