ego-lite: Instructions file for Codex

AGENTS.md

ego-lite AGENTS.md is an instructions file for Codex, OpenCode from citrolabs/ego-lite. It costs 1,894 tokens per session, scanned A, original, MIT.

Repository instructions for ego-lite, a project that lets AI agents control a real browser through a Node.js automation runtime. They describe the project structure, startup paths, and how browser actions flow through the code.

In plain words
What is it for?
Use them when developing or debugging the browser runtime, its command-line interface, its embedded version, or the shared helper functions agents use.
Why use it?
They make it easier to change the correct part of the browser harness and avoid confusing the open-source harness with the separate ego lite browser application.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is citrolabs/ego-lite's own configuration. It tells Codex and OpenCode how to work on ego-lite itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ego-lite configures →

About the project

ego lite is a browser built for people and AI agents to use at the same time, letting agents work with the user's existing tabs, logins, cookies, extensions, and bookmarks. It supports browser automation tasks for agents such as Codex and Claude Code, with agents working in separate Spaces while the user keeps control of their tabs. The catalogue entry provides the ego-browser skill for operating it.

citrolabs/ego-lite · 21,793 stars · on GitHub · lite.ego.app

Reuse

Borrowing it

Nothing to install: this file belongs to citrolabs/ego-lite. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/citrolabs/ego-lite/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/citrolabs/ego-lite

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ego-lite AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/citrolabs/ego-lite/agents-md/github.svg)](https://agentmods.dev/instructions/citrolabs/ego-lite/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/citrolabs/ego-lite/agents-md"><img src="https://agentmods.dev/badge/instructions/citrolabs/ego-lite/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ego-lite AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/citrolabs/ego-lite/agents-md"><img src="https://agentmods.dev/badge/instructions/citrolabs/ego-lite/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,894 This file is loaded in full into every session.
When invoked 1,894 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01894 $0.01894
Opus 5.5 $0.00758 $0.00758
Sonnet 5.5 $0.00379 $0.00379
Haiku 4.5 $0.00189 $0.00189

Measured 2d ago against content hash a1e55d5abab8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ego-lite AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repository Guidelines

Project Overview

ego-browser is a Node.js CDP browser-automation harness for AI agents. It drives the ego lite browser through globalThis.ego bindings (provided by the closed-source ego lite app), exposes a compact snapshot/ref workflow, and layers reusable site-specific knowledge ("learnings") on top of the browser runtime.

This repo contains the open-source harness and the agent skill package — not the browser itself. The ego lite app bundles its own ego-browser binary that embeds this runtime. The Skill has two layers: skills/ego-browser/ is a thin entry Skill that tells agents to run ego-browser skill, and package/ego-browser/skill-body/SKILL.md is the versioned usage guide that command prints (ego-browser nodejs <<'EOF' ... EOF). The repo CLI built here takes the heredoc directly on stdin with no subcommand.

Architecture & Data Flow

  • package/ego-browser/src/index.ts is the entrypoint with two startup paths:
    • Executed directly as a CLI → runMain() (reads JavaScript from stdin, executes it).
    • Imported as a module (how the app embeds it) → installEgoSdk(globalThis).
  • Both paths expose the same helper surface. public-api-schema.ts is the source of truth for the v2 API shown by help(); helpers.ts combines it with the frozen v1 compatibility surface.
  • src/run.ts executes stdin JavaScript inside an async function with the helpers injected as parameters.
  • src/browser-runtime.ts owns CDP transport over ego.sendCDPMessage, session attach/caching (2s TTL, auto re-attach on session loss), the buffered event queue (10k cap), and JS dialog tracking.
  • src/cdp-eval.ts provides cdp() and js() (string-expression evaluation; top-level return is auto-wrapped in an IIFE).
  • src/element-resolver.ts resolves all target forms — @N refs, loc=css: / loc=role: / loc=href: locators, xpath=, raw CSS — and classifies failures as transient (retryable) or permanent.
  • src/page-ref-registry.ts + src/page-ledger.ts: v2 Page refs (@21, not @e21) are SDK-assigned ids bound to one frame/document/backend node. Their mappings and invalidation persist across rounds; partial snapshots merge by node identity and full snapshots replace the active set. Missing refs require a fresh snapshot. src/ref-map.ts + src/ref-state.ts retain the v1 native-ref refresh behavior.
  • src/driver/ — nav (tabs, navigation), pointer (click/scroll/drag), keyboard, observe (snapshot/screenshot), waits, files (upload), element-ops (objectId handles), load.
  • src/learning/ — discovery, validation, and execution of site skills from skills/ego-browser/learnings/<site>/manifest.json (runSiteTool, runSiteBrowserTool, learnContext).
  • src/state.ts is the shared mutable runtime state singleton; src/env.ts resolves the agent workspace (EGO_BROWSER_AGENT_WORKSPACE, falling back to the entry Skill bundled next to the build output, then the repo's skills/ego-browser).
  • src/help-runtime.ts parses the built bundle's JSDoc with acorn at runtime to power help() — JSDoc on exported helpers is therefore user-facing documentation.

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +111 tokens per session a1e55d5abab8
  2. 21d ago Changed · +1 lines · +128 tokens per session 8503b4d58374
  3. 1mo ago Changed · +23 lines · +78 tokens per session cf29637bf312
  4. 2mo ago First seen · 61 lines · 1,577 tokens per session scan A 73d8d7a1d03e

Subscribe to this mod's changes

ego-lite AGENTS.md is an instructions file published in the GitHub repository citrolabs/ego-lite (21,793 stars, last pushed yesterday), licensed MIT. It adds 1,894 tokens to every session, about $0.0076 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ego-lite AGENTS.md compared with instructions from other repositories

ego-lite AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ego-lite AGENTS.mdcitrolabs/ego-liteInstructions file22kyesterdayMITA1,894Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode