Files
my-pi/hippo-memory-pi
云服务部-叶林立 879fc5d37f docs(upstream): 将 UPSTREAM.md 来源记录统一改为中文维护
把 12 份 UPSTREAM.md 来源记录全部翻译为中文,并把中文定为这份仓库自有
维护文档的强制语言。

- 翻译 hippo-memory-pi、pi-ask-user、pi-chrome、pi-compaction、
  pi-extension-codex-fast-mode、pi-minimal-footer、pi-notify、
  pi-permission-system/docs/auto-review、pi-ssh、pi-subagents 与
  pi-tool-search 的来源记录。
- 在 AGENTS.md 增加纪律:每个自维护扩展目录必须保留中文 UPSTREAM.md,
  内容涵盖官方仓库、tag/commit、导入版本、导入日期、许可证归属、本地
  改动清单与同步上游时的约束。
- 明确边界:UPSTREAM.md 属于仓库自有的维护文档,因此使用中文;上游自带
  的源码、测试、文档、README、CHANGELOG 与 LICENSE 一律保持原文,不翻
  译、不改写,避免同步上游时产生无意义 diff 并破坏许可证原文完整性。
- 所有 40 位 commit、tag/版本号、仓库 URL 与许可证路径原样保留,仅翻译
  叙述性文字。

验证:12 份文件均无残留英文正文;逐份复核了 commit、版本、URL 与
LICENSES/ 路径未发生改变。
2026-10-13 23:19:01 -07:00
..

Hippo Memory - Pi Extension

my-pi packaging note: this official source is bundled and loaded directly by the root package; do not copy it to another Pi extension directory. Use the root install.sh, update.sh, and uninstall.sh prompts to manage the matching global CLI. Upstream's original manual instructions are retained below for reference.

Biologically-inspired memory for Pi coding agent. Memories decay by default, retrieval strengthens them, errors stick longer, and sleep consolidation compresses episodes into patterns.

Install

# Install hippo CLI
npm install -g hippo-memory

# Init hippo in your project (or scan all repos)
hippo init
# or: hippo init --scan ~

# Copy extension to Pi's extensions directory
cp -r extensions/pi-extension ~/.pi/agent/extensions/hippo-memory

Or for project-level:

cp -r extensions/pi-extension .pi/extensions/hippo-memory

What it does

Automatic When
Injects memory context Session start
Captures tool errors After any failed tool call
Learns from git On hippo sleep (session end)
Consolidates memories On hippo sleep (session end)
Shares to global store On hippo sleep (session end)

Error capture has three filters to prevent memory pollution:

  1. Noise pattern filter (timeouts, ECONNREFUSED, etc.)
  2. Per-session rate limit (max 5 error memories)
  3. Per-session deduplication

Tools

The extension registers 5 tools for the LLM:

Tool Description
hippo_recall Search memories by topic
hippo_remember Store a new memory
hippo_outcome Report if memories were helpful
hippo_status Check memory health
hippo_context Smart context from git state

Config

Edit the DEFAULT_CONFIG object at the top of index.ts:

const DEFAULT_CONFIG = {
  budget: 4000,           // Token budget for recall
  contextBudget: 1500,    // Token budget for auto-context
  framing: 'observe',     // observe | suggest | assert
  autoContext: true,       // Inject context at session start
  autoLearn: true,         // Capture tool errors
  autoSleep: true,         // Run consolidation on exit
  maxErrorsPerSession: 5,  // Error capture rate limit
};

Requirements

  • hippo-memory CLI installed globally: npm install -g hippo-memory
  • .hippo/ initialized in your project: hippo init
  • Pi coding agent

How it differs from the OpenClaw plugin

Same core behavior. The Pi extension uses Pi's event system (session_start, tool_result, session_shutdown) instead of OpenClaw's hook system. Both use execFileSync with args arrays (no shell injection).