Agent Spawner
Creates and configures subagents dynamically with defined roles, constraints, and tool permissions
- License 许可
- MIT
- 最近更新
- 2026-06-22
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- Agent Spawner
- tags
- [ "agents", "subagents", "spawning" ]
- author
- ForgeWeave Core
- version
- 1.0.0
- skill_id
- agent-spawner
- description
- Creates and configures subagents dynamically with defined roles, constraints, and tool permissions
- tui_compatibility
- [ "opencode", "claude", "gemini", "qwen" ]
02 资源文件 2
- 参考文档references/tui-agent-formats.md822 B
- 脚本scripts/generate_agent.py2.8 KB
03 SKILL.md 正文
Agent Spawner
Purpose
Dynamically create and configure sub-agents for specific tasks. Each spawned agent gets a defined role, constraints, tool permissions, and a task-specific prompt. Enables the multi-agent patterns used in deep-research and workflow-orchestrator.
When to Use
- A multi-agent pipeline needs to be executed (e.g., deep-research)
- A task requires a specialized agent with specific permissions
- Parallel execution of independent subtasks is needed
- An agent needs to be sandboxed with restricted capabilities
When Not to Use
- The task is simple enough for a single agent
- The user explicitly asked for a single-agent approach
- The overhead of spawning a sub-agent exceeds the complexity of the task
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
task |
string | Yes | What the sub-agent should do |
role |
string | Yes | The sub-agent's role (e.g., "researcher", "validator") |
constraints |
array | No | Rules the sub-agent must follow |
permissions |
object | No | Tool permissions for the sub-agent |
Expected Outputs
| Output | Description |
|---|---|
| Spawned agent | A configured sub-agent ready to execute |
| Agent manifest | The agent's instructions and constraints |
Exact Workflow Steps
- Define the agent's role based on the task requirements
- Set constraints: what the agent MUST and MUST NOT do
- Set permissions: which tools the agent can use
- Write the agent's instructions prompt
- Spawn the agent using the TUI's sub-agent mechanism
- Monitor execution for constraint violations
Required Checks
- [ ] Agent has a clearly defined role
- [ ] Constraints are explicit and enforceable
- [ ] Permissions match the task requirements
- [ ] Agent instructions are self-contained
Failure Modes
| Failure Condition | Response |
|---|---|
| Permission mismatch | Adjust permissions to match the task |
| Agent goes out of scope | Enforce constraints and restart |
| Sub-agent mechanism unavailable | Execute the task directly with a prompt template |
References
| Reference | Path |
|---|---|
| Agent Spec | ./AGENT_SPEC.md |
| AGENTS.md | ./AGENTS.md |
| Deep Research skill | ../deep-research/SKILL.md |
04 同仓库更多 Skills
Workflow Orchestrator
Coordinates multi-skill execution pipelines (e.g., research → plan → build → test)
Web Research
Browser-driven or scraping-based skill for real-time internet extraction using Playwright and HTTP-based fetching
Validation Engine
Checks outputs from other skills for consistency, correctness, and adherence to AGENTS.md rules
Tool Selector
Determines which tools, APIs, MCP actions, or system capabilities are required for a given task
Test Generator
Creates test plans and test cases (unit, integration, edge cases) based on existing or planned code
Skill Generator
Meta-skill that creates new SKILL.md files from research outputs and patterns discovered in execution