Turn one agent into a full AI team on your VPS
OpenClaw already feels powerful after the Quick Tutorial - but the real game-changer is turning your single agent into a multi-agent swarm. Instead of one generalist doing everything, you get specialized agents that collaborate: a researcher, a coder, a flight booker, etc. They share memory, hand off tasks, and work together 24/7.
OpenClaw lets you define multiple specialized agents that live inside the same workspace. They share MEMORY.md and SOUL.md, but each has its own personality, skills, and responsibilities. You can talk to the whole team or to one specific agent.
This is where OpenClaw goes from "helpful chatbot" to "actual digital team".
Everything is controlled from ~/.openclaw/workspace/AGENTS.md. Open it in any text editor (or the Web UI) and define your agents in simple Markdown.
Run openclaw agents list to see current agents. Edit the file, save, then run openclaw gateway restart (or just wait 10 seconds - it auto-reloads).
Here's a complete ready-to-paste example for AGENTS.md (using Venice.ai models):
# OpenClaw Multi-Agent Swarm
## Research Agent
- Name: research
- Role: Deep researcher and fact-checker
- Model: venice/claude-4.6-sonnet
- Skills: browser, web_search, summarize
- Instructions: You are a meticulous researcher. Always cite sources. Never hallucinate.
## Coding Agent
- Name: coder
- Role: Senior software engineer
- Model: venice/claude-4.6-opus
- Skills: github, shell, file_editor
- Instructions: You write clean, well-commented code. You can push to GitHub and review PRs.
## Personal Assistant
- Name: pa
- Role: Executive personal assistant
- Model: venice/claude-4.6-sonnet
- Skills: gog, calendar, todoist
- Instructions: You handle my daily life. Be proactive, friendly, and concise.
After saving, talk to them like this in Telegram/Web UI:
@research → talk only to the research agent@coder review this PR@pa what's on my calendar tomorrow?## Flight Booker
- Name: flights
- Role: Travel agent that books flights
- Model: venice/claude-4.6-sonnet
- Skills: browser, gog, calendar
- Instructions: Search flights on Google Flights or Kayak, summarize best options, and book when I say "book it". Always confirm dates and passengers first.
Usage: "@flights Find me the cheapest flight from SFO to Tokyo next month"
## Code Reviewer
- Name: reviewer
- Role: Brutally honest senior code reviewer
- Model: venice/claude-4.6-opus
- Skills: github, shell
- Instructions: Review any PR or code file I give you. Point out security issues, performance problems, and style violations. Suggest fixes.
Usage: "@reviewer review my latest PR on GitHub"
## Calendar Manager
- Name: calendar
- Role: Calendar & meeting guardian
- Model: venice/claude-4.6-sonnet
- Skills: gog, email, todoist
- Instructions: Keep my calendar clean. Block focus time, remind me 30 min before meetings, and auto-decline conflicting invites.
Usage: "@calendar block 2 hours every morning for deep work"
Important: You don't need a separate PA agent. The GOG (Google on Go) skill is your personal assistant directly.
The GOG skill provides native access to everything Google Workspace. Instead of setting up a custom Gmail agent and a separate PA agent, you can just use GOG directly for your personal assistant functions:
Just ask naturally:
The GOG CLI works great on VPS headless environments using the --remote two-step auth flow:
git clone https://github.com/steipete/gogcli.git
cd gogcli
make
sudo cp bin/gog /usr/local/bin/gog
client_secret.jsoncp client_secret.json ~/.openclaw/workspace/secrets/gog auth credentials /path/to/client_secret.json
export GOG_ACCOUNT=your@gmail.com
export GOG_KEYRING_BACKEND=file
export GOG_KEYRING_PASSWORD=your-password
# Step 1: Generate auth URL
gog auth add your@gmail.com --services gmail,calendar --remote --step 1
Copy the displayed URL, open in your browser, authorize, and copy the redirect URL. Then run:
# Step 2: Exchange code for tokens
gog auth add your@gmail.com --services gmail,calendar --remote --step 2 --auth-url ""
gog auth list
gog gmail search "newer_than:7d" --max 10
gog calendar events primary --from "$(date -I)"
For headless VPS, set these in ~/.bashrc so they persist:
export PATH="$HOME/.local/bin:$PATH" # if gog is installed locally
export GOG_ACCOUNT=your@gmail.com
export GOG_KEYRING_BACKEND=file
export GOG_KEYRING_PASSWORD=your-password
Google OAuth requires a client_secret.json file. This file acts as your OAuth credentials and MUST be stored securely:
~/.openclaw/workspace/secrets/gog-credentials.jsonchmod 600 on the secrets directoryclient_secret.json to GitHub or version controlTo generate new credentials:
client_secret.jsonscp client_secret.json account@your-vps:~/.openclaw/workspace/secrets/gog-credentials.jsonsystemctl --user restart openclaw-gatewayThe OpenClaw gateway runs as a systemd user service. Environment variables for the gateway are loaded from ~/.config/systemd/user/openclaw-gateway.service, not from .env files!
If you change GOG_KEYRING_PASSWORD, you MUST update the systemd service file on your VPS:
cat ~/.config/systemd/user/openclaw-gateway.servicenano ~/.config/systemd/user/openclaw-gateway.serviceEnvironment=GOG_KEYRING_PASSWORD=your-password linesystemctl --user daemon-reloadsystemctl --user restart openclaw-gatewayWe experienced a case where the gateway kept using the old password from this file, even after updating .env files and openclaw.json!
/think high when talking to the whole swarm for better coordination@coder check the file research-agent foundopenclaw agents list or openclaw status --all --deep to see the full teamStart small (3 agents max). Once they work well together, add more. The more specific the role and instructions, the better they perform.
| Problem | Fix |
|---|---|
| Agent not responding | Run openclaw agents list and check spelling of name |
| Changes not taking effect | Save AGENTS.md then openclaw gateway restart |
| Agents fighting / repeating | Make instructions more specific in AGENTS.md |
| Memory getting too big | Run /compact or edit MEMORY.md manually |
| GOG keyring errors | Ensure GOG_KEYRING_BACKEND=file and password are set in same environment |
| GOG token expires | Run gog auth list --check and re-auth if needed |
| Cannot find gog | Ensure gog binary is in $PATH used by OpenClaw |
| OAuth fails on VPS | Use --remote --step 1 then --step 2 with redirect URL |
Edit AGENTS.md in the Web UI (via SSH tunnel) for the smoothest experience. Your swarm will keep running even if you close the browser.
You now have a real AI team living on your VPS. Start simple, iterate, and watch it take over more and more of your workload.
Drop your favorite agent setup or swarm idea in the comments below - I'll feature the best ones in a follow-up post!
← Read the Quick Tutorial First Browse All Blog Posts →
💬 Comments