๐Ÿ“ Workspace Anatomy

File hierarchy, what each file does, and how agents inherit configuration.

Profile Directory

Root of the OpenClaw installation: C:\Users\AI\.openclaw\

๐Ÿ“ .openclaw/ โ”œโ”€โ”€ openclaw.json โ† Main gateway config (providers, models, agents, plugins) โ”œโ”€โ”€ workspace/ โ† Shared workspace (loaded every session) โ”œโ”€โ”€ agents/ โ† Per-agent session transcripts & workspaces (29 agents) โ”‚ โ”œโ”€โ”€ main/ โ† Primary Clio session โ”‚ โ”œโ”€โ”€ superstarsaledev/ โ”‚ โ”œโ”€โ”€ superstarsalemarketing/ โ”‚ โ”œโ”€โ”€ headquartersdev/ โ”‚ โ”œโ”€โ”€ surroundshowdev/ โ”‚ โ”œโ”€โ”€ almightydollardev/ โ”‚ โ”œโ”€โ”€ cursor/ โ† Cursor code harness โ”‚ โ”œโ”€โ”€ codex/ โ† Codex vision harness โ”‚ โ””โ”€โ”€ ... 21 more agent workspaces โ””โ”€โ”€ plugin-skills/ โ† Installed plugin skills

Workspace Files

Located in C:\Users\AI\.openclaw\workspace\ โ€” loaded by agents every session.

๐Ÿ“ workspace/ โ”œโ”€โ”€ AGENTS.md โ† Agent instructions, routing rules, conventions โ”œโ”€โ”€ SOUL.md โ† Persona/tone definition โ”œโ”€โ”€ USER.md โ† Info about the human (Mike) โ”œโ”€โ”€ MEMORY.md โ† Curated long-term memory (MAIN session only!) โ”œโ”€โ”€ IDENTITY.md โ† Agent name, avatar, vibe โ”œโ”€โ”€ TOOLS.md โ† Environment-specific tool notes & integration configs โ”œโ”€โ”€ HEARTBEAT.md โ† Periodic check tasks (empty = skip heartbeat) โ”œโ”€โ”€ CAPABILITIES.md โ† Full list of agent capabilities โ”œโ”€โ”€ memory/ โ† Daily journals + dreaming cycle โ”‚ โ”œโ”€โ”€ 2026-06-30.md ... 2026-07-29.md โ”‚ โ””โ”€โ”€ dreaming/ โ† Automated memory consolidation โ”‚ โ”œโ”€โ”€ light/ โ† Extracts candidates from sessions โ”‚ โ”œโ”€โ”€ rem/ โ† Consolidates across sessions โ”‚ โ””โ”€โ”€ deep/ โ† Promotes to MEMORY.md โ”œโ”€โ”€ scripts/ โ† Shared scripts โ”‚ โ”œโ”€โ”€ update-crm-status.sh โ† Push status to CRM โ”‚ โ”œโ”€โ”€ update-status-html.sh โ† Generate static status HTML โ”‚ โ”œโ”€โ”€ update-agent-status.sh โ† Push status to GitHub Projects โ”‚ โ”œโ”€โ”€ github-publish-md.sh โ† Publish markdown to GitHub โ”‚ โ””โ”€โ”€ generate-status-html.js โ† Status page generator โ”œโ”€โ”€ skills/ โ† Custom skills โ”‚ โ”œโ”€โ”€ browse/ โ† Browser automation (stagehand CLI) โ”‚ โ”œโ”€โ”€ clawbrowser/ โ† Playwright CLI browser control โ”‚ โ”œโ”€โ”€ cursor-agent/ โ† Cursor harness wrapper โ”‚ โ”œโ”€โ”€ cursor-bridge/ โ† Cursor bridge utilities โ”‚ โ””โ”€โ”€ youtube-transcript/ โ† YouTube transcript fetcher โ”œโ”€โ”€ templates/ โ† Workflow templates โ”‚ โ”œโ”€โ”€ agents-workflow.md โ† Universal dev workflow rules โ”‚ โ”œโ”€โ”€ PULL_REQUEST_TEMPLATE.md โ”‚ โ””โ”€โ”€ convex-deploy-workflow.yml โ”œโ”€โ”€ docs/ โ† Agent guides (group-chat, heartbeat, posting images, etc.) โ”œโ”€โ”€ .env.github โ† GitHub credentials โ”œโ”€โ”€ .env.vercel โ† Vercel token โ”œโ”€โ”€ .env.facebook โ† Facebook Ads API config โ”œโ”€โ”€ .env.convex โ† Convex deploy keys (CRM + linkall apps) โ”œโ”€โ”€ .env.convex-surroundshow โ”œโ”€โ”€ .env.convex-funfirst โ”œโ”€โ”€ .env.convex-redwave โ”œโ”€โ”€ facebook-ads-wrapper.js โ””โ”€โ”€ heartbeat-state.json โ† Last check timestamps

File Reference

AGENTS.md

The primary instruction file. Loaded every session. Contains routing rules, coding conventions, deployment instructions, status update procedures, shell guidelines, and safety rules. Every agent workspace has its own AGENTS.md.

SOUL.md

Persona and tone definition. Defines how the agent communicates โ€” opinions, resourcefulness, boundaries, vibe.

USER.md

Info about the human being served. Name, timezone, preferences, current projects.

MEMORY.md

Curated long-term memory. Distilled from daily journals over time.

๐Ÿ”’ Security: Only loaded in MAIN session (direct chat). Never loaded in shared contexts (Discord, group chats). Contains personal context that shouldn't leak.

IDENTITY.md

Agent name, creature description, vibe, emoji, avatar path.

TOOLS.md

Environment-specific tool notes โ€” active integrations, command references, capability status. Updated when new integrations are added.

HEARTBEAT.md

Periodic check tasks. Empty or comment-only = skip heartbeat API calls (saves tokens). Add tasks here for batched periodic checks.

Agent Workspaces

Each agent under .openclaw/agents/<name>/workspace/ (or /agent/ for harnesses) has its own AGENTS.md with the same structure. These inherit the shared workspace but can override instructions per-agent.

29 agent workspaces currently exist, covering dev + marketing pairs for each brand plus cursor/codex harnesses and the main session.

Environment Files

FileContentsUsed By
.env.githubGITHUB_TOKEN, GITHUB_USERAll scripts
.env.vercelVERCEL_TOKENDeploy commands
.env.facebookFacebook Ads API credentialsfacebook-ads-wrapper.js
.env.convexConvex deploy key (CRM prod)CRM deploys
.env.convex-surroundshowConvex deploy key (SurroundShow dev)linkall monorepo deploys
.env.convex-funfirstConvex deploy key (FunFirst dev)linkall monorepo deploys
.env.convex-redwaveConvex deploy key (RedWave dev)linkall monorepo deploys
Never commit env files. They contain secrets. All are in the workspace (gitignored) not in repos.