Use Cases / context-compaction
Context compaction
Summarizing an agent transcript to save tokens deletes file paths, errors, and commands that a later step still needs.
Try a related template free on this host — 5 anonymous real-API runs with no signup — then ship the same schema with a prepaid jv_live_ key. See is Jev free? and playground.
Why Jev
A keep-or-drop pass asks two yes/no questions per old tool call: does the fact that it ran still matter, and does the result still need to stay verbatim? Text you wrote stays as-is. That is the pattern behind public Claude Code compaction plugins, pointed at POST /api/v1/decide on this host.
How to define the decision
State is the current task plus one tool call and a short result. Two Noul questions: keep the call, keep the result. Threshold them in code. Below the bar, delete or truncate. Above it, leave the original object untouched.
When to use Jev
- Trimming tool outputs before the next expensive model call
- Keeping a pinned head and tail of the transcript and judging only the middle
- Failing closed to your existing summarizer when the decide call errors
When not to use Jev
- Rewriting user or assistant text into a shorter story
- Dropping a result you cannot re-run
- Treating a probability as proof the result is useless
Failure modes and human fallback
- Upstream or network errors: retry with backoff; do not invent a decision.
- Low confidence: route to a human queue or safer default — never auto-act on money/destructive tools.
- Schema drift: keep a golden fixture set in CI so label changes fail the build before production.
- This page does not install a Claude Code plugin.
- Token estimates in third-party compactors are theirs. This host bills metered input tokens.
- See RAG relevance if the question is about retrieved chunks rather than tool logs.
API example
Same prepaid jv_live_ balance as tools. Output tokens are free on this host's metering model.
curl https://jevtypesafe.org/api/v1/decide \
-H "Authorization: Bearer jv_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"state":"Task: fix the failing login test.\nTool call: Read README.md\nResult: project overview and license. No login details.","questions":{"keep_call":{"type":"noul","instructions":"Does the agent still need to know this tool call was made?"},"keep_result":{"type":"noul","instructions":"Does the agent still need this tool result verbatim?"}}}'FAQ
- Will Jev summarize my transcript?
- No. It only returns probabilities for keep-or-drop questions you define. Your code deletes or keeps the original messages.
- How do I pay for compaction calls?
- The same prepaid packs as every other decide call. Open /pricing/, then send the sample with your jv_live_ key.
Related use cases
Ready to build?
Free anonymous tool runs, then prepaid packs and a jv_live_ key — independent host, not affiliated with TypeSafe AI.