OpenCode Tutorial: How to Connect OpenCode to a Task Board and Run Multi-Agent Tasks
OpenCode Tutorial: Connect OpenCode to a Task Board and Run Multi-Agent Tasks
OpenCode is an open-source terminal-based AI coding agent. It reads your codebase, follows instructions, and writes code — all from the command line. It's fast, free, and gaining traction among developers who want a lightweight alternative to heavier tools.
But OpenCode on its own is a single agent in a single terminal. You can't assign it tasks from a dashboard, coordinate it with other agents, or track its output alongside Claude Code or Cursor sessions.
This tutorial shows you how to solve that by connecting OpenCode to Ivern Squads — giving it a task board, role-based assignment, and multi-agent coordination.
Related: Claude Code Tutorial · Cursor AI Tutorial · Gemini CLI Tutorial · AI Coding Assistant Complete Guide · What Is BYOK?
What Is OpenCode?
OpenCode is an open-source AI coding agent that runs in your terminal. Key features:
- Codebase-aware — reads your project files and understands context
- Terminal-native — no GUI needed, works in any shell
- Multi-model — supports Claude, GPT-4, and local models
- Free and open source — no subscription, you bring your own API key
You give it a prompt, it writes code. The limitation: it works in isolation. No task queue, no coordination with other agents, no shared project view.
Prerequisites (5 Minutes)
1. Install OpenCode
# Install via npm
npm install -g opencode
# Or via pip
pip install opencode
Verify installation:
opencode --version
2. Get an API Key
OpenCode needs access to a language model. You provide your own API key:
- Anthropic (Claude) — Best for coding tasks. $5 in credits covers hundreds of tasks.
- OpenAI (GPT-4) — Strong alternative. Similar pricing.
3. Set Up an Ivern Account (Free)
Go to ivern.ai/signup. Create a free account. No credit card needed.
Ivern provides the task board and coordination layer that OpenCode lacks on its own.
Step 1: Create a Squad in Ivern
Log into Ivern and create a new squad:
- Click Create Squad
- Name it "Coding Team"
- Add agents:
| Agent | Role | Purpose |
|---|---|---|
| OpenCode Agent | Coder | Writes and refactors code |
| Reviewer | Reviewer | Reviews code quality and suggests improvements |
Click Create Squad.
Cost so far: $0. You only pay when tasks run.
Step 2: Connect OpenCode to Ivern
In your Ivern dashboard, go to Settings → Connections and generate an API key for your squad.
Then in your terminal:
# Install the Ivern agent bridge
npx @ivern-ai/agent install --key YOUR_IVERN_KEY --provider opencode
This configures OpenCode to:
- Poll Ivern for new tasks assigned to it
- Execute tasks using your API key
- Submit results back to the Ivern task board
The agent bridge runs as a background process. OpenCode still works normally in your terminal — the bridge just adds Ivern as an additional task source.
Step 3: Assign Your First Task
In Ivern, go to your Coding Team task board. Click New Task and paste:
Refactor the authentication module in src/auth/ to use JWT tokens instead of session cookies. Update all related tests. Ensure backwards compatibility with existing sessions for 30 days.
Click Create Task.
The task appears on the board. OpenCode picks it up within seconds (via the agent bridge polling). You see its output stream in real time on the Ivern dashboard.
Typical cost for a refactoring task: $0.05–$0.15 in API costs.
Step 4: Add Multi-Agent Coordination
Here's where it gets powerful. Add a Claude Code agent to the same squad:
# In a separate terminal, connect Claude Code
npx @ivern-ai/agent install --key YOUR_IVERN_KEY --provider claude
Now your squad has two coding agents:
- OpenCode Agent — handles implementation tasks
- Claude Code Agent — handles architecture and review tasks
When you assign a complex task, Ivern routes subtasks to the right agent based on their role. A "build feature X" task might split into:
- Claude Code designs the architecture
- OpenCode implements the code
- Reviewer agent checks the output
All coordinated through the same task board. You watch results stream in real time.
See the Claude Code tutorial for the full Claude Code setup walkthrough.
Step 5: Automate Recurring Tasks
Create task templates for common workflows:
Code Review Pipeline
Template: "Review all changes in the current branch. Check for: security issues, performance regressions, test coverage gaps, and code style violations. Produce a review report."
Run: Before every pull request.
Cost: $0.03–$0.08 per review.
Bug Fix Workflow
Template: "Analyze the bug described in [description]. Identify the root cause, implement a fix, and add a regression test."
Run: When bugs come in.
Cost: $0.05–$0.20 per fix.
Documentation Generator
Template: "Read all files in src/ that have been modified in the last 7 days. Update or create JSDoc comments and README sections for each changed function."
Run: Weekly.
Cost: $0.02–$0.10 per run.
OpenCode vs Claude Code vs Cursor: When to Use Each
| Scenario | Best Tool | Why |
|---|---|---|
| Quick inline edit | Cursor | Fastest in-editor experience |
| Complex refactoring | Claude Code | Deep codebase understanding |
| Open-source projects | OpenCode | Free, no subscription |
| Multi-step pipeline | All three via Ivern | Each handles its strength |
The key insight: you don't have to pick one. With Ivern, you connect all three and route tasks to whichever is best for the job. Read our Claude Code vs Cursor comparison for the full breakdown.
Frequently Asked Questions
Is OpenCode free to use?
Yes. OpenCode is open source and free. You pay only for the AI model API calls (Claude, GPT-4, etc.) at direct provider pricing. No subscription required.
Can OpenCode work without Ivern?
Absolutely. OpenCode works standalone in your terminal. Ivern adds the coordination layer — task boards, multi-agent routing, and shared project views. If you only use one agent, you might not need Ivern. If you use multiple agents (OpenCode + Claude Code + Cursor), Ivern coordinates them.
What models does OpenCode support?
OpenCode supports Claude (Anthropic), GPT-4 (OpenAI), and local models via Ollama. You configure the model through environment variables or the OpenCode config file.
How much does it cost to run OpenCode with Ivern?
Ivern is free. OpenCode is free. You only pay for API calls to your chosen model provider. Typical coding tasks cost $0.02–$0.20 each. Most developers spend $3–8/month on API costs for regular use.
Can I use OpenCode for non-coding tasks?
Yes. OpenCode can handle research, writing, and analysis tasks. However, it's optimized for coding workflows. For research and writing tasks, consider using a Researcher or Writer agent role in Ivern instead. See our AI research assistant tools guide for alternatives.
How is this different from GitHub Copilot?
Copilot suggests code inline in your editor. OpenCode is an agent — it reads your codebase, understands context, and executes multi-step tasks autonomously. Copilot completes your next line. OpenCode builds your next feature.
Start Now
- Install OpenCode:
npm install -g opencode - Sign up at ivern.ai/signup
- Connect with:
npx @ivern-ai/agent install --key YOUR_KEY --provider opencode - Assign your first task from the dashboard
Your first 15 tasks are free. For more tutorials, check out the Claude Code tutorial and Cursor AI tutorial.
Related Articles
Gemini CLI Tutorial: How to Use Google's AI Coding Agent for Real Projects (2026)
Google's Gemini CLI brings Gemini 2.5 Pro to your terminal for coding, research, and automation. This tutorial covers setup, real-world usage examples, and how to connect it to a multi-agent squad with Claude Code and Cursor.
Claude Code Tutorial: How to Connect Claude Code to a Task Board (2026)
A complete tutorial for Claude Code users who want structured task management. Learn how to connect Claude Code to Ivern Squads, assign tasks from a web dashboard, and coordinate it with other AI agents — no manual context switching.
Cursor AI Tutorial: How to Use Cursor for Multi-Agent Development (2026)
A complete Cursor AI tutorial for developers. Learn how to set up Cursor, write effective prompts, coordinate it with Claude Code and other AI agents, and build a multi-agent development workflow. Includes real examples and cost breakdowns.
Set Up Your AI Team - Free
Join thousands building AI agent squads. Free tier with 3 squads.