@lebronj/pi-suite
v0.1.40
Published
Slim Pi suite for WildClawBench / Claw-Eval: update_plan, bench control, memory, vision/media tools, safety gate.
Downloads
1,943
Maintainers
Readme
@lebronj/pi-suite
Slim Pi suite for WildClawBench / Claw-Eval. Default install profile is Lenovo ModelFactory DeepSeek; the bench profile (TEAM_PROFILE=zhizengzeng) provisions GPT-5.5 as the main model plus Gemini vision tools.
Evolution helpers and subagents are not loaded during evaluation. See docs/bench/LEADERBOARD.md.
Install
npm install -g --ignore-scripts @earendil-works/[email protected]
pi install npm:@lebronj/pi-suite
pi install npm:pi-web-access
pi install npm:@lebronj/pi-lspOr bootstrap Pi, write the DeepSeek provider, and install the slim suite. The script asks for the API key on the terminal; it does not ship a key.
curl -fsSL https://registry.npmjs.org/@lebronj/pi-suite/-/pi-suite-0.1.40.tgz | tar -xzO package/scripts/bootstrap.sh | bashDefaults written to ~/.pi/agent/models.json / settings.json:
- Provider:
lenovo-deepseek-v4-flash - Base URL:
https://modelfactory.lenovo.com/service-large-600-1777255649450/llm/v1 - API:
openai-completions - Default model:
DeepSeek-V4-Flash-0731
Override with TEAM_BASE_URL, TEAM_MODEL, or TEAM_API_KEY. Old claude-code.club / gpt-5.5 leftover: TEAM_PROFILE=legacy (see scripts/bootstrap.legacy.sh).
Bench profile: GPT-5.5 + Gemini vision
TEAM_PROFILE=zhizengzeng ZHIZENGZENG_API_KEY=sk-... bash scripts/bootstrap.shWrites the zhizengzeng provider (https://api.zhizengzeng.com/v1) with:
gpt-5.5/gpt-5.5-pro— main control, Responses API (chat completions rejects tools +reasoning_effortfor these models), text+image input.gemini-3.1-pro-preview— vision fallback model, chat completions.~/.pi/agent/media-tools.json— key + base URL for thegemini_visiontool below.
What Is Included
update_planfor long-horizon checklists.- Benchmark control (
extensions/bench-control.ts): records the Pi/suite/tool runtime manifest, enforces explicit search-query limits across turns, checks requested artifacts at 25%/50%/75% of the working budget, and usesPI_BENCH_DEADLINE_EPOCHto steer the agent into artifact finalization before the outer timeout. Finalization blocks new searches, remote vision calls, installations, clones, and downloads. - Media tools (
extensions/media-tools.ts), backed by Zhizengzeng's Google-native gateway (/google/v1beta):gemini_vision(paths, question)— images, whole videos (audio track included, timestamp-aware, MM:SS), and audio files. Oversized videos are transcoded down with ffmpeg; frame sampling is the last resort.smartCrop=truezooms into the relevant image region (two-pass crop-and-reask).startSeconds/durationSecondsclip long videos.image_contact_sheet— build a numbered grid for pixel-based batch classification instead of inferring classes from filenames.video_frames— extract frames to files: fixed interval, exact timestamps, or scene-change detection.image_crop— crop/resize an image with ffmpeg.media_probe— ffprobe metadata (duration, resolution, codecs, fps).gemini_visionuses the configured model only, one bounded retry with exponential backoff, a 30-second default request timeout, a 65-second whole-tool deadline, and a cross-call circuit breaker so a failed visual backend cannot consume the task budget indefinitely.- Requires
ffmpeg/ffprobeon PATH. Key resolution:ZHIZENGZENG_API_KEYenv, then~/.pi/agent/media-tools.json. Known gateway limits: OpenAI-formatvideo_urldoes not deliver video; the Files API upload returns 500 — hence inline + transcode.
- Safety gate (
extensions/safety-gate.ts), model-agnostic bench rails:- Blocks catastrophic filesystem/Git commands, credential harvesting, runtime package installation, executing workspace
SKILL.md, and cloning unreviewed code into auto-loaded skill/plugin directories. - Scans a repository for likely secrets before Git mutation/publication and blocks without revealing secret values.
- Preserves existing files beside the original as
*.preexisting.*beforewrite/editor common shell overwrites, blocks writes through symbolic links, treats overwrite authorization as negation-aware, and protects fixed/human-only lines from modification.
- Blocks catastrophic filesystem/Git commands, credential harvesting, runtime package installation, executing workspace
- Vendored memory, bench-slim by default:
memory_read+ lexicalmemory_searchonly. SetPI_MEMORY_BENCH=0to restore write/curator/share tools. For harness runs also setPI_MEMORY_FINALIZE=0andPI_MEMORY_SKILL_DRAFTS=offto disable shutdown finalization noise. - Companions installed by bootstrap:
pi-web-access,@lebronj/pi-lsp. - Web fetch fallback (
pi-web-access): bootstrap writes~/.pi/web-search.jsonwithfetchRouting.allowRemoteHostedProviders: trueandproviders: [http, firecrawl, jina, tinyfish, search1api], so pages that fail plainhttp/Readability (403 / anti-bot / JS-rendered) fall back tojina(r.jina.ai). Search routing defaults toserperwithjinafallback. SetSERPER_API_KEY/JINA_API_KEYin that file for the fallback tiers. - Reward-only self-evolution loop (
bench/evolve/): evaluates the harness on a task set for multiple rounds, feeds back only a clamped scalar score/status plus agent-owned traces and artifact manifests (never grader details), and evolvesbench/workspace/(system prompt append, memory card, tool trims, skills) with evidence-backed change manifests falsified by next-round flips. Seebench/evolve/README.md. /benchcommand (extensions/bench.ts), the in-pi switch for the loop:/bench taskslists tasks,/bench run [task ...]starts a one-off eval in the background,/bench evolve [N]starts the self-evolution loop,/benchshows status/results,/bench stopkills the run. Operator-only: disabled in the eval profile, and bench child processes never register it (PI_BENCH_CHILD=1).
RPC Runner Requirements
- Use Pi
0.84.3or newer. Bootstrap pins0.84.3by default; setPI_VERSION=latestto opt into a newer release after validating extension compatibility. - In multi-turn sessions, wait for
agent_settledbefore sending the next normal prompt.agent_endonly marks one low-level run and may be followed by retry, compaction, or queued continuation. - If a message must be submitted while Pi is busy, send RPC
promptwithstreamingBehavior: "followUp"(or"steer"when interruption is intentional). Do not retry a normal prompt in a tight loop afterAgent is already processing. - Keep the outer task timeout and each prompt timeout separate in logs and result status. A 600-second prompt timeout inside a 7200-second task budget is a prompt timeout, not a 7200-second Pi run.
- After any timeout, abort the active run and wait for settlement or replace the Pi process before reusing the session. Multi-role handoffs must not reuse a still-busy process.
Not installed or loaded:
- autogoal and skill-creator (repository-only evolution helpers)
pi-subagents,pi-mcp-adapter,pi-mono-figma
Do not also list those companions inside this package manifest; duplicates conflict.
Autogoal (evolution only)
The repository-only evolve profile can load /autogoal <task> for bounded autonomous coding runs. It is excluded from evaluation and from the published leaderboard package.
Useful commands:
/autogoal <task>
/autogoal status
/autogoal pause
/autogoal resume
/autogoal checkpoint optional reason
/autogoal dropBehavior:
- 60% context: prepare and stay concise.
- 75% context: write a structured checkpoint soon.
- 85% context: checkpoint and switch to a new session.
- Completion requires current-state evidence: changed files read after edits and a passing validation command.
- Subagents are optional and budgeted; worker subagents must use worktree isolation.
- Run artifacts are written under
~/.pi/agent/workflow-runs/autogoal-<run-id>/.
Update Plan
The update_plan tool gives Pi a Codex-style visible execution checklist for non-trivial tasks. It supports init, start, done, drop, rm, append, and note, shows active plan progress in the UI, and injects guidance to use it for 3+ step tasks or user-provided checklists.
Useful commands:
/plan-status
/plan-clearDefault Model Setup
Bootstrap writes the Lenovo DeepSeek provider above. The API key is entered at install time and stays on the user's machine. Do not publish a shared key in this package.
Old team endpoint leftover (main):
TEAM_PROFILE=legacy bash scripts/bootstrap.legacy.shMemory And Versioning
@jhp/pi-memory works without qmd for core memory features:
memory_writememory_readmemory_editscratchpadmemory_curate
memory_search automatically falls back to local lexical matching without qmd or embeddings. The bootstrap script installs qmd and initializes its collection when Bun is available, but does not run the time-consuming embedding step. Run qmd embed only when semantic search is needed. If Bun is missing, install qmd later:
bun install -g https://github.com/tobi/qmd
qmd collection add ~/.pi/agent/memory --name pi-memory
qmd embedMemory versioning is enabled by default. It snapshots the resolved memory root and resolved disabled skill-draft root into the local evolution repo, commits local changes automatically, and leaves push manual by default. Standalone Pi resolves to ~/.pi/agent/memory and ~/.pi/agent/skill-drafts; Multica-connected runs can resolve to ~/multica_workspaces/<workspace_id>/.pi/agents/<agent_id>/memory and skills/drafts. memory_curate also scans yesterday's daily log into REVIEW.md when learning is enabled and the daily file changed since the last scan.
For local multi-agent self-evolution, @jhp/pi-memory now supports:
PI_MEMORY_DIR,PI_SKILL_DRAFTS_DIR,PI_AGENT_ROOT,MULTICA_WORKSPACE_ID,MULTICA_AGENT_ID, andMULTICA_WORKSPACES_ROOTresolvers.- Agent root initialization with isolated
memory/,skills/drafts,skills/generated,inbox/,shared-cache/,profile/,feedback/, andsync_queue/directories. /memory-reviewplus startup andmemory_curatepending proposal reminders.- A Local Curator Manager registry/dirty-root API for one local manager to process many agent roots safely.
- Share candidate, downflow receive, sync upload/pull, profile generation, Local Curator Manager tools, and feedback JSONL helpers. Server downflow is per-Agent delivery, not broadcast, and local delivery never overwrites formal memory or auto-enables skills.
The external memory curator service uses a systemd user timer when available, with cron fallback. When the service points at a vendored TypeScript CLI under node_modules, the launcher uses Bun or tsx instead of plain Node so Node 22 can run it reliably.
Useful commands:
/memory-version-status
/memory-version-snapshot optional reason
/memory-version-list
/memory-version-restore <snapshot-id> [memory|skill-drafts|all]
/memory-version-pushMemory evolution is local-only by default and does not configure a shared remote. If a user wants backup sync, set PI_EVOLUTION_REMOTE to their own private repo before bootstrap/setup, or add a personal remote later with git -C ~/.pi/agent/evolution remote add origin <url>. Set PI_EVOLUTION_AUTO_PUSH=1 only if automatic remote sync is desired.
Update
pi updateOnly update Pi itself:
pi update --selfOnly update installed Pi packages:
pi update --extensions