Update SKILL.md with full recruitment workflow
This commit is contained in:
@@ -17,37 +17,54 @@ new-agent --type contractor --contractor-provider <claude|gemini> --agent-id <ag
|
|||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
The `new-agent` script executes these steps:
|
When a request to create a new agent is received, follow this workflow:
|
||||||
|
|
||||||
1. **Register agent**:
|
### Step 1 — Gather Requirements
|
||||||
- `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}`
|
|
||||||
|
|
||||||
2. **Wait for bindings**:
|
Communicate with the requester to collect the following:
|
||||||
- Poll `openclaw config get bindings` every 10s until `interviewee` accountId is no longer present
|
- New agent's `agent-id`
|
||||||
- Check `~/.openclaw/states/bindings.lock` exists → wait every 10s until it disappears
|
- 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**:
|
### Step 2 — Create Agent
|
||||||
- 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`
|
|
||||||
|
|
||||||
4. **Configure interviewee account**:
|
Execute `{baseDir}/scripts/new-agent` with the gathered parameters:
|
||||||
```bash
|
```bash
|
||||||
openclaw config set channels.discord.accounts.interviewee {
|
# openclaw type
|
||||||
"enabled": true,
|
new-agent --type openclaw --agent-id <agent-id> --model <primary-model>
|
||||||
"token": "<secret-mgr get-secret --key interviewee-discord-token>",
|
|
||||||
"groupPolicy": "open",
|
# contractor type
|
||||||
"streaming": { "mode": "off" }
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user