> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getspine.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw

> Configure OpenClaw to call the Spine API for research and deliverable generation.

[OpenClaw](https://github.com/openclaw/openclaw) is an open-source local AI agent that connects to any LLM. Add a Spine tool config and OpenClaw will delegate research-heavy tasks to Spine automatically.

## Install

Install OpenClaw if you don't have it:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
npm i -g openclaw
```

Drop a `SKILL.md` for Spine into OpenClaw's user skills directory:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
mkdir -p ~/.openclaw/skills/spine
curl -o ~/.openclaw/skills/spine/SKILL.md \
  https://docs.getspine.ai/static/agent-files/spine.openclaw.md
```

Verify OpenClaw discovered it:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
openclaw skills list | grep spine      # should show "✓ ready  🌲 spine"
openclaw skills info spine             # full skill metadata + path
```

<Card title="Download skill file" icon="download" href="/static/agent-files/spine.openclaw.md">
  `spine.openclaw.md` — drop into `~/.openclaw/skills/spine/`
</Card>

<Note>
  OpenClaw uses **`skills/`**, not `tools/`. The file must be named exactly
  `SKILL.md` inside a per-skill directory (`~/.openclaw/skills/spine/SKILL.md`).
  OpenClaw also accepts skills under `~/.openclaw/workspace/skills/<name>/SKILL.md`
  if you want a workspace-scoped install.
</Note>

## Set your API key

Add `SPINE_API_KEY` to your environment or to OpenClaw's `.env` file:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
export SPINE_API_KEY="sk_spine_..."
```

Create a key at [platform.getspine.ai/keys](https://platform.getspine.ai/keys).

## What it does

The skill teaches the OpenClaw agent:

1. **When** to delegate — multi-source research, competitive landscapes, reports, slide decks, spreadsheets, web apps
2. **The two-step pattern** — `POST /v1/run` → poll `GET /v1/run/{run_id}` every 15–30s (runs average 10–20 min, up to 2 hr)
3. **How to pick a template** — `deep_research`, `report`, `slides`, `memo`, `excel`, `app`, `landing_page`, or `auto`
4. **How to present results** — `final_output` text + artifact download links

## Headless invocation

For unattended use (CI, scheduled runs, scripts):

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
openclaw agent --local --agent main --json \
  -m "Produce a competitive landscape on <topic> using your Spine skill"
```

<Note>
  * `--local` runs the embedded agent (no gateway required; needs a model-provider key such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` in the shell).
  * `--agent main` (or `--session-id …`, or `--to <E.164>`) is required — otherwise `openclaw agent` exits with `Pass --to <E.164>, --session-id, or --agent to choose a session`.
  * OpenClaw loads skills lazily. If your prompt doesn't clearly match the skill's description, the agent may solve the task with its default tools instead. For deterministic routing, mention the capability by name ("using your Spine skill") or prompt the agent to check its available skills first.
</Note>

## Example

```
You: Research the top 5 competitors in the AI search API space

OpenClaw: Using my 🌲 spine skill with template=deep_research.
  [polling... 3/8 tasks complete... 7/8... done in 15m 42s]

Result:
  Competitive landscape analysis (final_output attached)
  Artifacts:
    - AI_Search_API_Analysis.docx → https://...
  Credits: 28
```

<Note>
  For long-running production workflows, register a webhook instead of polling — see [Webhooks](/api-reference/concepts/webhooks). Polling loops inside the agent can exhaust turn budgets on runs longer than 5–10 minutes.
</Note>

## Templates

Pass the template that best fits the output:

| Template        | Output               |
| --------------- | -------------------- |
| `auto`          | Agent picks          |
| `deep_research` | Research memo        |
| `report`        | Report (.docx)       |
| `slides`        | Slide deck (.pptx)   |
| `memo`          | Memo (.docx)         |
| `excel`         | Spreadsheet (.xlsx)  |
| `app`           | Web app (.html)      |
| `landing_page`  | Landing page (.html) |
