COMMUNITY OBSERVEDMetric claims: UNVERIFIEDSOURCE AUDITED🤖 Jev Agent

Pi Context Curator

A Pi extension that asks Jev which context units remain essential before an LLM call.

Overview & result

Before selected Pi LLM calls, this extension groups messages with their tool results, reuses prior judgments and asks Jev one yes/no relevance question for each new unit. Code removes units judged unnecessary while always keeping system messages and the latest request.

From the original post

A [pi](https://pi.dev) extension that curates the context sent to the LLM before each call — using **TypeSafe AI's Jev model** to decide which context is actually needed.

— Shashank H

How Jev fits in the loop

  1. Group assistant tool calls and their results into atomic context units.
  2. Send only new units to Jev as parallel Noul yes/no questions in one request.
  3. Apply the keep/remove decision to the per-call context, caching each judgment by content fingerprint.

How to reproduce

  1. Install the package in Pi and provide a TypeSafe API key; without a key it is a no-op.
  2. Run a session past the default 8,000-token floor and inspect the extension's removed-unit and cost commands.
  3. Check that system messages, the latest request and uncertain Jev answers remain in context.

Why this build matters

A concrete context-pruning pattern that keeps Jev's role bounded and exposes the risk of permanent removal.

Limitations

  • A false removal can hide a subtle dependency from later model calls; the threshold needs local testing.
  • Removed units are permanently omitted from later model context, although a display-only session record remains inspectable.
  • On API errors or missing credentials the extension passes context through unchanged.

Patterns