{"_id":"@brianluby/agent-brain","_rev":"3-496373bc951a24d07ff020b6c817e7aa","name":"@brianluby/agent-brain","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"@brianluby/agent-brain","version":"1.1.0","keywords":["claude","claude-code","claude-code-plugin","anthropic","opencode","opencode-plugin","memory","ai-memory","context-persistence","memvid","portable-memory","persistent-memory","llm-memory","ai-assistant"],"author":{"name":"Memvid","email":"hello@memvid.com"},"license":"MIT","_id":"@brianluby/agent-brain@1.1.0","maintainers":[{"name":"brianluby","email":"brian@luby.us"}],"homepage":"https://memvid.com","bugs":{"url":"https://github.com/brianluby/Agent-brain/issues"},"dist":{"shasum":"da87c23e86311e06ef342f2b8c725fd97add075a","tarball":"https://registry.npmjs.org/@brianluby/agent-brain/-/agent-brain-1.1.0.tgz","fileCount":34,"integrity":"sha512-WP3NJItf4BEuSCjkKtGl5/ETzGuk+slRcsnlTwwIp/8I9i0dD59DRdSu7Gd4oRZ+Txo9pMALNr+To5Z39E9JLQ==","signatures":[{"sig":"MEQCIARNlVuWotJkVXBMnhMk5ydGk+XuH2Awho6cgUiTPouuAiBEKcpwu2v13LSX6sObLEnmFiUWdnBihm4ZRnDNvkp7DA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":900599},"main":"dist/opencode/plugin.js","type":"module","types":"dist/opencode/plugin.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/opencode/plugin.d.ts","default":"./dist/opencode/plugin.js"},"./mind":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./opencode":{"types":"./dist/opencode/plugin.d.ts","default":"./dist/opencode/plugin.js"}},"gitHead":"0052df6aa9e4b446fa3ea1c6b97a6061bd2dfc83","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup && cp src/hooks/hooks.json dist/hooks/","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"brianluby","email":"brian@luby.us"},"opencode":{"type":"plugin","hooks":["chat.message","tool.execute.after","event"]},"repository":{"url":"git+https://github.com/brianluby/Agent-brain.git","type":"git"},"_npmVersion":"11.9.0","description":"Give Claude Code photographic memory in ONE portable file","directories":{},"_nodeVersion":"25.6.1","dependencies":{"@memvid/sdk":"^2.0.149","proper-lockfile":"^4.1.2","@opencode-ai/plugin":"^1.2.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","eslint":"^9.0.0","vitest":"^3.0.0","@eslint/js":"^9.39.2","typescript":"^5.7.0","@types/node":"^22.0.0","typescript-eslint":"^8.50.0","@types/proper-lockfile":"^4.1.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-brain_1.1.0_1772147776652_0.5975188075432762","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@brianluby/agent-brain","version":"1.1.1","keywords":["claude","claude-code","claude-code-plugin","anthropic","opencode","opencode-plugin","memory","ai-memory","context-persistence","memvid","portable-memory","persistent-memory","llm-memory","ai-assistant"],"author":{"name":"Memvid","email":"hello@memvid.com"},"license":"MIT","_id":"@brianluby/agent-brain@1.1.1","maintainers":[{"name":"brianluby","email":"brian@luby.us"}],"homepage":"https://memvid.com","bugs":{"url":"https://github.com/brianluby/Agent-brain/issues"},"dist":{"shasum":"d8c165d0275660769b1ec3b6a5001d405d1c9991","tarball":"https://registry.npmjs.org/@brianluby/agent-brain/-/agent-brain-1.1.1.tgz","fileCount":34,"integrity":"sha512-gUnogUcfiuHwEMirTIqy7Ho2vDiG2/esZjbeNNUxf+OUvnQgAJmGuNWfzNwLjp0000fAJnDoFquoKxfmqsDK8Q==","signatures":[{"sig":"MEUCID9bYspQ1W0gM6JhyAKnCoUDBYLNlcxlLktujvEYlXc0AiEAv8GyF4+DxQUPnd+nzgO8m+bO9NdPgHy6jVb9trlg+Qk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":900636},"main":"dist/opencode/plugin.js","type":"module","types":"dist/opencode/plugin.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/opencode/plugin.d.ts","default":"./dist/opencode/plugin.js"},"./mind":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./opencode":{"types":"./dist/opencode/plugin.d.ts","default":"./dist/opencode/plugin.js"}},"gitHead":"f2101cbd5f5cc97cf9c70a84496bcab3b0dfd148","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup && cp src/hooks/hooks.json dist/hooks/","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"brianluby","email":"brian@luby.us"},"opencode":{"type":"plugin","hooks":["chat.message","tool.execute.after","event"]},"repository":{"url":"git+https://github.com/brianluby/Agent-brain.git","type":"git"},"_npmVersion":"11.9.0","description":"Give Claude Code photographic memory in ONE portable file","directories":{},"_nodeVersion":"25.6.1","dependencies":{"@memvid/sdk":"^2.0.149","proper-lockfile":"^4.1.2","@opencode-ai/plugin":"^1.2.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","eslint":"^9.0.0","vitest":"^3.0.0","@eslint/js":"^9.39.2","typescript":"^5.7.0","@types/node":"^22.0.0","typescript-eslint":"^8.50.0","@types/proper-lockfile":"^4.1.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-brain_1.1.1_1772150940320_0.4603267338519115","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@brianluby/agent-brain","version":"1.1.2","description":"Give Claude Code photographic memory in ONE portable file","type":"module","main":"dist/opencode/plugin.js","types":"dist/opencode/plugin.d.ts","exports":{".":{"types":"./dist/opencode/plugin.d.ts","default":"./dist/opencode/plugin.js"},"./mind":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./opencode":{"types":"./dist/opencode/plugin.d.ts","default":"./dist/opencode/plugin.js"}},"opencode":{"type":"plugin","hooks":["chat.message","tool.execute.after","event"]},"scripts":{"build":"tsup && cp src/hooks/hooks.json dist/hooks/","dev":"tsup --watch","lint":"eslint src/","typecheck":"tsc --noEmit","test":"vitest run","prepublishOnly":"npm run build"},"keywords":["claude","claude-code","claude-code-plugin","anthropic","opencode","opencode-plugin","memory","ai-memory","context-persistence","agent-brain","portable-memory","persistent-memory","llm-memory","ai-assistant"],"author":{"name":"Brian Luby"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/brianluby/Agent-brain.git"},"homepage":"https://github.com/brianluby/agent-brain","bugs":{"url":"https://github.com/brianluby/Agent-brain/issues"},"publishConfig":{"access":"public"},"dependencies":{"@opencode-ai/plugin":"^1.2.10","@memvid/sdk":"^2.0.149","proper-lockfile":"^4.1.2"},"devDependencies":{"@eslint/js":"^9.39.2","@types/node":"^22.0.0","@types/proper-lockfile":"^4.1.4","eslint":"^9.0.0","tsup":"^8.0.0","typescript":"^5.7.0","typescript-eslint":"^8.50.0","vitest":"^3.0.0"},"engines":{"node":">=18.0.0"},"gitHead":"f24aac1488781f0166942fe8f39551f878d0f87a","_id":"@brianluby/agent-brain@1.1.2","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-qjxkXKOC3FWt1txdIw7xCvQOrls1m6RlLUVL1Pt9H6Dvkon+SchKpGtHIVnqpF+e7l0N3P0qeoPjk+RZlDulcQ==","shasum":"5f54208a0e7348d4607ae53e78c6ff363c66c31d","tarball":"https://registry.npmjs.org/@brianluby/agent-brain/-/agent-brain-1.1.2.tgz","fileCount":34,"unpackedSize":900398,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCDoIdtLabZmYrSYvn1i0OxXAoABWyIEteoLQI6D7v0aQIgUh5fLO6RgAxONM1tz0jvPUbZUABzyrlf3JwYiqBfiAM="}]},"_npmUser":{"name":"brianluby","email":"brian@luby.us"},"directories":{},"maintainers":[{"name":"brianluby","email":"brian@luby.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-brain_1.1.2_1772171970244_0.6859275556859512"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-26T23:16:16.520Z","modified":"2026-02-27T05:59:30.566Z","1.1.0":"2026-02-26T23:16:16.967Z","1.1.1":"2026-02-27T00:09:00.570Z","1.1.2":"2026-02-27T05:59:30.431Z"},"bugs":{"url":"https://github.com/brianluby/Agent-brain/issues"},"author":{"name":"Brian Luby"},"license":"MIT","homepage":"https://github.com/brianluby/agent-brain","keywords":["claude","claude-code","claude-code-plugin","anthropic","opencode","opencode-plugin","memory","ai-memory","context-persistence","agent-brain","portable-memory","persistent-memory","llm-memory","ai-assistant"],"repository":{"type":"git","url":"git+https://github.com/brianluby/Agent-brain.git"},"description":"Give Claude Code photographic memory in ONE portable file","maintainers":[{"name":"brianluby","email":"brian@luby.us"}],"readme":"<div align=\"center\">\n\n<img src=\"agent-brain.png\" alt=\"Agent Brain\" width=\"320\" />\n\n### Give your agents photographic memory.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<br />\n\n**[Install in 30 seconds](#installation)** · [How it Works](#how-it-works) · [Commands](#commands) · \n\n</div>\n\n<br />\n\n## Memvid Shoutout\n\nMemvid's creative approach to data storage—encoding text in video frames and using decades of video codec R&D for superior compression—inspired me to fork their Claude Brain project into an agent-agnostic version. None of this would be possible without their dedication to open source. If you're working on AI memory, check them out at [github.com/memvid](https://github.com/memvid) —it's seriously clever engineering.\n\n## The Problem\n\n```\nYou: \"Remember that auth bug we fixed?\"\nAgent 1: \"I don't have memory of previous conversations.\"\nAgent 2: \"I did not work on this code yesterday.\nYou: \"We spent 3 hours on it yesterday\"\nAgent 1: \"I'd be happy to help debug from scratch!\"\nAgent 2: \"Let me review the codebase to get an understanding\" *sound of tokens burning*\n```\n\n**small context window. Zero memory between sessions.**\n\nYou're paying for a dory with a PhD.\n\n<br />\n\n## The Fix\n\n```\nYou: \"What did we decide about auth?\"\nAgent 1: \"We chose JWT over sessions for your microservices.\n        The refresh token issue - here's exactly what we fixed...\"\nAgent 2: \" JWT overs sessions is a more secure implementation, Here is the code we fixed\"\n```\n\nOne file. All your agents remember everything.\n\n<br />\n\n## Installation\n\n### Claude Code (Marketplace)\n\n```bash\n# Optional one-time setup (if GitHub plugin URLs fail)\ngit config --global url.\"https://github.com/\".insteadOf \"git@github.com:\"\n```\n\n```bash\n# In Claude Code\n/plugin add marketplace brianluby/Agent-brain\n```\n\nThen in Claude Code:\n\n1. Open `/plugins`\n2. Go to **Installed**\n3. Enable **mind**\n4. Restart Claude Code\n\nOn first run, memory is created at:\n\n```bash\n.agent-brain/mind.mv2\n```\n\nIf you already have a legacy file at `.claude/mind.mv2`, migrate it safely to `.agent-brain/mind.mv2`:\n\n```bash\nif [ ! -f \".agent-brain/mind.mv2\" ]; then\n  mkdir -p \".agent-brain\" && mv \".claude/mind.mv2\" \".agent-brain/mind.mv2\"\nelse\n  echo \"Destination .agent-brain/mind.mv2 already exists. Back up both .claude/mind.mv2 and .agent-brain/mind.mv2, then reconcile manually.\"\nfi\n```\n\n### OpenCode\n\nAdd this plugin package to your OpenCode config:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"@brianluby/agent-brain\"]\n}\n```\n\nOr use a local checkout while developing:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"file:///absolute/path/to/agent-brain\"]\n}\n```\n\nThen restart OpenCode. The plugin will:\n\n- inject memory context on the first message of each session\n- capture tool outputs to persistent memory\n- expose a `mind` tool (`search`, `ask`, `recent`, `stats`, `remember`)\n\nOptional: install OpenCode slash commands globally for all projects:\n\n```bash\nmkdir -p ~/.config/opencode/commands\ncp .opencode/commands/mind-*.md ~/.config/opencode/commands/\n```\n\nProject-local command files are already included in `.opencode/commands/`.\n\n<br />\n\n## How it Works\n\nAfter install, Your Agent's memory lives in one file:\n\n```\nyour-project/\n└── .agent-brain/\n    └── mind.mv2   # Agent's brain. That's it.\n```\n\nNo database. No cloud. No API keys.\n\n**What gets captured:**\n- Session context, decisions, bugs, solutions\n- Auto-injected at session start\n- Searchable anytime\n\n**Why one file?**\n- `git commit` → version control Agent's brain\n- `scp` → transfer anywhere\n- Send to teammate → instant onboarding\n\n<br />\n\n## Commands\n\n**In Claude Code:**\n```bash\n/mind stats                       # memory statistics\n/mind search \"authentication\"     # find past context\n/mind ask \"why did we choose X?\"  # ask your memory\n/mind recent                      # what happened lately\n```\n\n**In OpenCode (slash commands):**\n```bash\n/mind-stats\n/mind-search authentication\n/mind-ask \"why did we choose X?\"\n/mind-recent\n/mind-remember \"Project uses pnpm, not npm\"\n```\n\nThese are provided in `.opencode/commands/` for project-local usage.\nTo use them in every repo, copy them to `~/.config/opencode/commands/`.\n\nOr just ask naturally: *\"mind stats\"*, *\"search my memory for auth bugs\"*, etc.\n\n## OpenCode Support\n\nAgent Brain supports the same core memory lifecycle through a platform adapter model.\n\n- Claude and OpenCode sessions can share project memory continuity.\n- Unknown or incompatible platforms fail open (session continues, memory capture safely skips).\n- Adapter contracts are SemVer-checked and validated through regression and contract tests.\n- OpenCode packaging is published through the npm package `@brianluby/agent-brain`.\n\n<br />\n\n## CLI (Optional)\n\nNo separate CLI install is required. Use the built-in memory commands in Claude Code (`/mind ...`) or OpenCode (`/mind-* ...`) for direct access.\n\n<br />\n\n## FAQ\n\n<details>\n<summary><b>How big is the file?</b></summary>\n\nEmpty: ~70KB. Grows ~1KB per memory. A year of use stays under 5MB.\n\n</details>\n\n<details>\n<summary><b>Is it private?</b></summary>\n\n100% local. Nothing leaves your machine. Ever.\n\n</details>\n\n<details>\n<summary><b>How fast?</b></summary>\n\nSub-millisecond. Native Rust core. Searches 10K+ memories in <1ms.\n\n</details>\n\n<details>\n<summary><b>Reset memory?</b></summary>\n\n`rm .agent-brain/mind.mv2`\n\n</details>\n\n<br />\n\n---\n\n<div align=\"center\">\n\nBuilt as a local-first, single-file memory plugin for Claude Code and OpenCode.\n\n<br />\n\n**If this saved you time, [star the repo](https://github.com/brianluby/Agent-brain)**\n\n<br />\n\n*Send me your `.mv2` file and I'll tell you what's wrong with your code. No context needed - I already know everything.*\n\n</div>\n","readmeFilename":"README.md"}