opencode

Adapters for OpenCode, a multi-provider AI coding agent from anomalyco/opencode. They connect it either through a local command-line process or through a remote HTTP server with streaming.

In plain words
What is it for?
Use the local adapter for general use or debugging, and the HTTP adapter when OpenCode runs as a remote streaming service. The OpenCode command-line package must be installed.
Why use it?
They let other tooling use OpenCode through the connection method that fits the setup, whether local or remote.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/a5c-ai/babysitter/opencode
Clone the repo
git clone --depth 1 https://github.com/a5c-ai/babysitter
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,350 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01350
Opus 5 $0.00000 $0.00675
Sonnet 5 $0.00000 $0.00270
Haiku 4.5 $0.00000 $0.00135

Measured 2d ago against content hash 1157c1242e31, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

opencode scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- curl: `curl -fsSL https://opencode.ai/install | bash`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- curl: `curl -fsSL https://opencode.ai/install | bash`
docs/adapters/reference/agents/opencode.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode

Adapters for the OpenCode multi-provider AI coding agent from anomalyco/opencode.

⚠️ Important: This is not the same as the deprecated opencode-ai/opencode GitHub project (now charmbracelet/crush). Adapters supports the anomalyco/opencode implementation, whose canonical npm package is opencode-ai.

Adapter Variants

Adapters provides two OpenCode adapters:

  • opencode (subprocess) — Default CLI-based integration
  • opencode-http (remote) — HTTP server with SSE streaming for enhanced performance

Choosing an Adapter

Adapter Type Use Case Performance
opencode Subprocess General use, simple setup Standard
opencode-http Remote (HTTP) High-performance, real-time streaming Enhanced

Recommendation: Use opencode-http for production workloads or when performance is critical. Use opencode for simple use cases or debugging.

Install

# Install the CLI (required for both adapters)
adapters install opencode

Install methods:

  • npm: npm install -g opencode-ai
  • brew (macOS): brew install --cask opencode
  • curl: curl -fsSL https://opencode.ai/install | bash

Supported on macOS, Linux and Windows.

Auth

OpenCode supports multiple AI providers. Configure authentication using:

opencode auth

Or set environment variables directly:

  • ANTHROPIC_API_KEY — for Claude models
  • OPENAI_API_KEY — for GPT models
  • GOOGLE_API_KEY — for Gemini models

Config file: ~/.config/opencode/config.json.

Minimal run

CLI Examples

# Subprocess adapter (default)
adapters run opencode --prompt "Add error handling to this function"

# HTTP adapter (enhanced performance)
adapters run opencode-http --prompt "Add error handling to this function"

Programmatic Examples

import { createClient } from '@a5c-ai/adapters';
const client = createClient();

// Subprocess adapter
const handle1 = await client.run({ agent: 'opencode', prompt: 'Refactor this code' });
for await (const ev of handle1.events()) console.log(ev);

// HTTP adapter
const handle2 = await client.run({ agent: 'opencode-http', prompt: 'Refactor this code' });
for await (const ev of handle2.events()) console.log(ev);

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 176 lines · 0 tokens per session scan C 1157c1242e31

Subscribe to this mod's changes

opencode is an agent published in the GitHub repository a5c-ai/babysitter (1,748 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,350 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

rn-tester

Tests React Native features on simulator/emulator. Verifies UI renders correctly, user flows work, and internal state matches expectations. Use when a feature has been implemented and needs verification. PARENT-SESSION-ONLY: requires MCP tools (cdp, device) — do NOT spawn via Task tool, run protocol inline in parent…

Lykhoyda/rn-dev-agent · 337 tokens

rn-code-architect

Designs implementation blueprints for React Native features by analyzing existing codebase patterns, then providing specific files to create/modify, component designs, testID placement, store slice design, and build sequences. Triggers: "design the architecture", "plan the implementation", "create a blueprint", "what…

Lykhoyda/rn-dev-agent · 238 tokens

rn-debugger

Diagnoses broken or unexpected behavior in a React Native app running on simulator/emulator. Gathers parallel evidence (component tree, logs, network, store), narrows root cause, applies a fix, and verifies recovery. PARENT-SESSION-ONLY: requires MCP tools (cdp, device, collectlogs) — do NOT spawn via Task tool, run…

Lykhoyda/rn-dev-agent · 341 tokens

rn-code-reviewer

Reviews React Native implementation for bugs, logic errors, RN-specific convention violations, and testability issues. Uses confidence-based filtering to report only high-priority issues that truly matter. Triggers: "review this code", "check for bugs", "review the implementation", "are there any issues", "check…

Lykhoyda/rn-dev-agent · 234 tokens

design-author

Use after research is complete to draft the approach before any code is written. Drafts a 200-line design document covering current state, desired end state, patterns to follow, and decisions made. Resolves its own open questions autonomously, recording each as an explicit, auditable assumption in the design.

bostonaholic/team · 64 tokens

implementer

Use when the implementation plan needs to be executed slice by slice. A seasoned coding expert that reads the plan, follows TDD discipline, executes one vertical slice at a time, and commits each slice atomically when its tests pass. Dispatched during the Implement phase.

bostonaholic/team · 56 tokens