awslabs / awslabs/cli-agent-orchestrator

[Feat] Interactive Agent Builder: role templates + explicit per-role provider/model choice

Open
#307 1 comment 1 reaction 1 assignee Claimed by @call-me-ram View on GitHub
feature
Dominant language
Python
Stars
1.3k
Forks
267
Avg merge
1d 23h
Merged PRs (30d)
70

Description

## The problem

CAO's economic premise is **"a frontier model plans; cheaper models do the work."** Today that silently fails:

- The built-in `developer`/`reviewer` profiles pin **no provider and no model**.
- A worker with no provider **inherits the supervisor's provider** (e.g. `claude_code`); with no model it uses **that CLI's configured default**.
- So on a machine whose Claude default is a frontier model, every "cheap worker" actually runs the most expensive model. Observed live: planner + developer both on the frontier tier — zero savings.

The fix isn't "remember to add a `model:` line to a markdown file" — most users won't know that field exists, or that omitting it routes to the frontier (see also the closely-related #174, where the `model` frontmatter was ignored at terminal-creation time). The fix is to make **role + provider + model an explicit, guided choice in the UI**, with the cost of each choice visible.

## What I'd like to build

An **Agent Builder**: a screen where a user creates a reusable agent by picking a **role template**, choosing its **provider + model**, and giving it an **avatar + name** — which writes a normal profile to the agent store, so it plugs into everything that already exists. *Keep the markdown-profile system; add a UI on top of it.*

**Two connected surfaces:**

1. **Agent Builder** (create/edit a profile)
- Pick a **role template** (Developer, Code Reviewer, Planner/Supervisor, Tester, Researcher, Doc Writer, … + Custom) that pre-fills the system prompt, recommended tool restrictions (role→tools defaults already exist), and a *recommended* model tier.
- Choose **provider + model** — the core fix. Model dropdown populated per provider (claude: opus/sonnet/haiku/fable; kimi: kimi-for-coding; …) with a **cost/speed hint** per option (frontier · balanced · cheapest). Default to the template's recommended tier, **not** "inherit".
- **Avatar + friendly name** (dependency-free: curated emoji picker or auto initials-on-color).
- **Live preview** of the resulting agent card, then **Save** → writes `.md` to the agent store (frontmatter: name/description/role/provider/model/avatar/mcpServers + the template's prompt body).

2. **Team composition in the run wizard**
- A "Who's on the team?" step mapping each role the planner uses (developer, reviewer) to a built agent — i.e. *which model fills which role for this run* — showing the projected mix ("Planner: · Developer: Sonnet · Reviewer: Kimi") with a plain-language cost note. This is what makes the planner actually delegate to a `dev-sonnet` instead of the unpinned `developer`.

## Backend

- **Role-template library** ({role, description, recommended_model_tier, system_prompt, recommended_tools}); seed from the existing `code_supervisor`/`developer`/`reviewer` prompt bodies.
- `GET /agents/templates`, `GET /agents/models?provider=…` (selectable models + cost/speed hint), `POST /agents/profiles/create` (build + install a profile `.md` from structured fields, validating the model against the provider — extends the existing install/profile machinery, doesn't reinvent it).
- Carry `avatar` + `model` through `GET /agents/profiles` and session detail (model already flows via `effective_model`).

## Frontend

- `AgentBuilder` modal (role-template grid → provider+model with cost hints → avatar+name → live preview → save), an `AgentAvatar` component reused on the run board / member rows / Agents tab, a new "Agents" library view, the run-wizard team step, and avatars on flow-graph nodes instead of bare dots.

## Phasing

1. **P0 (stops the bleeding):** make per-role model choosable — pin sensible models on the built-in worker profiles (developer→sonnet, reviewer→sonnet/opus) and add a model dropdown to the existing Spawn/Add-Agent forms. Immediately reduces frontier spend.
2. **P1:** the Agent Builder modal (templates + provider/model + name) writing profiles; the Agents library view.
3. **P2:** avatars everywhere; the run-wizard team-composition step with the cost estimate.
4. **P3:** custom role templates, duplicate/edit, export/sharing.

Happy to implement and upstream this as scoped PRs if there's interest.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.