Set up a new AI team member through a guided conversation. Not a config generator - a hiring process.
User says something like:
/hireQ1: "What do you need help with?"
Let them describe the problem, not a job title. "I'm drowning in code reviews" beats "I need a code reviewer."
Q2: "What's their personality? Formal, casual, blunt, cautious, creative?"
Or frame it as: "If this were a human colleague, what would they be like?"
Q3: "What should they never do?"
The red lines. This is where trust gets defined.
After Q1-Q3, assess whether anything is ambiguous or needs clarification. If so, ask ONE follow-up question tailored to what's unclear. Examples:
If Q1-Q3 were clear enough, skip Q4 entirely.
After the interview, present a summary:
🎯 Role: [one-line description]
🧠 Name: [suggested name from naming taxonomy]
🤖 Model: [selected model] ([tier])
⚡ Personality: [2-3 word vibe]
🔧 Tools: [inferred from conversation]
🚫 Boundaries: [key red lines]
🤝 Autonomy: [inferred level: high/medium/low]
Then ask: "Want to tweak anything, or are we good?"
Before finalizing, select an appropriate model for the agent.
Run openclaw models list or check the gateway config to see what's configured.
Map discovered models to capability tiers:
| Tier | Models (examples) | Best for |
|---|---|---|
| ------ | ------------------- | ---------- |
| reasoning | claude-opus-, gpt-5, gpt-4o, deepseek-r1 | Strategy, advisory, complex analysis, architecture |
| balanced | claude-sonnet-*, gpt-4-turbo, gpt-4o-mini | Research, writing, general tasks |
| fast | claude-haiku-, gpt-3.5, local/ollama | High volume, simple tasks, drafts |
| code | codex-, claude-sonnet-, deepseek-coder | Coding, refactoring, tests |
Use pattern matching on model names - don't hardcode specific versions.
Based on the interview:
Pick the best available model for the role. In the summary card, add:
🤖 Model: [selected model] ([tier] - [brief reason])
If multiple good options exist or you're unsure, ask:
"For a [role type] role, I'd suggest [model] (good balance of capability and cost). Or [alternative] if you want [deeper reasoning / faster responses / lower cost]. Preference?"
After the summary is confirmed, offer:
Create an agent directory at agents/ with:
../../USER.md (they need to know who they work for)../../MEMORY.md (shared team context)Mention to the user: "I've linked USER.md and MEMORY.md so they know who you are and share team context. You can change this later if you want them more isolated."
Use craft/role-based names. Check TOOLS.md for the full naming taxonomy:
Check existing agents to avoid name conflicts. Suggest a name that fits the role, but let the user override.
Before generating, check agents/ for existing team members. Note:
Mention any relevant observations: "You already have Scout for research - this new role would focus specifically on..."
config.patch (do not ask the user to run a manual command). You must:agents.list using this format:```json
{
"id": "
"workspace": "/home/lars/clawd/agents/
"model": "
}
```
subagents.allowAgents arrayRequired flow:
1) Fetch config + hash
```bash
openclaw gateway call config.get --params '{}'
```
2) Build the updated agents.list array (existing entries + new agent) and update the main agent's subagents.allowAgents (existing list + new id).
3) Apply with config.patch:
```bash
openclaw gateway call config.patch --params '{
"raw": "{\n agents: {\n list: [ / full list with new agent + updated main allowAgents / ]\n }\n}\n",
"baseHash": "
"restartDelayMs": 1000
}'
```
共 1 个版本