mansus

myself

Your agents remember people, projects and decisions across sessions. One file you own, on your laptop or shared from your server.

Ten commands, one brain.

A real session against an empty store: facts in, a graph out, a corrected fact, its history, and the Obsidian notes.

bash recorded with myself
$ myself remember relay is project
remembered 01a1942e-b3ad-7017-bab1-6daf5d0594a3
$ myself remember relay uses bun
remembered 01a1942e-b3b3-7052-9e2d-4c248ce13187
$ myself remember felipe related relay
remembered 01a1942e-b3bb-73fb-bd63-d608193079eb
$ myself remember bun is tool
remembered 01a1942e-b3c0-7111-af10-e9825dc684bc
$ myself describe relay --depth 1
relay
  is project
  uses bun
  <- felipe related
bun
  is tool
  <- relay uses
felipe
  related relay
project
  <- relay is
$ myself path bun felipe
relay uses bun
felipe related relay
$ myself remember i does "Felipe's coding agent. Answers tersely."
remembered 01a1942e-b3cf-7035-b9c0-f3594a199323
$ myself remember i does "Felipe's coding agent. Answers tersely. Never commits with the work email." --replace
forgot 01a1942e-b3cf-7035-b9c0-f3594a199323
remembered 01a1942e-b3d5-76f0-848a-b54673cdb8aa
$ myself history i
01a1942e-b3cf-7035-b9c0-f3594a199323 2026-10-31T22:57:31Z self does Felipe's coding agent. Answers tersely.
01a1942e-b3d5-76ef-bc8b-96cf1ae53f13 2026-10-31T22:57:31Z forget 01a1942e-b3cf-7035-b9c0-f3594a199323
01a1942e-b3d5-76f0-848a-b54673cdb8aa 2026-10-31T22:57:31Z self does Felipe's coding agent. Answers tersely. Never commits with the work email.
$ myself export --obsidian /tmp/vault && cat /tmp/vault/relay.md
exported 6 entities to /tmp/vault
# relay

- is [[project]]
- uses [[bun]]

## Linked from
- [[felipe]] related
$ 

The same recording is demo.cast in the repo. Play it in your terminal with asciinema play demo/demo.cast.

Tell it on Monday. It knows on Thursday.

Monday

You mention it once. The agent writes it down.

The agent runs these through Bash while it works on storefront. A session last week had already saved three facts.

bash
# saved last week: storefront is project, storefront uses npm, alice related storefront
$ myself remember storefront uses bun
remembered 01a1974d-c45e-7109-9f2d-c781ae8e11c4
$ myself forget storefront uses npm --reason "moved to bun in PR 218"
forgot 01a1974d-c452-77ce-bb8e-717657c6fefe
$ myself remember user prefers "short answers, no emoji"
remembered 01a1974d-c468-76e4-9c59-4fee607934df
$ myself remember i does "coding agent for the storefront repo"
remembered 01a1974d-c46d-7304-8a33-d640a71f9f77

Thursday

A new session starts with the brief. No re-explaining.

A SessionStart hook runs myself prime, so the agent has this before you type a word. i is the agent itself, stored as self. Hook setup is below.

bash
$ myself prime
self
  does coding agent for the storefront repo
storefront
  is project
  uses bun
  <- alice related
alice
  related storefront
project
  <- is: storefront
user
  prefers short answers, no emoji

Later

Ask what it knows, and what changed.

You can run these yourself, too. Nothing was overwritten: the npm fact and why it was dropped are still in the history.

bash
$ myself describe storefront
storefront
  is project
  uses bun
  <- alice related
$ myself history storefront uses
01a1974d-c452-77ce-bb8e-717657c6fefe 2026-11-01T13:30:18Z storefront uses npm
01a1974d-c45e-7109-9f2d-c781ae8e11c4 2026-11-01T13:30:18Z storefront uses bun
01a1974d-c464-73fa-b8bb-e63f8e6ade56 2026-11-01T13:30:18Z forget 01a1974d-c452-77ce-bb8e-717657c6fefe moved to bun in PR 218
$ myself path alice project
alice related storefront
storefront is project

The agent does the thinking. myself keeps what it learned.

Why it works this way

  1. The agent is the LLM, so the store stays simple

    The agent decides what is worth remembering and writes it as a fact. myself only stores, indexes and queries: no extraction step, no extra LLM calls, no API keys. The same input gives the same output.

  2. One binary, called from Bash

    Claude Code, Codex, pi, or any agent that can run a shell command can use it. Put the binary on your $PATH, add the skill file, and on a local file it needs no server and no network.

  3. Facts carry time

    A fact is subject relation object with a timestamp. The object is free text, so the how and why live in it. --replace and forget write new records, the old ones stay, and --at shows what was true on a given date.

  4. One brain for all your agents, if you want it

    myself serve puts the file behind HTTP, with a token per agent. Agents on other machines use the same CLI against it, harnesses without a shell connect over MCP, and you browse and fix it in a web app.

  5. One file, in git

    The memory is ~/.myself/brain.jsonl. It diffs, myself sync keeps it in a private git repo, and two hosts that both wrote merge to the union of their records.

  6. See it in Obsidian

    myself export --obsidian <dir> writes one note per entity with [[wikilinks]], and Obsidian's graph view draws the graph. Edits in the vault do not come back.

The idea that facts are superseded rather than overwritten comes from Graphiti. myself is much smaller: the calling agent writes the facts, a JSONL file instead of Neo4j, substring search instead of embeddings, and one timeline (when a record was written).

Install

v0.2.0 is out for Linux and macOS, amd64 and arm64.

bash Linux and macOS
# the latest release into ~/.local/bin, after checking its sha256
$ curl -fsSL https://raw.githubusercontent.com/mansus-org/myself/main/install.sh | sh
$ myself version

To pin a release, set MYSELF_VERSION; to install somewhere else, set MYSELF_INSTALL_DIR:

bash a pinned release
$ curl -fsSL https://raw.githubusercontent.com/mansus-org/myself/main/install.sh | MYSELF_VERSION=v0.2.0 MYSELF_INSTALL_DIR=/usr/local/bin sh

With Go, or from the prebuilt tarballs on the releases page:

bash Go
$ go install github.com/mansus-org/myself/cmd/myself@latest

Install, in the README

Use with Claude Code

Every session starts with the brain in context, and the agent uses myself through the skill. The brain lives in ~/.myself/brain.jsonl (override with MYSELF_FILE or --file) and is created on the first write.

  1. 1Install the binary, as above.

  2. 2From a clone of the repo, install the hooks and the skill. The skill is also at myself.mansus.org/skill.md: save it as ~/.claude/skills/myself/SKILL.md.

    bash
    $ git clone https://github.com/mansus-org/myself && cd myself
    $ mkdir -p ~/.myself/hooks ~/.claude/skills
    $ cp contrib/hooks/*.sh ~/.myself/hooks/
    $ chmod +x ~/.myself/hooks/*.sh
    $ cp -r skill/myself ~/.claude/skills/
  3. 3Merge this into ~/.claude/settings.json, keeping the hooks and permissions you already have.

    ~/.claude/settings.json file
    {
      "permissions": {
        "allow": ["Bash(myself:*)"]
      },
      "hooks": {
        "SessionStart": [
          {
            "hooks": [
              { "type": "command", "command": "~/.myself/hooks/session-start.sh", "timeout": 10 }
            ]
          }
        ],
        "Stop": [
          {
            "hooks": [
              { "type": "command", "command": "~/.myself/hooks/stop-nudge.sh", "timeout": 10 }
            ]
          }
        ]
      }
    }

What the hooks do

  • session-start.sh prints myself prime --budget 4000, which Claude Code adds to the session context. MYSELF_PRIME_BUDGET changes the budget.
  • stop-nudge.sh blocks the first stop of a session once, asking whether anything is worth remembering, but only if nothing was written to the brain since the session started and the session edited files, ran 3 or more Bash commands, or left uncommitted changes. MYSELF_NUDGE=off turns it off.
  • Both are POSIX sh and exit quietly when myself is missing or fails. If ~/.local/bin is not on the hooks' PATH, set MYSELF_BIN to the full path of the binary.
  • Claude Code's own file-based auto-memory can take "remember..." requests first. Add "env": { "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "1" } to the same file to leave it to myself.

Other harnesses: pi

The skill is one file that any myself serve instance serves at /skill.md, with no token. For pi, install the package. It adds the skill and an extension that runs myself prime --budget 4000 on the first agent run of each session and adds the output to the context, like the Claude Code SessionStart hook.

bash pi
$ pi install git:github.com/mansus-org/myself

Codex or any agent with no skills directory: tell it "Read https://myself.mansus.org/skill.md and follow it". myself prime prints a brief to put in its system prompt.

pi setup, in the README

Claude Code setup, in the README

Connect to a shared brain

myself serve shares one brain over HTTP, for agents on several hosts or harnesses. It serves this page at /, a REST API at /api/v1 (the same JSON as --json), MCP at /mcp and a web app at /app. Replace <your-server> below with your server's address.

Run the server

The admin token is only known to the server by its sha256. Without it the API answers 503.

bash on the server
$ export MYSELF_ADMIN_TOKEN_SHA256=$(printf %s "$ADMIN_TOKEN" | sha256sum | cut -d' ' -f1)
$ myself serve --addr :8080

The store is the usual --file or MYSELF_FILE. The repo's Dockerfile runs the same server with the store on a volume at /data.

Give each agent a token

The admin creates and revokes agent tokens with a read or write scope, from the web app's Tokens page or the API. Only their hashes are stored, in tokens.json next to the store, so the token is shown once.

bash admin
$ curl -H "Authorization: Bearer $ADMIN_TOKEN" -d '{"name":"laptop","scope":"write"}' https://<your-server>/api/v1/tokens
{"id":"01a1974f-64ae-70f3-a8de-8652b1a43929","name":"laptop","scope":"write","created":"2026-11-01T13:32:05Z","last_used":null,"token":"mys_..."}

The CLI, in remote mode

Set two variables and every command runs on the server instead of the local file, with the same output, --json and exit codes. The Claude Code hooks follow along when these are in Claude Code's environment.

bash on each agent's machine
$ export MYSELF_URL=https://<your-server>
$ export MYSELF_TOKEN=mys_...
$ myself whoami
name laptop
scope write
admin false
$ myself remember storefront is project
remembered 01a1974f-71c9-7010-be41-2bb126eb28bf
  • --url and --token override the variables. Prefer the variable for the token: flags show up in ps.
  • MYSELF_TIMEOUT bounds a request (default 10 s). An unreachable server, or a 401, 403 or 503, is exit 3.
  • sync is local only. Back a server up with GET /api/v1/export.jsonl.

MCP

For harnesses without Bash. The tools mirror the CLI (remember, forget, describe, ls, search, path, log, history, prime, relations, dream), plus a myself://prime resource. A read token can use all of them except remember and forget. In Claude Code:

bash Claude Code
$ claude mcp add --transport http myself https://<your-server>/mcp --header "Authorization: Bearer $MYSELF_TOKEN"
# headless runs (claude -p) only call the tools you allow
$ claude -p --allowedTools mcp__myself "what do you know about storefront?"

Any other MCP client with streamable HTTP takes the URL and the header:

MCP client config file
{"mcpServers":{"myself":{"type":"http","url":"https://<your-server>/mcp","headers":{"Authorization":"Bearer <token>"}}}}

The web app

Sign in at /app by pasting a token. A read token browses entities, the graph, search and the log as agents write; a write token can also add and forget facts; the admin token also manages tokens.

The web app's Graph page: entities as black squares, types as hollow squares, linked by solid is lines and dotted lines for other relations. A Find field and a Type filter sit above the graph.
The Graph page. Hover an entity to see its neighbours, click to open it.

Server, remote mode, MCP and the web app, in the README

Commands

Arguments are positional and everything after the relation is the object, so quotes are optional. --json works on every command, --file PATH picks the store, --url and --token pick a server, and --at TIME (RFC 3339 or YYYY-MM-DD) shows the state as of that time where listed.

CommandWhat it does
remember <subject> <relation> <object...> [--replace]Add a fact. --replace forgets live facts with the same subject and relation first.
remember -Bulk: one subject relation object per line on stdin, all or nothing.
forget <uuid>
forget <subject> <relation> [<object...>] [--reason TEXT]
Retract a record, or every matching live record.
describe <entity> [--depth N] [--at TIME]Outgoing and incoming facts, N hops out.
ls [<type>] [--at TIME]The types, or the entities of a type, following is transitively.
relationsThe allowed relations.
search <text> [--at TIME]Case-insensitive substring match.
path <a> <b> [--max-depth N]Shortest chain of facts linking two entities.
log [--since TIME] [-n N]Every record, forgets included.
history <subject> [<relation>]Every record for a subject, forgotten or not.
prime [--budget CHARS]Compact summary to put in an agent's context.
dreamReport near-duplicate subjects (read-only).
serve [--addr :8080] [--site DIR]Serve the brain over HTTP: API, MCP, web app.
export --obsidian <dir>Write one Markdown note per entity.
sync [--export DIR]Back the store up with git.
merge-driver <base> <ours> <theirs>Git merge driver used by sync.
whoamiThe local store path, or the token's name, scope and admin flag in remote mode.
versionVersion, commit and build date.

Relations are a closed set: is, are (stored as is), has, uses, does, prefers, related. Anything else is rejected:

bash
$ myself remember storefront owns checkout
error: unknown relation "owns". use one of: is, are, has, uses, does, prefers, related

i, me and myself as a name all mean the entity self. To remember something about this project, use another name, such as myself-cli.

The full grammar, in SPEC.md

How it stores memory

One JSON object per line, five fields, never rewritten:

~/.myself/brain.jsonl one line
{"uuid":"01a1974d-c48e-758c-b0a7-425a87f60106","subject":"self","relation":"does","object":"coding agent for storefront; opens PRs, never merges","time":"2026-11-01T13:30:18Z"}
  • The log is append-only. forget appends a record whose subject is the uuid of the retracted record, with forget as the relation and the reason as the object. A record is live unless a forget points at it.
  • Records are ordered by uuid (UUIDv7, so by time). Writers lock <file>.lock; readers take no lock and skip a corrupt line with a warning.
  • Time travel: myself describe storefront --at 2026-10-30 shows storefront as it was on that date. --at also works with ls and search.

Backup

Keep the store in a private git repository and sync it with one command. sync sets up a merge driver, so two hosts that both appended end up with the union of their records. It never creates a remote or sets a git identity.

bash
$ cd ~/.myself && git init && git remote add origin <private-repo-url>
# commits, pulls (rebase), pushes
$ myself sync

To sync every 15 minutes and refresh an Obsidian vault, add a cron line. myself must be on the cron job's PATH, since git calls it for merges.

crontab file
*/15 * * * * myself sync --export ~/vault/myself

Storage and backup, in the README

Obsidian mirror

One note per entity, live state only. Objects that match an entity become [[wikilinks]], and incoming links are listed under Linked from. The mirror is one way: the next export overwrites edits made in the vault.

bash
$ myself export --obsidian vault
exported 5 entities to vault
$ cat vault/storefront.md
# storefront

- is [[project]]
- uses bun

## Linked from
- [[alice]] related

Obsidian mirror, in the README

Molting and dreaming

Molting is how the agent changes what it knows about itself. The entity self holds its identity and preferences. --replace forgets the old fact and writes the new one, and the old one stays readable.

bash
$ myself remember i does "coding agent for storefront; opens PRs, never merges" --replace
forgot 01a1974d-c46d-7304-8a33-d640a71f9f77
remembered 01a1974d-c48e-758c-b0a7-425a87f60106
$ myself history i
01a1974d-c46d-7304-8a33-d640a71f9f77 2026-11-01T13:30:18Z self does coding agent for the storefront repo
01a1974d-c48e-758b-a677-6fcfbbd2e464 2026-11-01T13:30:18Z forget 01a1974d-c46d-7304-8a33-d640a71f9f77
01a1974d-c48e-758c-b0a7-425a87f60106 2026-11-01T13:30:18Z self does coding agent for storefront; opens PRs, never merges

Dreaming is a read-only housekeeping report. myself dream lists subjects that differ only by - or a trailing s, and the agent merges them with ordinary commands.

bash
$ myself dream
relay relays
web-ui webui

Molting and dreaming, in the README

Non-goals

  • No server needed. myself serve is optional; the CLI works on a local file.
  • No embeddings, yet. Search is a substring match.
  • No two-way Obsidian sync.
  • No query language. The commands are the interface.

Every flag, hook setting and endpoint is in the README.

Read on.