Memory
Memory files give Posit Assistant persistent context. They’re loaded automatically at the start of every conversation, so the assistant always knows your preferences and your project’s conventions, architecture, and setup.
Memory Files
Memory lives at two levels:
- User memory —
~/.posit/assistant/AGENTS.md: your global file, for personal preferences and cross-project context (for example, “I prefer metric units” or “always use ggplot2”). It’s loaded in every session, even when no project folder is open. - Project memory —
AGENTS.mdin the project root: project structure, coding conventions, preferred libraries, deployment details, or anything else the assistant should know about this project.
Both files are plain Markdown. When the two conflict, project memory wins.
Creating and Updating Memory
Use the /savememory command to create or update your project memory file:
/savememory
Use /savememory user to target your user-level memory file instead:
/savememory user I prefer metric units
The assistant will write or update the memory file based on the current conversation. You can add specific instructions:
/savememory Remember that we use tidymodels for all modeling and testthat for tests
The assistant also routes facts on its own when you ask it to remember something: personal preferences go to the user file, project facts go to the project file.
You can also edit the memory files directly in your editor — they’re just Markdown. The overflow menu (gear icon — in the top bar, or in the sidebar footer’s icon rail in the sidebar layout) has Open project memory and Open user memory entries that open or create the right file. These entries aren’t available on Posit Connect or hosted Canvas, where the file can’t be opened in a local editor.
Including Other Files
Reference additional files from your memory file using the @filename.md syntax:
# Project Memory
This project uses R with tidyverse conventions.
See also:
@docs/api-reference.md
@docs/coding-standards.md
Referenced files are resolved relative to the memory file’s directory and may not escape it.
Workspace Trust
Project memory files are only loaded in trusted workspaces. This prevents untrusted projects from injecting prompts into the assistant’s context. The user-level memory file is your own file — like your settings — and loads regardless of workspace trust.
Use /trust to mark a workspace as trusted, or respond to the trust prompt when opening a new project.