| name | memory-read |
| description | Read memories from persistent storage using the file system |
| metadata | {"CARNELIAN":{"emoji":"📖"},"carnelian":{"runtime":"node","version":"1.0.0","sandbox":{"network":"none","resourceLimits":{"maxMemoryMB":64,"maxCpuPercent":10,"timeoutSecs":10}},"capabilities":["fs.read"]}} |
memory-read
Read memories from persistent storage using the file system.
Ported from CARNELIAN memory-tool.ts.
Input
{
path: string;
from?: number;
lines?: number;
}
Output
{
path: string;
text: string;
}
Notes
- Path is relative to the agent's memory directory (
CARNELIAN_MEMORY_DIR or current working directory)
from is 1-indexed (first line is 1, not 0)
- If
from and lines are specified, only that range is returned
- No network access required (sandbox network: none)
- Uses
fs.readFile exposed in the node sandbox
Example
Read full file:
{
"path": "notes/meeting.txt"
}
Read lines 10-20:
{
"path": "notes/meeting.txt",
"from": 10,
"lines": 11
}