Fabriq
Agents

OpenCode Setup

Install and connect OpenCode as your Fabriq agent backend.

OpenCode is an open-source AI coding agent. It's free to use and supports the full Fabriq feature set.

Prerequisites

  • Node.js 18 or later
  • npm, pnpm, or yarn package manager

Install

npm install -g @opencode-ai/cli
# or
pnpm add -g @opencode-ai/cli

This installs the opencode CLI globally.

Verify

opencode --version
# → opencode/2.1.0 darwin-arm64 node-v20.11.0

If the command is not found, check that the global npm/bin directory is in your PATH:

npm config get prefix
# Usually /usr/local or ~/.npm-global
# Add its `/bin` subdirectory to your PATH if missing

Configure in Fabriq

  1. Launch Fabriq
  2. Go to Settings → Agent
  3. From the Agent Backend dropdown, select OpenCode
  4. Fabriq will verify the connection and show:
Agent: OpenCode v2.1.0 ● Connected

What happens when Fabriq connects

Fabriq starts OpenCode as a subprocess and communicates via ACP (Agent Communication Protocol):

Fabriq Desktop ◄── ACP stdio JSON-RPC ──► OpenCode subprocess

You don't need to keep a terminal open — Fabriq manages the subprocess lifecycle.

Troubleshooting

ProblemCheck
opencode: command not foundOpenCode isn't in your PATH. Reinstall or add the npm global bin directory to your shell config (.zshrc, .bashrc)
"Connection failed" after selectingTry running opencode directly in a terminal. If it fails there, Fabriq won't be able to start it either
Agent connects but disconnects after idleOpenCode may have a timeout. Try restarting from Settings → Agent → Reconnect
"Version mismatch" errorUpdate both Fabriq and OpenCode to the latest versions

Next steps

Edit on GitHub

Last updated on

On this page