무엇을 만드는가
각 에이전트가 올바르게 작동하려면 일련의 파일이 필요합니다. OpenClaw는 세션 시작 시 핵심 파일을 자동으로 읽습니다. cassette 파일은 각 에이전트에게 작업 영역과 이전 세션에서 이어서 작업할 수 있는 메모리를 제공합니다.
핵심 파일 — 매 세션마다 OpenClaw가 자동으로 불러옴:
| 파일 | 용도 |
|---|---|
SOUL.md | 성격, 말투, 절대 제한 사항, 미션 — 400단어 이내 |
AGENTS.md | 운영 규칙, 보고 절차 — 400단어 이내 |
IDENTITY.md | 이름, 역할, 보고 대상 — 사실만 간략하게 |
역할 상세 파일 — AGENTS.md 지시에 따라 세션당 한 번 읽음:
| 파일 | 용도 |
|---|---|
SPEC_[NAME].md | 상세 역할, 책임, cassette 시스템 규칙 |
Cassette 파일 — 핵심 파일 이후 세션 시작 시 읽음:
| 파일 | 용도 |
|---|---|
cassettes/ACTIVE_MODE.txt | 단어 하나: 현재 활성 모드 이름 |
cassettes/[mode]/SKILL_[MODE].md | 이 모드에서 에이전트가 할 수 있는 것 |
cassettes/[mode]/WORKFLOW_[MODE].md | 이 모드의 단계별 절차 |
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 구조 — 모든 에이전트:
INFO
~/.openclaw/workspace-[agentid]/ ├── SOUL.md ├── AGENTS.md ├── IDENTITY.md ├── SPEC_[NAME].md └── cassettes/ ├── ACTIVE_MODE.txt ← 지금 생성, 섹션 6에서 채움 └── archive/ ← LIVE_LEDGER와 KNOWLEDGE 초과분 저장
CEO workspace — identity 폴더 추가:
INFO
~/.openclaw/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/
cassette 모드 폴더(SKILL, WORKFLOW, LIVE_LEDGER, KNOWLEDGE)는 섹션 6에서 첫 번째 cassette를 만들 때 생성됩니다.
이 섹션의 진행 방식 — 두 파트
이 섹션은 두 파트로 구성됩니다. 순서대로 완료하세요:
파트 1 — Discord 설정 (아래 프롬프트) Discord 서버, 채널을 만들고 각 에이전트의 Webhook URL을 받으세요. 약 10분이 소요됩니다.
파트 2 — 에이전트 파일 (다음 프롬프트) 팀 설계 문서를 사용하여 실제 에이전트 파일을 생성하세요. 완성된 파일을 VS Code에 붙여넣으세요.
지금 파트 1부터 시작하세요.
Discord Webhook URL — 먼저 준비하기
각 에이전트는 Webhook URL을 통해 자신의 Discord 채널에 보고합니다. AGENTS.md 파일을 작성하기 전에 이 URL이 필요합니다.
▶ 이것을 AI에 붙여넣어 시작하세요
전송 전에 팀 설계 문서를 첨부하세요.
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.이 섹션의 진행 방식
아래 프롬프트를 Claude, ChatGPT, 또는 Gemini에 붙여넣고 두 파일을 첨부하세요:
- 섹션 2에서 작성한 팀 설계 문서
AI가 에이전트별로 모든 파일을 하나씩 생성하며, 다음으로 넘어가기 전에 확인을 요청합니다.
▶ 이것을 AI에 붙여넣어 시작하세요
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
~/.openclaw/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
~/.openclaw/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
~/.openclaw/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
~/.openclaw/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: ~/.openclaw/workspace-[agentid]/
- Discord webhook: DISCORD_WEBHOOK_[NAME]
- Cassettes: ~/.openclaw/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: ~/.openclaw/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 created2단계 — VS Code에서 각 파일 저장하기
각 에이전트에 대해:
workspace 열기:
code ~/.openclaw/workspace-[agentid]왼쪽 패널에서 우클릭 -> New File -> 내용 붙여넣기 -> 저장
cassettes 폴더 생성:
Windows:
mkdir C:\Users\%USERNAME%\.openclaw\workspace-[agentid]\cassettes
mkdir C:\Users\%USERNAME%\.openclaw\workspace-[agentid]\cassettes\archiveMac:
mkdir -p ~/.openclaw/workspace-[agentid]/cassettes/archive- cassettes 안에 빈
ACTIVE_MODE.txt생성 (비워두기 — 섹션 6에서 채움)
CEO 전용 — identity 폴더 생성:
Windows: mkdir C:\Users\%USERNAME%\.openclaw\workspace-ceo\identity
Mac: mkdir ~/.openclaw/workspace-ceo/identity
3단계 — 다음 에이전트로 넘어가기 전 확인
AGENTS.md를 열어보세요. Session Start 섹션에 ACTIVE_MODE.txt, LIVE_LEDGER, KNOWLEDGE를 포함한 8개 단계가 모두 나열되어 있나요?
예 -> 계속 진행. 아니오 -> AI에게 먼저 수정을 요청하세요.
이 섹션이 완료되면
각 에이전트의 workspace:
INFO
workspace-[agentid]/ ├── SOUL.md ✅ ├── AGENTS.md ✅ ├── IDENTITY.md ✅ ├── SPEC_[NAME].md ✅ └── cassettes/ ├── ACTIVE_MODE.txt ✅ (비어있음 — 섹션 6에서 채움) └── archive/ ✅ (비어있음 — 800줄 초과 시 사용)
CEO 추가 항목:
INFO
workspace-ceo/ └── identity/ ├── COMPANY_PROFILE.md ✅ ├── PERSONAL_PROFILE.md ✅ └── VALUES.md ✅
섹션 5로 넘어가서 팀을 시작하세요.
보안 에이전트 배포하기
에이전트 파일 설정이 완료되었습니다.
BALIA OS에는 에이전트가 하나 더 있습니다: **보안 에이전트(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.py에이전트 ID는
.env파일의AGENT_ID값입니다. 토큰은.env파일의BALIA_TOKEN에서 자동으로 읽혀집니다.
Mac / Linux:
bash
curl -o install_core_pack.py https://balia-os-guide.vercel.app/scripts/install_core_pack.py2단계 — 에이전트에게 실행 지시
openclaw agent --agent [에이전트-ID] "다음을 실행해 주세요:
python install_core_pack.py --lang ko
(The token will be read automatically from your .env file)
완료되면 Discord에 보고해 주세요."에이전트가 자율적으로:
- 토큰 인증
- 보안 에이전트 파일 다운로드
- ~/.opengoat/agents/security/ 에 배포
- Discord에 "보안 에이전트 배포 완료" 보고
를 수행합니다.
⚠️ 중요: 보안 에이전트의 ID, 이름, 폴더 경로를 변경하지 마세요. 다른 설정 파일이 이 에이전트를 직접 참조합니다. 변경하면 스킬 격리 시스템이 손상됩니다.
Discord 확인 메시지를 받으면 섹션 5로 넘어가세요.