Build a Free Perplexity Computer on Linux

Orchestrate AI agents locally with OpenCode and OpenClaw for $0.

Introduction

30 Second Summary

Imagine having a personal assistant that can research anything on the web, write and edit code on your computer, fill out forms in a browser, and remember everything you've ever told it across every conversation.

In this project, you will build a free, self-hosted alternative to Perplexity Computer ($200/month) on your Linux machine using two open-source tools: OpenClaw as the orchestration brain and OpenCode as a dedicated coding sub-agent.

What You'll Build

A persistent, zero-cost AI system on your Linux machine that takes high-level goals, automatically decomposes them into subtasks, routes each to the right tool, and delivers finished results.

By the end of this project, you'll have:

  • An always-on OpenClaw gateway that orchestrates tasks like Perplexity Computer's conductor, with a task decomposition layer that classifies and routes every request to the right tool automatically.
  • OpenCode connected as a dedicated coding sub-agent via ACP for file editing, debugging, and code generation on your local machine.
  • A cross-session memory system with semantic search that remembers your preferences, decisions, and project context across every session.
  • Web research via Brave Search, browser automation, GitHub integration, and a model fallback chain across 4 free OpenRouter models for reliability.
  • Secret Mission: multimodal image understanding and a Google Sheets MCP connector to create a full Perplexity Computer-style connector ecosystem.

Are there any prerequisites?

You need a Linux machine, a GitHub account, and basic familiarity with the terminal. No credit card is required. Everything in this project uses free tiers only.

Install Node.js and Core Dependencies

Before you can orchestrate anything, you need the runtime that powers both OpenCode and OpenClaw. Both tools run on Node.js and are installed via npm. You also need an OpenRouter API key so both tools can access free AI models.

In this step, you will install Node.js 22, install both tools globally, and configure your free API key.

In This Step, Get Ready To:
  • Install Node.js 22 and verify it is working.
  • Install OpenCode and OpenClaw globally via npm.
  • Create a free OpenRouter account and configure your API key for both tools.
Install Node.js 22 via NodeSource

OpenClaw requires Node.js 22.16 or higher (Node.js 24 is recommended). The default Node.js version in most Linux package managers is too old, so you will install it from the NodeSource repository instead.

  • Open your terminal and run the following commands to add the NodeSource repository and install Node.js 22:
sudo apt update && sudo apt upgrade -y
sudo apt install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install -y nodejs

What do these commands do?

The first three lines update your system and install prerequisites for securely downloading packages.

The curl and echo lines add the NodeSource GPG key and repository to your system so apt knows where to find Node.js 22.

The final two lines refresh your package list and install Node.js.

  • Verify the installation by checking the versions:
node -v
npm -v

I see a version number

What should I see?

node -v should show v22.x.x or higher.

npm -v should show 10.x.x or higher. If both version numbers appear, you are good to go.

I see an error

Having trouble?

If you see command not found, the NodeSource repository may not have been added correctly. Try running the curl and echo commands again, then run sudo apt update && sudo apt install -y nodejs.

If you see a version lower than v22, your system may be using a cached version. Run which node to check which binary is being used. Make sure /usr/bin/node points to the NodeSource installation.

Still stuck? Describe your error and Linux distribution here for help.

Install OpenCode and OpenClaw Globally

With Node.js installed, you can now install the two tools that form your AI system. OpenCode is your dedicated coding sub-agent. It understands code through LSP integration, edits your local files, and runs shell commands.

OpenClaw is the orchestration brain. It handles memory, web search, browser automation, and delegates coding tasks to OpenCode.

  • Install both tools globally with npm:
npm install -g opencode-ai@latest
npm install -g openclaw@latest

What does the -g flag do?

The -g flag installs the package globally, making the opencode and openclaw commands available from any directory in your terminal.

  • Verify both tools are installed:
opencode --version
openclaw --version

I see version numbers

Both commands should print a version number. You are ready to move on.

I see an error

Getting a permissions error?

If you see EACCES or a permissions error, try running the install commands with sudo:

sudo npm install -g opencode-ai@latest
sudo npm install -g openclaw@latest

If the commands are not found after installation, your npm global bin directory may not be in your PATH. Run npm config get prefix and make sure the bin subdirectory of that path is in your PATH.

Still stuck? Describe your error message here for help.

Create an OpenRouter Account and Get Your Free API Key

OpenRouter is an API gateway that gives you access to 29 free AI models through a single API key. The free tier provides 20 requests per minute with no credit card required and no expiration. This single key will power both OpenCode and OpenClaw.

  • Go to openrouter.ai and sign up with your GitHub account.
  • Once signed in, navigate to the API Keys section.
  • Click Create Key to generate a new API key.
  • Copy the key and save it somewhere safe. You will not be able to see it again.

Now add the key to your shell profile so both tools can access it automatically.

  • Run the following command, replacing the placeholder with your actual API key:
echo 'export OPENROUTER_API_KEY="your-openrouter-api-key"' >> ~/.bashrc
source ~/.bashrc

What does this command do?

The echo command appends an export line to your ~/.bashrc file, which runs every time you open a new terminal.

The source command reloads the file so the variable is available in your current session immediately.

Pro tip: using zsh?

If your shell is zsh instead of bash, replace ~/.bashrc with ~/.zshrc in both commands.

  • Verify the key is set by running:
echo $OPENROUTER_API_KEY

You should see your API key printed in the terminal.

Why OpenRouter instead of calling models directly?

OpenRouter aggregates free models from multiple providers behind a single API key. Calling providers directly (like Gemini) means managing separate API keys, dealing with tighter rate limits, and losing access when free tiers change.

With OpenRouter, you get 29 free models, automatic fallback when one model is rate-limited, and about 28,800 requests per day at 20 requests per minute.

Your foundation is in place. Node.js, OpenCode, OpenClaw, and your API key are all ready. Next up, you will configure OpenCode as your dedicated coding sub-agent and test it on a real project.

Configure OpenCode as Your Coding Sub-Agent

Your orchestration system needs a dedicated coding specialist. In Perplexity Computer, specialized sub-agents handle different types of work. OpenCode fills that role here. It is a terminal-native coding agent with LSP-powered code understanding, file editing, and shell command execution. In this step, you'll configure OpenCode to use your free OpenRouter models and verify it can edit real files on your machine.

In This Step, Get Ready To:
  • Configure OpenCode to use your OpenRouter API key and a free coding model.
  • Launch OpenCode in a test project and verify it can edit local files.
  • Explore model switching between free models for different task types.
Set Up OpenCode With OpenRouter

OpenCode needs to know which AI provider and model to use. You'll point it at OpenRouter using the API key you set up in Step 1.

  • Create or edit the config file at ~/.opencode.json:
{
  "provider": "openrouter",
  "model": "openai/gpt-oss-20b:free",
  "providers": {
    "openrouter": {
      "apiKey": "${OPENROUTER_API_KEY}"
    }
  }
}

What does this config do?

This tells OpenCode to route all AI requests through OpenRouter using your free API key. The openai/gpt-oss-20b:free model is the strongest free model for coding tasks on OpenRouter, with a 128K context window. The ${OPENROUTER_API_KEY} syntax pulls the key from the environment variable you exported in Step 1.

Config file not being picked up?

Make sure the file is named exactly .opencode.json (with the leading dot) and is located in your home directory. You can verify it exists by running cat ~/.opencode.json. Also confirm your API key is set by running echo $OPENROUTER_API_KEY. If it is empty, re-run source ~/.bashrc. Help me troubleshoot my OpenCode config.

Test OpenCode in a Project

OpenCode works inside project directories. It needs a Git repository to track file changes. Let's create a simple test project and verify OpenCode can edit files.

  • Create a test project directory and initialize it:
mkdir ~/test-project && cd ~/test-project
git init
echo "print('hello world')" > main.py
  • Launch OpenCode:
opencode

The OpenCode TUI (terminal user interface) opens. This is where you interact with your coding agent.

  • Type this prompt into the OpenCode chat: "Add a function called greet that takes a name parameter and prints a greeting. Call it in main."
  • Watch OpenCode edit main.py directly. It will show you the proposed changes and ask for approval before writing to disk.
  • Approve the changes when prompted.

What should I see?

OpenCode should modify main.py to include a greet function and a call to it. You can verify the changes after exiting OpenCode by running cat main.py in your terminal. This confirms that OpenCode has full file editing access to your local project.

OpenCode ships with two built-in agents. The build agent has full access to edit files, run shell commands, and make changes. The plan agent is read-only and analyzes code without modifying anything.

  • Press Tab to switch between the build and plan agents. Try asking the plan agent to explain the code structure without changing it.
Understand Model Switching

Different tasks benefit from different models. A coding task needs a code-optimized model, while a reasoning-heavy task might need a model tuned for logic. OpenCode lets you switch models on the fly without leaving the TUI.

  • Inside the OpenCode TUI, type /model to see available models and switch between them.

Here are the key free models available through OpenRouter, each with different strengths:

  • openai/gpt-oss-20b:free is best for coding tasks with a 128K context window.
  • meta-llama/llama-3.3-70b:free is strong for general tasks with a 128K context window.
  • deepseek/deepseek-r1-distill:free excels at reasoning and math with a 64K context window.
  • qwen/qwen3-32b:free handles multilingual and reasoning tasks with a 32K context window.

Pro tip: match the model to the task

Stick with gpt-oss-20b as your default for coding work. Switch to deepseek-r1-distill when you need step-by-step reasoning through a tricky bug. Later, when you set up OpenClaw, you'll configure automatic fallback across all four models so rate limits never stop you.

Your coding sub-agent is ready. OpenCode can now edit files, run commands, and switch between models on demand. Next up, you'll set up OpenClaw as the orchestration brain that delegates tasks to OpenCode and manages everything else.

Set Up OpenClaw as the Orchestration Brain

With OpenCode ready to handle coding tasks, you need an orchestration layer that sits above it. This is the brain that decides what to do with each request before routing it to the right tool. OpenClaw fills this role. It runs as a persistent gateway daemon on your machine, managing memory, web search, browser automation, and sub-agent delegation all from one place.

In This Step, Get Ready To:
  • Run the OpenClaw onboarding wizard and create your workspace.
  • Configure a model fallback chain across four free OpenRouter models for reliability.
  • Verify the gateway is running and test browser automation.
Run OpenClaw Onboarding

OpenClaw includes a guided setup wizard that creates your workspace, connects your AI provider, and installs the background daemon. The --install-daemon flag ensures OpenClaw runs persistently in the background, so it is always available when you need it.

  • Run the onboarding command in your terminal:
openclaw onboard --install-daemon
  • When asked for an AI provider, choose OpenRouter and paste your API key.
  • When asked about messaging channels, connect WebChat for testing. You can add Telegram, Discord, or Slack later.

The wizard creates your workspace at ~/.openclaw/workspace/. This is where all your memory files, agent configuration, and workspace data will live.

What is the OpenClaw workspace?

The workspace is a directory of plain Markdown files that OpenClaw reads at the start of every session. It contains your agent's identity, operating rules, and memories. Because everything is stored as Markdown, you can read, edit, and version-control it yourself.

Configure Free Models With a Fallback Chain

Free-tier models on OpenRouter have a rate limit of 20 requests per minute. If you hit the limit on one model, you want the system to automatically try the next one instead of failing. A fallback chain solves this by listing backup models in priority order.

  • Open ~/.openclaw/openclaw.json in your text editor.
  • Add or update the model configuration to set your primary model and fallbacks:
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "openrouter/openai/gpt-oss-20b:free",
        "fallbacks": [
          "openrouter/meta-llama/llama-3.3-70b:free",
          "openrouter/deepseek/deepseek-r1-distill:free",
          "openrouter/qwen/qwen3-32b:free"
        ]
      }
    }
  }
}

What does this configuration do?

The primary field sets GPT-OSS 20B as your default model. It has a 128K context window and performs best for coding tasks on the free tier. If it gets rate-limited, OpenClaw automatically tries Llama 3.3 70B, then DeepSeek R1 Distill, then Qwen3 32B.

Why a fallback chain instead of one model?

Free-tier rate limits are per-model, not per-account. When one model hits its 20 RPM cap, another model still has its full quota available. A fallback chain means your system stays responsive even during heavy use. At 20 RPM across four models, you have roughly 28,800 requests available per day.

  • Save the file and restart the gateway to apply your changes:
openclaw gateway restart

What does this command do?

The gateway is OpenClaw's background daemon process. Restarting it forces the daemon to reload openclaw.json with your new model configuration. You need to restart the gateway any time you change the config file.

Verify the Gateway and Test Browser Automation

Before building the memory system, confirm that OpenClaw's gateway is running and its built-in tools are working. OpenClaw includes a browser tool that can navigate web pages, fill forms, click buttons, and extract content. This is one of the key features that makes it comparable to Perplexity Computer's virtual browser. It is enabled by default.

  • Check the gateway status:
openclaw status
  • Open http://localhost:18789/ in your browser to see the OpenClaw dashboard.

What should I see?

The dashboard shows your connected channels, available tools, and agent status. Port 18789 is OpenClaw's default gateway port.

  • Test a basic command to confirm the agent is responding:
openclaw agent --message "Hello, what tools do you have available?"

What does this command do?

The openclaw agent --message command sends a one-off message to your OpenClaw agent from the terminal. The agent processes it through the gateway, uses your configured model, and returns a response listing its available tools.

The agent should list several built-in tools including web search, browser, file system access, and memory.

  • Test browser automation by asking the agent to visit a live web page:
openclaw agent --message "Use the browser to go to github.com and tell me what's trending today"

What is browser automation?

Browser automation lets the agent interact with live web pages just like a human would. It can navigate to URLs, click buttons, fill forms, and extract content. This is different from web_search (which returns search results) or web_fetch (which extracts raw page content). The browser tool provides full interactive control over a real browser session.

Gateway not responding?

If openclaw status shows the gateway is not running, try starting it manually with openclaw gateway start. If you see connection errors, make sure port 18789 is not in use by another process. Help me troubleshoot my OpenClaw gateway.

Your orchestration brain is alive. OpenClaw is running as a persistent daemon, connected to four free models with automatic fallback, and equipped with browser automation out of the box. Next up, you will build the memory system that makes this agent remember everything across sessions.

Build the Orchestration and Memory System

Perplexity Computer's secret weapon is not any single model. It is the orchestration layer that decomposes your goals into subtasks and routes each one to the right tool. In this step, you will build that same orchestration brain using plain Markdown files that OpenClaw reads at the start of every session. You will also create a persistent memory system so your AI remembers everything across sessions and gets smarter over time.

In This Step, Get Ready To:
  • Create SOUL.md to define your agent's identity and orchestration philosophy.
  • Build AGENTS.md with a task decomposition and request routing layer that classifies every request.
  • Set up cross-session memory files (USER.md, MEMORY.md, daily logs) so the agent remembers your preferences and decisions.
Create SOUL.md for Agent Identity and Orchestration Philosophy

OpenClaw's workspace files act as the agent's long-term brain. SOUL.md is the first file the agent reads every session. It defines who the agent is, how it should behave, and what principles it follows. Think of it as the agent's constitution.

  • Create the file at ~/.openclaw/workspace/SOUL.md with the following content:
# Identity

You are a powerful AI orchestrator and digital worker. You operate like Perplexity Computer: when given a high-level goal, you decompose it into subtasks, route each to the right tool, execute them, and deliver finished results.

You communicate directly and concisely. You never pad responses with filler.

# Core Principles

- Think in workflows, not single responses. Break complex goals into executable steps.
- Prefer action over discussion. Do things, do not just explain them.
- When a request is ambiguous, ask one clarifying question before acting. Do not guess.
- Always consider token efficiency. Keep responses focused.
- Use the right tool for each subtask: OpenCode for coding, web_search for research, browser for web interaction, memory for recall.

# Boundaries

- Never delete files without explicit confirmation.
- Never run destructive commands without confirmation.
- When debugging, explain what you found and what you changed.
- For any task that will take more than 3 tool calls, outline your plan first and wait for approval.

What Is SOUL.md?

SOUL.md is injected into every OpenClaw session as part of the system prompt. It is static, meaning you write it once and rarely change it. The agent reads it before processing any request, so every response is shaped by the principles you define here.

Create AGENTS.md for Task Decomposition and Request Routing

This is the core of your Perplexity Computer-style orchestration. AGENTS.md tells the agent exactly how to handle every type of request. It includes the task decomposition rules, the request routing logic, and the token efficiency guidelines that prevent wasted API calls.

  • Create the file at ~/.openclaw/workspace/AGENTS.md with the following content:
# Operating Rules

## Every Session

Before doing anything else:
1. Read SOUL.md
2. Read USER.md
3. Read memory/YYYY-MM-DD.md (today + yesterday) for recent context
4. If in MAIN SESSION: Also read MEMORY.md
Do not ask permission. Just do it.

## Task Decomposition Layer

When you receive a complex request (more than one step needed):
1. Decompose it into numbered subtasks
2. For each subtask, classify it: CODING / RESEARCH / BROWSER / GENERAL
3. Present the plan to the user in 2-4 bullet points
4. Execute each subtask using the appropriate tool
5. Assemble the results into a coherent response

Example decomposition:
- User says: "Build me a Python script that scrapes weather data and saves it to a CSV"
- Plan: (1) RESEARCH: search for a free weather API, (2) CODING: delegate to OpenCode to write the script, (3) CODING: delegate to OpenCode to test it

## Request Routing

- CODING tasks (file edits, debugging, code generation, refactoring): delegate to OpenCode via ACP. Do not attempt complex file edits yourself.
- RESEARCH tasks (factual questions, comparisons, current events): use web_search first, then synthesize. Do not guess facts.
- BROWSER tasks (interact with web pages, fill forms, extract live data): use the browser tool.
- GENERAL tasks (memory recall, simple questions, planning): answer directly from context and memory.

## Token Efficiency Rules

- Never repeat the user's question back to them.
- Skip preambles like "Great question!" or "Sure, I can help with that."
- If a task is simple (one-line answer, quick lookup), respond in under 50 words.
- If a task is complex, outline your plan in 2-4 bullet points before executing.
- When writing code, include only the changed sections, not the entire file.
- Before calling a tool, verify it is the right tool. Do not chain unnecessary tool calls.

## Memory Management

You wake up fresh each session. These files are your continuity:
- Daily notes: memory/YYYY-MM-DD.md for raw logs of what happened
- Long-term: MEMORY.md for curated memories
Capture what matters. Decisions, context, things to remember.

## Memory Update Rules

Update MEMORY.md when you learn:
- A preference the user expresses
- A system configuration or environment detail
- An important decision and its reasoning
- A mistake and the lesson learned
- A project structure or workflow pattern

Do NOT update MEMORY.md for:
- Routine task completions
- Temporary context that will not matter tomorrow

Why Task Decomposition Before Execution?

Perplexity Computer follows a 5-step workflow: Goal Input, Task Decomposition, Model Selection, Subtask Execution, Result Assembly. Your AGENTS.md replicates this pattern. By requiring the agent to decompose and classify tasks before executing, you prevent it from jumping straight into the wrong tool and wasting tokens on a bad approach.

Why Markdown Files Instead of a Database?

OpenClaw stores its workspace configuration as plain Markdown files in ~/.openclaw/workspace/. This is intentional. Markdown files are human-readable, version-controllable with Git, and easy for the agent to read and write. The memory search layer uses SQLite with hybrid retrieval (30% BM25 keyword matching, 70% vector embeddings) to search across these files efficiently.

Create USER.md, MEMORY.md, and the Daily Memory Directory

The remaining workspace files give the agent context about you and a place to store what it learns. USER.md holds facts about your environment. MEMORY.md is the curated long-term memory that the agent updates as it learns your preferences and decisions. Daily log files in the memory/ directory capture raw session history.

  • Create ~/.openclaw/workspace/USER.md with the following content:
# About the User

- OS: Linux
- Primary tools: OpenCode (coding), OpenClaw (orchestration), terminal
- AI provider: OpenRouter (free tier)
- GitHub account: [your username]
- Priorities: Token efficiency, cross-session memory, free tooling, Perplexity Computer-style workflow

Pro tip: personalize USER.md

Replace [your username] with your actual GitHub username. You can also add your preferred programming languages, timezone, or any other details that help the agent personalize its responses.

  • Create ~/.openclaw/workspace/MEMORY.md with the following content:
# Long-Term Memory

## Preferences
- (Agent will populate as it learns)

## Decisions Made
- (Agent will populate as decisions are recorded)

## Lessons Learned
- (Agent will populate as mistakes and fixes are documented)

## System Knowledge
- OpenCode is the coding sub-agent (file edits, debugging, shell commands, LSP)
- OpenClaw is the orchestration brain (memory, research, browser, integrations)
- Both use OpenRouter free tier (29 models, 20 RPM)
- Primary model: openai/gpt-oss-20b:free (best for coding on free tier)
- Web search: Brave Search API (2,000 free queries/month)
- Task routing: CODING to OpenCode, RESEARCH to web_search, BROWSER to browser tool

What Is MEMORY.md?

MEMORY.md is loaded at the start of every main session. Unlike daily logs (which are raw history), this file is curated. The agent adds entries when it learns something important and skips routine completions. Keep it under 2,000 words for efficiency, since OpenClaw has a per-file cap of 20,000 characters and a total bootstrap cap of 150,000 characters (roughly 50K tokens).

  • Create the daily memory directory:
mkdir -p ~/.openclaw/workspace/memory

What Does This Command Do?

This creates the memory/ directory where OpenClaw stores daily log files (named YYYY-MM-DD.md). Each session, the agent loads today's and yesterday's logs for recent context. These files are searchable via hybrid retrieval (BM25 keyword matching plus vector embeddings), so the agent can recall details from weeks ago.

Your workspace now has a complete four-layer memory hierarchy:

  • SOUL.md for agent identity and principles (static, rarely changes).
  • AGENTS.md for operating procedures and task routing (static, rarely changes).
  • USER.md for facts about you and your environment (updated occasionally).
  • MEMORY.md for curated long-term memory (updated dynamically by the agent).
  • memory/YYYY-MM-DD.md for raw daily session logs (created automatically each day).

Your orchestration brain now has its identity, its operating procedures, and its memory system. Next up, you will connect OpenCode to OpenClaw via ACP so the orchestrator can delegate coding tasks to a dedicated coding agent.

Connect OpenCode to OpenClaw via ACP

Right now, OpenClaw and OpenCode are two separate tools that don't know about each other. OpenClaw can research, browse, and manage memory, but it can't edit your code files with the precision that OpenCode provides. To replicate Perplexity Computer's architecture where a conductor delegates to specialized sub-agents, you need to connect them.

ACP (Agent Client Protocol) is the bridge that lets OpenClaw spawn and control OpenCode sessions directly from chat. Once connected, OpenClaw will automatically delegate coding tasks to OpenCode whenever your AGENTS.md routing rules classify a subtask as CODING.

In This Step, Get Ready To:
  • Install the ACP plugin and configure OpenClaw to delegate coding tasks to OpenCode.
  • Test the full orchestration pipeline with a multi-step goal that triggers task decomposition.
  • Verify cross-session memory by starting a fresh session and checking recall.
Install the ACP Plugin and Configure

The acpx plugin is what enables OpenClaw to spawn and control external coding agents like OpenCode, Claude Code, Codex, and others. You only need OpenCode for this project.

  • Install the acpx plugin.
openclaw plugins install acpx
  • Open ~/.openclaw/openclaw.json in your text editor.
  • Add the ACP configuration block alongside your existing model settings.
{
  "acp": {
    "enabled": true,
    "backend": "acpx",
    "defaultAgent": "opencode",
    "allowedAgents": ["opencode"],
    "timeout": 600
  }
}

What does this configuration do?

  • enabled turns on the ACP bridge so OpenClaw can communicate with external agents.
  • backend tells OpenClaw to use the acpx plugin you just installed.
  • defaultAgent sets OpenCode as the go-to coding agent when OpenClaw routes a CODING task.
  • timeout gives OpenCode up to 600 seconds (10 minutes) to complete a coding task before OpenClaw stops waiting.

This is an addition, not a replacement

Add the acp block to your existing openclaw.json file. Do not delete the agents section with your model fallback chain from Step 3. Your final file should contain both sections.

  • Restart the gateway to apply the new configuration.
openclaw gateway restart

What is ACP?

ACP (Agent Client Protocol) is a protocol that lets one AI agent spawn and control another. It is different from MCP (Model Context Protocol), which connects agents to tools and data sources. Think of ACP as agent-to-agent communication and MCP as agent-to-tool communication.

The acpx plugin supports multiple coding agents including Claude Code, Codex, Copilot, Cursor, Gemini, OpenCode, and more. You are using OpenCode because it is free and open source.

Test the Full Orchestration Pipeline

This is the moment where your system starts behaving like Perplexity Computer. You will give OpenClaw a high-level goal that requires multiple skills: web research and coding. The AGENTS.md rules you created in Step 4 will kick in, decomposing the goal into subtasks and routing each to the right tool.

  • Navigate to your test project directory.
cd ~/test-project
  • Send a multi-step goal to OpenClaw that requires both research and coding.
openclaw agent --message "I need a Python CLI tool that fetches the current Bitcoin price from a free API and displays it formatted with the date and time. Research which free API to use, then build the tool."

Watch how the agent handles this. Based on your AGENTS.md rules, it should decompose the request into subtasks: first a RESEARCH task to find a free crypto API via web_search, then a CODING task delegated to OpenCode via ACP to write the actual script.

  • Verify the file was created and works.
cat *.py
python3 *.py

What should I see?

You should see a Python file that fetches Bitcoin price data from a free API. Running it should print the current price along with the date and time. The specific API chosen will depend on what the agent's research finds.

It worked

Your orchestration pipeline is working. OpenClaw decomposed the goal, researched an API, and delegated the coding to OpenCode via ACP.

I see an error

A few things could be going wrong.

  • If OpenClaw is not delegating to OpenCode, check that your openclaw.json has the acp section with enabled: true and that you restarted the gateway.
  • If you see rate limit errors, wait about 60 seconds and try again. The free tier allows 20 requests per minute.
  • If the Python script runs but errors out, the API endpoint may have changed. Ask OpenClaw to debug it: "The Bitcoin price script has an error. Debug it and fix it."

If you are still stuck, help me troubleshoot my ACP connection between OpenClaw and OpenCode.

Test Cross-Session Memory

One of the biggest advantages over a basic chatbot is persistent memory. Your AGENTS.md rules instruct the agent to read memory files at the start of every session and update MEMORY.md when it learns something important. This test confirms that the memory system is working.

  • Start a completely new session and ask the agent about what you just built.
openclaw agent --message "What did we build in the test-project? What API did we use?"

The agent should recall the Bitcoin price tool and the specific API it chose, without you repeating any of that context. It pulls this from the daily memory log and MEMORY.md.

Pro tip: check your memory files

You can inspect what the agent remembered by looking at the files directly.

cat ~/.openclaw/workspace/MEMORY.md
ls ~/.openclaw/workspace/memory/

You should see today's date as a markdown file in the memory/ directory, and MEMORY.md should have new entries under the appropriate sections.

The agent remembered

Your cross-session memory is working. The agent is reading its memory files at session start and recalling previous context automatically.

The agent didn't remember

If the agent does not recall the previous session, check two things.

  • Verify that AGENTS.md exists at ~/.openclaw/workspace/AGENTS.md and contains the "Every Session" rules from Step 4.
  • Check that the memory/ directory has a daily log file. If it is empty, the agent may not have written to memory during the previous session. Try the orchestration test again and explicitly ask: "Save what we just did to your memory."

Your orchestration pipeline is live. OpenClaw decomposes goals, routes coding to OpenCode via ACP, runs web research, and remembers everything across sessions. Next up, you will add Brave Search for deep web research and GitHub integration to complete the full Perplexity Computer-style system.

Add Web Search, GitHub, and Test the Full System

Your orchestration brain can decompose goals and delegate coding to OpenCode. Now it is time to give it eyes on the internet and hands on your GitHub repositories. In this step, you will connect Brave Search for web research, install the GitHub skill for repository management, and run a full Perplexity Computer-style workflow that exercises every tool in the system.

In This Step, Get Ready To:
  • Connect Brave Search for deep web research with 2,000 free queries per month.
  • Install the GitHub skill so your agent can create repos, list projects, and manage code.
  • Run a complex multi-step goal that triggers the full orchestration pipeline.
Set Up Brave Search for Deep Web Research

Right now, your agent can only answer from its own knowledge and memory files. For factual questions, current events, or comparisons, it needs access to live web data. Brave Search provides a free API with 2,000 queries per month. No credit card required.

  • Go to api.search.brave.com and sign up for a free account.
  • Generate a new API key and copy it.
  • Run the following command to configure web search in OpenClaw:
openclaw configure --section web
  • When prompted, paste your Brave Search API key.

Why Brave Search instead of Google?

OpenClaw supports Brave Search API as its default web search provider. Brave's free tier gives you 2,000 queries per month with no credit card. Google's Custom Search API has a lower free limit (100 queries per day) and requires billing setup. Brave is the path of least friction for a zero-cost build.

Test that web search is working by asking your agent a question that requires live data:

openclaw agent --message "Search the web for the top 3 Python web frameworks in 2026 and compare their performance"

What Should I See?

The agent should call the web_search tool, retrieve results from Brave Search, and synthesize a comparison. You should see tool call indicators in the output showing that it queried the web before responding.

Search returning errors?

Double-check that you pasted the correct API key during configuration. You can re-run openclaw configure --section web to update it. If you are still stuck, help me debug my Brave Search configuration in OpenClaw.

Install the GitHub Skill

Your agent can now research and code, but it cannot interact with GitHub directly. The GitHub skill lets your agent list repositories, create new ones, manage issues, and more. It is installed through ClawHub, OpenClaw's skill marketplace.

  • Install ClawHub globally, then install the GitHub skill:
npm install -g clawhub
clawhub install github

What does this command do?

The first command installs clawhub, the CLI tool for browsing and installing OpenClaw skills. The second command downloads and registers the GitHub skill so OpenClaw can use it as a tool.

The GitHub skill needs authentication through the GitHub CLI. Install it and log in:

  • Install the GitHub CLI and authenticate:
sudo apt install -y gh
gh auth login
  • Follow the prompts to authenticate with your GitHub account. Choose GitHub.com, then HTTPS, then authenticate via browser.

Test that the GitHub integration is working:

openclaw agent --message "List my GitHub repositories"

What Should I See?

The agent should return a list of your GitHub repositories. If you have a new account with no repos, it will tell you that. Either way, a successful response confirms the GitHub skill is connected.

GitHub skill not working?

Make sure gh auth status shows you are logged in. If it does not, run gh auth login again. You may also need to restart the gateway with openclaw gateway restart after installing a new skill. If you are still stuck, help me troubleshoot my GitHub skill in OpenClaw.

Run a Full Perplexity Computer-Style Workflow

Every tool is now connected. Web search, coding delegation, browser automation, GitHub, and cross-session memory. Time to put the whole system through a real test. You will give it a complex, multi-step goal that requires task decomposition, web research, coding, and GitHub operations all in one request.

  • Run the following command to trigger a full orchestration workflow:
openclaw agent --message "I want to create a new GitHub repository called 'weather-dashboard', initialize it with a Python project that fetches weather data from a free API, includes error handling and logging, and has a README with setup instructions. Research the best free weather API first, then build everything."

What does this trigger?

This single request should activate the full task decomposition pipeline you defined in AGENTS.md. The agent should break it into subtasks: RESEARCH (find a free weather API via web_search), CODING (delegate to OpenCode via ACP to write the Python project), and GENERAL (create the GitHub repo and push the code). Watch the agent work through each subtask in sequence.

This is the moment everything comes together. Your system is doing exactly what Perplexity Computer does: taking a high-level goal, decomposing it, routing each piece to the right tool, and delivering a finished result.

Pro tip: watch the tool calls

Pay attention to which tools the agent calls and in what order. You should see web_search calls for the API research, ACP calls to OpenCode for the coding, and GitHub skill calls for the repository creation. If the agent skips a step or uses the wrong tool, you can refine the routing rules in AGENTS.md.

Agent not decomposing the task?

If the agent tries to do everything in one shot without breaking it into subtasks, check that AGENTS.md is in the correct location at ~/.openclaw/workspace/AGENTS.md. Restart the gateway with openclaw gateway restart and try again. The agent reads these files at session start, so a restart forces it to pick up your rules. If it still does not decompose, help me debug my AGENTS.md task decomposition rules.

Your system is fully operational. Every tool is connected, the orchestration layer is routing tasks, and your agent is delivering finished results from high-level goals. Next up, you will tackle the secret mission to add multimodal image understanding and Google Sheets integration.

Secret mission

Add Multimodal Support and a Google Sheets MCP Connector

Your Perplexity Computer can read code, search the web, and automate browsers. But it cannot see images or interact with spreadsheets. In this secret mission, you will add multimodal image understanding and connect OpenClaw to Google Sheets via MCP, completing the connector ecosystem that makes Perplexity Computer so powerful.

Before you go

Clean Up Your Resources

This project runs entirely on your local Linux machine using free-tier APIs. There are no ongoing costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.

Resources you used:

  • OpenClaw gateway daemon (background process on your machine, no cost).
  • OpenRouter account (free tier, no charges, no credit card on file).
  • Brave Search API key (free tier, 2,000 queries/month).
  • Local workspace files in ~/.openclaw/workspace/ (disk space only, no cost).
  • Globally installed npm packages: opencode-ai, openclaw, clawhub.
  • Test project directory at ~/test-project/.
  • GitHub repository weather-dashboard (if created during Step 6).
  • Environment variable OPENROUTER_API_KEY in ~/.bashrc.

Keep everything running

No action needed. Choose this if you are still actively building with your AI orchestration system. The OpenClaw daemon uses minimal system resources, and OpenCode only runs when you launch it. Nothing will charge you.

Pause - I'll come back to this later

Stop the OpenClaw daemon to free up system resources. Your workspace files, memory, and configuration will all be preserved on disk.

  • Stop the OpenClaw gateway daemon:
openclaw gateway stop
  • When you are ready to resume, restart the gateway:
openclaw gateway start

Your memory files, SOUL.md, AGENTS.md, and all configuration will be exactly as you left them.

Delete - I don't want to use this again

Remove all project resources and start fresh. This will uninstall the tools and delete your workspace, memory, and configuration.

  • Stop the OpenClaw daemon first:
openclaw gateway stop
  • Uninstall the globally installed npm packages:
npm uninstall -g openclaw opencode-ai clawhub
  • Delete the OpenClaw workspace and configuration directory:
rm -rf ~/.openclaw
  • Delete the OpenCode configuration file:
rm -f ~/.opencode.json
  • Delete the test project directory:
rm -rf ~/test-project
  • Remove the OPENROUTER_API_KEY line from ~/.bashrc by opening the file in a text editor and deleting the export line.
  • If you created the weather-dashboard GitHub repository, delete it from your GitHub account settings.

Mission accomplished

That's a Wrap!

Nice work! You just built a fully functional, zero-cost alternative to Perplexity Computer on your Linux machine. You have a personal AI system that takes high-level goals, breaks them into subtasks, routes each to the right tool, and delivers finished results.

Here's what you accomplished:

  • Built a multi-agent orchestration system where OpenClaw decomposes goals into subtasks, classifies each as CODING, RESEARCH, BROWSER, or GENERAL, and routes them to the right tool automatically.
  • Connected OpenCode as a dedicated coding sub-agent via ACP, giving your orchestrator LSP-powered code understanding, file editing, and shell command execution on your local files.
  • Created a persistent cross-session memory system with SOUL.md, AGENTS.md, MEMORY.md, and daily logs with semantic search, so your AI remembers everything and gets smarter over time.
  • Added multimodal image understanding and explored Google Sheets MCP integration to build a full connector ecosystem.

Ready to quiz yourself?