54 lines
1.8 KiB
Markdown
54 lines
1.8 KiB
Markdown
---
|
|
name: recruitment
|
|
description: Onboard new agents into OpenClaw. Use when creating a new agent, adding an agent to the system, or setting up a new agent workspace. Triggers on requests like "new agent", "add agent", "create agent", "recruit agent", "onboard agent".
|
|
---
|
|
|
|
# Recruitment Skill
|
|
|
|
Onboard new agents into OpenClaw with binding configuration.
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
new-agent --type openclaw --agent-id <agent-id> [--model <primary-model>]
|
|
|
|
new-agent --type contractor --contractor-provider <claude|gemini> --agent-id <agent-id>
|
|
```
|
|
|
|
## Workflow
|
|
|
|
The `new-agent` script executes these steps:
|
|
|
|
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}`
|
|
|
|
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
|
|
|
|
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`
|
|
|
|
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" }
|
|
}
|
|
```
|