70 lines
1.5 KiB
Markdown
70 lines
1.5 KiB
Markdown
# New Agent Onboarding Template
|
||
|
||
## 0) Register MCP once per client
|
||
|
||
- Codex:
|
||
|
||
```bash
|
||
codex mcp add memory-gateway --url http://100.64.0.45:8787/mcp
|
||
```
|
||
|
||
- Claude/Cursor: 在对应客户端 MCP 配置中添加同一 URL:
|
||
- `http://100.64.0.45:8787/mcp`
|
||
|
||
## 1) Create agent lane
|
||
|
||
```bash
|
||
cd /Users/lingyuzeng/project/collective-memory-repo
|
||
scripts/add-agent.sh <agent-id>
|
||
```
|
||
|
||
Example:
|
||
|
||
```bash
|
||
scripts/add-agent.sh kimi-helper
|
||
```
|
||
|
||
## 2) (Optional) Auto update OpenClaw qmd paths
|
||
|
||
```bash
|
||
scripts/add-agent.sh <agent-id> --openclaw-config ~/.openclaw/openclaw.json
|
||
```
|
||
|
||
## 3) Session first message (recommended)
|
||
|
||
```bash
|
||
cd /Users/lingyuzeng/project/collective-memory-repo
|
||
scripts/print-session-bootstrap.sh --tool codex --branch main
|
||
```
|
||
|
||
任务会话示例:
|
||
|
||
```bash
|
||
scripts/print-session-bootstrap.sh --tool codex --branch task/openclawd-migration-2026-03 --task-id openclawd-migration-2026-03
|
||
```
|
||
|
||
## 4) Commit and push
|
||
|
||
```bash
|
||
git add agents/<agent-id>
|
||
git commit -m "feat(agent): add <agent-id> memory lane"
|
||
git push
|
||
```
|
||
|
||
## 5) Verify memory-gateway visibility
|
||
|
||
```bash
|
||
curl -fsS http://100.64.0.45:8787/health
|
||
printf '{"branch":"main","require_latest":true}' \
|
||
| curl -fsS -H 'content-type: application/json' -d @- \
|
||
http://100.64.0.45:8787/memory/status
|
||
```
|
||
|
||
## 6) Query smoke test
|
||
|
||
```bash
|
||
printf '{"query":"<agent-id>","branch":"main","require_latest":true,"top_k":3}' \
|
||
| curl -fsS -H 'content-type: application/json' -d @- \
|
||
http://100.64.0.45:8787/memory/search
|
||
```
|