{"id":"docs/backlog-agent","source":"docs","sourceLabel":"docs/","sourcePath":"docs/backlog-agent.md","routePath":"/fastapp/public-docs/page/docs/backlog-agent","rawPath":"/fastapp/public-docs/raw/docs/backlog-agent","slug":["docs","backlog-agent"],"slugPath":"docs/backlog-agent","title":"Autonomous Task Board worker","description":"The local worker polls Task Board, but only acquires cards explicitly moved to AGENT READY. The server control endpoint performs the lease operation in a Firestore transaction. The worker fails closed when that endpoint or its token is u...","headings":["Autonomous Task Board worker","Setup","Release adapter contract"],"wordCount":250,"markdown":"# Autonomous Task Board worker\r\n\r\nThe local worker polls Task Board, but only acquires cards explicitly moved to\r\n`AGENT_READY`. The server control endpoint performs the lease operation in a\r\nFirestore transaction. The worker fails closed when that endpoint or its token\r\nis unavailable.\r\n\r\n## Setup\r\n\r\n1. Rotate any credentials previously shared in chat or logs.\r\n2. Deploy the application with a new `TASK_BOARD_AGENT_SHARED_TOKEN` server\r\n   secret. Use a different, restricted `TASK_BOARD_API_TOKEN` for record reads.\r\n3. Configure the local variables documented in `.env.example`.\r\n4. The default executor adapter invokes `codex exec` ephemerally with the\r\n   `workspace-write` sandbox. `BACKLOG_AGENT_EXECUTOR_ARGS_JSON` is an argument\r\n   array; the generated prompt file path is appended as the final argument.\r\n5. Keep `BACKLOG_AGENT_ENABLE_RELEASE=0` until the release, smoke and rollback\r\n   adapters have been reviewed. Commands are fixed operator configuration and\r\n   are never generated by the model.\r\n\r\nRun one polling cycle:\r\n\r\n```bash\r\nnpm run agent:backlog:once\r\n```\r\n\r\nRun continuously at the configured interval (30 seconds by default):\r\n\r\n```bash\r\nnpm run agent:backlog\r\n```\r\n\r\nCreate `.data/backlog-agent/STOP` to pause acquisition without killing the\r\nprocess. After three consecutive failures the circuit breaker pauses polling\r\nfor five minutes by default. Both thresholds are configurable.\r\n\r\n## Release adapter contract\r\n\r\nThe release command must be idempotent for the pair\r\n`FASTAPP_AGENT_TASK_ID`/`FASTAPP_AGENT_EXECUTION_ID`, publish through the\r\nexisting GitHub Release workflow, wait for its result and print a final JSON\r\nline containing `commit_sha`, `release_url` and optionally `artifact_url`.\r\nThe smoke command must exit non-zero on an unhealthy production deployment.\r\nThe rollback command must restore the previous immutable image.\r\n\r\nThe worker never gives Task Board, Firebase, GitHub or VPS credentials to\r\nOpenClaw. OpenClaw receives redacted task context and an MCP capability profile\r\nrestricted to `readonly` or `operator`.\r\n"}