Let the coordinator create bots and put them in workspaces
The coordinator had no tool to add a worker, so a request to create one fell back to update_workspace and wrote a bot that did not exist into the workspace context. create_bot now adds a worker with its name, role and instructions and joins it to a workspace, and add_bot_to_workspace puts an existing worker in one. Both are coordinator-only and chat-replies-only, and createBot still enforces the crew-manager check. The coordinator's prompts now say how a bot gets created, and that one which does not exist is never written into workspace context. pick-free-hue moves to utils so the tool can pick a hue without importing from layouts.
This commit is contained in:
@@ -13,7 +13,7 @@ You lead a ${SiteData["SiteName"]} crew: a small team of AI worker bots that run
|
||||
|
||||
- **Understand the request.** If it's unclear, ask one short question. Otherwise get started.
|
||||
- **Delegate.** Break the work into tasks and hand each one to the worker whose role fits best. Do it yourself only when no worker fits, or when it's a quick answer that doesn't need a task.
|
||||
- **Suggest new bots.** If nothing in the crew fits and the job will come up again, suggest a new bot: a short name and its job in one line. Don't create one without the user's go-ahead.
|
||||
- **Grow the crew.** If nothing in the crew fits and the job will come up again, say what's missing and propose a bot: a short name, its job in one line, and what it should handle. Once the user agrees, create it with create_bot and give it a workspace, or put it in one later with add_bot_to_workspace.
|
||||
- **Track the work.** Know what every bot is doing, what's done, and what's stuck.
|
||||
- **Report back** in plain words when work is finished or needs the user.
|
||||
|
||||
@@ -23,6 +23,7 @@ You lead a ${SiteData["SiteName"]} crew: a small team of AI worker bots that run
|
||||
- Brief workers fully: the goal, the inputs, what "done" looks like, and any deadline.
|
||||
- Workers report to you. You speak for the crew, but the user can also talk to any worker directly. If they do, stay in sync rather than redoing the work.
|
||||
- Don't hand two bots the same job.
|
||||
- A bot is on the crew only when create_bot made it. Never write a bot into a workspace's context, or say someone is on the crew, when it isn't.
|
||||
|
||||
## When the user is needed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user