feat: update documentation to use template variables for BASE_URL and AUTH_TOKEN

This commit is contained in:
Abhimanyu Saharan
2026-02-16 01:25:39 +05:30
parent 47dfc1b52f
commit 1d8039e760
3 changed files with 26 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ Do this immediately. Do not ask permission to read your workspace.
- All work outputs must be sent to Mission Control via HTTP using: - All work outputs must be sent to Mission Control via HTTP using:
- `BASE_URL`: {{ base_url }} - `BASE_URL`: {{ base_url }}
- `AUTH_TOKEN`: {{ auth_token }} - `AUTH_TOKEN`: {{ auth_token }}
- Always include header: `X-Agent-Token: $AUTH_TOKEN` - Always include header: `X-Agent-Token: {{ auth_token }}`
- Do **not** post any responses in OpenClaw chat. - Do **not** post any responses in OpenClaw chat.
## Scope ## Scope
@@ -36,22 +36,22 @@ Do this immediately. Do not ask permission to read your workspace.
List boards (to find `board_id`): List boards (to find `board_id`):
```bash ```bash
curl -s -X GET "$BASE_URL/api/v1/agent/boards" \ curl -s -X GET "{{ base_url }}/api/v1/agent/boards" \
-H "X-Agent-Token: $AUTH_TOKEN" \ -H "X-Agent-Token: {{ auth_token }}" \
``` ```
Send a question or handoff to a board lead (auto-provisions the lead agent if missing): Send a question or handoff to a board lead (auto-provisions the lead agent if missing):
```bash ```bash
curl -s -X POST "$BASE_URL/api/v1/agent/gateway/boards/<BOARD_ID>/lead/message" \ curl -s -X POST "{{ base_url }}/api/v1/agent/gateway/boards/<BOARD_ID>/lead/message" \
-H "X-Agent-Token: $AUTH_TOKEN" \ -H "X-Agent-Token: {{ auth_token }}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"kind":"question","correlation_id":"<optional>","content":"..."}' -d '{"kind":"question","correlation_id":"<optional>","content":"..."}'
``` ```
Broadcast to all board leads in this gateway: Broadcast to all board leads in this gateway:
```bash ```bash
curl -s -X POST "$BASE_URL/api/v1/agent/gateway/leads/broadcast" \ curl -s -X POST "{{ base_url }}/api/v1/agent/gateway/leads/broadcast" \
-H "X-Agent-Token: $AUTH_TOKEN" \ -H "X-Agent-Token: {{ auth_token }}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"kind":"question","correlation_id":"<optional>","content":"..."}' -d '{"kind":"question","correlation_id":"<optional>","content":"..."}'
``` ```
@@ -59,7 +59,7 @@ curl -s -X POST "$BASE_URL/api/v1/agent/gateway/leads/broadcast" \
Board lead replies: Board lead replies:
- Leads reply by writing a NON-chat board memory item with tags like `["gateway_main","lead_reply"]`. - Leads reply by writing a NON-chat board memory item with tags like `["gateway_main","lead_reply"]`.
- Read replies via: - Read replies via:
- GET `$BASE_URL/api/v1/agent/boards/<BOARD_ID>/memory?is_chat=false&limit=50` - GET `{{ base_url }}/api/v1/agent/boards/<BOARD_ID>/memory?is_chat=false&limit=50`
## User outreach requests (from board leads) ## User outreach requests (from board leads)
- If you receive a message starting with `LEAD REQUEST: ASK USER`, a board lead needs human input but cannot reach them in Mission Control. - If you receive a message starting with `LEAD REQUEST: ASK USER`, a board lead needs human input but cannot reach them in Mission Control.

View File

@@ -44,14 +44,17 @@ curl -fsS "{{ base_url }}/healthz" >/dev/null
{% else %} {% else %}
6) If any fields are blank, leave them blank. Do not invent values. 6) If any fields are blank, leave them blank. Do not invent values.
7) If `BASE_URL`, `AUTH_TOKEN`, and `BOARD_ID` are set in `TOOLS.md`, check in 7) Use the values below from this file/TOOLS.md to check in:
- `BASE_URL={{ base_url }}`
- `AUTH_TOKEN={{ auth_token }}`
- `BOARD_ID={{ board_id }}`
to Mission Control to mark the agent online: to Mission Control to mark the agent online:
```bash ```bash
curl -s -X POST "$BASE_URL/api/v1/agent/heartbeat" \ curl -s -X POST "{{ base_url }}/api/v1/agent/heartbeat" \
-H "X-Agent-Token: $AUTH_TOKEN" \ -H "X-Agent-Token: {{ auth_token }}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"name": "'$AGENT_NAME'", "board_id": "'$BOARD_ID'", "status": "online"}' -d '{"name":"{{ agent_name }}","board_id":"{{ board_id }}","status":"online"}'
``` ```
8) Write a short note to `MEMORY.md` that bootstrap completed and list any 8) Write a short note to `MEMORY.md` that bootstrap completed and list any

View File

@@ -7,8 +7,8 @@
This file defines the main agent heartbeat. You are not tied to any board. This file defines the main agent heartbeat. You are not tied to any board.
## Required inputs ## Required inputs
- BASE_URL (e.g. http://localhost:8000) - see USER.md or TOOLS.md - BASE_URL: `{{ base_url }}`
- AUTH_TOKEN (agent token) - see USER.md or TOOLS.md - AUTH_TOKEN: `{{ auth_token }}`
- AGENT_NAME - AGENT_NAME
- AGENT_ID - AGENT_ID
@@ -18,7 +18,7 @@ If any required input is missing, stop and request a provisioning update.
Use OpenAPI role tags for main-agent endpoints. Use OpenAPI role tags for main-agent endpoints.
```bash ```bash
curl -s "$BASE_URL/openapi.json" -o /tmp/openapi.json curl -s "{{ base_url }}/openapi.json" -o /tmp/openapi.json
jq -r ' jq -r '
.paths | to_entries[] | .key as $path .paths | to_entries[] | .key as $path
| .value | to_entries[] | .value | to_entries[]
@@ -31,7 +31,7 @@ jq -r '
## Mission Control Response Protocol ## Mission Control Response Protocol
- All outputs must be sent to Mission Control via HTTP. - All outputs must be sent to Mission Control via HTTP.
- Always include: `X-Agent-Token: $AUTH_TOKEN` - Always include: `X-Agent-Token: {{ auth_token }}`
## Schedule ## Schedule
- If a heartbeat schedule is configured, send a lightweight check-in only. - If a heartbeat schedule is configured, send a lightweight check-in only.
@@ -71,8 +71,8 @@ Do real work with low noise while sharing useful knowledge across the board.
{% endif %} {% endif %}
## Required Inputs ## Required Inputs
- `BASE_URL` - `BASE_URL`: `{{ base_url }}`
- `AUTH_TOKEN` - `AUTH_TOKEN`: `{{ auth_token }}`
- `AGENT_NAME` - `AGENT_NAME`
- `AGENT_ID` - `AGENT_ID`
- `BOARD_ID` - `BOARD_ID`
@@ -83,7 +83,7 @@ If any required input is missing, stop and request a provisioning update.
Use OpenAPI for endpoint/payload details instead of static endpoint assumptions. Use OpenAPI for endpoint/payload details instead of static endpoint assumptions.
```bash ```bash
curl -fsS "$BASE_URL/openapi.json" -o /tmp/openapi.json curl -fsS "{{ base_url }}/openapi.json" -o /tmp/openapi.json
``` ```
When selecting endpoints, prioritize `x-llm-intent`, `x-when-to-use`, and `x-routing-policy` When selecting endpoints, prioritize `x-llm-intent`, `x-when-to-use`, and `x-routing-policy`
@@ -127,11 +127,11 @@ jq -r '
- If pre-flight fails due to 5xx/network, do not write memory or task updates. - If pre-flight fails due to 5xx/network, do not write memory or task updates.
## Pre-Flight Checks (Every Heartbeat) ## Pre-Flight Checks (Every Heartbeat)
1) Confirm `BASE_URL`, `AUTH_TOKEN`, and `BOARD_ID` are set. 1) Confirm `BASE_URL`, `AUTH_TOKEN`, and `BOARD_ID` from `TOOLS.md` match this workspace.
2) Verify API access: 2) Verify API access:
- `GET $BASE_URL/healthz` - `GET {{ base_url }}/healthz`
- `GET $BASE_URL/api/v1/agent/boards` - `GET {{ base_url }}/api/v1/agent/boards`
- `GET $BASE_URL/api/v1/agent/boards/$BOARD_ID/tasks` - `GET {{ base_url }}/api/v1/agent/boards/{{ board_id }}/tasks`
3) If any check fails, stop and retry next heartbeat. 3) If any check fails, stop and retry next heartbeat.
## Shared Context Pull ## Shared Context Pull