memory
See and change what Bash remembers about each of your users: their preferences, the people in their life, and things they told it once. You can read what it knows, tell it a new fact, or make it forget.
Add a fact
Tell Bash something once, and it remembers it.
const traveller = vestra.user('traveller-42'); await traveller.memory.add('Prefers a window seat, and never a red-eye.');Search what Bash remembers
Ask a question in plain words.
const { found, text } = await traveller.memory.search('Which seat does she like?');console.log(found, text);List and forget memories
Read the written profile and each memory, newest first. Then forget one, or everything.
const all = await traveller.memory.list();console.log(all.profile?.markdown);const first = all.data[0];if (first) await traveller.memory.forget(first.id);await traveller.memory.forgetAll();Add a fact
Tell Bash something once, and it remembers it.
traveller = vestra.user("traveller-42") traveller.memory.add("Prefers a window seat, and never a red-eye.")Search what Bash remembers
Ask a question in plain words.
found = traveller.memory.search("Which seat does she like?")print(found.found, found.text)List and forget memories
Read the written profile and each memory, newest first. Then forget one, or everything.
everything = traveller.memory.list()print(everything.profile)if everything.data: traveller.memory.forget(everything.data[0].id)traveller.memory.forget_all()Add a fact
Tell Bash something once, and it remembers it.
vestra memory add "Prefers a window seat, and never a red-eye." --kind preference --user traveller-42Search what Bash remembers
Ask a question in plain words.
vestra memory search "Which seat does she like?" --user traveller-42List and forget memories
Read the profile and each memory, then forget one, or everything.
vestra memory --user traveller-42vestra memory forget mem_4kx --user traveller-42vestra memory forget --all --user traveller-42 --yesAdd a fact
Tell Bash something once, and it remembers it.
curl "$VESTRA_BASE_URL/v1/memory" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "user_id": "traveller-42", "text": "Prefers a window seat, and never a red-eye." }'Search what Bash remembers
Ask a question in plain words.
curl "$VESTRA_BASE_URL/v1/memory/search?user_id=traveller-42&q=Which%20seat%20does%20she%20like" \ -H "Authorization: Bearer $VESTRA_API_KEY"List and forget memories
Read the profile and every memory, newest first. Then forget one, or everything.
curl "$VESTRA_BASE_URL/v1/memory?user_id=traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY" curl -X DELETE "$VESTRA_BASE_URL/v1/memory/mem_4ka?user_id=traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY" curl -X DELETE "$VESTRA_BASE_URL/v1/memory?user_id=traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY"{ "method": "tools/call", "params": { "name": "memory_search", "arguments": { "user": "traveller-42", "q": "Which seat does she like?" } }}Good to know
Listing and searching
list returns a written profile and each memory, newest first. search answers a question in plain words, and returns { found, text }.
Forgetting
Forget one memory by its id, or everything Bash knows about a user at once.
Your company's memory
Leave the user out to read and add to the memory of your company's own Bash, the one that works for your company rather than for a user.
Showing memory in your app
A session opened with memory: true shows your user what Bash remembers about them, and lets them make it forget. Turn this on for your company first, with PATCH /v1/org and memory_panel: true.
The routes behind memory5 routes, each with every field in the API reference
runtime (or all)runtime (or all)runtime (or all)runtime (or all)runtime (or all)