Inkbox

> # Documentation index
> Fetch the complete documentation index at: https://inkbox.ai/sitemap.xml
> Use this file to discover all available pages before exploring further.

---

# OpenCode plugin
description: Give your OpenCode agent an Inkbox email address, a phone number for SMS and calls, iMessage, contacts, notes, and a vault

---


# OpenCode plugin

The [Inkbox OpenCode plugin](https://github.com/inkbox-ai/opencode-plugin) (`@inkbox/opencode-plugin`) is a standalone plugin for [OpenCode](https://opencode.ai). 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.

[View plugin on GitHub](https://github.com/inkbox-ai/opencode-plugin)

## 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:

```bash
curl -fsSL https://raw.githubusercontent.com/inkbox-ai/opencode-plugin/main/install.sh | bash
```

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:

```bash
git clone https://github.com/inkbox-ai/opencode-plugin.git ~/.inkbox-opencode/app
cd ~/.inkbox-opencode/app
npm install && npm run build && npm pack
```

From your OpenCode project, install the packed build and add a wrapper that OpenCode auto-loads from `.opencode/plugins/`:

```bash
npm install ~/.inkbox-opencode/app/inkbox-opencode-plugin-*.tgz
mkdir -p .opencode/plugins
```

Create `.opencode/plugins/inkbox.ts`. All plugin options — tool gating, the recipient allowlist, the gateway — go inside the `InkboxPlugin(input, { ... })` call here:

```typescript
import InkboxPlugin from "@inkbox/opencode-plugin";

export default async (input: any) => InkboxPlugin(input, {
    // set tool, outbound, and gateway options here
});
```

Provide credentials with environment variables (they also fall back to `~/.inkbox/config`). Get both from the [Inkbox Console](https://inkbox.ai/console):

```bash
export INKBOX_API_KEY=...        # agent-scoped API key
export INKBOX_IDENTITY=my-agent  # agent handle
```

Then point OpenCode at the bundled skills so the agent knows Inkbox etiquette, and ask it to run `inkbox_doctor` to confirm the setup:

```json
{
    "skills": { "paths": ["$HOME/.inkbox-opencode/app/skills"] }
}
```

## 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:

```bash
inkbox-opencode run
```

## 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.

## Related

- [Inkbox OpenCode plugin on GitHub](https://github.com/inkbox-ai/opencode-plugin)
- [OpenCode](https://opencode.ai)
- [Manage reachability in the Inkbox Console](https://inkbox.ai/console)
