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 is a coding-agent runtime that makes everyday AI-assisted code work smoother by adding practical, opinionated features on top of the pi-mono agent while keeping the core minimal. It powers the Dori AI assistant and focuses on disciplined tool use, context management, and safe permission handling.
How it works
senpi is a TypeScript monorepo forked from pi-mono, rebranded as a single CLI binary. It follows an extension-first philosophy: the core stays lean, and capabilities are added as built-in extensions that can be toggled via settings. Key subsystems include a dynamic system prompt that forces an intent gate before any tool call, a compaction pipeline for adaptive context summarization, tool-call middleware supporting XML, Hermes, YAML+XML, and Gemma4 text-tool protocols for models without native function calling, and a full permission system with rules, JSONL storage, and TUI prompts. Additional capabilities like LSP, AST-grep, and comment checking can be installed as standalone pi-* extensions.
Who it’s for
Developers building AI assistants or coding agents who want a lightweight, production-tested runtime with curated defaults, and OMO users who prefer a single CLI binary without the heavier opencode harness. It is also the runtime behind the Dori assistant, so anyone exploring that ecosystem will find relevant design choices.
Highlights
- Extension-first design: every feature ships as a builtin extension, disabled via
disabledBuiltinExtensions. - Forced intent gate in the dynamic system prompt to discipline tool usage.
- Compaction pipeline with adaptive thresholds, emergency compaction, and restoration tracking.
- Tool-call middleware for multiple text-tool protocols (XML, Hermes, YAML+XML, Gemma4).
- Permission system with allow/deny rules, JSONL storage, and parser-aware patterns.
- Built-in extensions for apply-patch, bash timeout, web search, goal tracking, nested AGENTS.md, and more.
- Installable extensions for LSP, AST-grep, comment checking, computer use, and native provider tools (Anthropic, OpenAI, Google).
Related
- Project
- Project
- Project
- Project
- Project