OpenCode Tutorial: How to Connect OpenCode to a Task Board and Run Multi-Agent Tasks

By Ivern AI Team8 min read

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:

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:

  1. Click Create Squad
  2. Name it "Coding Team"
  3. Add agents:
AgentRolePurpose
OpenCode AgentCoderWrites and refactors code
ReviewerReviewerReviews 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:

  1. Claude Code designs the architecture
  2. OpenCode implements the code
  3. 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

ScenarioBest ToolWhy
Quick inline editCursorFastest in-editor experience
Complex refactoringClaude CodeDeep codebase understanding
Open-source projectsOpenCodeFree, no subscription
Multi-step pipelineAll three via IvernEach 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

  1. Install OpenCode: npm install -g opencode
  2. Sign up at ivern.ai/signup
  3. Connect with: npx @ivern-ai/agent install --key YOUR_KEY --provider opencode
  4. 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.

Create Your Free Squad →

Set Up Your AI Team - Free

Join thousands building AI agent squads. Free tier with 3 squads.