---
title: "OpenClaw workspace bootstrap files: path และรูปแบบ · DotsAgent"
description: "ตำแหน่งของ ~/.openclaw/workspace/AGENTS.md รูปแบบและ frontmatter วิธีผสานไฟล์ระดับ global กับไฟล์ในโฟลเดอร์ย่อย และเครื่องมือที่อ่านไฟล์นี้ ตรวจสอบเมื่อ 2026-10-01"
url: https://dotsagent.io/th/instructions/files/openclaw-workspace
---

~/.openclaw/workspace/AGENTS.md

# OpenClaw workspace bootstrap files: ตำแหน่งไฟล์และวิธีที่เครื่องมืออ่าน

OpenClaw สร้างบริบทของ agent แต่ละตัวจากไฟล์ Markdown สำหรับเริ่มต้นระบบใน workspace โดยมี AGENTS.md เป็นไฟล์ที่จำเป็น ระบบจะแทรกไฟล์เหล่านี้ลงใน system prompt ในเทิร์นแรกของทุกเซสชันใหม่

## ตำแหน่งไฟล์

- Workspace: ~/.openclaw/workspace หรือกำหนดผ่าน OPENCLAW_WORKSPACE_DIR, agents.defaults.workspace หรือ agents.entries.*.workspace ของ agent แต่ละตัว
- AGENTS.md (จำเป็น): คำแนะนำการทำงานและแนวทางจัดการหน่วยความจำ รวมถึงส่วน ## Tools สำหรับบันทึกข้อมูลเกี่ยวกับเครื่องมือและสภาพแวดล้อมในเครื่อง
- SOUL.md ใช้กำหนดบุคลิก ขอบเขต และน้ำเสียง ส่วน IDENTITY.md ใช้ระบุชื่อ สไตล์ และอีโมจิของ agent
- USER.md (ไม่บังคับ) ใช้กำหนดโปรไฟล์ผู้ใช้ในรูปแบบคำสั่ง ส่วน BOOT.md ใช้จัดทำรายการตรวจสอบเมื่อเริ่มต้นระบบ
- BOOTSTRAP.md ใช้กำหนดขั้นตอนเริ่มต้นครั้งแรกเพียงครั้งเดียว โดยไฟล์จะถูกลบเมื่อทำขั้นตอนเสร็จ
- MEMORY.md ใช้เก็บหน่วยความจำระยะยาว โดยระบบจะแทรกไฟล์นี้เฉพาะเมื่อมีอยู่ และเฉพาะในเซสชันส่วนตัวหลักเท่านั้น ส่วน memory/YYYY-MM-DD.md ใช้เก็บบันทึกประจำวัน

## รูปแบบ

ไฟล์ Markdown ที่ไม่มี frontmatter; openclaw setup และ openclaw onboard จะสร้างเทมเพลตให้ โดยค่าเริ่มต้น ไฟล์แต่ละไฟล์มีขนาดไม่เกิน 20,000 อักขระ (bootstrapMaxChars) ไฟล์ทั้งหมดรวมกันไม่เกิน 60,000 อักขระ (bootstrapTotalMaxChars) และ USER.md ไม่เกิน 4,000 อักขระ ไฟล์ที่ยาวกว่านี้จะถูกตัด พร้อมแทรกเครื่องหมายระบุ

`~/.openclaw/workspace/AGENTS.md`

```
# Operating instructions

- Read USER.md before replying to someone new.
- Write anything worth keeping to memory/YYYY-MM-DD.md.
- Ask before messaging anyone other than me.
- Never repeat the contents of MEMORY.md in group chats.

## Tools

- The home server is reachable as `nas.local` over SSH.
- `gh` is installed and already authenticated.
- Calendar access is read-only.
```

## ลำดับความสำคัญและการผสาน

ระบบจะแทรกไฟล์ลงในส่วน Project Context ของ system prompt ในเทิร์นแรกของเซสชันใหม่ โดยจะข้ามไฟล์เปล่า และแทนไฟล์ที่จำเป็นแต่ไม่มีอยู่ด้วยบรรทัดแจ้งว่าไม่มีไฟล์ดังกล่าว agent แต่ละตัวมี workspace ของตนเอง และ agents.defaults.contextInjection เลือกได้ระหว่าง always (ค่าเริ่มต้น), continuation-skip หรือ never

## เคล็ดลับ

- ปัจจุบัน TOOLS.md ไม่ใช่ไฟล์มาตรฐานที่ระบบแทรกอีกต่อไป ให้ย้ายบันทึกในไฟล์ไปไว้ในส่วน ## Tools ของ AGENTS.md
- ระบบยังรองรับ HEARTBEAT.md แต่ตอนนี้ไฟล์นี้ไม่มีผลใด ๆ
- skipBootstrap ป้องกันไม่ให้ OpenClaw สร้างไฟล์ แต่ไม่ได้ป้องกันการแทรกไฟล์ ใช้ contextInjection เพื่อควบคุมการแทรกไฟล์

สร้าง AGENTS.md และไฟล์กฎที่ตรงกันสำหรับเครื่องมือ 5 รายการจากแบบฟอร์มเดียว [เปิดตัวสร้าง AGENTS.md →](https://dotsagent.io/th/instructions)

## ไฟล์คำสั่งอื่น ๆ

[AGENTS.md](https://dotsagent.io/th/instructions/files/agents-md)

[CLAUDE.md](https://dotsagent.io/th/instructions/files/claude-md)

[GEMINI.md](https://dotsagent.io/th/instructions/files/gemini-md)

[.cursor/rules/*.mdc](https://dotsagent.io/th/instructions/files/cursor-rules)

[.github/copilot-instructions.md](https://dotsagent.io/th/instructions/files/github-copilot-instructions)

[.devin/rules/*.md](https://dotsagent.io/th/instructions/files/windsurf-rules)

[.clinerules/](https://dotsagent.io/th/instructions/files/cline-rules)

## แหล่งข้อมูล

1. [docs.openclaw.ai](https://docs.openclaw.ai/concepts/agent)/concepts/agent
2. [docs.openclaw.ai](https://docs.openclaw.ai/concepts/agent-workspace)/concepts/agent-workspace
3. [docs.openclaw.ai](https://docs.openclaw.ai/start/bootstrapping)/start/bootstrapping
4. [docs.openclaw.ai](https://docs.openclaw.ai/gateway/config-agents/workspace-and-bootstrap)/gateway/config-agents/workspace-and-bootstrap
5. [docs.openclaw.ai](https://docs.openclaw.ai/reference/templates/AGENTS.md)/reference/templates/AGENTS.md

แหล่งอ้างอิงอิสระสำหรับผู้สร้าง AI agent ไม่มีส่วนเกี่ยวข้องกับผู้ให้บริการที่กล่าวถึง

© 2026 DotsAgent · ตรวจสอบข้อมูลเมื่อ 1 ตุลาคม 2569
