pi-reflect

pi-reflect is an open-source agent harness and self-improvement extension for pi coding agents, developed by jo-inc. It inspects agent session transcripts over time to extract recurring correction patterns, mistakes, and developer preferences, and then updates agent behavioral configuration files with precise, surgical edits. In daily operations, pi-reflect operates either interactively inside agent sessions using slash commands or in a headless mode for scheduled automation. The system includes commands such as /reflect to initiate transcript analysis, /reflect-config to adjust per-target models, lookback windows, and transcript sources, and /reflect-history to monitor recent reflection runs. It supports custom model registry authentication to route reflection analysis through various LLM providers. What sets pi-reflect apart from standard memory layers is its focus on safe, automated rule synthesis rather than naive context append. It includes safety mechanisms such as automated backups, exact text matching, ambiguity detection, and duplication prevention to prevent configuration corruption. Distributed via npm under the `@jo-inc/pi-reflect` package scope, pi-reflect is open-source software that can run locally on developer workstations or via system schedulers like cron and launchd.

Tags: ai agent, cli, code assistant, coding agent, developer tools, OpenSource

Visit pi-reflect