with one click
managing-agents
// Manages temporary and defined agents including creation, promotion, cleanup, and namespacing. Use when user creates custom agents, asks about agent lifecycle, temp agents, or agent management.
// Manages temporary and defined agents including creation, promotion, cleanup, and namespacing. Use when user creates custom agents, asks about agent lifecycle, temp agents, or agent management.
Use when user says "create workflow", "create a workflow", "design workflow", "orchestrate", "automate multiple steps", "coordinate agents", "multi-agent workflow". Creates orchestration workflows from natural language using Socratic questioning to plan multi-agent workflows with visualization.
Use when user provides workflow syntax with arrows (-> || ~>), says "run workflow", "execute workflow", "run this", mentions step1 -> step2 patterns. Executes orchestration workflows with real-time visualization, steering, and error recovery.
Use and customize workflow templates for common scenarios. Use when user wants to use a template, asks about available templates, or wants to customize existing workflows.
Debug workflow execution issues including syntax errors, agent failures, variable problems, and execution errors. Use when workflows fail, produce unexpected results, or user asks for debugging help.
Design custom syntax elements with reuse-first approach for workflow orchestration. Use when user needs custom operators, checkpoints, or syntax patterns not available in core syntax.
Create and execute temporary scripts (Python, Node.js, shell) during workflow execution for API integrations, data processing, and custom tools. Use when user needs to interact with external APIs, process data with specific libraries, or create temporary executable code.
| name | managing-agents |
| description | Manages temporary and defined agents including creation, promotion, cleanup, and namespacing. Use when user creates custom agents, asks about agent lifecycle, temp agents, or agent management. |
I manage the lifecycle of agents in the orchestration system: creation, execution, promotion, and cleanup.
I automatically activate when you:
No namespace prefix, always available:
Explore - Codebase explorationgeneral-purpose - General-purpose taskscode-reviewer - Code reviewimplementation-architect - Architecture planningexpert-code-implementer - Code implementationWith orchestration: prefix, permanent agents in this plugin:
orchestration:workflow-socratic-designerorchestration:workflow-syntax-designerLocated in: agents/ directory
Registry: agents/registry.json
With orchestration: prefix, workflow-specific ephemeral agents:
temp-agents/ directoryReference in workflows: $agent-name
See temp-agents.md for complete guide.
Created automatically during workflow design:
---
name: security-scanner
description: Scans for security vulnerabilities
created: 2025-01-08
---
You are a security expert specializing in vulnerability detection...
Saved to: temp-agents/security-scanner.md
Referenced in workflow with $ prefix:
$security-scanner:"Scan codebase":findings ->
general-purpose:"Analyze {findings}"
Executed with namespace: orchestration:security-scanner
After workflow completion, you can save temp agents:
Workflow complete!
Temp agents created:
- security-scanner
- performance-profiler
Save as permanent agents? [Y/n]
If saved:
temp-agents/ to agents/agents/registry.jsonUnsaved temp agents are deleted:
๐งน Cleaned up 2 temporary file(s):
- temp-agents/security-scanner.md
- examples/workflow-data.json
See defined-agents.md for detailed guide.
To create a permanent agent manually:
agents/custom-agent.md:
---
name: custom-agent
namespace: orchestration:custom-agent
description: One-line description of what this agent does
tools: [Read, Grep, Edit]
usage: "Use via Task tool with subagent_type: 'orchestration:custom-agent'"
---
You are a specialized agent for [purpose].
Your responsibilities:
1. Task 1
2. Task 2
Output format:
[Expected output format]
Use these tools:
- Read: [When to use]
- Grep: [When to use]
Add to agents/registry.json:
{
"custom-agent": {
"file": "custom-agent.md",
"description": "One-line description",
"namespace": "orchestration:custom-agent",
"created": "2025-01-08",
"usageCount": 0
}
}
Reference by name (system adds namespace automatically):
custom-agent:"Perform specialized task":output
See namespacing.md for complete reference.
| Agent Type | User Writes | System Executes |
|---|---|---|
| Built-in | Explore:"task" | Explore |
| Defined plugin | workflow-socratic-designer | orchestration:workflow-socratic-designer |
| Temp | $security-scanner | orchestration:security-scanner |
function resolveAgent(name) {
// 1. Check if built-in
if (isBuiltIn(name)) return name;
// 2. Check if other plugin (e.g., superpowers:)
if (name.includes(':')) return name;
// 3. Add orchestration namespace
return `orchestration:${name}`;
}
See promotion.md for details.
After workflow execution with temp agents:
Temp agents used in this workflow:
1. security-scanner
Description: Scans for security vulnerabilities
Used: 1 time in workflow
2. performance-profiler
Description: Analyzes code performance
Used: 1 time in workflow
Select agents to save (space-separated numbers, or 'none'):
You selected: security-scanner
Promotion options:
[P]romote as-is - Save with current definition
[E]dit first - Modify before saving
[S]kip - Don't save this agent
If promoted:
temp-agents/ to agents/agents/registry.jsonUnselected agents are deleted
To update a defined agent:
agents/agent-name.mdagents/registry.json metadataChanges take effect immediately in new workflows.
To remove a defined agent:
agents/agent-name.mdagents/registry.jsonAgent will no longer be available in workflows.
Track agent usage in agents/registry.json:
{
"security-scanner": {
"usageCount": 15,
"lastUsed": "2025-01-08T14:30:00Z"
}
}
โ DO:
โ DON'T:
โ Promote when:
โ Don't promote when:
โ Good names:
security-scanner (clear purpose)api-doc-generator (descriptive)performance-profiler (specific)โ Bad names:
helper (too generic)agent1 (meaningless)do-stuff (vague)"Agent not found" error:
temp-agents/agents/ and registryNamespace conflict:
orchestration: in workflowsTemp agent disappeared:
agents/registry.json:
{
"$schema": {
"description": "Registry of defined agents",
"namespace": "orchestration:",
"usage": "All agents accessed via 'orchestration:{agent-name}'"
},
"agent-name": {
"file": "agent-name.md",
"description": "One-line description",
"namespace": "orchestration:agent-name",
"created": "2025-01-08",
"usageCount": 0,
"lastUsed": null
}
}
See examples in:
Need to create or manage agents? Just ask!