npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dmsdc-ai/aigentry-brain

v0.2.5

Published

LLM-Native Intelligence Layer — multi-device memory profile sync

Readme

aigentry-brain

AI 의사결정을 감사 가능하게 만드는 오픈소스 엔진

npm version License: MIT Node.js

Persistent, cross-device memory for AI agents. Exposes 20 MCP tools so Claude Code (and any MCP-compatible client) can read and write structured memories that survive context resets, sync across machines via Git with version vectors, and carry policy metadata controlling scope, retention, and access.


Quick Start

npm install -g @dmsdc-ai/aigentry-brain

That's it. Three things happen automatically:

  1. ~/.aigentry/ is created with a local memory profile
  2. The MCP server is registered in Claude Code, Gemini CLI, and Codex
  3. If gh CLI is authenticated, a private GitHub repo is auto-created for cross-device sync

No prompts. No manual config. On next Claude Code session, brain_context_resume loads your memory automatically.

For manual setup (optional):

aigentry-brain-setup

To start the MCP server manually:

aigentry-brain-mcp

To open the CLI dashboard:

aigentry

Why aigentry?

Most AI memory tools treat memory as a black box. You can't audit what was stored, can't control which model reads what, and can't sync across devices without a proprietary cloud.

aigentry-brain is different:

| Feature | aigentry-brain | Mem0 | Khoj | |---|---|---|---| | Local-first storage | Yes (YAML) | No (cloud) | Yes | | Git-based sync | Yes | No | No | | MCP protocol native | Yes | No | Partial | | Policy per entry (scope/TTL/sensitivity) | Yes | No | No | | Audit trail | Yes | No | No | | Cross-LLM memory | Yes | Partial | No | | Open source | MIT | OSS core | MIT | | Self-hosted | Yes | Paid tier | Yes | | Version vectors | Yes | No | No | | Session handoff | Yes | No | No | | Zero-prompt setup | Yes | No | No |


MCP Tools (20)

Once installed, these tools are available inside Claude Code:

| Tool | Description | |---|---| | brain_append | Create or update a memory entry | | brain_query | Query entries with filters (category, tags, date, content search) | | brain_search | Hybrid lexical/semantic search across memories | | brain_erase | Soft-delete an entry by ID | | brain_context_resume | Restore context summary for AI consumption | | brain_sync_status | Get current sync state | | brain_health | System health report | | brain_compact | Run manual memory compaction | | brain_experiment_run | Run replay-based search/restore experiments | | brain_append_batch | Append multiple entries in one write | | brain_erase_batch | Delete multiple entries by ID | | brain_sync_pull | Pull remote memory state | | brain_sync_push | Push local state to remote Git repo | | brain_sync_ack | Acknowledge sync completion | | brain_peers_list | List configured peer devices | | brain_peers_register | Register a peer device | | brain_export | Export memory entries | | brain_audit_log | Read the audit trail | | brain_session_export | Export session state for handoff | | brain_session_import | Import session state from another device |


Cross-Machine Sync (CMP)

The Cross Machine Protocol (CMP) uses Git as the sync transport. Each device maintains a local clone; push/pull is triggered explicitly via MCP tools or CLI.

# Point to your private Git repo
export [email protected]:you/brain-sync.git

# Pull from remote
aigentry brain sync pull

# Push to remote
aigentry brain sync push

Conflict resolution: Last-Write-Wins based on ISO8601 updated timestamp. Tie-breaking by device_id lexicographic order. Version vectors track causal ordering across devices.

Session handoff allows seamless context transfer between devices via brain_session_export/brain_session_import.

peers.yaml

peers:
  - id: device-macbook
    remote_url: [email protected]:you/brain-sync.git
    branch: main
  - id: device-linux
    remote_url: [email protected]:you/brain-sync.git
    branch: main

Entry Schema

Every memory entry carries:

interface Entry {
  id: string;           // "mem_..."
  category: string;     // preference | skill | fact | decision | habit | ...
  content: string;
  source: string;       // user | auto | session | settings
  confidence: number;   // 0.0 – 1.0
  tags?: string[];
  created: string;      // ISO8601
  updated: string;      // ISO8601
  deleted?: boolean;
  policy?: {
    project_id?: string;
    scope?: 'user' | 'project' | 'team';
    allowed_models?: string[];
    retention_ttl?: string;   // "30d" | "90d" | "365d" | "forever"
    sensitivity?: 'public' | 'internal' | 'confidential' | 'restricted';
  };
  version_vector?: Record<string, number>;  // causal ordering
}

Configuration

All config via environment variables:

| Variable | Default | Description | |---|---|---| | BRAIN_REMOTE_URL | — | Remote Git URL for sync | | BRAIN_REPO_PATH | ~/.aigentry/repo | Local clone path | | BRAIN_PROJECT_ID | "default" | Default project ID for new entries | | BRAIN_DEFAULT_SCOPE | "user" | Default scope (user / project / team) | | BRAIN_PEERS_PATH | ~/.aigentry/peers.yaml | Peer device config file | | BRAIN_DEVICE_ID | auto-detected | Device identifier for sync | | BRAIN_LOG_LEVEL | "info" | Log level (debug / info / warn / error) | | BRAIN_CONFIG_PATH | ~/.aigentry/config.json | Setup config file path |


Known Limitations

  • LWW conflict resolution is simple — concurrent writes from multiple devices with identical timestamps break ties by device ID, not content
  • Team scope access control is not yet enforced (Phase 2)
  • retention_ttl auto-expiry sweeper is not yet implemented — expired entries are filtered at read time but not physically removed

The aigentry Ecosystem

| Package | Description | npm | |---|---|---| | aigentry-brain | Persistent memory + MCP server (this repo) | @dmsdc-ai/aigentry-brain | | aigentry-deliberation | Multi-session AI debate engine with cross-LLM browser integration | @dmsdc-ai/aigentry-deliberation | | aigentry-devkit | Cross-platform installer and tooling bundle | @dmsdc-ai/aigentry-devkit | | aigentry-registry | Agent and tool registry | @dmsdc-ai/aigentry-registry | | aigentry-ssot | Single source of truth sync utilities | @dmsdc-ai/aigentry-ssot |

aigentry-deliberation

The deliberation package lets multiple AI models debate a decision before committing to it. Claude responds via MCP tool; Gemini or ChatGPT respond via CDP browser automation. Transcripts are structured with explicit agree/disagree/conditional tagging and synthesized into a report.

npx @dmsdc-ai/aigentry-deliberation install

Development

git clone https://github.com/dmsdc-ai/aigentry-brain.git
cd aigentry-brain
npm install
npm run build
npm test          # 746 tests across 52 files
npm run lint      # ESLint + Prettier
npm run test:coverage  # Coverage report (60% threshold)

Requirements: Node.js >= 20


License

MIT — see LICENSE