code-yeongyu/senpi
pi had nothing (nothing), so I made something (something) — sorry mariozechner-senpai, I went ahead and lovingly soiled your pure pi for you. opinionated fork of badlogic/pi-mono with extension-first additions. ganbare ganbare senpi 頑張れ頑張れ先輩
What it solves
senpi provides a more feature-rich, opinionated runtime for AI coding agents. It addresses the need for a "sane" version of the pi-mono framework by bundling a curated set of built-in extensions and core tweaks that improve agent reliability, context management, and tool execution, specifically tuned for the needs of coding assistants like Dori.
How it works
It is a TypeScript monorepo and a fork of pi-mono. It maintains a minimal core while implementing most of its added functionality as extensions. Key architectural improvements include:
- Dynamic System Prompts: Replaces static prompts with an adaptive builder that includes forced intent gates, exploration discipline, and per-model tuning.
- Compaction Pipeline: Uses adaptive thresholds and restoration trackers to manage long-term context and prevent token overflow.
- Tool-Call Middleware: Implements various text-tool protocols (XML, Hermes, YAML+XML) to support models that lack native function calling.
- Extension System: Allows users to install additional capabilities (like LSP or AST-grep) via a CLI command (
senpi install).
Who it’s for
Developers building AI coding agents, users of the pi-mono ecosystem, and those migrating from the OMO (oh-my-openagent) framework who want a lighter, single-binary CLI experience.
Highlights
- Built-in Tooling: Includes native web search, bash timeout enforcement, and a permission system for tool calls.
- gpt-apply-patch: Swaps standard edit tools for Codex-style freeform patching when using GPT models.
- Context Management: Features an adaptive compaction pipeline to handle session recovery and tool-result truncation.
- Broad Model Support: Provides specific prompt presets for various model families (GPT, Claude, Kimi).
- Extensible Architecture: Supports a wide range of pluggable extensions for LSP integration, AST-aware search, and computer-use bindings.
Related
- Project
- Project
- Project
- Project
- Project