Skip to content

wakegate

Gate that asks Jev whether a timer or event is worth resuming a sleeping agent's LLM, skipping only when confidently not.

Benchmarkprototype

Overview

wakegate saves tokens for long-running agents that sleep and wake on timers or incoming events. Before resuming the agent's LLM with its full context, it asks Jev one three-way Choice against the agent's own note about what it is waiting for: wake, not yet, or unrelated. Code skips the wakeup only when the wake probability is below 0.2, and always wakes on user messages, bare timers, errors, timeouts and after a skip limit (10 by default).

The README reports about 250 ms per call. On 21 hand-written scenarios the current wording got 21 of 21, with p50 latency 253 ms; an earlier yes/no wording got 16 of 21. The author calls this a smoke test, not a benchmark, noting the same person wrote the scenarios and the question. It is a TypeScript package using the Vercel AI SDK with typesafe-ai/jev on AI Gateway by default.

What the decision model decides

TypeQuestionAnswers
ChoiceGiven what the agent was waiting for, is this event worth waking for?wake · not yet · unrelated

How it works

  1. The agent sleeps with a note on what it is waiting for.
  2. A timer or event fires; call shouldWake.
  3. Jev answers wake, not yet or unrelated.
  4. Skip only if wake is below 0.2; force wake on user messages, errors and skip limits.

Strengths

  • Avoids full LLM turns for irrelevant wakeups.
  • Conservative rules always wake on important cases.
  • Honest small-sample evaluation.

Caveats

  • 21 scenarios are a smoke test, not a benchmark.
  • Not on npm yet.

Getting started

npm install github:shitianfang/wakegate ai, set AI_GATEWAY_API_KEY

At a glance

Type
Benchmark
Status
prototype
Language
TypeScript
Runtime
Node library (Vercel AI SDK)
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

  • Long-running agents: before a sleeping agent's LLM is resumed on a timer or incoming event, Jev answers a `Choice` (wake, not yet, unrelated) against the agent's own sleep note, and code skips the wakeup only when wake is below 0.2 while always waking on user messages, bare timers, a skip limit, errors, and timeouts; one run passed 21 of 21 hand-written scenarios, which the README calls a smoke test rather than a benchmark.

    yibie/awesome-jev
  • Experimental gate where Jev decides whether a timer or incoming event is worth resuming a sleeping agent's LLM; code skips only when Jev is confident and always wakes on user messages, errors, and a skip limit.

    cobanov/awesome-jev

Frequently asked questions

When does it skip a wakeup?

Only when Jev's wake probability is below 0.2 and no forced-wake rule applies.

How accurate is it?

21 of 21 on the author's hand-written scenarios, described as a smoke test.

Which model does it use?

typesafe-ai/jev on Vercel AI Gateway by default.

Related projects

  • Multi-agent orchestration layer for Claude Code with opt-in Jev hooks for fast judgment points, decision caching and egress controls.

    PluginproductionTypeScript
  • Runs Claude Code on Opus 5.5 with Jev re-picking reasoning effort after every tool batch, via per-message effort so the cache survives.

    ProxybetaTypeScript
  • OpenClaw plugin and CLI that turn a plain-language condition into a scheduled trigger, waking the model only when Jev says it is true.

    PluginbetaTypeScript
  • DeepSeek Harness plugin for budgeted, read-only GPT 'teacher' consults; Jev may only suggest when a consult is worthwhile.

    ProjectprototypeJavaScript
  • Tiny demo that asks Jev whether an agent should continue, downgrade its model, or stop, given budget and plan.

    DemoprototypeTypeScript
  • npm library that rate-limits, spend-caps, caches and redacts every Jev request made in a loop.

    LibrarybetaJavaScript