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
- Launch Fabriq
- Go to Settings → Agent
- From the Agent Backend dropdown, select OpenCode
- 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
| Problem | Check |
|---|---|
opencode: command not found | OpenCode isn't in your PATH. Reinstall or add the npm global bin directory to your shell config (.zshrc, .bashrc) |
| "Connection failed" after selecting | Try running opencode directly in a terminal. If it fails there, Fabriq won't be able to start it either |
| Agent connects but disconnects after idle | OpenCode may have a timeout. Try restarting from Settings → Agent → Reconnect |
| "Version mismatch" error | Update both Fabriq and OpenCode to the latest versions |
Next steps
- Injecting Context — give OpenCode the project knowledge it needs
- Working with the Agent — guide OpenCode during a feature
- Creating a Feature — start your first feature with OpenCode
Edit on GitHub
Last updated on