Skip to content

Memory & Persistence

Your agent has both short-term and long-term memory. Understanding how these work helps you get the most out of your agent.

During a conversation, your agent maintains context in session files stored at /data/sessions/. Each session is a JSONL file containing:

  • Your messages
  • Agent responses
  • Tool calls and results
  • Usage statistics

Sessions persist across turns within a conversation. When you send a message, the agent continues from where you left off.

CommandEffect
/clearStart a new session (old ones preserved)
/resumeList recent sessions with hashes
/resume abc1Resume a specific session by hash
/compactCompress session to save tokens

Each model has a context window limit (currently 200k tokens for all Claude models). When your session approaches the limit, use /compact to summarize older messages and free up space.

/data/MEMORY.md is your agent’s persistent memory. It survives:

  • Session changes
  • /clear commands
  • Platform updates
  • Channel switches

The default MEMORY.md includes:

# agentname — Agent Memory
## Identity
- Email: agentname@tinyfat.com
- Owner: you@example.com
## Email Response Pattern
[How to send emails via /data/outbox/email/]
## Rules
[Default behavior rules]

Ask your agent to edit its memory:

“Add to your memory that I prefer concise responses”

Or:

“Show me your MEMORY.md file”

Then tell it what to change.

Agent preferences like model selection are stored in /data/config.json:

{
"model": "sonnet"
}

The default model is claude-sonnet-4-6. Change it with /model haiku or /model sonnet, or just ask your agent to switch.

All channels (Email, Telegram, Slack) share the same:

  • MEMORY.md — Persistent memory
  • Sessions — Conversation history
  • Storage/data directory

Start a conversation on email, continue on Telegram. Your agent remembers everything.

All agent data lives in R2 storage:

agents/{agent_id}/
├── MEMORY.md # Long-term memory
├── config.json # Preferences
├── sessions/
│ └── {id}.jsonl # Session files
├── outbox/
│ ├── email/ # Pending emails
│ ├── sent/ # Sent emails
│ └── failed/ # Failed emails
└── events/
└── {name}/ # Scheduled events

Each agent has isolated storage — agents can’t see each other’s data.

When your session gets large, use /compact to reduce token usage:

  1. The agent summarizes the conversation history
  2. Old messages are replaced with the summary
  3. Recent messages are preserved
  4. You continue with full context of what happened
/compact focus on the code changes we discussed

Tells the agent what to prioritize in the summary.

Your data is yours:

  1. View anytime — Ask your agent to show files
  2. Export — Download from R2 (contact support)
  3. Self-host — Run your own instance with troublemaker

We don’t lock you in.

  • Persistent preferences
  • Project context that spans sessions
  • Standing instructions
  • Important information to always remember
  • Active conversations
  • Work in progress
  • Temporary context

Don’t dump everything in MEMORY.md. It’s read every turn, so keep it concise and relevant.