Overview
PicoClaw stores all agent data in a workspace directory. By default, this is~/.picoclaw/workspace, but you can customize it.
Workspace Location
Configuration
Set workspace path inconfig.json:
Environment Variable
Override workspace location:Using PICOCLAW_HOME
Set the root directory for all PicoClaw data:/opt/picoclaw/config.json(if you also setPICOCLAW_CONFIG)/opt/picoclaw/workspace/(default workspace)
Directory Structure
Directory Descriptions
sessions/
Purpose: Stores conversation history for each session. Structure:- Message history
- Tool usage logs
- Session metadata
memory/
Purpose: Long-term memory storage for the agent. File:memory/MEMORY.md
The agent uses this to remember:
- Important user preferences
- Past interactions and learnings
- Context across sessions
state/
Purpose: Persistent state data. Files:state/last_channel.txt- Last used communication channelstate/*.json- Other state data
cron/
Purpose: Scheduled jobs database. Structure:- Schedule (cron expression or interval)
- Task description
- Execution history
skills/
Purpose: User-defined custom skills. Structure:Configuration Files
AGENTS.md
Purpose: Define agent behavior guidelines. Example:HEARTBEAT.md
Purpose: Define periodic tasks the agent should perform. Example:IDENTITY.md
Purpose: Define agent identity and personality. Example:SOUL.md
Purpose: Define core values and principles. Example:TOOLS.md
Purpose: Document available tools and their usage. Example:USER.md
Purpose: Store user preferences and context. Example:Workspace Security
Restrict to Workspace
By default, agents can only access files within the workspace:- Reading
/etc/passwd - Writing to
/usr/bin - Executing commands outside workspace
Allow Specific Paths
Grant access to specific paths outside workspace:Multiple Workspaces
You can use different workspaces for different purposes:- Conversation history
- Memory
- Cron jobs
- Skills
Backup and Migration
Backup Workspace
Restore Workspace
Migrate to New Location
Cleanup and Maintenance
Clear Session History
Clear Memory
Clear Cron Jobs
Best Practices
- Regular backups - Backup workspace weekly
- Separate workspaces - Use different workspaces for different contexts
- Keep workspace secure - Use
restrict_to_workspace: true - Document preferences - Keep USER.md and AGENTS.md updated
- Clean old sessions - Remove old conversation history periodically