Useful Pluginssubagents

subagents

Spawn specialized sub-agents to handle specific tasks. Delegate work to focused agents with their own tools, model, and system prompt.

Parent agent calls task(prompt, agent_type) → sub-agent runs and returns result. Built-in agents included.

Quick Start

main.py
from connectonion import Agent from connectonion.useful_plugins import subagents agent = Agent("main", plugins=[subagents], model="co/gemini-2.5-pro") # The agent can now delegate to sub-agents agent.input("explore the codebase and explain the architecture")
output
[agent] Delegating to explore sub-agent...
[sub-explore] Reading project structure...
[sub-explore] Found: agent.py, llm.py, tool_executor.py...
 
Architecture summary:
- agent.py: Main orchestrator with event system
- llm.py: Multi-provider LLM abstraction
- tool_executor.py: Tool execution with xray context
...

AGENT.md Format

Create a file at .co/agents/name/AGENT.md:

code
--- name: reviewer description: Code reviewer that checks for bugs and style issues model: co/claude-opus-4-5 max_iterations: 10 tools: - glob - grep - read_file --- You are a code reviewer. Find bugs, style issues, and improvements. Return a structured report with findings and line numbers.
FieldRequiredDescription
nameyesAgent identifier (used in task() calls)
descriptionyesShown to parent agent when choosing sub-agent
modelnoDefault: co/gemini-2.5-pro
max_iterationsnoDefault: 10
toolsnoList of tool names to give the sub-agent

Available tool names:

glob, grep, read_file, edit, multi_edit, write, bash, WebFetch, Memory, Browser

Agent Discovery

Agents are discovered in priority order:

code
.co/agents/{name}/AGENT.md # Project-level (highest priority) ~/.co/agents/{name}/AGENT.md # User-level builtin/{name}/AGENT.md # Built-in agents (lowest priority)

Project-level agents override built-ins. Built-in agents are bundled with co ai for common tasks like codebase exploration and planning.

Events used

EventHandlerPurpose
on_agent_readyinitialize_subagentsDiscover agents, register task() tool

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.