# Agent Workspace Documentation

## Overview
The agent workspace functions as the agent's primary working directory for file operations and contextual memory. It's distinct from `~/.openclaw/`, which handles configuration, credentials, and sessions.

## Key Points

**Location & Configuration**
The default workspace resides at `~/.openclaw/workspace`. Users can customize this path via the `openclaw.json` configuration file or by setting the `OPENCLAW_PROFILE` environment variable.

**Important Security Note**
The workspace isn't a hard sandbox by default. While tools resolve relative paths within it, absolute paths can access other host directories unless sandboxing is explicitly enabled through `agents.defaults.sandbox`.

**Standard Files**
The workspace contains several bootstrap files including:
- `AGENTS.md` - operating guidelines and behavioral rules
- `SOUL.md` - persona and boundaries
- `USER.md` - user identification details
- `IDENTITY.md` - agent name and identity markers
- `memory/` directory - daily logs organized by date

## Backup Strategy

Documentation recommends maintaining a **private git repository** for workspace backup. Critical reminders include:

Even in a private repo, avoid storing secrets in the workspace: API keys, OAuth tokens, passwords, or private credentials.

This protective measure ensures sensitive information remains separate from version control while preserving essential memory structures through regular commits.
