Skip to content
System One

nourhelmi/pi-jev-compaction

An automatic extension for the Pi coding agent that has Jev score older tool outputs and stops resending the ones no longer needed, while keeping the original session messages intact.

nourhelmi/pi-jev-compaction on GitHub

Stars
3
Forks
1
Language
TypeScript
License
MIT
Last push
22 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

import { estimateTokens, type SessionEntry } from "@earendil-works/pi-coding-agent";

export const ENTRY_TYPE = "pi-jev-pruning";
export const ENDPOINT = "https://api.typesafe.ai/v1/systemone";
export const MAX_REQUEST_BYTES = 24_000;
export const MAX_RESPONSE_BYTES = 64_000;
export const GROWTH_TOKENS = 8_000;
export type ToolResult = Extract<AgentMessage, { role: "toolResult" }>;

View in src/pruning.ts

Open on GitHub

More like this

Keep browsing