How to use it
These examples use two optional apps, Brain and LastSecrets. Choose the app you want to try from the registry. It covers daily use, for you and for your AI agent.
Two apps on your own node.
Each person runs one LastDB on their own Mac. That is a node. Brain and LastSecrets are apps on your node. They read and write it over a local Unix socket, and each is a complete app for one person. Nothing on this page needs an account.
LastDB can also share a whole database with other people by invitation, and a developer can publish an app to the App Registry. This page does not cover either. To build or publish your own app, read the Developer guide: step 8 is sharing and step 9 is publishing.
Brain keeps notes and decisions. LastSecrets keeps credentials.
Write it once. Find it later.
- 01
When a decision settles, write it to Brain.
A note has a short name, a title, and a body. Say why, not only what.
brain concept new caching --title "Cache layer" --body "chose LRU because the working set is small"
- 02
Find it later by name, or ask in plain words.
brain get reads the note by name. brain ask matches by keyword until LastSeek is installed, so use a word from the note.
brain get caching brain ask "what did we decide about caching?"
- 03
Change the note when the decision changes.
One current note is better than many old ones. Write the same name again with --force to replace it.
brain concept new caching --title "Cache layer" --body "moved to a size cap; LRU alone grew too large" --force
- 04
Keep credentials in LastSecrets.
The value goes in on stdin, never on the command line. lastsecrets ref prints a lastsecrets://… reference. Put only that reference in your notes.
printf '%s' "$TOKEN" | lastsecrets put my-api-token \ --label "My API token" \ --provider example \ --purpose demo \ --env dev \ --value-stdin lastsecrets ref my-api-token
The agent runs on your Mac and uses the same apps you do.
Give your agent the same memory.
Point the agent at llms.txt. It is the plain-text version of this site. Then connect Brain through MCP, so the agent can read and write your notes.
brain mcp install
brain mcp
brain mcp install asks before it changes anything. It writes to CLAUDE.md and .claude/settings.json in the current folder, so run it in your project.
- 01
A rule that helps.
Ask the agent to search Brain before it starts, and to write each settled decision back. The context then survives the chat.
- 02
A rule for secrets.
The agent stores a credential with lastsecrets put, value on stdin. It keeps only the lastsecrets:// reference in notes, documents, and logs. It reads the value with lastsecrets get only at the point of use, and does not print it.
Check the node before you restart it.
lastdb status socket="$HOME/.lastdb/folddb.sock" [ -S "$socket" ] || socket="$HOME/.lastdb/data/folddb.sock" curl --fail --silent --show-error --unix-socket "$socket" http://localhost/health
The health check returns JSON with "status":"ok". If both commands succeed, the node is up. If these checks fail, read lastdb status and the service logs first. Homebrew restart applies only to a Homebrew-managed service. A managed LaunchAgent uses a different lifecycle; see Node Health.