This page assumes LastDB and the starter apps are installed. It covers daily use, for you and for your AI agent.
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.
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"
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?"
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
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.
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.
Ask the agent to search Brain before it starts, and to write each settled decision back. The context then survives the chat.
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.
lastdb status curl --fail --silent --show-error --unix-socket ~/.lastdb/data/folddb.sock http://localhost/health
The health check returns JSON with "status":"ok". If both commands succeed, the node is up. Restart only when both fail: brew services restart lastdb.