If you landed here you probably searched for how to use OpenClaw multi-agent setup for different business functions. This post is a field report on building an "AI employee" org chart—separate agents for sales, marketing, engineering and operations—using OpenClaw v3.4.2 on ClawCloud. I moved our tiny SaaS from one monolithic assistant to four specialized workers and lived to tell the tale.
Why split into multiple OpenClaw agents at all?
One agent with every possible tool quickly turns into a Swiss-army knife nobody wants to hold. Prompt context balloons, memory gets noisy, and the risk surface grows—one credential leak and you’re toast. OpenClaw’s design makes isolation cheap, so treat agents like Unix processes: single purpose, clear contracts.
- Cognitive load: Each LLM call sees only domain-specific docs and examples, so responses stay on topic.
- Security: Marketing doesn’t need SSH to prod. Engineering doesn’t need the Mailchimp key.
- Auditing: Logs map to business functions. When sales spams 5k contacts you know which agent did it.
- Scaling: Run agents on different ClawCloud nodes, bumping tokens for the heavy ones only.
Designing the org chart: sales, marketing, engineering, ops
OpenClaw names matter because they show up in memory prompts. Pick roles you’d assign to humans:
- claw-sales – CRM, email, calendar, call transcripts.
- claw-marketing – Content drafts, social posting, SEO research.
- claw-eng – GitHub PR triage, CI status, incident review.
- claw-ops – Billing, analytics, renewal reminders, back-office scripts.
For solo founders the same pattern works—let the bots pretend to be departments, you stay the manager.
Namespace conventions
I prefix environments too: prod-claw-sales, staging-claw-eng. It keeps accidental cross-talk out of Slack.
Setting up isolated workspaces on ClawCloud (and locally)
ClawCloud gives you the fastest path, but everything below also works with self-hosted OpenClaw Gateway + Daemon.
1. Create four workspaces
In the cloud UI hit “New Agent” four times, naming as above. Under the hood ClawCloud stores each in its own Postgres schema—no memory leakage.
2. API keys per agent
Generate OpenAI or Anthropic keys scoped via billing sub-accounts if you care about cost tracking. Paste them into each agent’s Environment → LLM_PROVIDER_KEY.
3. Command-line equivalent
If you prefer git-ops, install CLI v0.9:
npm install -g @openclaw/cli
claw login --token $CLAWCLOUD_TOKEN
claw agent:create claw-sales --model gpt-4o
claw agent:create claw-marketing --model gpt-4o
claw agent:create claw-eng --model gpt-4o
claw agent:create claw-ops --model gpt-4o
4. Vault-inject secrets
Use ClawCloud’s secret manager instead of plain env if the tool needs OAuth:
claw secret:set claw-marketing MAILCHIMP_KEY sk_live_...
Bootstrapping each agent with function-specific skills
OpenClaw ships blank. You teach it through:
- Tools (Composio integrations)
- Memories (vector or keyword)
- Scheduled actions
- Examples (few-shot convo fragments)
Sales agent
Add HubSpot, Gmail, Calendar, and Whisper for call notes:
claw tool:add claw-sales hubspot
claw tool:add claw-sales gmail
claw tool:add claw-sales google-calendar
claw tool:add claw-sales openai-whisper
Then seed memory with ICP definition and pricing sheet:
claw memory:upload claw-sales assets/icp.md
claw memory:upload claw-sales pricing_2024.pdf --tags pricing
Marketing agent
Integrate Ghost CMS, Twitter API v2, Ahrefs SERP scraper:
claw tool:add claw-marketing ghost
claw tool:add claw-marketing twitter
claw tool:add claw-marketing ahrefs
Schedule a daily content ideation run:
claw cron:add claw-marketing "0 13 * * *" "Generate next week's post ideas"
Engineering agent
Here things get interesting—shell access + GitHub. Use shell.readonly not shell unless you trust it.
claw tool:add claw-eng github
claw tool:add claw-eng shell.readonly
claw tool:add claw-eng pagerduty
Load CONTRIBUTING.md and coding_style.md into memory. This keeps review comments consistent.
Operations agent
Stripe, QuickBooks, PostHog, plus S3 for receipts archive:
claw tool:add claw-ops stripe
claw tool:add claw-ops quickbooks
claw tool:add claw-ops posthog
claw tool:add claw-ops s3
I also give ops full Shell because it needs cron-based scripts on invoices.
Wiring inter-agent communication the UNIX way
Agents shouldn’t share a database, they should pass messages. The simplest path is Webhooks + Slack, but gRPC and Redis Streams also work. I went Slack because everyone (the human me) lives there.
Slack channels as message bus
Create private channels:
#ai-sales#ai-marketing#ai-eng#ai-ops#ai-standup(cross-function)
In each agent settings: Connector → Slack → Bot Token, limit the channel list.
Now the magic: use OpenClaw’s mention pattern to hand off tasks.
Example—sales agent detects a feature request in a prospect call note:
[claw-sales thought]
"This prospect asked for OAuth support. @claw-eng can we estimate effort?"
Engineering agent will receive the mention via Slack event, run its internal chain, and reply back. You get threaded context by default.
Rate limiting social chatter
We learned the hard way: agents love to tag each other. I added a guardrail memory:
claw memory:add claw-sales "Only ping other agents if the issue cannot be solved locally."
This dropped inter-agent traffic by ~60%.
Alternative: Redis Streams
If you need millisecond latency, set TRANSPORT=redis:
export CLAW_TRANSPORT=redis://10.0.0.5:6379/0
claw daemon &
Each agent subscribes to its own topic; publish/subscribe pattern is built into the daemon.
Solo founder workflow: command router and daily stand-up
Running four agents sounds heavier than it is. The trick is a fifth meta-agent—claw-router—that redirects prompts so you talk to one Slack DM.
Implementing router in 15 lines
// router.js (Node 22+)
import { handle } from 'openclaw-router';
export default async ({ message }) => {
const map = {
sales: 'claw-sales',
marketing: 'claw-marketing',
eng: 'claw-eng',
ops: 'claw-ops'
};
const [prefix] = message.text.split(':');
const target = map[prefix.trim()];
if (!target) return 'Unknown dept. Use sales:, marketing:, eng:, ops:.';
await forward(target, message.text.replace(/^\w+:/, '').trim());
return `Sent to ${target}`;
};
Deploy it as another agent with no tools. It just calls forward() which uses the ClawCloud REST API.
Daily stand-up automation
Each night ops agent posts yesterday’s metrics to #ai-standup. The router gathers summaries:
cron:"0 7 * * *" "sales: summary yesterday\nmarketing: summary yesterday\neng: summary yesterday\nops: summary yesterday"
You wake up to a tidy thread: revenue, sign-ups, content shipped, open PRs.
Hard edges: security, rate limits, cost caps
Nobody on HN trusts AI until they break it, so here’s what bit me.
Shell access is dangerous
- Use
shell.readonlyunless automation strictly requires writes. - Whitelist paths:
/var/log,/srv/git. Block/etc.
Tokens bleed between agents
OpenClaw ≤3.3 had a bug where API headers persisted across sessions. Upgrade to ≥3.4.1 or patch client.js line 128.
LLM cost spiral
- Set
MAX_TOKENS_PER_DAYper agent. Sales needed 2× more than expected. - Use OpenAI
gpt-3.5-turbo-previewfor marketing drafts—half the price of GPT-4o, quality fine.
Rate limit GitHub API
Engineering agent reviewing every commit can blow the 5k req/hr cap. Cache PR bodies to S3; fetch only diff hunks.
Debugging and iterating in prod
Logs are text; grep them. Two tricks helped:
1. Enable trace mode
claw config:set claw-eng TRACE=true
This dumps tool call arguments. Pipe to Datadog to slice by latency.
2. Memory diffs
A cron on ops agent compares memory size day over day:
claw cron:add claw-ops "0 2 * * *" "memory:stats --diff"
If any agent grows by >5 MB we review what got stored. Usually sales recordings.
Iterate weekly: nuke bad memories, add examples, bump or drop tools. The modular setup keeps blast radius tiny—marketing tweaks never touch prod deploy pipeline.
Next step: start with one agent, clone when it hurts
You don’t need the full org on day 1. Fire up claw-sales first, let it prove value, then branch. Because each agent is just config + memory, cloning is a 30-second job:
claw agent:clone claw-sales claw-marketing
Strip sales tools, add marketing ones, and voilà—you’ve hired your second AI employee without a headhunter fee.
That’s the playbook. Take it, modify it, report back in the GitHub issues if something breaks. Real feedback from the community is how OpenClaw got to 145k stars in the first place.