Scratchpad
A temporary workspace for reasoning, planning, and intermediate computations. Session-bound and cleared on agent restart.
Use Cases
- Chain-of-thought reasoning: Step-by-step problem solving
- Planning: Task decomposition and sequencing
- Scratch calculations: Temporary math or data transformation
- Draft responses: Iterative response refinement
API
# Write to scratchpad
mem.scratchpad_write(content="Step 1: Parse the user's request...")
# Read current scratchpad entries
entries = mem.scratchpad_read()
# Clear scratchpad
mem.scratchpad_clear()
Schema
| Column | Type | Description |
|---|---|---|
id | TEXT | UUIDv4 primary key |
content | TEXT | Scratchpad entry content |
session_id | TEXT | Session binding (default: 'default') |
created_at | TIMESTAMP | Row creation time |
updated_at | TIMESTAMP | Last update time |
Lifecycle
flowchart LR A[Agent Start] -->|create| SP[Scratchpad] SP -->|write/read| SP SP -->|clear| DEL[Discard] A -->|shutdown| DEL
Configuration
| Parameter | Default | Description |
|---|---|---|
MNEMOSYNE_SP_MAX | 1000 | Maximum entries per session |
Not Persistent
Scratchpad contents are session-bound and lost on agent restart. Do not store critical information solely in the scratchpad. Move important data to Working Memory via mem.remember() before shutting down.
Related Pages
Working Memory
Explore Mnemosyne's Working Memory tier: a short-term, high-speed buffer for the most recent agent o...
BEAM Architecture
Overview of BEAM (Biological-inspired Episodic-Associative Memory), Mnemosyne's four-tier architectu...
First Steps
Learn the fundamentals of Mnemosyne after installation: storing memories, querying, understanding th...
Mnemosyne