pi-sim-passive0.2.1
Lightweight passive JSONL observation archive for Pi Agent
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
title: Self-Improvement Memory emoji: π§ colorFrom: blue colorTo: indigo sdk: static app_file: index.html pinned: false license: mit short_description: Model-independent persistent memory for Pi Agent tags:
- pi-agent
- agent-memory
- typescript
- local-first
- self-improvement
Self-Improvement Memory (SIM)
A lightweight, passive observation archive for Pi Agent.
SIM records information. Pi interprets it. The user retains authority.
SIM automatically records selected lifecycle and tool-execution metadata in local JSON Lines (JSONL) files. Pi can retrieve past observations using the read-only sim_search tool. SIM does not train models, run independent inference, execute improvement campaigns, or certify task success.
Install
Requires Pi Agent (tested with version 1.7.0), Git for Git-based installation, and a writable local archive directory. Review the extension before installing: Pi extensions run with your operating-system permissions.
pi install git:github.com/adammohse/Self-Improvement-Memory
Alternatively, clone the repository and run pi install with its absolute local path.
Restart Pi, then run:
/sim-status
SIM starts recording automatically in trusted projects. No additional language model is required for passive observation recording.
File Architecture
Self-Improvement-Memory/
βββ .github/
β βββ workflows/
β βββ sync-to-huggingface.yml
β βββ test.yml
βββ skills/
β βββ self-improvement/
β βββ SKILL.md
βββ .gitignore
βββ archive.mjs
βββ CHANGELOG.md
βββ index.html
βββ index.ts
βββ LICENSE
βββ package.json
βββ README.md
βββ test.mjs
Use
Recording starts automatically in trusted projects. To retrieve previous observations, ask Pi to call sim_search with, for example:
{"query":"tool_execution_end","limit":10}
Search is literal metadata keyword matching, not semantic search. An optional session_hash narrows results. A missing observation is not evidence that an event did not occur. A tool reporting no error does not establish task success.
/sim-status reports committed, pending, dropped and uncertain observations, plus storage and observation errors. Exit Pi normally to flush pending records.
Storage configuration
Default: ~/.pi-sim/passive-v2. Set SIM_ARCHIVE_ROOT before starting Pi to an absolute existing parent directory on a writable local filesystem. The extension creates passive-v2 beneath it. Optional legacy journals may be stored under sessions beneath the same parent. The default parent is created automatically. Use a dedicated directory owned by your account; do not use a shared or untrusted directory.
PowerShell:
New-Item -ItemType Directory -Force "$HOME\sim-memory" | Out-Null
$env:SIM_ARCHIVE_ROOT = "$HOME\sim-memory"
pi
Linux/macOS:
mkdir -p "$HOME/sim-memory"
SIM_ARCHIVE_ROOT="$HOME/sim-memory" pi
No fixed drive letter, volume UUID or provider configuration is required. This portable edition checks directory identity rather than authenticating a physical disk. Do not disconnect or replace the archive filesystem while Pi is running.
Privacy and limits
- Records contain timestamps, event types, hashed identifiers, selected tool names, error indicators and reported durations. Raw prompts, arguments, command text and tool output are not stored.
- Direct user shell invocation records only the occurrence, not its outcome. Unrecognized tool names are projected as
other. - Search is bounded to 32 files, 16 MiB and 20 results; directory enumeration is also bounded. Historical search is not exhaustive.
- Queue capacity is 256; writes are batched asynchronously. Errors or queue saturation may lose observations. Abrupt termination can lose pending writes.
- Hash chains detect some corruption; they are not signatures or proof against an attacker who can rewrite files. Legacy schema validation is limited.
- Metadata can still reveal usage patterns. Keep archives private; no encryption or automatic retention/deletion is provided. The extension itself makes no network requests, but retrieved metadata can enter the model context and may be transmitted by your configured model provider.
- This is not a permission system or security sandbox. It cannot prevent other tools from accessing files if the host permits them.
- It does not preserve detailed solutions or reasoning and does not implement autonomous recursive self-improvement.
Development and Validation
Run the automated archive tests:
node --test test.mjs
Automated compatibility testing
| Operating system | Node.js 22 | Node.js 24 |
|---|---|---|
| Windows | PASS | PASS |
| Ubuntu Linux | PASS | PASS |
| macOS | PASS | PASS |
All six GitHub Actions test environments passed.
Native runtime validation
- Original SIM v0.2.0: Windows native recording, historical retrieval, tool success/error recording and restart tests passed.
- Portable SIM v0.2.1: Windows native initialization, recording, persistent storage and clean shutdown passed.
- Direct GitHub installation and automatic extension discovery passed.
- Native Windows integration tested with Pi Agent 1.7.0.
- Passive recording verified without a configured language model.
Known validation limits
Native Pi integration on Linux and macOS remains unverified. Portable model-driven retrieval requires additional runtime validation. Long-duration reliability and inference overhead have not been benchmarked.
Uninstall
pi remove git:github.com/adammohse/Self-Improvement-Memory
Restart Pi. Archive files are not automatically deleted. Back them up or remove them yourself when no Pi process is using them.
Authors and Acknowledgments
Project Creator and Maintainer: adammohse
AI Development Collaborator: ChatGPT (OpenAI)
Self-Improvement Memory (SIM) was developed through humanβAI collaboration. The project creator established the objectives, architectural philosophy, operational requirements, and performed real-world deployment and acceptance testing.
ChatGPT contributed extensively to system architecture, software implementation, debugging, architectural simplification, test development, and technical documentation.
The project follows a fundamental design principle:
SIM records information. Pi interprets information. The user retains authority.
This independent open-source implementation is inspired by research into Self-Improvement Memory and continual recursive self-improvement. It is not an official implementation of the original research or affiliated with Google DeepMind or OpenAI.
Released under the MIT License.
License
MIT. See LICENSE.