Update SKILL.md with full recruitment workflow

This commit is contained in:
lyn
2026-04-12 15:44:58 +00:00
parent 2e9be8375c
commit f6b13246d8

View File

@@ -17,37 +17,54 @@ new-agent --type contractor --contractor-provider <claude|gemini> --agent-id <ag
## Workflow
The `new-agent` script executes these steps:
When a request to create a new agent is received, follow this workflow:
1. **Register agent**:
- `openclaw`: runs `openclaw agents add {agent-id} --model {primary-model} --workspace ~/.openclaw/workspace/workspace-{agent-id} --non-interactive`
- `contractor`: requires `contractor-agent` plugin; runs `openclaw contractor-agents add --agent-id {agent-id} --workspace ~/.openclaw/workspace/workspace-{agent-id} --contractor {contractor-provider}`
### Step 1 — Gather Requirements
2. **Wait for bindings**:
- Poll `openclaw config get bindings` every 10s until `interviewee` accountId is no longer present
- Check `~/.openclaw/states/bindings.lock` exists → wait every 10s until it disappears
Communicate with the requester to collect the following:
- New agent's `agent-id`
- New agent's primary model (`--model`)
- New agent's role and position
- Whether the agent is a contractor agent (default: not a contractor)
3. **Set bindings**:
- Create `~/.openclaw/states/bindings.lock`
- Fetch current bindings, append entry:
```json
{
"agentId": "{agent-id}",
"match": {
"channel": "discord",
"accountId": "interviewee"
}
}
```
- Write back with `openclaw config set`
- Delete `bindings.lock`
### Step 2 — Create Agent
4. **Configure interviewee account**:
```bash
openclaw config set channels.discord.accounts.interviewee {
"enabled": true,
"token": "<secret-mgr get-secret --key interviewee-discord-token>",
"groupPolicy": "open",
"streaming": { "mode": "off" }
}
```
Execute `{baseDir}/scripts/new-agent` with the gathered parameters:
```bash
# openclaw type
new-agent --type openclaw --agent-id <agent-id> --model <primary-model>
# contractor type
new-agent --type contractor --contractor-provider <claude|gemini> --agent-id <agent-id>
```
### Step 3 — Interview
Use the `create-discussion-channel` tool to start an interview with the new agent:
- Participant: `interviewee`
- Discussion guide: "`<@{ego-mgr get discord-id}>`请参考{baseDir}/workflow/interview.md"
After receiving the discussion callback, review the discussion summary:
- If it contains the agent's **name** and **gender** → proceed to Step 4
- If either field is missing → attempt to gather the missing information via another `create-discussion-channel` call
- If still unavailable → notify the requester and proceed without it
### Step 4 — Onboard
Use `proxy-pcexec` to call `{baseDir}/scripts/onboard`:
- `proxy-for`: new agent's `agent-id`
- Parameters: `--name`, `--role`, `--position`, `--gender`, `--bot-token`
### Step 5 — Report
Notify the requester that onboarding is complete.
## Scripts
### new-agent
Creates and registers the agent, then configures the `interviewee` Discord account binding.
### onboard
Sets up ego-mgr identity fields and configures the agent's Discord account using the name/gender collected during interview.