一键导入
spinal-cord
// File-backed HTTP job queue (“spine”) for coordinating OpenClaw head and claw machines. Use when you need to submit jobs, let a claw poll/claim/heartbeat/complete/fail/release work, or inspect job status/results via the Spine API.
// File-backed HTTP job queue (“spine”) for coordinating OpenClaw head and claw machines. Use when you need to submit jobs, let a claw poll/claim/heartbeat/complete/fail/release work, or inspect job status/results via the Spine API.
| name | spinal-cord |
| description | File-backed HTTP job queue (“spine”) for coordinating OpenClaw head and claw machines. Use when you need to submit jobs, let a claw poll/claim/heartbeat/complete/fail/release work, or inspect job status/results via the Spine API. |
This skill documents how to talk to a running Spine server over HTTP.
Set these env vars in the environment where the agent/tooling runs:
SPINE_BASE_URL (example: http://192.168.68.66:36725)SPINE_TOKEN (Bearer token for this role)POST /jobs with target + specGET /jobs until status is done / failed / deadPOST /jobs/:id/comment with feedback, or submit a follow-up jobGET /jobs?status=queued&target=left-claw (or your target)POST /jobs/:id/claimPOST /jobs/:id/heartbeat every ~1–2 minutesPOST /jobs/:id/completePOST /jobs/:id/fail (optionally requeue)POST /jobs/:id/releaseGET /healthGET /skill.md (public)POST /jobs (head)
{ target, spec, meta?, maxAttempts? }GET /jobs (head + claws)
status, targetGET /jobs/:idPOST /jobs/:id/claim (claws)POST /jobs/:id/heartbeat (owner / head override)
{ progress? }POST /jobs/:id/complete (owner / head override)
{ result? }POST /jobs/:id/fail (owner / head override)
{ error?, requeue?: boolean }POST /jobs/:id/release (owner / head override)POST /jobs/:id/comment (head + claws)
{ text }POST /blobs (multipart)
fileSpine is pull-based. The "push" is: the Head submits jobs to Spine, and each Claw runs a polling worker loop to claim/execute work.
Point OpenClaw at the running Spine server’s skill doc:
http://<spine-host>:36725/skill.mdRecommended: treat this as the source of truth. If the skill changes, machines can re-fetch it.
Each agent/runtime that talks to Spine needs:
SPINE_BASE_URL=http://<spine-host>:36725SPINE_TOKEN=<role token>
HEAD_TOKENLEFT_CLAW_TOKENRIGHT_CLAW_TOKENOn each claw machine (e.g. atgsilver), run a cron/launchd job every ~60s.
Use a local state file so work survives across cron ticks:
~/.spine/current-job.jsonAlgorithm (each tick):
current-job.json exists:
POST /jobs/:id/heartbeat)complete; if failed → fail (optionally requeue); if giving up → releasecurrent-job.jsoncurrent-job.json does not exist:
GET /jobs?status=queued&target=left-claw)POST /jobs/:id/claim)current-job.jsonTwo execution modes:
When a worker finishes, it should call POST /jobs/:id/complete with a structured result payload so the Head can review quickly.
Recommended result shape:
{
"url": "https://…",
"pr": "https://github.com/…/pull/123",
"branch": "spine/job-abc",
"notes": "What changed and why",
"howToTest": [
"Step 1…",
"Step 2…"
],
"artifacts": [
{ "name": "build-log", "url": "https://…" },
{ "name": "bundle.zip", "url": "https://…" }
]
}
Keep it small and human-readable; link out to large logs/artifacts.
The head submits jobs and monitors results:
POST /jobs to createGET /jobs / GET /jobs/:id to watchjob.result (URL/PR/notes/howToTest)POST /jobs/:id/comment to provide feedback / next stepsqueued (or marks dead at max attempts).*_TOKENS CSV env vars.