OpenCode plugin
The Inkbox OpenCode plugin (@inkbox/opencode-plugin) is a standalone plugin for OpenCode. It gives an OpenCode agent its own Inkbox identity: a mailbox, a phone number for SMS/MMS and voice calls, iMessage, contacts, notes, and an encrypted credential vault, all as native OpenCode tools.
This is a plugin, not an Inkbox SDK skill or an OpenCode fork. It ships as source you build locally and loads through OpenCode's plugin system, with an optional gateway that turns inbound email, texts, and calls into OpenCode sessions.
Install
The fastest path is the one-command installer. It builds the plugin from source, wires it into your global OpenCode config, and runs a setup wizard that self-signs up a fresh Inkbox agent (or takes an existing API key), provisions a phone number, connects iMessage, and mints a webhook signing key:
Re-running is safe. Check the wiring anytime with inkbox-opencode doctor.
Manual install
To install per-project or without the installer, clone and build the plugin:
From your OpenCode project, install the packed build and add a wrapper that OpenCode auto-loads from .opencode/plugins/:
Create .opencode/plugins/inkbox.ts. All plugin options — tool gating, the recipient allowlist, the gateway — go inside the InkboxPlugin(input, { ... }) call here:
Provide credentials with environment variables (they also fall back to ~/.inkbox/config). Get both from the Inkbox Console:
Then point OpenCode at the bundled skills so the agent knows Inkbox etiquette, and ask it to run inkbox_doctor to confirm the setup:
What you get
By the end of setup your OpenCode agent has:
- An email address - send, receive, and reply from an Inkbox mailbox
- A phone number - SMS/MMS, plus call history and transcripts
- iMessage - each person who messages the agent gets their own ongoing thread to reply on
- Contacts and notes - persistent Inkbox records the agent can create and read
- An encrypted vault - opt-in credential storage the agent can unlock and read
Outbound email, SMS, iMessage, and calls request approval through OpenCode's native permission prompts, or you can set a recipient allowlist in the wrapper.
What Inkbox adds
| Capability | OpenCode alone | With Inkbox plugin |
|---|---|---|
| Agent-owned mailbox | Bring your own integration | Built in |
| SMS/MMS and voice calls | Bring your own integration | Built in |
| iMessage | Bring your own integration | Built in |
| Contacts, notes, and vault | Agent memory or external tools | Built in |
| Approval-gated outbound sends | Custom guardrails | OpenCode permission prompts |
OpenCode itself stays upstream. The plugin registers Inkbox tools, routes outbound sends through OpenCode's permission prompts, bundles task skills, and can run an inbound gateway, without requiring an OpenCode fork.
Inbound gateway
The plugin can also run an optional inbound gateway (off by default): a long-lived process that receives email, SMS, iMessage, and calls to the agent's identity and turns each into an OpenCode session that replies on the same channel. Enable it with gateway: { enabled: true, projectDirectory } in the wrapper, set a webhook signing key (INKBOX_SIGNING_KEY), and run it as a sidecar that finds or launches its own OpenCode server:
After install
Text START to the agent's Inkbox phone number from every phone the agent needs to text. This opts that phone number in to SMS from the agent. You can also email the agent mailbox or call the agent phone number.