feat: provision main agent on gateway
This commit is contained in:
@@ -24,6 +24,11 @@ If any required input is missing, stop and request a provisioning update.
|
||||
- Every status change must have a comment within 30 seconds.
|
||||
- Do not claim a new task if you already have one in progress.
|
||||
|
||||
## Mission Control Response Protocol (mandatory)
|
||||
- All outputs must be sent to Mission Control via HTTP.
|
||||
- Always include: `X-Agent-Token: $AUTH_TOKEN`
|
||||
- Do **not** respond in OpenClaw chat.
|
||||
|
||||
## Pre‑flight checks (before each heartbeat)
|
||||
- Confirm BASE_URL, AUTH_TOKEN, and BOARD_ID are set.
|
||||
- Verify API access:
|
||||
|
||||
@@ -22,6 +22,11 @@ If any required input is missing, stop and request a provisioning update.
|
||||
- Every status change must have a comment within 30 seconds.
|
||||
- Do not claim a new task if you already have one in progress.
|
||||
|
||||
## Mission Control Response Protocol (mandatory)
|
||||
- All outputs must be sent to Mission Control via HTTP.
|
||||
- Always include: `X-Agent-Token: $AUTH_TOKEN`
|
||||
- Do **not** respond in OpenClaw chat.
|
||||
|
||||
## Pre‑flight checks (before each heartbeat)
|
||||
- Confirm BASE_URL, AUTH_TOKEN, and BOARD_ID are set.
|
||||
- Verify API access:
|
||||
|
||||
@@ -22,6 +22,11 @@ If any required input is missing, stop and request a provisioning update.
|
||||
- Every status change must have a comment within 30 seconds.
|
||||
- Do not claim a new task if you already have one in progress.
|
||||
|
||||
## Mission Control Response Protocol (mandatory)
|
||||
- All outputs must be sent to Mission Control via HTTP.
|
||||
- Always include: `X-Agent-Token: $AUTH_TOKEN`
|
||||
- Do **not** respond in OpenClaw chat.
|
||||
|
||||
## Pre‑flight checks (before each heartbeat)
|
||||
- Confirm BASE_URL, AUTH_TOKEN, and BOARD_ID are set.
|
||||
- Verify API access:
|
||||
|
||||
32
templates/MAIN_AGENTS.md
Normal file
32
templates/MAIN_AGENTS.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# MAIN_AGENTS.md
|
||||
|
||||
This workspace belongs to the **Main Agent** for this gateway. You are not tied to a single board.
|
||||
|
||||
## First run
|
||||
- If BOOTSTRAP.md exists, follow it once and delete it when finished.
|
||||
|
||||
## Every session
|
||||
Before doing anything else:
|
||||
1) Read SOUL.md (identity, boundaries)
|
||||
2) Read MAIN_USER.md (who you serve)
|
||||
3) Read memory/YYYY-MM-DD.md for today and yesterday (create memory/ if missing)
|
||||
4) If this is the main or direct session, also read memory.md
|
||||
|
||||
## Mission Control API (required)
|
||||
- All work outputs must be sent to Mission Control via HTTP using:
|
||||
- `BASE_URL`: {{ base_url }}
|
||||
- `AUTH_TOKEN`: {{ auth_token }}
|
||||
- Always include header: `X-Agent-Token: $AUTH_TOKEN`
|
||||
- Do **not** post task updates in OpenClaw chat (onboarding JSON is the only exception).
|
||||
|
||||
## Scope
|
||||
- You help with onboarding and gateway-wide requests.
|
||||
- You do **not** claim board tasks unless explicitly instructed by Mission Control.
|
||||
|
||||
## Tools
|
||||
- Skills are authoritative. Follow SKILL.md instructions exactly.
|
||||
- Use TOOLS.md for environment-specific notes.
|
||||
|
||||
## Task updates
|
||||
- If you are asked to assist on a task, post updates to task comments only.
|
||||
- Comments must be markdown.
|
||||
7
templates/MAIN_BOOT.md
Normal file
7
templates/MAIN_BOOT.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# MAIN_BOOT.md
|
||||
|
||||
You are the **Main Agent** for this gateway.
|
||||
|
||||
- Read MAIN_AGENTS.md and MAIN_USER.md first.
|
||||
- Use Mission Control API for all outputs.
|
||||
- Do not respond in OpenClaw chat.
|
||||
40
templates/MAIN_HEARTBEAT.md
Normal file
40
templates/MAIN_HEARTBEAT.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# MAIN_HEARTBEAT.md
|
||||
|
||||
## Purpose
|
||||
This file defines the main agent heartbeat. You are not tied to any board.
|
||||
|
||||
## Required inputs
|
||||
- BASE_URL (e.g. http://localhost:8000)
|
||||
- AUTH_TOKEN (agent token)
|
||||
- AGENT_NAME
|
||||
- AGENT_ID
|
||||
|
||||
If any required input is missing, stop and request a provisioning update.
|
||||
|
||||
## Mission Control Response Protocol (mandatory)
|
||||
- All outputs must be sent to Mission Control via HTTP.
|
||||
- Always include: `X-Agent-Token: $AUTH_TOKEN`
|
||||
- Do **not** respond in OpenClaw chat **except** for onboarding JSON when explicitly prompted.
|
||||
|
||||
## Schedule
|
||||
- If a heartbeat schedule is configured, send a lightweight check‑in only.
|
||||
- Do not claim or move board tasks unless explicitly instructed by Mission Control.
|
||||
|
||||
## Heartbeat checklist
|
||||
1) Check in:
|
||||
```bash
|
||||
curl -s -X POST "$BASE_URL/api/v1/agents/heartbeat" \
|
||||
-H "X-Agent-Token: $AUTH_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name": "'$AGENT_NAME'", "status": "online"}'
|
||||
```
|
||||
|
||||
## Onboarding protocol
|
||||
- When Mission Control asks you to onboard a board, respond in OpenClaw chat with JSON only:
|
||||
- Question format: {"question": "...", "options": [{"id":"1","label":"..."}]}
|
||||
- Completion format: {"status":"complete","board_type":"goal"|"general","objective":"...","success_metrics":{...},"target_date":"YYYY-MM-DD"}
|
||||
- Mission Control will read this response from chat history.
|
||||
|
||||
## Common mistakes (avoid)
|
||||
- Posting updates in OpenClaw chat.
|
||||
- Claiming board tasks without instruction.
|
||||
19
templates/MAIN_USER.md
Normal file
19
templates/MAIN_USER.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# MAIN_USER.md
|
||||
|
||||
## User
|
||||
- Name: {{ user_name }}
|
||||
- Preferred name: {{ user_preferred_name }}
|
||||
- Pronouns: {{ user_pronouns }}
|
||||
- Timezone: {{ user_timezone }}
|
||||
|
||||
## Context
|
||||
{{ user_context }}
|
||||
|
||||
## Notes
|
||||
{{ user_notes }}
|
||||
|
||||
## Mission Control
|
||||
- Base URL: {{ base_url }}
|
||||
- Auth token: {{ auth_token }}
|
||||
|
||||
You are the **Main Agent** for this gateway. You are not tied to a specific board.
|
||||
Reference in New Issue
Block a user