wardo turns a complex prompt into a durable workflow that can run Codex and Claude Code agents. Node/TypeScript and Python runtimes share the same task DAG, nested task tree, independent judge, retry policy and workspace .wardo state.
The agent skill is maintained at skills/wardo/SKILL.md and can be installed from the skills directory:
npx skills add banbox/wardo --skill wardoBrowse it at skills.sh/banbox/wardo/wardo.
npm install
npm run check
npm run buildNode.js 20 or newer is required for the TypeScript runtime. A Python 3.10+ runtime is also included under python/wardo; it has no required third party dependencies and is suitable for machines without Node.js.
Install the skill into the detected host with:
npm run build
node dist/cli.js install-skill
# or choose one explicitly:
node dist/cli.js install-skill --agent codex
node dist/cli.js install-skill --agent claudeAt runtime Wardo records the installed agents, detected active host, versions and detection source in .wardo/workflow.json. Automatic tasks use that active host first. Set WARDO_ACTIVE_AGENT=codex or WARDO_ACTIVE_AGENT=claude when the parent environment does not expose a host marker.
Create ~/.wardo/config.yml:
maxConcurrency: 3
modelPreferences:
- anthropic:claude-haiku-4-5
- openai:gpt-5-mini
providers:
openai:
type: openai
apiKey: ${OPENAI_API_KEY}
baseUrl: ${OPENAI_BASE_URL}
models: [gpt-5-mini]
anthropic:
type: anthropic
apiKey: ${ANTHROPIC_API_KEY}
baseUrl: ${ANTHROPIC_BASE_URL}
models: [claude-haiku-4-5]
local:
type: openai-compatible
apiKey: ${LOCAL_LLM_API_KEY}
baseUrl: ${LOCAL_LLM_BASE_URL}
models: [local-fast]
retry:
delaysMs: [60000, 180000, 480000, 1200000]
maxAttempts: 5Environment variables override file values. Supported overrides include WARDO_MAX_CONCURRENCY, WARDO_MODEL_PREFERENCES, WARDO_PROVIDER_<NAME>_API_KEY, WARDO_PROVIDER_<NAME>_BASE_URL, WARDO_PROVIDER_<NAME>_MODELS, OPENAI_API_KEY, OPENAI_BASE_URL, ANTHROPIC_API_KEY, and ANTHROPIC_BASE_URL.
import { execute } from "wardo";
await execute({
prompt: "检查项目中的认证错误,修复并运行测试",
workspace: process.cwd(),
maxConcurrency: 3,
resume: true,
});需要让 planner 自动拆分任务时加入 plan: "auto":
await execute({ prompt: "完成一个需要分析、实现和测试的复杂改造", plan: "auto", resume: true });For a stable multi-step plan, use defineWorkflow, defineTask, and runWorkflow from the package. Use reviewScript at a checkpoint when the workflow script needs an agent review and update.
The CLI supports wardo run, wardo run --plan auto, wardo resume, wardo status, wardo env, and wardo fork <destination>. Pressing Ctrl-C persists the current task as paused; wardo resume continues from the saved .wardo state.
From this checkout, add python to PYTHONPATH (or install/copy that directory) and use the same call shape:
python -m wardo run --plan auto "decompose, implement and verify this change"from wardo import execute, define_task, define_workflow, run_workflow
result = execute(prompt="用户目标", workspace=".", resume=True)Python provider configuration is read from the same ~/.wardo/config.yml, WARDO_* variables and provider entries. OpenAI chat completions, OpenAI Responses and Anthropic Messages formats are supported; requestFormat can select a wire format explicitly. Python task adapters invoke installed codex or claude CLIs by default and can be replaced with a custom adapter.
The current implementation includes planner-driven decomposition, a durable scheduler, provider adapters, judge requests, retry classification, event storage, resume loading, configuration loading and the reviewScript checkpoint helper. Interactive pause commands and automatic review triggers are the next implementation slice.
~/.wardo/config.yml 的 providers 支持按顺序排列的列表。每一项可使用 openai、anthropic 或 local(OpenAI 兼容接口)类型;name 可选,用于在模型偏好中引用该项:
providers:
- name: primary
type: openai
apiKey: ${OPENAI_API_KEY}
models: [gpt-5-mini]
- type: anthropic
apiKey: ${ANTHROPIC_API_KEY}
models: [claude-haiku-4-5]
- type: local
baseUrl: http://127.0.0.1:11434/v1
models: [local-fast]
providerHealth:
cooldownMs: 300000
probeProbability: 0.1Wardo 按列表顺序选择 provider。遇到网络、限流、503/5xx 等临时故障时,会把 provider 写入工作区 .wardo/provider-health.json,在冷却时间内跳过它,并以 probeProbability 的概率进行恢复探测;成功请求会清除该 provider 的故障状态。旧的对象格式仍兼容。