AGENT SKILL
a0-live-debug
a0, agent-zero, docker, live-debug, scheduler, tasks, csrf, chats
- License 许可
- BSD-3-Clause
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- a0-live-debug
- description
- a0, agent-zero, docker, live-debug, scheduler, tasks, csrf, chats
- compatibility
- any environment with docker access to a running Agent Zero container
03 SKILL.md 正文
Agent Zero Live Container Debug
Goal
Inspect and debug a running, dockerized Agent Zero runtime without touching the host outside the container.
Input
A running A0 container (default name agent-zero, image a0-symbolics:local).
All commands run inside the container via docker exec; the runtime root is
/a0.
Output
Concrete diagnosis of backend/UI/scheduler problems plus verified fixes.
Layout (inside container)
| Path | Contents |
|---|---|
/a0/usr/scheduler/tasks.json |
Scheduler task list (state, last_result carries run errors) |
/a0/usr/chats/<ctx>/messages/N.txt |
Per-context chat turns; higher N = newer |
/a0/usr/projects/<slug>/ |
Projects; slug is the folder name, .a0proj/project.json holds the title |
/a0/tmp/ |
Runtime caches (memory, playwright) |
/a0/webui/ |
Served WebUI source (compare md5 against repo when UI misbehaves) |
Workflow
- Identify container and uptime:
docker ps --format '{{.Names}}\t{{.Status}}'. - Read scheduler state first;
last_resultrecords exact run errors:docker exec agent-zero python3 -c "import json;d=json.load(open('/a0/usr/scheduler/tasks.json'));[print(t['name'],t['state'],t.get('last_result')) for t in d['tasks']]" - Read worker chat tails for recent agent-side context:
docker exec agent-zero sh -c 'cat /a0/usr/chats/<id>/messages/$(ls /a0/usr/chats/<id>/messages | sort -n | tail -1).txt' - Check container logs, filtering reaped-pid noise:
docker logs agent-zero --since 30m 2>&1 | grep -viE "reaped unknown pid" | tail -50 - Smoke-test APIs from inside the container. CSRF needs a cookie jar plus
Origin header (login-disabled mode rejects
Origin: None):docker exec agent-zero sh -c ' curl -s -c /tmp/cj http://localhost:80/api/csrf_token \ -H "Origin: http://localhost:5080" > /tmp/ct.json TOKEN=$(python3 -c "import json;print(json.load(open(\"/tmp/ct.json\"))[\"token\"])") curl -s -X POST http://localhost:80/api/<endpoint> \ -H "Content-Type: application/json" -H "Origin: http://localhost:5080" \ -H "X-CSRF-Token: $TOKEN" -b /tmp/cj -d "{\"timezone\":\"America/New_York\"}"' - Endpoints are
/api/<name>; bare/<name>returns 405. GET on POST-only endpoints returns 405 - always use POST. - Fix persisted data directly only after root-cause confirmation, then re-run the failing operation through the API to verify.
Known Failure Modes
- Task runs fail with
FileNotFoundError ... /usr/projects/<Name>/.a0proj/project.json- Task stores a display title (
Hackmode) instead of the folder slug (hackmode); Linux is case-sensitive. Fixproject_name(andproject.name) intasks.jsonto the folder slug. Listings succeed because serialization never touches disk - onlyactivate_projectfails at run time.
- Task stores a display title (
CSRF token missing or invalidvia curl - missing cookie jar or Origin header; see step 5.Origin None not allowed when login is disabledmeans the Origin header was absent.- UI shows no tasks but tasks.json has them - check the browser console and
ALLOWED_ORIGINS; the fetch path is/scheduler_tasks_listPOST viawebui/components/modals/scheduler/scheduler-store.js.
Rules
- Never edit tasks.json while a task is
running; set state toidleonly after confirming the run actually failed. - Prefer reproducing through the real API path over reading files; file reads prove state, API calls prove behavior.
- Do not restart the container as a first move; read state first.
- Mask tokens/secrets when pasting logs or chat excerpts.
Verification
docker exec agent-zero python3 -c "import json;print([t['state'] for t in json.load(open('/a0/usr/scheduler/tasks.json'))['tasks']])"
docker logs agent-zero --since 5m 2>&1 | grep -ci traceback
04 同仓库更多 Skills
unknown-frontmatter
validator, fixture
★ 0
zara-phone-pair
zara, phone, pairing, adb, wireless-debugging, curve, enrollment, android
★ 0
zara-mcp
zara, mcp, stdio, http, tools, resources, prompts, debugging
★ 0
youtube-context
youtube, transcripts, yt-dlp, whisper, video-context
★ 0
worker-orchestration
workers, routing, delegation, fleet, budgets, concurrency
★ 0
task-steward-worker
steward, rage, leases, fencing, heartbeat, receipts
★ 0