Agent Task Loop reads one JSON config file. It is resolved from exactly three places, first match wins, with no merging between them:
--config <path>(must exist)- the
AGENT_TASK_LOOP_CONFIGenvironment variable ~/.agent-task-loop/config.json(the global config)
There is no per-directory task.config.* discovery and no TypeScript or
JavaScript config. With none of the three present, commands fail with a
message pointing at agent-task-loop init.
The full shape is in
packages/agent-task-loop/config.example.json.
npx --no-install @rivus/agent-task-loop initinit asks which task source to use (GitHub Issues, Feishu Base, or both),
runs local agent discovery and pre-fills claude and codex entries for
agents that are runnable, and writes ~/.agent-task-loop/config.json. A
Feishu source needs lark-cli on PATH; init offers to install it. init
never overwrites an existing config and points at source add instead. Fill
in projects and repositories afterwards.
agent-task-loop source list
agent-task-loop source add --type github --owner you --repo your-repo
agent-task-loop source add --type feishu --token <base> --table <tableId>
agent-task-loop source remove github:you/your-reposource add merges into the config without touching unrelated blocks. Adding
a second GitHub repository converts the single-repo shorthand to
repositories[] and rejects a duplicate owner/repo. source remove refuses
to remove the last source. Every write is validated against the config schema
first. Without flags in a terminal, add prompts for missing values; without a
terminal, missing values are an error. All subcommands accept --config.
At least one of feishu and githubIssues is required.
{
"feishu": { "baseToken": "base_token", "tableId": "table_id" },
"githubIssues": {
"defaultAgent": "codex",
"repositories": [
{ "owner": "your-org", "repo": "service-a" },
{ "owner": "your-org", "repo": "service-b", "defaultAgent": "claude" }
]
}
}feishuoptionally takesviewId. Runschemato check the Base fields andschema --applyto create missing ones.githubIssuestakes eitherowner+repoorrepositories[]; each repo becomes the sourcegithub:<owner>/<repo>. The token is resolved fromgithubIssues.token, thenGITHUB_TOKEN, thengh auth token, so agh-authenticated machine needs no token in the file.- With both sources configured, new tasks go to Feishu unless a source is chosen.
How sources are combined and where run-time state is kept is described in
architecture/task-sources.md.
A project maps task metadata to a default repository and workspace root. For GitHub-sourced tasks the project key must equal the repository name.
"projects": {
"demo": {
"key": "demo",
"name": "Demo",
"defaultRepository": "demo_app",
"workspaceRoot": "/workspace/demo",
"taskTemplatePrompt": ""
}
}Repository config tells the runner how to prepare, test, build, and optionally deploy a workspace.
"repositories": {
"demo_app": {
"key": "demo_app",
"localPath": "/workspace/demo-app",
"defaultBranch": "main",
"installCommand": "pnpm install",
"testCommand": "pnpm test",
"buildCommand": "pnpm build",
"workspaceStrategy": "worktree"
}
}Use workspaceStrategy: "existing-repo" only when the task should run directly
in the configured checkout.
Agents are local commands. Supported names are claude, codex, coco, and
glm. Keep credentials in the environment, not in the config file.
"agents": {
"codex": { "name": "codex", "command": "codex", "args": [], "env": {} }
}Do not commit local credentials, personal paths, generated workspaces, logs, or machine-specific config. The global config lives outside any repository.