Agent Memory
Agents lose their context between sessions. Tusky solves this by giving agents persistent, encrypted storage where they can save conversation summaries, decisions, task state, and working notes — then read them back in future sessions to pick up where they left off.
This workflow covers both writing context (storing conversation data) and reading it back (retrieving stored files for analysis).
Prerequisites
Section titled “Prerequisites”- MCP server configured and connected to your agent
- For private vaults:
TUSKYDP_PASSWORDset in the MCP config
Tools used: tusky_vault_create, tusky_folder_create, tusky_file_create, tusky_vault_list, tusky_file_list, tusky_folder_get_contents, tusky_file_read, tusky_file_get
Storing context
Section titled “Storing context”1. Create a dedicated vault
Section titled “1. Create a dedicated vault”Create a vault for context storage once per project. Use a private vault for encrypted storage:
tusky_vault_create({ name: "agent-context", visibility: "private" })2. Organize by session
Section titled “2. Organize by session”Create a folder for each session or time period:
tusky_folder_create({ vaultId: "<vault-id>", name: "2025-03-16-session" })3. Save context as files
Section titled “3. Save context as files”Store conversation summaries, key decisions, and task state:
tusky_file_create({ name: "session-summary.md", content: "## Session Summary\n\n- Discussed migration to v2 API...", encoding: "utf-8", vaultId: "<vault-id>", folderId: "<folder-id>"})Good candidates for context files:
- Session summaries — what was discussed, what was decided
- Task state — in-progress work, next steps, blockers
- Architecture decisions — design choices and rationale
- Research notes — findings, analysis, extracted data
- Configuration snapshots — settings, preferences, environment details
Retrieving context
Section titled “Retrieving context”In a new session, the agent can browse and read previously stored context.
1. Find the right vault
Section titled “1. Find the right vault”tusky_vault_list()2. Browse files and folders
Section titled “2. Browse files and folders”tusky_file_list({ vaultId: "<vault-id>" })tusky_folder_get_contents({ folderId: "<folder-id>" })3. Check metadata before reading
Section titled “3. Check metadata before reading”For large files, check the size and type first:
tusky_file_get({ fileId: "<file-id>" })4. Read content inline
Section titled “4. Read content inline”tusky_file_read({ fileId: "<file-id>" })Text files are returned as text. Binary files are returned as base64. For large files, use tusky_file_download to save to disk first.
5. Use the content
Section titled “5. Use the content”The agent can now use the retrieved context in its reasoning — answering questions based on stored files, continuing where a previous session left off, or building on past analysis.
When to use this
Section titled “When to use this”- Long-running projects where the agent needs to remember past decisions
- Agents that operate across multiple sessions and need continuity
- Storing structured data like task lists, architecture decisions, or meeting notes
- Agents that need to reference stored documentation or specifications
- Pulling in logs or data files for analysis
- Answering user questions based on files stored in Tusky
- Use consistent naming for context files (e.g.,
session-summary.md,task-state.json) so the agent can find them predictably - Organize chronologically with dated folder names for easy browsing
- Store JSON for structured data — easier for agents to parse than free-form text
- Use
tusky_file_createovertusky_file_uploadfor text content — it’s simpler and doesn’t require writing to disk first