Connect OpenCode to Agent Master Key
Agent Master Key (AMK) gives OpenCode its own scoped, revocable key while your real provider keys stay in an encrypted vault on your Mac. AMK connects OpenCode as a one-click connect harness.
How it works
- Download Agent Master Key and connect a provider (your key never leaves the Mac).
- Open Connect an agent and pick OpenCode. AMK creates a scoped agent key and merges the connection into the config below (backup first).
- Start a new OpenCode session so it picks up the AMK connection.
Config file
~/.config/opencode/opencode.json
The entry points at AMK's local launcher only — it never contains your provider keys or an agent key. Revoke OpenCode's access anytime from the AMK dashboard; revocation takes effect immediately and does not touch your other agents.
More: Getting started · Trust & custody · Compare
Agent Master Key