senpi

An opinionated fork of pi-mono that packs intent gates, dynamic prompts, compaction, and a permission system into a lightweight coding-agent CLI.

Stars
★ 489
Last updated
today
License
MIT
Primary language
TypeScript

At a glance

How it runs
CLI
Works with
Universal · cross-platformOpenAI API · Claude API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
npmBunNode.jsShell / CLINetwork accessLocal filesystem
Typical use
Developers migrating from OMO who want the intent gate, todo continuation loop, and per-model prompt presets but prefer a lightweight single-binary CLI over an opencode plugin.
Not a fit if
  • Heavy OMO users who need Discipline Agents, Team Mode, skills, or Ralph Loop
  • Teams betting a production pipeline on it — the README self-labels it Experimental
  • Teams needing built-in container isolation; it inherits the launching user's filesystem and credentials
Source review
74/100 · Some gaps

What does this agent do, and when should you use it?

senpi is a TypeScript monorepo fork of badlogic/pi-mono, maintained by code-yeongyu and positioned as a 'sane pi' — it also serves as the coding-agent runtime behind Dori, Sisyphus Labs' AI assistant. It follows pi's extension-first philosophy: the core stays minimal while 18 builtin extensions land in the binary, including permission-system, compaction, dynamic-prompt, prompt-preset, todowrite, gpt-apply-patch, bash-timeout, websearch/webfetch, goal, and rules. The repo bundles @earendil-works/pi-ai (multi-provider LLM API), pi-agent-core (agent runtime), pi-tui (differential-rendering terminal UI), and the senpi CLI itself. It borrows signature ideas from OMO (intent gate, todo continuation, per-model presets) but ships as a single CLI binary instead of an opencode plugin, deliberately lighter than OMO. The project is explicitly experimental, with core modifications documented in changes.md files to keep upstream rebases reviewable.

senpi runs as an interactive CLI/TUI coding agent: it reads project rule files (AGENTS.md, CLAUDE.md, nested AGENTS.md), builds a dynamic system prompt (identity → forced intent gate → task discipline → verification tiers → per-model preset), and drives tool calls through the unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.). Tool surface includes bash (with timeout policy), file editing (swapped to Codex-style apply_patch on GPT models), todowrite/todoread, websearch, webfetch, and goal tracking. The session layer runs adaptive compaction (speculative + emergency, restoration tracker, tool-result truncation) and tool-pair-guard sanitization of orphan tool_result blocks. Standalone extensions such as pi-lsp-client, pi-ast-grep, and pi-comment-checker install via senpi install git:github.com/code-yeongyu/pi-ast-grep-style commands. The permission system stores rules in JSONL, prompts in the TUI, and supports a wildcard allow rule in ~/.senpi/agent/settings.json for full auto-approval.

  1. Developers migrating from OMO who want the intent gate, todo continuation loop, and per-model prompt presets but prefer a lightweight single-binary CLI over an opencode plugin.
  2. Engineers switching between OpenAI, Anthropic, and Google models, using pi-ai's unified API plus prompt-preset tuning per model family.
  3. Teams needing allow/deny rules and auditable JSONL permission records via the permission-system builtin.
  4. Users running long coding sessions who need compaction and tool-pair-guard to keep context stable.
  5. Developers wanting deep code intelligence — LSP diagnostics, AST search/replace, comment-quality checks — by installing pi-lsp-client, pi-ast-grep, or pi-comment-checker.
  6. Trusting users who want OMO-style full automation by writing {"permission":{"*":"allow"}} into settings..

How do you install or deploy this agent?

The npm package is @code-yeongyu/senpi; the installed executable is senpi. For development: npm install --ignore-scripts (or bun install --ignore-scripts), then bun run build, bun run test, and bun run publish. Runtime needs a shell and network access to LLM provider APIs (API keys required). Configuration lives in ~/.senpi/agent/ (global) and .senpi/ (per project). The README does not state a one-line end-user install command for the published npm package; the exact install command should be confirmed separately.

How do you use this agent?

After installation, run senpi to enter the interactive CLI/TUI session. Configure ~/.senpi/agent/settings.json as needed: permissions (e.g., wildcard allow), disabledBuiltinExtensions, favoriteModels, openai.serviceTier. Install extensions: senpi install git:github.com/code-yeongyu/pi-lsp-client, senpi install git:github.com/code-yeongyu/pi-ast-grep, senpi install git:github.com/code-yeongyu/pi-comment-checker. Update with senpi update senpi (queries code-yeongyu/senpi releases). Useful commands: /rules, /reload-rules, /history, /diff, /files, /tui, and /lsp (requires pi-lsp-client).

What are this agent's strengths and limitations?

Pros
  • Extension-first architecture: 18 builtin extensions work out of the box, and any unwanted one is a single disabledBuiltinExtensions flag away from off; core stays minimal and rebase-friendly against upstream.
  • Multi-provider coverage: pi-ai unifies OpenAI, Anthropic, and Google APIs; prompt-preset provides per-model presets for GPT-5.x, Claude Opus 4.x, and Kimi K2.6; gpt-apply-patch swaps in a Codex-style patch tool for GPT-family models.
  • Serious context-reliability engineering: the compaction pipeline (adaptive thresholds, restoration tracker, emergency compaction), tool-pair-guard, and bash-timeout address real long-session failure modes.
  • Documented supply-chain hardening: exact-pinned direct dependencies, save-exact and min-release-age in .npmrc, scheduled npm audit and signature checks in CI.
Limitations
  • The README self-labels the project 'Experimental' and warns against betting a production pipeline on it; design decisions reflect the needs of one specific assistant, Dori.
  • Several OMO capabilities have no counterpart: Discipline Agents, Team Mode, the skill system, Hashline, Ralph Loop, and /init-deep are all absent — heavy OMO users face a feature gap.
  • No built-in container boundary: by default the agent runs with the launching user's filesystem, process, network, and credential permissions; isolation requires adopting documented OpenShell, Gondolin micro-VM, or Docker patterns yourself.
  • As a fork it must be periodically rebased on upstream pi-mono with changes.md bookkeeping; documentation is developer-oriented and the end-user one-line install command is not stated.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
senpi This agent 74 · Some gaps CLIFree + model costs ★ 489 today TypeScript OpenAI API · Claude API
zot Coding Agent 59 · Major gaps CLIFree + model costs ★ 351 today Go OpenAI API · Claude API
FuXi Terminal AI Coding Agent 37 · Major gaps CLIFreemium ★ 3.2k 4d ago Python OpenAI API · Claude API
opencode 47 · Major gaps CLIFree + model costs ★ 221k today TypeScript —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
74/ 100 5-point scale 3.7 / 5
This review covers the source as of Sep 09, 2026. The project has shipped 30 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 19/29
Reliability 12/14
Adaptability 14/18
Convention 16/18
Effectiveness 9/13
Verifiability 4/8
Why each dimension lost points
Trust19 / 29 · 3.3/5

The permission system provides rules, JSONL storage, and TUI confirmation prompts with non-interactive fallback, and the README explicitly warns about the wildcard-allow shortcut — good. Deducted: SECURITY.md states there is no sandbox and that prompt injection is unprotectable; sensitive-data handling is only a trust-boundary narrative with no concrete secret-management evidence; rollback evidence exists only in the release pipeline (draft cleanup, source_ref recovery), not for user sessions/files.

Reliability12 / 14 · 4.3/5

Test files thoroughly cover empty-response recovery, stream-start timeout, and thinking timing; error messages name the controlling setting (retry.provider.streamStartTimeoutMs) — strong self-consistency and failure messaging. Deducted: dependency availability rests on lockfiles and pinned-deps check scripts only; static review cannot verify installs or passing CI.

Adaptability14 / 18 · 3.9/5

The README names its audience (Dori runtime, OMO migrants) and explicitly lists features with no senpi counterpart (Discipline Agents, Team Mode, etc.) — clear capability boundaries. Deducted: environment fit is asserted (Node>=24, bun) with cross-platform evidence only on the CI side; trigger precision (intent gate behavior) is described but not substantiated by provided source.

Convention16 / 18 · 4.4/5

Excellent information architecture: package tables, ordered builtin-extension registry, per-directory changes.md trackers, a changelog-gate workflow enforcing PR entries, complete versioning scripts, and a LICENSE preserving both upstream and fork copyright. Deducted: maintenance responsibility sits on a single experimental fork ('don't bet a production pipeline on it'); pi/senpi naming is mixed (release assets still named pi-*), and examples are mostly install commands rather than usage examples.

Effectiveness9 / 13 · 3.5/5

Positioning is clear ('a lighter OMO on pi'); bounded webfetch, bash timeouts, and the compaction pipeline carry real value. Deducted: output usability and cost/benefit depend on upstream pi-mono quality not present in this evidence set, and the experimental framing weakens the production cost argument.

Verifiability4 / 8 · 2.5/5

The README claims verification against git diff and all changes.md files, but only a subset of files is provided, so many claims (extension behaviors, OMO mapping) cannot be rechecked; tests and SECURITY.md do not contradict each other, and fact/inference separation is acceptable. Deducted: many referenced external repos (pi-lsp-client etc.) are absent from the evidence, making cross-source corroboration essentially impossible.

Risks and how to mitigate them
  • SECURITY.md explicitly states the coding agent runs within the user's account with no sandbox — isolate with a container or VM yourself.
  • The README's wildcard allow setting disables all interactive tool prompts; use only in fully trusted workspaces.
  • The project self-describes as an experimental fork and explicitly discourages production pipelines.
  • Prompt injection is declared unprotectable and out of security scope; exercise extra caution with untrusted repository content.
  • npm packages use the @earendil-works scope while the repo/brand is senpi; verify package names and provenance before installing.
Evidence confidence: Low Reviewed Sep 09, 2026 Reviewed revision fc2fcb39072e New commits since this review; the score may not cover them
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v2026.10.24-3
    Release notes excerpt
    @code-yeongyu/senpi Breaking Changes Added - On macOS and Linux, a public RPC host endpoint (bare --mode rpc --listen, the host supervisor, and senpi host ensure) now publishes a fresh per-launch key record (<keyRoot>/rpc/keys/<launch_id>, a 0600 file in a 0700 directory) and proves it with an HMAC challenge-response carried in the caller's own first get_protocol_info frame; first-party clients verify the host's proof before sending any command and then prove the key themselves. This release serves an unauthenticated client with one deprecation line per connection; `SENPI …
    View on GitHub ↗
  2. v2026.10.24-2
    Release notes excerpt
    @code-yeongyu/senpi Breaking Changes Added - Shared RPC hosts support live-only attach_session, one-hold release_attachment, and atomic reclaim_session. Attachments are fenced by durable session identity, and temporary releases let active turns finish ([#3795](https://github.com/code-yeongyu/senpi/issues/3795), [#3814](https://github.com/code-yeongyu/senpi/pull/3814)). …
    View on GitHub ↗
  3. v2026.10.24-1
    Release notes excerpt
    @code-yeongyu/senpi Breaking Changes Added Changed - A person's turn now writes two session lifecycle records, one running record when its epoch opens and one done (or other terminal) record when it seals, instead of three or four. The session_lifecycle event for that turn arrives when its run starts rather than when the input is admitted; input into a still-open epoch is still recorded at once ([#3980](https://github.com/code-yeongyu/senpi/issues/3980)). …
    View on GitHub ↗
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents