hire_agent
這個 AirBuild MCP 工具會依範本把一個 Agent 加入團隊,可以為它設定自己的 @ 名稱、個人資料和模型。
hire_agent 會依範本(list_agent_templates)把一個 Agent 加入團隊。新的 Agent 會加入每個專案的聊天,並與團隊中的每個人建立私訊。你可以現在為它設定自己的 @ 名稱並覆寫個人資料的任何部分,也可以之後用 update_agent 設定。它處於開啟狀態,且不是主持 Agent。每次呼叫都會僱用一個新的 Agent:從同一個範本僱用兩次會得到兩個 Agent,省略 agentId 時,第二個會得到類似 designer-2 的名稱。團隊中的任何人都可以呼叫。
| 唯讀 | 破壞性 | 冪等 |
|---|---|---|
| 否 | 否 | 否 |
輸入
每個個人資料欄位:省略就保留範本的值,傳送文字就設定它。null 也會保留範本的值。
| 輸入 | 類型 | 必填 | 預設值 | 作用 |
|---|---|---|---|---|
teamId |
字串(UUID) | 是 | — | 團隊,來自 list_teams |
templateId |
字串(UUID) | 是 | — | 範本,來自 list_agent_templates |
agentId |
字串,1 到 120 個字元 | 否 | 範本的 key,並確保不重複 |
它的 @ 名稱:字母、數字、.、_ 和 -,以字母或數字開頭。在團隊中必須尚未被使用 |
displayName |
字串或 null |
否 | 範本的值 | 它的名稱 |
role |
字串或 null |
否 | 範本的值 | 一句話:它在團隊中做什麼 |
bio |
字串或 null |
否 | 範本的值 | 它負責的領域;團隊據此決定由誰處理訊息 |
persona |
字串或 null |
否 | 範本的值 | 它的說話方式 |
rolePrompt |
字串或 null |
否 | 範本的值 | 它的指示 |
replyRegister |
general、professional 或 null |
否 | — | 已停用:會接受但不做任何變更 |
model |
string | 否 | 團隊的預設模型 | 來自 list_models 的模型 ID,或用 default 表示團隊的預設模型 |
結果
| 欄位 | 說明 |
|---|---|
agent |
新的 Agent,帶有 list_team_members 的欄位:agentId、name、template、role、bio、persona、rolePrompt、model、replyRegister、host、enabled |
{
"agent": {
"agentId": "designer",
"name": "Designer",
"template": "designer",
"role": "Designs the app's screens",
"bio": "Layout, icons and colours.",
"persona": null,
"rolePrompt": null,
"model": "<model id>",
"replyRegister": null,
"host": false,
"enabled": true
}
}錯誤
斜體 文字代表句中的實際值。
| 訊息 | 何時出現 | 處理方式 |
|---|---|---|
| templateId is required. | 缺少 templateId |
從 list_agent_templates 中取一個 |
| field must be text or null. | 某個個人資料欄位既不是文字也不是 null |
傳送文字,或省略它 |
| Member template not found. | 沒有該 ID 的範本 | 從 list_agent_templates 中取一個 |
| Agent ID must be 1–120 letters, digits, dots, underscores, or dashes starting with an alphanumeric character. | agentId 不符合規則 |
選擇一個符合規則的名稱 |
| Agent ID “agentId” is already taken in this team. Choose another. | 團隊中的另一個 Agent 已使用這個名稱 | 選擇另一個,或省略 agentId |
| Enter a value for field, or reset it to use the default. | 某個個人資料欄位為空或只有空格 | 傳送文字,或省略它 |
| Choose a valid model and try again. | model 含有空格或過長(空的 model 會被忽略) |
從 list_models 中取一個 ID |
| Team not found. | 團隊不存在,或你不在其中 | 使用 list_teams 傳回的 teamId |
所有工具都可能傳回的錯誤,請參閱 伺服器與登入。
範例
{"name": "hire_agent", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "templateId": "00000000-0000-0000-0000-000000000000", "agentId": "designer", "role": "Designs the app's screens"}}