Memory and deleting data
Memory is files under /workspace/memories, kept between tasks for one
owner, project, and environment. It exists only when the task has an
owner, and loads only into that
owner’s tasks.
You need: CLI 0.52.0 or later, logged in as an owner or admin.
Make the agent remember
The first 200 lines (at most 25 KB) of /workspace/memories/MEMORY.md load
into every prompt; other files load only when the agent opens them. Keep it an index:
## Memory
/workspace/memories/MEMORY.md is loaded at the start of every task. Keep it an index:
one line per entry, each pointing to a file, e.g. `- Acme Corp: clients/acme.md`.
Update the file and the index before you finish. Never store secrets.Run tasks that write one owner’s memory one at a time.
1. Delete one owner’s memory
-
Find the member’s UUID by its external ID (
user:<id>,anon:<id>,<idp-id>:<sub>, orslack:<team-id>/<channel-id>):introspection members get user:<user-id> --query id -o table -
List their memory file IDs:
introspection files list --filter category=memory \ --filter name_contains=memory/production/member:<member-uuid>/ \ --query "join(' ', [].id)" -o table -
Paste the IDs into one delete:
introspection files delete --yes <file-id-1> <file-id-2>
The list returns one page: repeat 2 and 3 until it is empty, then do the same
for memory/staging/. A task started with only a conversation_id keeps
memory under memory/<env>/conv:<conversation-id>/ instead.
2. Export their conversations
introspection conversations list --filter owner_key=user:<user-id> --page-all \
--query "[].conversation_id" -o table
introspection conversations get <id-1> <id-2> --output-file conversations.jsonlconversations get takes several IDs, or --ids-file with up to 20, one per line.
Verify
Run the list in step 1 again. Expect an empty list.
Or ask your agent: “Export user cust-123’s conversations, then delete their memory.”
What each delete does
| Delete | Command | Effect |
|---|---|---|
| Task | introspection tasks delete <task-id> | Cancels running work and soft-deletes the task. Its conversation, files, and memory stay. |
| File | introspection files delete <file-id> | Soft-deletes that version; an earlier version, if any, becomes the latest. |
| Member | DELETE /v1/members/{id} (owner or admin) | Revokes sessions and connections and frees a seat. Tasks, conversations, and files stay. Asserting the same user_id again revives the member. |
To remove a Slack agent, introspection connectors delete <connector>, then
delete each channel’s memory.
Retention
Conversations are kept unless retention is enabled for your data
plane: contact us to change it (Data handling). For memory
and files, add --filter updated_before=<cutoff> to the list in step 1 and run it on a
schedule.
Load more memory files into the prompt
Add an extension:
import { readFile } from "node:fs/promises";
import type { ExtensionFactory } from "@earendil-works/pi-coding-agent";
const FILES = ["/workspace/memories/preferences.md"];
const extension: ExtensionFactory = (pi) => {
pi.on("before_agent_start", async (event) => {
const parts = await Promise.all(FILES.map((f) => readFile(f, "utf8").catch(() => "")));
return { systemPrompt: `${event.systemPrompt}\n\n<memory>\n${parts.join("\n")}\n</memory>` };
});
};
export default extension;Limits
| Not supported | Do this instead |
|---|---|
| Deleting a conversation yourself | Contact support@introspection.dev for a purge. |
| Memory shared across people | Shared records in your system behind a tool. |
| Per-matter memory for one person | Use a user_id per person and matter, or tell the agent to use only /workspace/memories/matters/<id>/. |