OpenCode Plugin — Agentuity Documentation

OpenCode Plugin

Install the Agentuity plugin for OpenCode and configure Agentuity Coder agents

The OpenCode plugin adds Agentuity Coder agents, slash commands, and memory support to OpenCode. Use it to run Agentuity Coder inside OpenCode or from agentuity ai opencode run.

Installation

Install the plugin using the CLI:

agentuity ai opencode install

This command adds @agentuity/opencode to your global OpenCode config at ~/.config/opencode/opencode.json.

After installation, OpenCode loads:

  • Agentuity Coder agents for planning, implementation, review, memory, and command execution
  • slash commands for Agentuity Coder, Cadence, cloud services, sandboxes, and memory
  • plugin tools for session dashboards and public memory sharing

To remove the plugin:

agentuity ai opencode uninstall

Agents

The plugin registers agents by display name. Use these exact names when overriding models in opencode.json.

Coder Team

AgentRoleWhen to Use
LeadOrchestratorEntry point for /agentuity-coder, /agentuity-cadence, and headless runs
ScoutExplorerFinding files, patterns, and codebase context (read-only)
BuilderImplementerInteractive code changes, quick fixes, guided implementation
ArchitectAutonomous ImplementerCadence mode, complex multi-file features, long-running tasks
ReviewerCode ReviewerReviewing changes, catching issues, suggesting fixes
MemoryContext ManagerStoring/retrieving context, decisions, patterns across sessions
ExpertAgentuity SpecialistCLI commands, cloud services, SDK questions
RunnerCommand ExecutorRun lint/build/test/typecheck/format, returns structured summaries
ProductProduct StrategyClarifying requirements, validating scope, tracking PRD-style work

Expert Subagents

The Expert agent can route deeper Agentuity questions to hidden specialist subagents:

AgentFocus
Expert BackendRuntime, agents, schemas, Drizzle, Postgres, storage
Expert FrontendReact hooks, auth, browser integrations, frontend utilities
Expert OpsCLI, cloud services, deployments, sandboxes

The Lead agent coordinates most user-facing work and delegates to the right subagent through OpenCode's task system.

Builder vs Architect

AspectBuilderArchitect
ModeInteractiveAutonomous
Best forQuick fixes, guided workCadence mode, complex features
Default modelanthropic/claude-opus-4-6openai/gpt-5.3-codex
Default reasoning optionvariant: "high"reasoningEffort: "xhigh"
ContextSession-basedCheckpoint-based

Use Builder for interactive changes and small implementation tasks. Use Architect for Cadence mode, complex multi-file features, and longer autonomous work.

Memory System

The Memory agent stores reusable context by entity type:

Entity TypeScopeExamples
userCross-projectYour preferences, patterns, corrections
projectProject-specificArchitecture decisions, codebase patterns
repoCross-projectRepository conventions, commit styles
agentCross-projectAgent-specific behaviors, model preferences

Memory tracks conclusions, corrections, relationships, session summaries, and compaction history. The plugin stores this data in Agentuity Cloud Key-Value Storage and Vector Storage namespaces used by the Memory agent.

Use /agentuity-memory-save to explicitly save important context. Use /agentuity-memory-share when you want to create a public share URL for a session summary or saved memory content.

Model Configuration

Override any agent's model in opencode.json. See Agent Model Overrides for full configuration options.

Run opencode models to see all available models.

Slash Commands

The plugin adds slash commands for common Agentuity tasks:

CommandDescription
/agentuity-coderRun tasks with the full agent team (Lead orchestrates)
/agentuity-cadenceStart a long-running autonomous loop
/agentuity-cloudInteract with any Agentuity cloud service
/agentuity-sandboxRun code in isolated sandbox environments
/agentuity-memory-saveSave session context to memory
/agentuity-memory-shareShare memory or session content with a public URL

Use these commands by typing them directly in OpenCode:

/agentuity-coder Create a new agent that processes webhooks from Stripe

MCP Servers

The plugin works without extra MCP servers, but Scout and Expert are more useful when context7 and grep_app are configured in opencode.json.

{
  "mcp": {
    "context7": { "type": "remote", "url": "https://mcp.context7.com/mcp" },
    "grep_app": { "type": "remote", "url": "https://mcp.grep.app" }
  }
}
MCPPurposeFree Tier
context7Library docs lookup500 req/month
grep_appGitHub code searchUnlimited

The install command prints this recommendation, but it does not modify your MCP config automatically.

Headless Mode

Run Agentuity tasks from the command line without opening OpenCode:

agentuity ai opencode run "Create an agent that validates email addresses"

This wraps opencode run --agent "Agentuity Coder Lead" and adds non-interactive instructions so the agents can continue without prompting you.

# Ask the team to use an Agentuity cloud sandbox for execution
agentuity ai opencode run --sandbox "run the test suite"
 
# Stream OpenCode's raw JSON events
agentuity ai opencode run --json "fix the failing auth test"

Cadence Mode

Cadence enables long-running autonomous work sessions. Start it with the /agentuity-cadence slash command:

/agentuity-cadence Build a complete auth system with tests

Ask the Lead to adjust Cadence in natural language:

ActionHow
Start/agentuity-cadence <task description>
Status"what's the status?"
Pause"pause" or "hold on"
Resume"continue" or "resume"
Stop"stop" or Ctrl+C

For headless execution:

agentuity ai opencode run "/agentuity-cadence Build the feature"

Tmux Integration

When running inside tmux, the plugin can spawn agent work into separate panes for a visible multi-agent layout.

Configure tmux settings in your Agentuity CLI profile (~/.config/agentuity/production.yaml by default):

coder:
  tmux:
    enabled: true
    maxPanes: 6
OptionDefaultDescription
enabledfalseEnable tmux pane spawning
maxPanes4Max agent panes before rotating the oldest out
mainPaneMinWidth100Minimum width for the main pane in columns
agentPaneMinWidth40Minimum width for agent panes in columns

When enabled, agents spawn in a dedicated Agents window with a tiled grid layout. Oldest panes close automatically when maxPanes is reached.

Plugin Tools

The plugin registers a small set of tools for the agents:

ToolDescription
agentuity_session_dashboardInspect a session tree from the local OpenCode SQLite database
agentuity_memory_shareCreate a public share URL for memory or session content through Agentuity Cloud Streams

These are agent-facing tools. In normal use, call /agentuity-coder, /agentuity-memory-share, or /agentuity-cadence and let the Lead or Memory agent choose the tool.

Configuration

Agent models are configured in ~/.config/opencode/opencode.json. OpenCode reads plugin-provided agents and the agent entries in opencode.json, so you can override any Agentuity Coder agent by display name. Plugin behavior settings such as tmux live in your Agentuity CLI profile.

Agent Model Overrides

Override any agent's default model in opencode.json:

{
  "agent": {
    "Agentuity Coder Builder": {
      "model": "anthropic/claude-opus-4-6",
      "temperature": 0.7
    },
    "Agentuity Coder Architect": {
      "model": "openai/gpt-5.3-codex",
      "reasoningEffort": "xhigh"
    }
  }
}
OptionDescription
modelModel identifier (e.g., anthropic/claude-opus-4-6)
temperatureNumber between 0-1 (lower = more deterministic)
reasoningEffortFor OpenAI: low, medium, high, xhigh
variantFor Anthropic: low, medium, high, max (extended thinking)
thinkingFor Anthropic: { "type": "enabled", "budgetTokens": 10000 }
maxStepsMaximum tool use steps per turn
provider-specific optionsAdditional fields passed through by OpenCode, such as provider or model options

Monitoring Sessions

View and inspect OpenCode coding sessions from the CLI.

Dashboard

Display an overview of recent sessions with status, message counts, active tools, costs, and todos:

agentuity ai opencode dashboard
OptionDescription
--watchContinuously refresh the dashboard (press q to quit, r to refresh)
--interval <seconds>Refresh interval in watch mode (default: 5)
--limit <n>Maximum sessions to show (default: 10)
--allShow all sessions (overrides default limit)
--since <duration>Filter by recent activity (30m, 1h, 6h, 24h, 7d)
--status <status>Filter by status: active, idle, error, archived, compacting
--search <query>Search sessions by title (case-insensitive)
--session <id>Focus on a specific session tree
--all-todosShow all todos including completed (default: pending only)
--jsonOutput as JSON
# Watch active sessions updated in the last hour
agentuity ai opencode dashboard --watch --since 1h
 
# Only active sessions
agentuity ai opencode dashboard --status active
 
# Search by title
agentuity ai opencode dashboard --search "auth"
 
# 5 most recent idle sessions
agentuity ai opencode dashboard --limit 5 --status idle
 
# JSON output for scripting
agentuity ai opencode dashboard --json

Inspect

View detailed information about a specific session, including messages, active tools, recent tool history, todos, cost breakdown, and child sessions:

agentuity ai opencode inspect <session-id>
agentuity ai opencode inspect ses_abc123
 
# JSON output
agentuity ai opencode inspect ses_abc123 --json

Database Location

Both commands read from the local OpenCode SQLite database. The CLI searches standard platform locations automatically:

  • macOS: ~/Library/Application Support/opencode/opencode.db
  • Linux: ~/.local/share/opencode/opencode.db
  • Windows: %APPDATA%\opencode\opencode.db (fallback: %LOCALAPPDATA%\opencode\opencode.db)

Override the path with the OPENCODE_DB_PATH environment variable:

OPENCODE_DB_PATH=/path/to/opencode.db agentuity ai opencode dashboard

Next Steps