pi-dejavu-memory

DejaVu memory extension for Pi — automated memory management with SessionStart boot protocol

Packages

Package details

extension

Install pi-dejavu-memory from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-dejavu-memory
Package
pi-dejavu-memory
Version
1.4.2
Published
Oct 22, 2026
Downloads
1,967/mo · 50/wk
Author
alexandre_ai
License
MIT
Types
extension
Size
320.5 KB
Dependencies
1 dependency · 3 peers
Pi manifest JSON
{
  "hooks": [
    "./hooks/session-start.sh"
  ],
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-dejavu-memory

DejaVu extension for Pi — automated memory management with SessionStart boot protocol.

Agent-side companion to a DejaVu MCP memory server on Cloudflare. Also available for dsh: dsh-dejavu-memory.

The OpenAI/Codex plugin is the only client that opens the interactive memory graph. Pi uses the same server and boot protocol through tools only; there is no graph UI or direct MCP setup for end users here.

Features

  • SessionStart Boot Protocol — the hook emits DEJAVU_BOOT_REQUIRED; the agent then calls dejavu_boot (reads system://boot, system://recent/5, system://triggers, then best-effort system://briefing) and reads system://focus to resume active working trees (recent is a briefing subset, so no need to re-read it after boot)
  • Memory Rules — global rules injected every session for intelligent memory usage (write-judgement, update-over-create, trigger discipline)
  • Memory Tools — dejavu_boot, dejavu_read, dejavu_create, dejavu_update, dejavu_delete, dejavu_search

Install

pi install npm:pi-dejavu-memory

Configure

Add to ~/.claude/rules.md or project rules:

- DejaVu memory rules (from pi-dejavu-memory extension)

Set your MCP endpoint in ~/.pi/agent/extensions/pi-dejavu-memory/config.json:

{ "mcpUrl": "https://dejavu.example.com/mcp", "mcpHeaders": { "CF-Access-Client-Id": "<service-token-id>", "CF-Access-Client-Secret": "<service-token-secret>" } }

For servers behind Cloudflare Access (e.g. dejavu.example.com), pass the service token headers instead of mcpAuth:

{
  "mcpUrl": "https://dejavu.example.com/mcp",
  "mcpHeaders": {
    "CF-Access-Client-Id": "your-client-id",
    "CF-Access-Client-Secret": "your-client-secret"
  }
}

mcpHeaders is merged into every MCP request; mcpAuth (Authorization) can be combined if the server also accepts it.

Without a config file, the extension also accepts DEJAVU_MCP_URL and DEJAVU_MCP_AUTH.

How It Works

  1. SessionStart Hook — emits DEJAVU_BOOT_REQUIRED
  2. Agent calls dejavu_boot — loads system://boot, system://recent/5, system://triggers, then best-effort system://briefing
  3. Agent reads system://focus — resume active working trees (recent already covered by boot/briefing)
  4. Global Rules — memory operation rules injected every session
  5. Agent uses memory tools — read/create/update/delete based on rules

Tool naming

The dejavu_boot / dejavu_read prefixes make the memory tools explicit in the tool list and in the boot protocol, so agents call them directly instead of probing for a generic resource first.

License

MIT

Related