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.

1
from ellipsis import ClaudeCodeConfig, Ellipsis, EllipsisGrant, PermissionsConfig
2
3
client = Ellipsis()
4
session = client.sessions.run(
5
claude_code=ClaudeCodeConfig(
6
model="claude-opus-5-5",
7
prompt="Run the tests in api-repo. Consult previous diagnoses and save new findings in nightly-tests/diagnoses.md.",
8
),
9
environment="api-environment",
10
memories=[
11
"team/conventions.md",
12
"nightly-tests/*",
13
],
14
permissions=PermissionsConfig(
15
ellipsis=[
16
EllipsisGrant(
17
allow=[
18
"memories.list",
19
"memories.get",
20
"memories.update",
21
],
22
path="nightly-tests/*",
23
),
24
],
25
),
26
)
27
print(session.id)

The memory nightly-tests/diagnoses.md records a cause and a way to reproduce the failure.

1
The daily summary test fails when midnight falls between two Date.now() calls.
2
Reproduce by advancing the test clock across midnight.

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.

1
---
2
metadata:
3
labels: [flaky-test]
4
annotations:
5
owner: platform
6
---
7
The daily summary test fails when midnight falls between two Date.now() calls.
8
Reproduce by advancing the test clock across midnight.

For example, this lists the platform team's memories about flaky tests. A memory must have every label and annotation you pass.

1
from ellipsis import Ellipsis
2
3
client = Ellipsis()
4
for memory in client.memories.list(
5
label=["flaky-test"],
6
annotation=["owner:platform"],
7
):
8
print(memory.path)

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.

FileMemory path
.ellipsis/memory/testing.md in api-repoapi-repo/testing.md
.ellipsis/memory/testing.md in web-repoweb-repo/testing.md
memory/team/conventions.md in the .ellipsis repositoryteam/conventions.md

Managing memories from your code

Each memory has a unique path in your account ending in .md.

ActionSDKAPI
Createclient.memories.createPOST /v1/memories
Listclient.memories.listGET /v1/memories
Readclient.memories.getGET /v1/memories/{id}
Updateclient.memories.updatePATCH /v1/memories/{id}
Deleteclient.memories.deleteDELETE /v1/memories/{id}
List versionsclient.memories.versions.listGET /v1/memories/{id}/versions

For example, this creates a memory from a local diagnoses.md file.

1
from pathlib import Path
2
from ellipsis import Ellipsis
3
4
client = Ellipsis()
5
response = client.memories.create(
6
path="nightly-tests/diagnoses.md",
7
content=Path("diagnoses.md").read_text(),
8
)
9
print(response.memory.id)

On this page

Schedule a demo
For HumansFor Agents