Guides
Multi-agent workspacesWorkspace แบบ multi-agent
Build multi-agent setups where each agent gets its own /Agents/<name> folder seeded with prompt.md, context.md, and rules.md. Scope each external AI's MCP connection to that folder so agents keep separate, uncontaminated memory.สร้างระบบ multi-agent ที่ agent แต่ละตัวได้โฟลเดอร์ /Agents/<name> ของตัวเอง ซึ่ง seed มาพร้อม prompt.md, context.md และ rules.md จากนั้นจำกัดขอบเขตการเชื่อมต่อ MCP ของ AI แต่ละตัวให้อยู่ในโฟลเดอร์นั้น เพื่อให้ agent แต่ละตัวมี memory แยกกันและไม่ปนเปื้อน
One Cosmos can host many scoped sub-brains. Building a research agent plus a coder plus a reviewer with OpenCode, Cline, or Cursor? Give each agent its own folder so they never poison each other's memory, while still living inside a single Cosmos.
How scoped sub-brains work
Each agent gets its own /Agents/<name> folder, seeded with three files:
prompt.md— the agent's system prompt.context.md— background fed to the agent every turn.rules.md— what the agent can and can't do.
The external AI connects its MCP scoped to that folder, so each agent reads and writes only its own memory. A researcher's findings never leak into the reviewer's brain unless you choose to share a folder.
Create an agent
- Navigate to
/Agentsin the folder tree. - Open the ... menu and choose + New agent.
- Name it — for example,
Reviewer. - Edit
prompt.md(the system prompt),context.md(background fed every turn), andrules.md(what it can and can't do). - Connect your AI tool's MCP scoped to
/Agents/Reviewer.
Repeat for each agent — for example a researcher and a coder — so every role has its own isolated sub-brain.
Shared vs isolated brains
Agents can share one folder to build a single team brain, or stay fully isolated so their memories never mix. Pick per role:
- Isolated — best when agents have conflicting context (a critic vs. an author).
- Shared — best when agents collaborate on the same task and should learn from each other.
How do I stop agents from poisoning each other's memory?
Scope each agent's MCP connection to its own /Agents/<name> folder. Because recall is folder-scoped, one agent can't read another's memory unless they share a folder.
Which AI tools work with multi-agent workspaces?
Any MCP-capable tool — OpenCode, Cline, Cursor, and the others in Connect your AI tools (MCP) — can connect scoped to a single agent folder.
Cosmos เดียวสามารถ host sub-brain ที่แยกขอบเขตได้หลายอัน กำลังจะสร้าง research agent บวกกับ coder บวกกับ reviewer ด้วย OpenCode, Cline หรือ Cursor อยู่ใช่ไหม ให้ agent แต่ละตัวมีโฟลเดอร์ของตัวเอง เพื่อไม่ให้ปนเปื้อน memory ของกันและกัน ในขณะที่ทั้งหมดยังคงอยู่ภายใน Cosmos ตัวเดียว
Sub-brain แบบแยกขอบเขตทำงานอย่างไร
agent แต่ละตัวจะได้โฟลเดอร์ /Agents/<name> ของตัวเอง ซึ่ง seed มาพร้อมไฟล์สามตัว:
prompt.md— system prompt ของ agentcontext.md— ข้อมูลพื้นหลังที่ป้อนให้ agent ทุกเทิร์นrules.md— สิ่งที่ agent ทำได้และทำไม่ได้
AI ภายนอกจะเชื่อมต่อ MCP โดยจำกัดขอบเขตไว้ที่โฟลเดอร์นั้น ดังนั้น agent แต่ละตัวจะอ่านและเขียนเฉพาะ memory ของตัวเองเท่านั้น สิ่งที่ researcher ค้นพบจะไม่รั่วไหลเข้าไปใน brain ของ reviewer เว้นแต่คุณจะเลือกแชร์โฟลเดอร์ร่วมกัน
สร้าง agent
- ไปที่
/Agentsใน folder tree - เปิดเมนู ... แล้วเลือก + New agent
- ตั้งชื่อ — ตัวอย่างเช่น
Reviewer - แก้ไข
prompt.md(system prompt),context.md(ข้อมูลพื้นหลังที่ป้อนให้ทุกเทิร์น) และrules.md(สิ่งที่ทำได้และทำไม่ได้) - เชื่อมต่อ MCP ของเครื่องมือ AI ของคุณโดยจำกัดขอบเขตไว้ที่
/Agents/Reviewer
ทำซ้ำสำหรับ agent แต่ละตัว — ตัวอย่างเช่น researcher และ coder — เพื่อให้แต่ละบทบาทมี sub-brain ที่แยกขาดเป็นของตัวเอง
Brain แบบแชร์ vs แบบแยกขาด
agent หลายตัวสามารถแชร์โฟลเดอร์เดียวกันเพื่อสร้าง team brain ร่วมกัน หรือจะแยกขาดออกจากกันโดยสมบูรณ์เพื่อให้ memory ไม่ปะปนกันก็ได้ เลือกตามแต่ละบทบาท:
- แยกขาด (Isolated) — เหมาะที่สุดเมื่อ agent มี context ที่ขัดแย้งกัน (นักวิจารณ์ vs ผู้เขียน)
- แชร์ (Shared) — เหมาะที่สุดเมื่อ agent ทำงานร่วมกันในงานเดียวกันและควรเรียนรู้จากกันและกัน
จะกัน agent ไม่ให้ทำให้ memory ของกันและกันปนเปื้อนได้อย่างไร?
จำกัดขอบเขตการเชื่อมต่อ MCP ของ agent แต่ละตัวไว้ที่โฟลเดอร์ /Agents/<name> ของตัวเอง เพราะการ recall ถูกจำกัดขอบเขตไว้ที่ระดับโฟลเดอร์ agent ตัวหนึ่งจึงไม่สามารถอ่าน memory ของอีกตัวได้ เว้นแต่พวกมันจะแชร์โฟลเดอร์ร่วมกัน
เครื่องมือ AI ตัวไหนใช้กับ workspace แบบ multi-agent ได้บ้าง?
เครื่องมือใดก็ตามที่รองรับ MCP — OpenCode, Cline, Cursor และตัวอื่น ๆ ใน Connect your AI tools (MCP) — สามารถเชื่อมต่อโดยจำกัดขอบเขตไว้ที่โฟลเดอร์ agent ตัวเดียวได้
- Atitechs EngineeringMaintainer
- Atitechs DXDeveloper Experience