สิ่งที่คุณกำลังสร้าง
แต่ละ agent ต้องการชุดไฟล์เพื่อให้ทำงานได้อย่างถูกต้อง OpenClaw จะอ่านไฟล์หลักโดยอัตโนมัติเมื่อเริ่มต้น session ส่วนไฟล์ cassette จะกำหนดโดเมนการทำงานและความทรงจำให้แต่ละ agent สามารถทำงานต่อจากที่ค้างไว้
ไฟล์หลัก — โหลดอัตโนมัติโดย OpenClaw ทุก session:
| ไฟล์ | วัตถุประสงค์ |
|---|---|
SOUL.md | บุคลิกภาพ น้ำเสียง ขอบเขตที่ละเมิดไม่ได้ ภารกิจ — ต้องไม่เกิน 400 คำ |
AGENTS.md | กฎการทำงาน ขั้นตอนการรายงาน — ต้องไม่เกิน 400 คำ |
IDENTITY.md | ชื่อ บทบาท ผู้บังคับบัญชา — ระบุข้อเท็จจริงเท่านั้น กระชับ |
ไฟล์รายละเอียดบทบาท — อ่านครั้งเดียวต่อ session ผ่านคำสั่งใน AGENTS.md:
| ไฟล์ | วัตถุประสงค์ |
|---|---|
SPEC_[NAME].md | บทบาทโดยละเอียด ความรับผิดชอบ กฎของระบบ cassette |
ไฟล์ cassette — อ่านเมื่อเริ่ม session หลังจากไฟล์หลัก:
| ไฟล์ | วัตถุประสงค์ |
|---|---|
cassettes/ACTIVE_MODE.txt | คำเดียว: ชื่อ mode ที่ใช้งานอยู่ |
cassettes/[mode]/SKILL_[MODE].md | สิ่งที่ agent นี้ทำได้ใน mode นี้ |
cassettes/[mode]/WORKFLOW_[MODE].md | ขั้นตอนการทำงานทีละขั้นสำหรับ mode นี้ |
cassettes/[mode]/LIVE_LEDGER_[MODE].md | ความคืบหน้า งานที่ยังไม่เสร็จ การดำเนินการถัดไป |
cassettes/[mode]/KNOWLEDGE_[MODE].md | บทเรียนสะสม: ความสำเร็จ ความล้มเหลว สิ่งที่เรียนรู้ |
เฉพาะ CEO — โฟลเดอร์ identity:
| ไฟล์ | วัตถุประสงค์ |
|---|---|
identity/COMPANY_PROFILE.md | ประวัติบริษัท รายละเอียดธุรกิจ |
identity/PERSONAL_PROFILE.md | ประวัติเจ้าของ ทักษะ ประสบการณ์ |
identity/VALUES.md | รูปแบบการคิด ค่านิยม หลักการตัดสินใจ |
โครงสร้าง workspace ทั้งหมด — ทุก agent:
INFO
~/.opengoat/workspace-[agentid]/ ├── SOUL.md ├── AGENTS.md ├── IDENTITY.md ├── SPEC_[NAME].md └── cassettes/ ├── ACTIVE_MODE.txt ← สร้างตอนนี้ กรอกข้อมูลใน Section 6 └── archive/ ← พื้นที่เก็บ LIVE_LEDGER และ KNOWLEDGE เมื่อเกินขนาด
CEO workspace — มีโฟลเดอร์ identity เพิ่มเติม:
INFO
~/.opengoat/workspace-ceo/ ├── SOUL.md ├── AGENTS.md ├── IDENTITY.md ├── SPEC_CEO.md ├── identity/ │ ├── COMPANY_PROFILE.md │ ├── PERSONAL_PROFILE.md │ └── VALUES.md └── cassettes/ ├── ACTIVE_MODE.txt └── archive/
โฟลเดอร์ mode ของ cassette (SKILL, WORKFLOW, LIVE_LEDGER, KNOWLEDGE) จะถูกสร้างใน Section 6 เมื่อคุณสร้าง cassette ชุดแรก
วิธีการทำงานของส่วนนี้ — สองส่วน
ส่วนนี้มีสองส่วน ทำตามลำดับ:
ส่วนที่ 1 — การตั้งค่า Discord (พรอมต์ด้านล่าง) สร้างเซิร์ฟเวอร์ Discord, ช่องทาง และรับ URL Webhook สำหรับแต่ละตัวแทน ใช้เวลาประมาณ 10 นาที
ส่วนที่ 2 — ไฟล์ตัวแทน (พรอมต์ถัดไป) สร้างไฟล์ตัวแทนโดยใช้เอกสารออกแบบทีมของคุณ วางไฟล์ที่เสร็จสมบูรณ์ลงใน VS Code
เริ่มต้นด้วยส่วนที่ 1 ตอนนี้
Discord Webhook URL — เตรียมสิ่งเหล่านี้ก่อน
แต่ละ agent รายงานไปยัง Discord channel ของตัวเองผ่าน Webhook URL คุณต้องเตรียม URL เหล่านี้ก่อนที่จะเขียนไฟล์ AGENTS.md
▶ วางสิ่งนี้ลงในเอไอของคุณเพื่อเริ่มต้น
แนบ Team Design Document ก่อนส่ง
You are helping me set up Discord channels and Webhook URLs for my
BALIA OS multi-agent team.
Guide me step by step. Ask one question at a time.
If I get stuck, ask me to take a screenshot and describe what I see.
I have attached my Team Design Document.
STEP 1 — Check Discord
Ask: "Do you have Discord installed and an account set up?"
If no: guide me to discord.com to download and create an account.
If yes: move to Step 2.
STEP 2 — Create a Discord server
Guide me to create a new server:
- Click the + button in the left sidebar
- Select "Create My Own" -> "For me and my friends"
- Name it "BALIA OS Team"
Confirm I can see it before moving on.
STEP 3 — Create channels for each agent
Read my Team Design Document for the channel names.
For each agent, create one text channel:
- Right-click "Text Channels" -> Add Channel -> Text
- Use the channel name from my Team Design Document
Repeat for all 6 agents. Confirm all channels exist before moving on.
STEP 4 — Get a Webhook URL for each channel
One channel at a time:
1. Right-click the channel -> Edit Channel
2. Integrations -> Webhooks -> New Webhook
3. Name it after the agent (e.g. "Marcus")
4. Copy Webhook URL
5. Ask me to paste it somewhere safe
Repeat for all 6. Confirm all 6 URLs are saved before moving on.
STEP 5 — Add to .env file
Guide me to open the .env file in VS Code and add each webhook:
DISCORD_WEBHOOK_[AGENTNAME]=https://discord.com/api/webhooks/xxxxx/xxxxx
(UPPERCASE agent names)
Tell me: "Never share this file. Never commit it to GitHub."
When all webhooks are saved: "Discord setup complete."
Start now. Ask me the first question.วิธีดำเนินการในส่วนนี้
นำ prompt ด้านล่างไปวางใน Claude, ChatGPT หรือ Gemini พร้อมแนบไฟล์สองไฟล์:
- Team Design Document จาก Section 2
AI จะสร้างไฟล์ทั้งหมดสำหรับแต่ละ agent ทีละตัว โดยยืนยันก่อนดำเนินการต่อ
▶ วางสิ่งนี้ลงในเอไอของคุณเพื่อเริ่มต้น
You are helping me create agent files for BALIA OS,
a multi-agent AI OS built on OpenClaw.
Attached:
1. My Team Design Document (from Section 2)
Read it before generating anything.
Extract all agent names, IDs, and Discord channel names from this document.
ARCHITECTURE:
1. I am the CEO. I command each agent directly. No orchestrator.
2. OpenClaw auto-injects SOUL.md, AGENTS.md, IDENTITY.md at every
session start. Do not write "read yourself" instructions in them.
3. SPEC_[NAME].md is NOT auto-injected. Add to AGENTS.md Session Start:
"Read SPEC_[AGENTNAME].md for full role detail"
4. Every agent has a cassette system:
cassettes/ACTIVE_MODE.txt: one word, the active mode
cassettes/[mode]/SKILL_[MODE].md
cassettes/[mode]/WORKFLOW_[MODE].md
cassettes/[mode]/LIVE_LEDGER_[MODE].md
cassettes/[mode]/KNOWLEDGE_[MODE].md
Mode folders are built in Section 6.
For now: create cassettes/ folder and empty ACTIVE_MODE.txt only.
5. CEO only has an identity/ folder:
identity/COMPANY_PROFILE.md
identity/PERSONAL_PROFILE.md
identity/VALUES.md
Generate these for the CEO agent only.
6. SOUL.md and AGENTS.md: under 400 words each (injected every session).
SPEC: can be detailed (read once per session).
7. LIVE_LEDGER and KNOWLEDGE rules (add to every SPEC under
"## Cassette System Rules"):
- Agent updates both files at every session end
- File structure: SUMMARY (top, always current) ->
PINNED (never delete) -> CURRENT or PATTERNS -> RECENT LOG
- When either file exceeds 800 lines:
move RECENT LOG to cassettes/[mode]/archive/
SUMMARY and PINNED always stay at the top
GENERATE FOR EACH AGENT:
====================================
FILE 1: SOUL.md
~/.opengoat/workspace-[agentid]/SOUL.md
Auto-injected every session. Under 400 words.
====================================
# SOUL.md — [Agent Name]
## Who You Are
[2-3 sentences: identity, personality, work approach]
## Tone
- [Rule 1]
- [Rule 2]
- [Rule 3]
- [Forbidden style]
## Hard Limits
- Never act outside defined role
- Never report complete without verifying the result
- Never take destructive action without Commander approval
- [1-2 role-specific limits]
## Current Mission
[1-2 sentences on current focus]
====================================
FILE 2: AGENTS.md
~/.opengoat/workspace-[agentid]/AGENTS.md
Auto-injected every session. Under 400 words.
====================================
# AGENTS.md — [Agent Name] Operating Procedures
## Session Start (Every session — this order)
1. Confirm identity from SOUL.md
2. Read SPEC_[AGENTNAME].md for role detail
3. Read cassettes/ACTIVE_MODE.txt — note the active mode
4. Load cassettes/[mode]/SKILL_[MODE].md
5. Load cassettes/[mode]/WORKFLOW_[MODE].md
6. Read cassettes/[mode]/LIVE_LEDGER_[MODE].md — resume from last session
7. Read cassettes/[mode]/KNOWLEDGE_[MODE].md — apply accumulated learning
8. Report to Discord: "🔷 [Name] ready. Mode: [mode]. [current task]"
(CEO only — after step 2, also read:
identity/COMPANY_PROFILE.md
identity/PERSONAL_PROFILE.md
identity/VALUES.md)
## Session End (Every session)
1. Update LIVE_LEDGER_[MODE].md:
- Refresh SUMMARY (3-5 line overview)
- Update CURRENT (today's progress, next task)
- Append to RECENT LOG
- If over 800 lines: move RECENT LOG to cassettes/[mode]/archive/
2. Update KNOWLEDGE_[MODE].md:
- Refresh SUMMARY
- Add new patterns to PATTERNS
- Append to RECENT
- If over 800 lines: move RECENT to cassettes/[mode]/archive/
3. Report to Discord: "✅ [Name] session complete. [summary]"
## Reporting
- Channel: #[discord-channel]
- Command: python $BALIA_OS_PATH/scripts/discord_send.py
DISCORD_WEBHOOK_[NAME] "message"
(BALIA_OS_PATH is set in the .env file from Section 3)
- HTTP 204 = success. Else = report failure immediately.
- Format: Conclusion -> Detail -> Next recommended action
- Report at: session start / task complete / error / session end
## Error Handling
1. Check KNOWLEDGE_[MODE].md for similar past cases
2. Unresolved -> report full detail to Commander
3. No destructive retries without Commander approval
## Hard Rules
- Verify before reporting complete
- No actions outside defined role
- No destructive operations without Commander approval
====================================
FILE 3: IDENTITY.md
~/.opengoat/workspace-[agentid]/IDENTITY.md
Auto-injected. Facts only, keep short.
====================================
# IDENTITY.md
Name: [Agent Name]
Agent ID: [agentid-lowercase]
Role: [Role Title]
Department: BALIA OS Team
Reports To: Commander (directly)
Discord: #[channel name]
====================================
FILE 4: SPEC_[AGENTNAME].md
~/.opengoat/workspace-[agentid]/SPEC_[AGENTNAME].md
Not auto-injected. Read once per session via AGENTS.md.
====================================
# SPEC_[AGENTNAME] v1.0 — [Agent Name] ([Role])
Last Updated: [today]
## 1. Role
[2-3 sentences]
## 2. Responsibilities
[Bullet list from Team Design Document]
## 3. What This Agent Does NOT Do
[Clear boundaries]
## 4. Current Phase Mission
[Current focus]
## 5. Key Paths
- Workspace: ~/.opengoat/workspace-[agentid]/
- Discord webhook: DISCORD_WEBHOOK_[NAME]
- Cassettes: ~/.opengoat/workspace-[agentid]/cassettes/
## 6. Cassette System Rules
- Read ACTIVE_MODE.txt at every session start
- Load SKILL, WORKFLOW, LIVE_LEDGER, KNOWLEDGE for the active mode
- Update LIVE_LEDGER and KNOWLEDGE at every session end
- LIVE_LEDGER structure: SUMMARY -> PINNED -> CURRENT -> RECENT LOG
- KNOWLEDGE structure: SUMMARY -> PINNED -> PATTERNS -> RECENT
- Either file over 800 lines:
move RECENT to cassettes/[mode]/archive/
SUMMARY and PINNED always remain
## Skill Loading Rules
- Never load all skills simultaneously (prevents token exhaustion)
- At the start of each task, check skills/_SKILL_INDEX.md
- Load only skills/{skill-name}/SKILL.md required for the current task
- Release loaded skills after task completion
- Security Agent is the only agent authorized to add skills to skills/ folder
## 7. Change Log
| Version | Date | Changes |
|---------|------|---------|
| v1.0 | [today] | Initial creation |
====================================
CEO ONLY — FILES 5, 6, 7: identity/ folder
Ask these 3 questions one at a time before generating.
====================================
Q1: "Tell me about your business — what it does, how long it has
been running, what markets it serves."
Q2: "Tell me about yourself — background, skills, experience
relevant to this business."
Q3: "How do you make decisions? What values guide you?
What thinking styles or perspectives do you wish you had more of?"
After all 3 answers, generate:
COMPANY_PROFILE.md — Q1 content, structured
PERSONAL_PROFILE.md — Q2 content, structured
VALUES.md — Q3 content, structured
Location: ~/.opengoat/workspace-ceo/identity/
The more detail provided here, the more the CEO thinks and
decides like the owner.
====================================
HOW TO PROCEED:
- Start with Agent #1 (not CEO)
- Show all files completely, no truncation
- Show exact save paths after each agent
- Ask: "Ready for the next agent?" and wait for confirmation
- When you reach CEO: ask the 3 identity questions first,
then generate 4 core files + 3 identity files
- End with a summary table of all files createdขั้นตอนที่ 2 — บันทึกแต่ละไฟล์ใน VS Code
สำหร���บแต่ละ agent:
เปิด workspace:
code ~/.opengoat/workspace-[agentid]คลิกขวาที่แผงด้านซ้าย -> New File -> วางเนื้อหา -> บันทึก
สร้างโฟลเดอร์ cassettes:
Windows:
mkdir C:\Users\%USERNAME%\.opengoat\workspace-[agentid]\cassettes
mkdir C:\Users\%USERNAME%\.opengoat\workspace-[agentid]\cassettes\archiveMac:
mkdir -p ~/.opengoat/workspace-[agentid]/cassettes/archive- สร้างไฟล์
ACTIVE_MODE.txtเปล่าไว้ในโฟลเดอร์ cassettes (ทิ้งไว้ว่าง — จะกรอกข้อมูลใน Section 6)
เฉพาะ CEO — สร้างโฟลเดอร์ identity:
Windows: mkdir C:\Users\%USERNAME%\.opengoat\workspace-ceo\identity
Mac: mkdir ~/.opengoat/workspace-ceo/identity
ขั้นตอนที่ 3 — ตรวจสอบก่อนดำเนินการกับ agent ถัดไป
เปิด AGENTS.md ดูว่าส่วน Session Start มีครบทั้ง 8 ขั้นตอน รวมถึง ACTIVE_MODE.txt, LIVE_LEDGER และ KNOWLEDGE หรือไม่
ครบ -> ดำเนินการต่อได้ ไม่ครบ -> ขอให้ AI แก้ไขก่อน
เมื่อส่วนนี้เสร็จสมบูรณ์
workspace ของแต่ละ agent:
INFO
workspace-[agentid]/ ├── SOUL.md ✅ ├── AGENTS.md ✅ ├── IDENTITY.md ✅ ├── SPEC_[NAME].md ✅ └── cassettes/ ├── ACTIVE_MODE.txt ✅ (ว่างเปล่า — กรอกข้อมูลใน Section 6) └── archive/ ✅ (ว่างเปล่า — ใช้เมื่อถึง 800 บรรทัด)
CEO มีเพิ่มเติม:
INFO
workspace-ceo/ └── identity/ ├── COMPANY_PROFILE.md ✅ ├── PERSONAL_PROFILE.md ✅ └── VALUES.md ✅
ดำเนินการต่อที่ Section 5 เพื่อเปิดตัวทีมของคุณ
ติดตั้ง Security Agent
ไฟล์เอเจนต์ของคุณเสร็จสมบูรณ์แล้ว
ยังมีเอเจนต์อีกตัวใน BALIA OS: Security Agent (security)
เอเจนต์นี้ถูกกำหนดค่าล่วงหน้าโดย BALIA ห้ามเปลี่ยนชื่อ บุคลิก หรือเส้นทาง เพราะจะทำให้การเชื่อมต่อกับเอเจนต์อื่นเสียหาย
ดาวน์โหลดและรันตัวติดตั้ง
ขั้นตอนที่ 1 — ดาวน์โหลดตัวติดตั้ง
ในเทอร์มินัล VS Code ของคุณ:
Windows:
powershell
Invoke-WebRequest -Uri "https://balia-os-guide.vercel.app/scripts/install_core_pack.py" -OutFile install_core_pack.pyID ตัวแทนของคุณคือค่าของ
AGENT_IDในไฟล์.envของคุณ token จะถูกอ่านโดยอัตโนมัติจากBALIA_TOKENในไฟล์.envของคุณ
Mac / Linux:
bash
curl -o install_core_pack.py https://balia-os-guide.vercel.app/scripts/install_core_pack.pyขั้นตอนที่ 2 — ให้เอเจนต์รันตัวติดตั้ง
openclaw agent --agent [รหัสเอเจนต์ของคุณ] "กรุณารันคำสั่งต่อไปนี้:
python install_core_pack.py --lang th
(The token will be read automatically from your .env file)
รายงานไปยัง Discord เมื่อเสร็จสิ้น"เอเจนต์จะดำเนินการโดยอัตโนมัติ:
- ยืนยันโทเค็นของคุณ
- ดาวน์โหลดไฟล์ Security Agent
- ติดตั้งไปที่ ~/.opengoat/agents/security/
- รายงาน "ติดตั้ง Security Agent สำเร็จ" ไปยัง Discord
⚠️ สำคัญ: ห้ามเปลี่ยน ID ชื่อ หรือเส้นทางโฟลเดอร์ของ Security Agent ไฟล์การกำหนดค่าอื่นๆ อ้างอิงเอเจนต์นี้โดยตรง การเปลี่ยนแปลงจะทำให้ระบบกักกัน skill เสียหาย
เมื่อได้รับการยืนยันจาก Discord แล้ว ไปยังส่วนที่ 5