Memories
Memories are markdown files Ellipsis keeps for your agents, so a session can start with what earlier sessions learned.
When to use
Use memories for knowledge the model should update as it works.
Giving an agent memory
Ellipsis copies the memories selected by path or pattern in memories into the session's environment at /ellipsis/memories/ before the session starts. Ellipsis injects instructions that tell the model where its memories are and, when the session has Ellipsis API access, how to change them, so your prompt only needs to say what to do with them. The model can read these copies without memory API permissions.
For example, sessions of this nightly test agent use past diagnoses to investigate failures and save new findings for later runs.
The memory nightly-tests/diagnoses.md records a cause and a way to reproduce the failure.
The next session can try this reproduction before investigating other causes.
Updating a memory
Editing a local copy does not update the saved memory, and copies do not refresh automatically. A session needs permissions for memories.list and memories.update on the memory's path to save an edit. Creating a memory needs memories.create. An update replaces the full content. Ellipsis records every change as a version, kept for 30 days by default. For GitHub-backed memories, Ellipsis collects edits in one pull request per repository and applies them when it merges.
Deleting a memory
A session needs permissions for memories.list and memories.delete on a memory's path to delete it. Its versions stay readable until they expire. Delete a GitHub-backed memory through its source file.
Labeling memories
Labels and annotations let you and your agents find memories without knowing their paths. They are the frontmatter of the memory's file under metadata, in a session's copy and in a file synced from GitHub. A file with no frontmatter has no metadata.
For example, this lists the platform team's memories about flaky tests. A memory must have every label and annotation you pass.
An update that sends metadata replaces the labels and sets each annotation it names, and an annotation set to null is removed. el memory edit reads the frontmatter of the file it saves, and a file without frontmatter keeps the memory's metadata.
Syncing memories to GitHub
Ellipsis syncs .md files under .ellipsis/memory/ on a repository's default branch. A push creates, updates, or deletes memories to match the changed files. Memory paths include the repository name, except in the shared .ellipsis repository.
For example, the same file name in two repositories is two memories.
| File | Memory path |
|---|---|
.ellipsis/memory/testing.md in api-repo | api-repo/testing.md |
.ellipsis/memory/testing.md in web-repo | web-repo/testing.md |
memory/team/conventions.md in the .ellipsis repository | team/conventions.md |
Managing memories from your code
Each memory has a unique path in your account ending in .md.
| Action | SDK | API |
|---|---|---|
| Create | client.memories.create | POST /v1/memories |
| List | client.memories.list | GET /v1/memories |
| Read | client.memories.get | GET /v1/memories/{id} |
| Update | client.memories.update | PATCH /v1/memories/{id} |
| Delete | client.memories.delete | DELETE /v1/memories/{id} |
| List versions | client.memories.versions.list | GET /v1/memories/{id}/versions |
For example, this creates a memory from a local diagnoses.md file.