opencode-agent-teams
v2.0.0
Published
OpenCode plugin for parallel agent execution, background tasks, and team coordination. Create teams of agents that work together, run tasks in parallel respecting dependencies, and fire off background work without blocking.
Maintainers
Readme
opencode-agent-teams
Plugin for OpenCode that brings parallel agent execution, background tasks, and team coordination to your sessions. Define teams of agents, run tasks in parallel respecting dependencies, and fire off background work without blocking your main session.
No more waiting for one agent to finish before starting the next.
Tools
team_create
Define a reusable team plan with multiple tasks, each with a prompt, optional agent type, and optional dependencies.
| Field | Type | Description |
|-------|------|-------------|
| plan_id | string | Unique name for the plan |
| tasks | array | Tasks with id, prompt, agent (optional), depends_on (optional) |
team_run
Execute a team plan. Tasks within the same dependency level run in parallel. The agent waits for all tasks to complete and returns a summary.
| Field | Type | Description |
|-------|------|-------------|
| plan_id | string | Plan to execute |
team_status
Check status of running or finished teams.
| Field | Type | Description |
|-------|------|-------------|
| plan_id | string (optional) | Omit to list all teams and background tasks |
background
Fire-and-forget a single agent in the background. Returns immediately with a task ID. Optionally injects the result into your session when done.
| Field | Type | Description |
|-------|------|-------------|
| prompt | string | Instructions for the background agent |
| agent | string (optional) | Agent type: general, explore, build. Defaults to general. |
| notify | boolean (optional) | Inject result into current session when done. Default: true. |
How it works
Under the hood, the plugin uses the OpenCode SDK to create child sessions and send prompts programmatically:
team_createstores a plan with a DAG of task dependenciesteam_runtopologically sorts the tasks, runs each dependency level in parallel viaPromise.all- Each task gets its own child session via
client.session.createwithparentIDset to the current session - Tasks run via
client.session.prompt(blocking) orclient.session.promptAsync(background) team_statusreads session state from the OpenCode server- Background tasks poll for completion and inject results back into the parent session
Install
{
"plugin": ["opencode-agent-teams"]
}Restart OpenCode.
Examples
Parallel research team
team_create plan_id="research-feature" tasks=[
{id:"api", prompt:"Research the API endpoints needed for user auth", agent:"explore"},
{id:"db", prompt:"Research database schema for user auth", agent:"explore"},
{id:"summary", prompt:"Synthesize the API and DB findings into a plan", agent:"general", depends_on:["api","db"]}
]
team_run plan_id="research-feature"Background code review
background prompt="Review all changed files in this project for security issues" agent="explore"
team_statusMantenido por
Maycol B.T (@SoyMaycol)
Email: [email protected]
Web: https://soymaycol.icu
GitHub: https://github.com/SoyMaycol