Context Compaction
Watch Jev shrink an agent's context in real time — KEEP the essential, TRUNCATE the long, DROP the noise — one typed decision per step. No key, just press compact.
This is exactly what agents do to survive long tasks — one typed Jev call per step. See all live demos →
A demo of the decision pattern — real compaction also keeps recent turns and pins the system prompt. Token counts are illustrative.
How it works
Long-running agents blow past the context window: tool dumps, install logs and redundant listings pile up until the goal scrolls off the top. Compaction fixes that by deciding, step by step, what to keep in full, what to shorten to a summary, and what to drop. Here every step of a real agent trace is one Jev call returning a typed KEEP / TRUNCATE / DROP — streamed in live while the token bar shows the context collapsing.
The essential things — the user's goal, the key finding, the change that was applied, the final result — stay in full. The noise gets cut. That is exactly the pattern agents use to survive tasks that run for hours.
Build it into your agent
With a hosted key the same Jev call runs over your own message history before each turn: a typed decision per step at $0.42/M input tokens, in milliseconds, with no malformed output. Pair it with a rule to always pin the system prompt and keep the last few turns, and you have compaction that keeps agents on-task without a summarizer model or a brittle prompt.
FAQ
Does Jev actually decide per step?
Yes — every step of the trace is an independent Jev call that returns a typed KEEP, TRUNCATE or DROP plus whether the step is essential. The verdicts stream in live and the token bar updates as they land.
Is the token count real?
The per-step weights are illustrative so the shrink is easy to see, but the decision each step gets is a real, live Jev call. In your own agent you'd compact against the actual token counts.
Is it free? Can I run my own trace?
Free, no key — a rate-limited call to the live Jev API. To compact your own agent's context at scale, wire the same call into your loop with a hosted key.
More: Model Router demo · Ask 100 Personas · All Jev tools · Jev API docs