Actor memory
Give an actor memory that lasts across runs. Memories are private to the actor by default, attached to the work they describe, and managed with spl memory.
What it is
Actor memory lets an actor keep a fact across runs and sessions. Two things make it more than a note:
- It is about a thread. A memory is attached to the work it describes, so a fact about a piece of work stays with that work.
- It is private by default. An actor's memories are its own unless you share them.
When an actor works on a thread again, it sees the latest memory for each name, with who wrote it. It does not have to go looking for what it learned last time.
Manage memories with spl memory
spl memory is how you read and write memories yourself.
List an actor's memories:
spl memory list
spl memory list --actor did:sync:agent:dev
spl memory list --verbose # full descriptions, not truncatedShow one in full:
spl memory show <name>Add a memory. A memory has a name (unique per actor), a type, and a description:
spl memory add project-context \
--type project \
--description "This instance tracks its own work with spl task; th_tasks is the task thread." \
--confidence 0.9 \
--tag onboardingThe type is one of user, feedback, project, reference, skill, or
insight. Confidence defaults to 0.8. Tags are repeatable.
Search and remove:
spl memory search "task tracking"
spl memory remove project-contextremove cancels the memory. The history keeps a record that it existed.
Every subcommand takes --actor <did>; without it, the actor is the one in
your config identity.
The remember tool: memory written by a run
A run does not call spl memory. It uses a tool named remember to save
something it learned about the thread it is working on, so the next run over
that thread starts with it.
remember is a tool for runs, not a command: there is no spl remember. A run
has it only when its definition grants it. What it saves shows up in
spl memory list for that actor.
A note on visibility
A memory is private to its actor by default. It is shown when that same actor
works on the thread, and it is not published onto the thread for others to see.
If you write a memory and do not see it on a shared thread, nothing is lost.
Read it with spl memory list for that actor.
See also
- Task management: the work an actor's memories most often attach to.
- Actors and adapters: defining the actors that carry memory.
The run_code tool
Let a member run write a small JavaScript program that calls its granted tools and returns structured data. What it is, when it is used, and its limits.
Hooks
Show a running actor a lesson after one of its tool calls returns, by saving a hook. Also covers spl session hooks, which record an external agent's session.