ZephyrDeng/ego-jev

Jev (TypeSafe System One) inner loop for ego-browser — one ~0.4s typed decision per DOM step instead of an LLM turn. Agent skill for ego lite.

JavaScript

5

8 commits

updated Sep 22, 2026

See the code

See what people are saying (1)

README

ego-jev · ego lite × TypeSafe

ego-jev

skills.sh release license

An agent skill that gives ego lite a Jev (TypeSafe System One) inner loop — one ~0.4 s typed decision per DOM step instead of a full LLM turn.

ego executes; Jev decides. Each step: snapshot → number the interactive elements → one System One call picks the operation and its target together → ego clicks, fills, selects. Jev never writes text and never sees a screenshot. Login, payment, free text, canvas and content reading escalate back to the planner.

Sibling project: jev-ultrafast runs the same idea as a standalone browser agent — Zürich → London on Google Flights in 7.1 s. This skill brings that loop into ego lite, so the agent keeps the user's real browser, sessions and logins.

The loop

Every observation produces a numbered element table — a11y refs @N plus DOM-discovered "dark matter" dN (div cards, cursor:pointer, iframe and shadow content the snapshot never refs):

@2  textbox   "Customer name"
@5  button    "Apply filters"
d1  div       "member card G18655"
...
                       one System One request
                      ┌───────────────────────────┐
page → element table → operation                  │
                      │ click_target              │
                      │ fill_target               │
                      │ select_target, if present │
                      └─────────────┬─────────────┘
                           use the matching target
                                    │
                      CLICK @5 ─────┤──→ ego-browser
                      FILL  @2 ─────┘

Target questions are speculative: only the selected operation's target can execute. Two decisions, one network round trip, and each target head carries only role-compatible elements.

Demo

Four Jev decisions on a live form — each step numbers the elements, picks an operation and target in one call, then ego executes it:

ego-jev loop: snapshot, number elements, Jev picks op and target, ego fills and clicks

(docs/demo.mp4 for a crisper version.)

Per step

Jev decision (TypeSafe direct)~300–550 ms, 20–120 elements
Snapshot + DOM walk~20 ms
Tokens≈ 11K input ≈ $0.0005 (output free)
The LLM-turn alternativeseconds of reasoning + a screenshot
opwhat runs
click / fill / selectego page.click / fill / selectOption on @N; dN via tagged CSS or viewport coordinates
scroll / waitreveal an element or let async content settle
done / escalate / blockedloop exits loud — your verify decides if done is real

Guarded targets (pay / delete / upload / confirm, EN + 中文) escalate by default; so do login pages, free text, low confidence and repeated actions.

Requirements

  • ego lite installed and onboarded — it provides the ego-browser command and the TaskSpace/Page runtime this skill drives.
  • The ego-browser agent skill (TaskSpace and Page rules; ego-jev only replaces the per-step "which element" judgment).
  • One backend key:
    • TYPESAFE_API_KEY from console.typesafe.ai (fastest, ~300–550 ms/step), or
    • AI_GATEWAY_API_KEY for Jev through the Vercel AI Gateway.
    • Put either in ~/.config/ego-jev/secrets.env (export NAME=value).

Install

npx skills add ZephyrDeng/ego-jev

or with the GitHub CLI:

gh skill install ZephyrDeng/ego-jev

or as a Claude Code plugin:

/plugin marketplace add ZephyrDeng/ego-jev
/plugin install ego-jev@ego-jev

No key yet? The offline selftest drives the loop with a mock decider inside ego-browser — same mechanics, nothing to configure:

cd skills/ego-jev && ego-browser nodejs < scripts/selftest.mjs

Use

Read skills/ego-jev/SKILL.md — the entry point your agent loads. The loop itself is dependency-free Node in skills/ego-jev/scripts/jev-loop.mjs; options, thresholds, backends and latency numbers live in skills/ego-jev/reference.md.

const { runJevLoop } = await import(`file://${SKILL_DIR}/scripts/jev-loop.mjs`);
const result = await runJevLoop(page, {
  goal: "Open the Billing page and show the credit balance",
  verify: async (p) => /billing/.test(await p.url()),
});

Offline smoke test (mock decider, no key, runs inside ego-browser):

cd skills/ego-jev && ego-browser nodejs < scripts/selftest.mjs

Help

License

MIT

agent-skills
ai-agents
browser-automation
claude-skills
codex-skills
skill-md

Contributors

ZephyrDeng

8 commits

ZephyrDeng/ego-jev

Jev (TypeSafe System One) inner loop for ego-browser — one ~0.4s typed decision per DOM step instead of an LLM turn. Agent skill for ego lite.

JavaScript

5

8 commits

updated Sep 22, 2026

See the code

See what people are saying (1)

README

ego-jev · ego lite × TypeSafe

ego-jev

skills.sh release license

An agent skill that gives ego lite a Jev (TypeSafe System One) inner loop — one ~0.4 s typed decision per DOM step instead of a full LLM turn.

ego executes; Jev decides. Each step: snapshot → number the interactive elements → one System One call picks the operation and its target together → ego clicks, fills, selects. Jev never writes text and never sees a screenshot. Login, payment, free text, canvas and content reading escalate back to the planner.

Sibling project: jev-ultrafast runs the same idea as a standalone browser agent — Zürich → London on Google Flights in 7.1 s. This skill brings that loop into ego lite, so the agent keeps the user's real browser, sessions and logins.

The loop

Every observation produces a numbered element table — a11y refs @N plus DOM-discovered "dark matter" dN (div cards, cursor:pointer, iframe and shadow content the snapshot never refs):

@2  textbox   "Customer name"
@5  button    "Apply filters"
d1  div       "member card G18655"
...
                       one System One request
                      ┌───────────────────────────┐
page → element table → operation                  │
                      │ click_target              │
                      │ fill_target               │
                      │ select_target, if present │
                      └─────────────┬─────────────┘
                           use the matching target
                                    │
                      CLICK @5 ─────┤──→ ego-browser
                      FILL  @2 ─────┘

Target questions are speculative: only the selected operation's target can execute. Two decisions, one network round trip, and each target head carries only role-compatible elements.

Demo

Four Jev decisions on a live form — each step numbers the elements, picks an operation and target in one call, then ego executes it:

ego-jev loop: snapshot, number elements, Jev picks op and target, ego fills and clicks

(docs/demo.mp4 for a crisper version.)

Per step

Jev decision (TypeSafe direct)~300–550 ms, 20–120 elements
Snapshot + DOM walk~20 ms
Tokens≈ 11K input ≈ $0.0005 (output free)
The LLM-turn alternativeseconds of reasoning + a screenshot
opwhat runs
click / fill / selectego page.click / fill / selectOption on @N; dN via tagged CSS or viewport coordinates
scroll / waitreveal an element or let async content settle
done / escalate / blockedloop exits loud — your verify decides if done is real

Guarded targets (pay / delete / upload / confirm, EN + 中文) escalate by default; so do login pages, free text, low confidence and repeated actions.

Requirements

  • ego lite installed and onboarded — it provides the ego-browser command and the TaskSpace/Page runtime this skill drives.
  • The ego-browser agent skill (TaskSpace and Page rules; ego-jev only replaces the per-step "which element" judgment).
  • One backend key:
    • TYPESAFE_API_KEY from console.typesafe.ai (fastest, ~300–550 ms/step), or
    • AI_GATEWAY_API_KEY for Jev through the Vercel AI Gateway.
    • Put either in ~/.config/ego-jev/secrets.env (export NAME=value).

Install

npx skills add ZephyrDeng/ego-jev

or with the GitHub CLI:

gh skill install ZephyrDeng/ego-jev

or as a Claude Code plugin:

/plugin marketplace add ZephyrDeng/ego-jev
/plugin install ego-jev@ego-jev

No key yet? The offline selftest drives the loop with a mock decider inside ego-browser — same mechanics, nothing to configure:

cd skills/ego-jev && ego-browser nodejs < scripts/selftest.mjs

Use

Read skills/ego-jev/SKILL.md — the entry point your agent loads. The loop itself is dependency-free Node in skills/ego-jev/scripts/jev-loop.mjs; options, thresholds, backends and latency numbers live in skills/ego-jev/reference.md.

const { runJevLoop } = await import(`file://${SKILL_DIR}/scripts/jev-loop.mjs`);
const result = await runJevLoop(page, {
  goal: "Open the Billing page and show the credit balance",
  verify: async (p) => /billing/.test(await p.url()),
});

Offline smoke test (mock decider, no key, runs inside ego-browser):

cd skills/ego-jev && ego-browser nodejs < scripts/selftest.mjs

Help

License

MIT

agent-skills
ai-agents
browser-automation
claude-skills
codex-skills
skill-md

Contributors

ZephyrDeng

8 commits

Languages

JavaScript

100.0%