QuotaCheap Playbook

OpenClaw Multi-Agent: nhiều agent, nhiều workspace, không lẫn não và quyền

Hướng dẫn OpenClaw Multi Agent production: isolated agents, workspace, agentDir, auth profiles, session stores, channel bindings, sub agents, ACP harnesses…

Multi-agent trong OpenClaw không chỉ là nhiều persona. Đó là routing, workspace, agentDir, auth profile, session store, bindings, sub-agents và ACP harnesses — mỗi thứ phải có biên giới rõ.

Playbook tiếng Việt về OpenClaw Multi-Agent: agent identity, workspace/agentDir/session isolation, bindings, routing specificity, DM split, sub-agents, sessions_spawn, ACP agents, agent-send CLI, cost visibility và production checklist.

Multi agent nghe như “cho nhiều con bot nói chuyện”.

Trong production, nó nghiêm túc hơn: nhiều agent nghĩa là nhiều workspace, nhiều state directory, nhiều auth profile, nhiều session store, nhiều channel binding, và đôi khi nhiều background sub agent hoặc external ACP harness.

Nếu làm đúng, mỗi agent có não và quyền riêng.

Nếu làm sai, bạn có một nồi lẩu context: bot social đọc auth coding, agent gia đình thấy transcript work, sub agent cầm tool không cần thiết.

Vui một lần, debug ba ngày.

OpenClaw docs định nghĩa agent là full per persona scope : workspace files, auth profiles, model registry và session store.

Multi agent không phải theme màu.

Nó là isolation boundary ở tầng vận hành.

Docs nói một agent là fully scoped brain với: Workspace: files, AGENTS.md, SOUL.md, USER.md, local notes, persona rules.

State directory / agentDir: auth profiles, model registry, per agent config.

Session store: chat history + routing state under ~/.openclaw/agents/<agentId /sessions.

Auth profiles per agent: Single agent default: agentId defaults to main.

Sessions keyed as agent:main:<mainKey .

Workspace defaults to ~/.openclaw/workspace hoặc profile workspace.

State defaults to ~/.openclaw/agents/main/agent.

Warning từ docs: never reuse agentDir across agents .

Reuse gây auth/session collisions.

Nếu cần independent OAuth account, sign in từ agent đó; nếu copy thủ công, chỉ copy portable static api key hoặc token profiles.

Workspace là default cwd, không phải hard sandbox Docs có note quan trọng: mỗi agent workspace là default cwd , not a hard sandbox.

Relative paths resolve inside workspace, nhưng absolute paths vẫn có thể reach host locations nếu sandboxing chưa bật.

Nghĩa là: workspace giúp tách persona/context/files theo convention; agentDir giúp tách state/auth/session; sandboxing mới là boundary mạnh hơn cho filesystem/tool execution.

Đừng bán multi agent như hostile tenant isolation.

OpenClaw security model vẫn là personal assistant trust boundary.

Mixed trust/adversarial users cần split gateway/credentials/OS user/host.