agent · diff

git:20260625.4710b18 to git:20260718.206f45d

69 added, 57 removed. Audit A to A.

---
name: agent
- description: "Compose and run a multi-agent team from the builtin templates for a goal. Triggers on: run an agent team, set up an agent team, multi-agent, orchestrate agents, agent team for, build a team."
+ description: Create and manage custom AI agents and teams
---
- # Agent Team
+ # agent
- **IMPORTANT: Start your response with a context preamble.**
+ Create and manage custom AI agents and teams using
+ the Attune Agent SDK.
- Call `help_lookup(topic="agent", mode="preamble")` and display the
- returned `preamble` text as a blockquote. Then tell the user they can
- say "tell me more" for a step-by-step guide, or answer the scoping
- question below to proceed.
+ ## Routes
- If the MCP call fails, fall back to:
+ | Subcommand | Action |
+ | ---------- | ------ |
+ | `create` | Create a new agent |
+ | `create-team` | Create a multi-agent team |
+ | `run` | Run an existing agent |
+ | `list` | List available agents |
+ | `release-prep` | Run release prep agent team |
- > **Agent Team** — Composes a multi-agent team from the builtin agent
- > templates for your goal, shows you the proposed team and its
- > estimated cost, then runs it once you confirm.
+ ## Usage
- ## Scoping
+ ```bash
+ /agent # Ask what to do
+ /agent create # Create an agent
+ /agent create-team # Create a team
+ /agent run # Run an agent
+ /agent list # List agents
+ /agent release-prep # Run release prep team
+ ```
- 1. **Goal** — "What should the team accomplish?" (e.g. "improve test
- coverage to 90%", "audit this module for security").
- 2. **Context** (optional) — any starting facts (a path, a current
- metric) to inform composition.
+ ## Behavior
- ## Execution
+ ### create
- Two steps: preview the composed team (free, deterministic), then run it
- (LLM-heavy) only after the user confirms.
+ Use `AskUserQuestion` to understand:
- 1. **Preview the team** — compose a plan without running it:
+ - What should the agent do?
+ - What tier? (cheap, capable, premium)
+ - What tools does it need?
- ```bash
- python -c "import json; from attune.orchestration import describe_team_for_task; print(json.dumps(describe_team_for_task('improve test coverage to 90%'), default=str))"
- ```
+ Then guide the user through agent definition using
+ the SDK:
- Returns `{task, strategy, agents:[{id, role}], estimated_cost,
- estimated_duration, quality_gates}`. Present the proposed agents,
- the composition `strategy`, and the **estimated cost** to the user.
+ ```python
+ from attune.agents.sdk import SDKAgent
- 2. **Confirm before running** — use `AskUserQuestion`:
- "Run this team? (est. cost ~$X)" → Yes / No. This is a paid,
- multi-agent run; never skip the confirmation.
+ agent = SDKAgent(
+ agent_id="my-agent",
+ role="analyst",
+ tier="capable",
+ )
+ ```
- 3. **Run the team** (only on Yes). This makes real multi-agent LLM
- calls:
+ ### create-team
- ```bash
- python -c "
- import json, asyncio
- from attune.orchestration import run_team_for_task
- result = asyncio.run(run_team_for_task('improve test coverage to 90%', context={}, input_data={}))
- print(json.dumps(result.to_dict() if hasattr(result, 'to_dict') else result.__dict__, default=str))
- "
- ```
+ Use `AskUserQuestion` to understand:
- ## Output
+ - What's the team's goal?
+ - How many agents?
+ - What roles?
- Present the `DynamicTeamResult` readably: lead with the aggregated
- outcome, then per-agent contributions, then run metadata (cost,
- duration, which quality gates passed). If it failed, surface the error.
+ Then guide through team creation:
- ## How this differs from other skills
+ ```python
+ from attune.agents.sdk import SDKAgentTeam
- - **agent** *composes and runs a multi-agent team* (this skill).
- - **wizard** runs a single guided step-by-step flow.
- - **catalog** *lists* agent templates (and workflows, wizards, tools)
- but does not run them.
- - The 6 Claude Code subagents in `plugin/agents/` are a different
- thing — reached via the Agent/Task tool, not this skill.
+ team = SDKAgentTeam(
+ team_id="my-team",
+ agents=[agent1, agent2],
+ )
+ ```
- ## Anti-Patterns
+ ### run
- - DO NOT run the team without previewing the plan and confirming the
- cost first — it is a paid multi-agent run.
- - DO NOT hand-author the team — always compose it live via
- `describe_team_for_task` / `run_team_for_task`.
- - DO NOT use this for a single-step task — a plain workflow or the
- `wizard` skill is cheaper.
+ Use `AskUserQuestion`:
+
+ - Which agent or team to run?
+ - What input?
+
+ Then execute the agent.
+
+ ### list
+
+ Show available agents and teams from the registry.
+
+ ### release-prep
+
+ Run the release preparation agent team:
+
+ ```bash
+ uv run attune workflow run release-prep
+ ```