# ego-lite | CitroLabs | Knowledge Base | Instagit

The fastest browser for AI agents to run web automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.

GitHub Stars: 2.3k

Repository: https://github.com/citrolabs/ego-lite

---

## Articles

### [How the Ego-Browser Locator Facade API Supports Chained Calls: Immutable Selector Composition Explained](/citrolabs/ego-lite/ego-browser-locator-facade-api-chained-calls)

Discover how the ego-browser locator facade API enables chained calls via immutable selector composition. Learn to build dynamic selectors efficiently.

- Tags: deep-dive
- Published: 2026-08-29

### [Ego‑Browser Element Resolution Transience Rules: When to Retry vs. Fail](/citrolabs/ego-lite/ego-browser-element-resolution-transience-rules)

Understand ego-browser element resolution transience rules. Learn when to retry failures like unknown references and when to fail on permanent issues such as ambiguous selectors.

- Tags: deep-dive
- Published: 2026-08-29

### [How Ego-Browser Handles ARIA Role Locators and Uniqueness Enforcement](/citrolabs/ego-lite/ego-browser-aria-role-locator-uniqueness-enforcement)

Learn how ego-browser finds elements with ARIA role locators and enforces uniqueness. Understand transient vs permanent errors for robust testing.

- Tags: internals
- Published: 2026-08-29

### [Supported Element Target Forms for Resolution in ego-browser: Complete Reference Guide](/citrolabs/ego-lite/supported-element-target-forms-ego-browser-resolution)

Discover supported element target forms in ego-browser including CSS selectors, XPath, text matchers, and more. Find the perfect locator for your automation needs.

- Tags: api-reference
- Published: 2026-08-29

### [How Ego-Browser Rebuilds the Ref Map on `snapshotRaw()` Calls](/citrolabs/ego-lite/how-ego-browser-rebuilds-refmap-on-snapshotraw)

Learn how Ego-Browser rebuilds the Ref Map on snapshotRaw() calls. It clears and repopulates refs ensuring reference IDs always resolve to current backend nodes.

- Tags: internals
- Published: 2026-08-29

### [How the RefMap in ego-browser Stores and Retrieves Backend Node ID Mappings](/citrolabs/ego-lite/how-refmap-in-ego-browser-stores-retrieves-nodeid-mappings)

Discover how ego-browser's RefMap stores and retrieves backend node ID mappings using an in-memory Map. Learn about automatic population for seamless ref identifier linking.

- Tags: internals
- Published: 2026-08-29

### [Element Resolution System in ego-browser: How It Locates DOM Elements and Handles Errors](/citrolabs/ego-lite/ego-browser-element-resolution-system-error-types)

Discover ego-browsers Element Resolution system. Learn how it finds DOM elements and categorizes errors as transient or permanent for robust automation.

- Tags: internals
- Published: 2026-08-29

### [When Does ego-browser Invalidate CDP Sessions and Clear Preferred Targets?](/citrolabs/ego-lite/when-ego-browser-invalidates-cdp-sessions-clears-targets)

Discover when ego-browser invalidates CDP sessions and clears preferred targets. Learn about lost sessions, detached targets, and method mutations. Understand ego-lite behavior for better control.

- Tags: internals
- Published: 2026-08-29

### [How ego‑browser Handles CDP Session‑Lost Errors and Re‑Attaches Sessions](/citrolabs/ego-lite/ego-browser-cdp-session-lost-errors-re-attach)

ego-browser automatically handles CDP session-lost errors, invalidating stale sessions and re-attaching to fresh targets for seamless recovery. Learn how.

- Tags: internals
- Published: 2026-08-29

### [SESSION_TTL_MS in ego-browser: Understanding Session Caching with 2-Second TTL](/citrolabs/ego-lite/session-ttl-ms-constant-ego-browser-session-caching)

Understand SESSION_TTL_MS in ego-browser. Learn how this 2-second constant optimizes Chrome DevTools Protocol session caching for efficient debugging and development.

- Tags: internals
- Published: 2026-08-29

### [How ego-browser Manages CDP Session Transport and Timeouts: A Deep Dive into the Runtime Layer](/citrolabs/ego-lite/how-ego-browser-manages-cdp-session-transport-timeouts)

Discover how ego-browser manages CDP session transport and timeouts with its self-healing layer. Learn about automatic session attachment, response timeouts, and failed request retries for seamless CDP calls.

- Tags: deep-dive
- Published: 2026-08-29

### [How Ego-Browser Helpers Handle User-Owned Task Spaces: Skip Logic and Claim Workflows](/citrolabs/ego-lite/ego-browser-helper-behavior-user-owned-task-space)

Discover how ego-browser helpers manage user owned task spaces with skip logic and claim workflows. Learn to avoid unintended mutations.

- Tags: deep-dive
- Published: 2026-08-29

### [How ego-browser Determines If a Task Space Is Agent-Owned](/citrolabs/ego-lite/how-ego-browser-determines-agent-owned-task-space)

Discover how ego-browser identifies agent-owned task spaces using the isAgentOwned predicate and ownership properties in ego-lite helpers.ts for clear access control.

- Tags: how-to-guide
- Published: 2026-08-29

### [Task Space Ownership States in Ego-Browser: A Complete Guide](/citrolabs/ego-lite/ego-browser-task-space-ownership-states)

Understand ego-browser task space ownership states: agent, agentDelegatedToUser, and user. Discover how these states control browsing context in this comprehensive guide.

- Tags: deep-dive
- Published: 2026-08-29

### [How Ego-Browser Handles Helper Readiness Signals and Queue Calls](/citrolabs/ego-lite/ego-browser-helper-readiness-signals-queueing)

Learn how ego-browser manages helper readiness signals and queue calls using Promise-based wrappers for seamless CDP runtime initialization and ordered execution.

- Tags: internals
- Published: 2026-08-29

### [How ego-browser SDK Installs and Injects Helpers into the Global Scope](/citrolabs/ego-lite/how-ego-browser-sdk-installs-injects-helpers)

Discover how the ego-browser SDK installs and injects helpers into the global scope using installEgoSdk() for instant access to browser automation methods without imports.

- Tags: how-to-guide
- Published: 2026-08-29

### [ego‑browser CLI Startup Path: How Entry Points Work in the ego‑lite Project](/citrolabs/ego-lite/ego-browser-startup-path-cli)

Discover the ego-browser CLI startup path. Learn how runMain and isDirectCli initiate the ego-lite project's entry points for seamless command-line execution.

- Tags: internals
- Published: 2026-08-29

### [How Helpers Are Injected into the ego-browser Runtime via helperContext](/citrolabs/ego-lite/how-helpers-injected-ego-browser-runtime-helpercontext)

Learn how helpers are injected into the ego-browser runtime via helperContext. Discover the two-step pipeline for assembling driver primitives and projecting façades onto globalThis.

- Tags: internals
- Published: 2026-08-29

### [Ego-Browser Data Flow Architecture: From Heredoc to Chrome DevTools Protocol](/citrolabs/ego-lite/ego-browser-data-flow-architecture-heredoc-to-browser)

Explore the ego-browser data flow architecture. Learn how JavaScript heredoc commands travel from CLI ingestion to Chrome DevTools Protocol execution in a live browser.

- Tags: architecture
- Published: 2026-08-29

### [What Components Does the ego‑browser Runtime Own? A Deep Dive into ego‑lite's Core CDP Layer](/citrolabs/ego-lite/what-components-does-ego-browser-runtime-own)

Explore the ego-browser runtime's core CDP layer and discover its key components including transport, session management, event buffering, and runtime services.

- Tags: deep-dive
- Published: 2026-08-29

### [How ego-browser Drives Browser Automation for AI Agents: A Deep Dive into the CDP Architecture](/citrolabs/ego-lite/how-ego-browser-drives-browser-automation-for-ai-agents)

Discover how ego-browser drives browser automation for AI agents by translating high-level commands into Chrome DevTools Protocol messages. Learn about its CDP architecture.

- Tags: deep-dive
- Published: 2026-08-29

### [What Is the Playwright-Style Facade Surface in ego-browser?](/citrolabs/ego-lite/what-is-playwright-style-facade-in-ego-browser)

Discover the Playwright-style facade surface in ego-browser. This familiar API simplifies browser automation by wrapping CDP calls, letting you write Playwright-like scripts effortlessly.

- Tags: deep-dive
- Published: 2026-08-29

### [How ego-browser Embeds a Node.js Helper Runtime Inside Chromium](/citrolabs/ego-lite/how-ego-browser-embeds-nodejs-runtime-in-chromium)

Discover how ego-browser embeds a Node.js helper runtime in Chromium using a global ego object and CDP transport for a powerful API.

- Tags: internals
- Published: 2026-08-29

### [How Agents Reclaim Control in ego-lite Using `takeOverTaskSpace`](/citrolabs/ego-lite/agent-reclaim-task-space-takeover)

Learn how to use ego-lite's takeOverTaskSpace to reclaim control from users and instantly resume automation commands. Expert guide for citrolabs/ego-lite.

- Tags: internals
- Published: 2026-08-28

### [How `completeTaskSpace` Works in ego‑lite: Understanding the `keep` Option](/citrolabs/ego-lite/complete-taskspace-behavior-ego-lite)

Explore how ego-lite's completeTaskSpace functions, focusing on the keep option. Learn how to manage task spaces effectively for user inspection or complete closure. Master ownership transitions and status reporting.

- Tags: internals
- Published: 2026-08-28

### [How to Use `useOrCreateTaskSpace` and `claimTaskSpace` in ego-lite](/citrolabs/ego-lite/use-create-claim-taskspace-ego-lite)

Master ego-lite's useOrCreateTaskSpace and claimTaskSpace. Learn to efficiently manage and claim task spaces for agent actions, improving your workflow. Get started today.

- Tags: how-to-guide
- Published: 2026-08-28

### [ego-lite Task Space Ownership Models: agent, agentDelegatedToUser, and user Explained](/citrolabs/ego-lite/task-space-ownership-models-ego-lite)

Understand ego-lite Task Space ownership models: agent, agentDelegatedToUser, and user. Learn which side AI or human executes browser actions to manage your automation effectively.

- Tags: deep-dive
- Published: 2026-08-28

### [How ego-lite Resolves and Executes Site-Specific Tools (Node.js and Browser-Side)](/citrolabs/ego-lite/ego-lite-resolve-execute-site-tools)

Discover how ego-lite resolves and executes site-specific tools in Node.js and browser environments by scanning for matching manifests and dynamically importing or evaluating tools.

- Tags: how-to-guide
- Published: 2026-08-28

### [Understanding the Ego‑Lite Learning Subsystem for Site‑Specific Knowledge Management](/citrolabs/ego-lite/learning-subsystem-ego-lite-site-knowledge)

Explore the Ego-Lite learning subsystem and its three-stage pipeline for acquiring site-specific knowledge. Learn how it manages notes, tool signatures, and helper functions without hard-coding.

- Tags: deep-dive
- Published: 2026-08-28

### [Task Space Facade in ego-lite: How Lifecycle and Ownership Are Managed](/citrolabs/ego-lite/task-space-facade-ego-lite-management)

Learn how the task space facade in ego-lite manages lifecycle and ownership with async helpers for discovery, creation, claiming, switching, completion, and hand-off.

- Tags: internals
- Published: 2026-08-28

### [How to Use the Playwright-Style Page Facade in ego-lite](/citrolabs/ego-lite/use-playwright-page-facade-ego-lite)

Learn to use the Playwright-style page facade in ego-lite with createPageFacade(). Automate browsers efficiently using familiar methods like page.goto() and page.locator().

- Tags: how-to-guide
- Published: 2026-08-28

### [Ego-Browser Public Helpers for Agent Scripts: Complete API Reference (2024)](/citrolabs/ego-lite/public-helpers-ego-browser-agent-scripts)

Explore the ego-browser package's 40+ public helpers for agent scripts, including CDP methods, navigation, and observation tools. Access the complete API reference for efficient automation.

- Tags: api-reference
- Published: 2026-08-28

### [How Ego‑Lite's Reference System Provides Stable Element References Across Script Runs](/citrolabs/ego-lite/reference-system-ego-lite-stable-elements)

Discover how Ego-Lite ensures stable element references across script runs with its RefMap, browserRefMap, and resolveElement helpers. Learn about this robust architecture.

- Tags: internals
- Published: 2026-08-28

### [Ego-Browser Element Resolver Selector Forms: Complete Guide to 7 Locator Types](/citrolabs/ego-lite/element-selector-forms-ego-browser)

Master ego-browser's element resolver with our complete guide. Learn all 7 selector forms including CSS, ARIA, href, XPath, text locators, and more to find elements efficiently.

- Tags: deep-dive
- Published: 2026-08-28

### [How the CDP Evaluation Module in ego-lite Executes Raw CDP Commands and JavaScript](/citrolabs/ego-lite/cdp-evaluation-ego-lite-module)

Discover how ego-lite's CDP evaluation module executes raw CDP commands and JavaScript using cdp() and js() helpers. Learn about its runtime state and session manager for efficient message transport and parsing.

- Tags: internals
- Published: 2026-08-28

### [How ego-lite Tracks JavaScript Dialogs in CDP Sessions: A Deep Dive into Chrome DevTools Protocol Event Handling](/citrolabs/ego-lite/ego-lite-javascript-dialog-tracking)

Learn how ego-lite tracks JavaScript dialogs in CDP sessions by subscribing to Page events and storing dialog state for seamless runtime helper queries. Explore the Chrome DevTools Protocol in action.

- Tags: deep-dive
- Published: 2026-08-28

### [Ego-Lite Event Buffering Mechanism: How the Browser Runtime Handles CDP Events](/citrolabs/ego-lite/event-buffering-ego-lite-browser-runtime)

Discover how Ego-Lite's browser runtime buffers Chrome DevTools Protocol CDP events using a circular buffer. Learn about its efficient memory management for long sessions.

- Tags: internals
- Published: 2026-08-28

### [How the Browser Runtime Module Manages Chrome DevTools Protocol (CDP) Communication in ego‑lite](/citrolabs/ego-lite/browser-runtime-cdp-communication-ego-lite)

Explore how ego-lite's browser runtime module expertly manages CDP communication. Discover its session-aware transport, automatic retries, and clean async API for seamless DevTools interaction.

- Tags: internals
- Published: 2026-08-28

### [How Ego-Lite Handles Data Flow Across Short-Lived Processes: A Deep Dive](/citrolabs/ego-lite/data-flow-in-ego-lite-across-processes)

Explore how Ego-Lite manages data flow across short-lived processes. Learn about its unique state persistence, ref maps, and isolation techniques for efficient agent execution.

- Tags: deep-dive
- Published: 2026-08-28

### [Two Startup Paths for the ego-browser Package: CLI vs SDK Explained](/citrolabs/ego-lite/two-startup-paths-for-ego-browser-package)

Explore the two startup paths for the ego-browser package: use it directly via CLI or import it as an SDK. Learn how to integrate ego-browser into your projects.

- Tags: deep-dive
- Published: 2026-08-28

### [How ego-lite Handles Isolation Between Users and Agents in the Browser](/citrolabs/ego-lite/how-ego-lite-handles-isolation-between-users-and-agents)

Discover how ego-lite ensures user and agent isolation in the browser using task spaces and ownership flags for secure command control and seamless hand-offs.

- Tags: internals
- Published: 2026-08-28

### [ego‑lite vs ego‑browser Explained: Architecture, Differences, and How They Work Together](/citrolabs/ego-lite/difference-between-ego-lite-and-ego-browser)

Understand ego-lite vs ego-browser. ego-lite is the Chromium browser binary, while ego-browser is the Node.js SDK for AI agent control via Chrome DevTools Protocol. Learn their architecture and how they work together.

- Tags: deep-dive
- Published: 2026-08-28

### [How to Set Up ego‑lite for Human‑Agent Collaboration: A Complete Guide](/citrolabs/ego-lite/how-to-set-up-ego-lite-for-human-agent-collaboration)

Learn to set up ego-lite for human-agent collaboration. This guide covers installing the Chromium app and configuring the ego-browser skill for seamless shared browser control.

- Tags: how-to-guide
- Published: 2026-08-28

### [How the Snapshot Reference System Works in ego-lite](/citrolabs/ego-lite/how-does-the-snapshot-reference-system-work-in-ego-lite)

Discover how ego-lite's snapshot reference system maps @ identifiers to backendNodeIds, rebuilding references with ensureSnapshot() upon DOM changes. Learn its efficient DOM mutation handling.

- Tags: internals
- Published: 2026-08-27

### [Handling Transient vs Permanent Element Resolution Errors in Ego-Lite](/citrolabs/ego-lite/how-are-transient-vs-permanent-element-resolution-errors-handled-in-ego-lite)

Learn how ego-lite handles transient vs permanent element resolution errors. Understand the difference between temporary DOM issues and fatal selector problems for effective debugging.

- Tags: how-to-guide
- Published: 2026-08-27

### [ElementResolutionError in ego-lite: Handling Transient and Permanent Resolution Failures](/citrolabs/ego-lite/what-is-an-elementresolutionerror-and-its-kinds-in-ego-lite)

Understand ego-lite's ElementResolutionError. Learn to distinguish between transient and permanent failures for smarter retry logic in your automation scripts.

- Tags: deep-dive
- Published: 2026-08-27

### [How the `loc=` Locator Syntax Works in ego‑lite](/citrolabs/ego-lite/how-does-the-loc-locator-syntax-work-in-ego-lite)

Understand how ego-lite's loc= locator syntax parses XPath, CSS, text, attributes, and ARIA roles. Learn to write efficient selectors for your tests.

- Tags: how-to-guide
- Published: 2026-08-27

### [Supported Element Resolution Forms in ego-lite: Complete Locator Syntax Guide](/citrolabs/ego-lite/what-are-the-supported-element-resolution-forms-in-ego-lite)

Discover ego-lite's 14 element resolution forms, including CSS selectors, XPath, and text matchers. Master locator syntax with our complete guide.

- Tags: api-reference
- Published: 2026-08-27

### [How to Wait for Specific Browser Events in ego-lite: A Complete Guide](/citrolabs/ego-lite/how-to-wait-for-specific-browser-events-in-ego-lite)

Learn how to wait for specific browser events in ego-lite using waitForBrowserEvent(). Pause execution until your desired Chrome DevTools Protocol event occurs. A complete guide.

- Tags: how-to-guide
- Published: 2026-08-27

### [How Ego-Lite Buffers and Drains CDP Events: Inside the Browser Runtime](/citrolabs/ego-lite/how-does-ego-lite-buffer-and-drain-cdp-events)

Discover how ego-lite buffers and drains CDP events within its browser runtime. Learn about the in-memory queue and efficient event handling for real-time matches.

- Tags: internals
- Published: 2026-08-27

### [How to Set and Clear the Preferred Target Tab in ego-lite](/citrolabs/ego-lite/how-to-set-and-clear-the-preferred-target-tab-in-ego-lite)

Learn to set and clear the preferred target tab in ego-lite using setPreferredTarget and clearPreferredTarget for precise browser control in your CDP sessions.

- Tags: how-to-guide
- Published: 2026-08-27

### [How Ego-Lite Handles Stale or Missing CDP Sessions: Automatic Recovery and TTL Management](/citrolabs/ego-lite/how-does-ego-lite-handle-stale-or-missing-cdp-sessions)

Discover how ego-lite automatically handles stale or missing CDP sessions with TTL validation, request deduplication, and error retry logic. Ensure seamless operation.

- Tags: internals
- Published: 2026-08-27

### [What Is the Session TTL in ego-lite and How Is It Managed?](/citrolabs/ego-lite/what-is-the-session-ttl-in-ego-lite-and-how-is-it-managed)

Discover the 2-second session TTL in ego-lite. Learn how the ensureSession() function automatically refreshes CDP connections to prevent stale sessions.

- Tags: how-to-guide
- Published: 2026-08-27

### [CDP Request Timeout in ego-lite: Default Duration and Configuration](/citrolabs/ego-lite/what-is-the-response-timeout-for-cdp-requests-in-ego-lite)

Discover the default CDP request timeout in ego-lite is 30 seconds. Learn how to configure this duration to prevent errors and optimize your application.

- Tags: deep-dive
- Published: 2026-08-27

### [How CDP Messages Are Handled and Tracked in ego-lite](/citrolabs/ego-lite/how-are-cdp-messages-handled-and-tracked-in-ego-lite)

Discover how ego-lite handles CDP messages with monotonic ID tracking, automatic session recovery, and a ring buffer. Learn about its efficient memory management.

- Tags: internals
- Published: 2026-08-27

### [How to Get Runtime Documentation Using the `help()` Function in Ego‑Lite](/citrolabs/ego-lite/how-to-get-runtime-documentation-using-the-help-function-in-ego-lite)

Access ego-lite runtime documentation dynamically with the help() function. Get JSDoc signatures and descriptions for helpers or the entire API.

- Tags: how-to-guide
- Published: 2026-08-27

### [How to Send Direct CDP Messages Using Ego-Lite: The Complete Guide](/citrolabs/ego-lite/how-to-send-direct-cdp-messages-using-ego-lite)

Learn to send direct CDP messages with Ego-Lite. This guide covers the cdp helper function for seamless Chrome DevTools Protocol command execution with automatic retries and target attachment.

- Tags: how-to-guide
- Published: 2026-08-27

### [How Ego‑Lite’s Dual Fetch Works: Server vs. Browser Requests Explained](/citrolabs/ego-lite/how-does-the-dual-fetch-server-browser-work-in-ego-lite)

Understand Ego-Lite's dual fetch mechanism. Learn how serverFetch and browserFetch enable efficient resource retrieval in Node.js and browser environments.

- Tags: deep-dive
- Published: 2026-08-27

### [How to Use the `site` Facade for Site Skills in ego-lite](/citrolabs/ego-lite/how-to-use-the-site-facade-for-site-skills-in-ego-lite)

Master the ego-lite `site` facade to discover and run site skills like runTool and lookup. Execute agent scripts efficiently without manual imports and enhance your application's capabilities.

- Tags: how-to-guide
- Published: 2026-08-27

### [Task Spaces in ego-lite: Isolated Browsing Contexts for Safe Agent Control](/citrolabs/ego-lite/what-are-task-spaces-in-ego-lite-and-how-to-use-them)

Discover task spaces in ego-lite: isolated browsing contexts for safe agent control. Learn how these secure environments protect interactive jobs with strict ownership.

- Tags: deep-dive
- Published: 2026-08-27

### [How to Manage Tabs Using the Browser Facade in Ego-Lite](/citrolabs/ego-lite/how-to-manage-tabs-using-the-browser-facade-in-ego-lite)

Learn to manage browser tabs in Ego-Lite with the browser facade. This guide explains how to use Playwright-style methods for direct tab control, simplifying CDP operations.

- Tags: how-to-guide
- Published: 2026-08-27

### [How the `page` Facade Works in ego-lite: Architecture and API Reference](/citrolabs/ego-lite/how-does-the-page-facade-work-in-ego-lite)

Understand the ego-lite page facade. Discover how `createPageFacade` uses CDP commands for async navigation, element interaction, and network monitoring in your scripts.

- Tags: architecture
- Published: 2026-08-27

### [Complete Reference to ego-browser Helper Functions in citrolabs/ego-lite](/citrolabs/ego-lite/what-are-the-available-helper-functions-in-ego-browser)

Explore over 50 ego-browser helper functions in citrolabs/ego-lite. Access page, browser, site, fetch, and more directly from your script context. Master web automation today.

- Tags: api-reference
- Published: 2026-08-27

### [How the ego-lite Snapshot System Rebuilds the RefMap: A Technical Deep Dive](/citrolabs/ego-lite/how-does-the-ego-lite-snapshot-system-rebuild-the-refmap)

Learn how the ego-lite snapshot system rebuilds the RefMap by clearing stale entries, fetching a fresh DOM tree via CDP, and populating new mappings with auxiliary metadata. Technical deep dive into citrolabs/ego-lite.

- Tags: deep-dive
- Published: 2026-08-26

### [How Stable Are Ref Numbers (backendNodeId) Across ego-lite Snapshots?](/citrolabs/ego-lite/how-stable-are-ref-numbers-backendnodeid-across-ego-lite-snapshots)

Discover why ego-lite ref numbers (backendNodeId) are unstable across snapshots. Learn about their short-lived nature tied to CDP backend node IDs and how they change with each new snapshot.

- Tags: internals
- Published: 2026-08-26

### [When Does ego‑lite Throw a Permanent Element Resolution Error for Multi‑Match Selectors?](/citrolabs/ego-lite/when-does-ego-lite-throw-a-permanent-element-resolution-error-for-multi-match-selectors)

Discover when ego-lite throws an ElementResolutionError for multi-match selectors. Learn how to avoid this error by providing an nth index for disambiguation.

- Tags: deep-dive
- Published: 2026-08-26

### [Ego-Lite Selector Formats: Complete Guide to Element Resolution](/citrolabs/ego-lite/what-selector-formats-are-supported-by-ego-lite-s-element-resolver)

Explore ego-lite's versatile selector formats including CSS, text, roles, XPath, and attributes for robust element resolution. Discover the full guide to element selection.

- Tags: deep-dive
- Published: 2026-08-26

### [How to Wait for Specific Browser Events in ego-lite: A Complete Guide](/citrolabs/ego-lite/how-can-i-wait-for-specific-browser-events-in-ego-lite)

Learn how to wait for specific browser events in ego-lite using waitForBrowserEvent or specialized helpers like waitForRequest and waitForResponse. Master efficient browser automation.

- Tags: how-to-guide
- Published: 2026-08-26

### [How ego-lite Handles SESSION_LOST Errors During CDP Communication](/citrolabs/ego-lite/how-does-ego-lite-handle-session-lost-errors-during-cdp-communication)

Learn how ego-lite automatically handles SESSION_LOST errors in CDP communication by invalidating stale sessions, attaching new ones, and retrying commands.

- Tags: internals
- Published: 2026-08-26

### [How ego-lite Manages CDP Sessions with a 2-Second TTL](/citrolabs/ego-lite/how-does-ego-lite-manage-cdp-sessions-with-its-2-second-ttl)

Discover how ego-lite manages CDP sessions with a 2-second TTL, automatically refreshing stale connections with ensureSession() for seamless browser automation.

- Tags: internals
- Published: 2026-08-26

### [How ego-lite Handles Browser Session Readiness Before Executing Helpers](/citrolabs/ego-lite/how-does-ego-lite-handle-the-readiness-of-the-browser-session-before-executing-helpers)

Discover how ego-lite ensures browser session readiness before executing helpers. It automatically creates CDP sessions, enables domains, and polls document readyState for a stable page.

- Tags: how-to-guide
- Published: 2026-08-26

### [How Ego‑Lite Distinguishes Between CLI Mode and SDK Mode at Runtime](/citrolabs/ego-lite/how-does-ego-lite-distinguish-between-cli-mode-and-sdk-mode-for-its-runtime)

Discover how ego-lite runtime determines CLI vs SDK mode by examining its entry script. Learn the logic behind routing to runMain or installEgoSdk.

- Tags: internals
- Published: 2026-08-26

### [Where to Find Documentation for the ego-browser Runtime Harness](/citrolabs/ego-lite/where-can-i-find-the-documentation-for-interacting-with-the-ego-browser-runtime-harness)

Find ego-browser runtime harness documentation in SKILL.md and TypeScript source files at citrolabs/ego-lite. Learn how to interact with the ego-browser runtime harness effectively.

- Tags: api-reference
- Published: 2026-08-26

### [How to Use the ego-browser Node.js CLI for Browser Automation](/citrolabs/ego-lite/how-can-i-use-the-ego-browser-node-js-cli-to-automate-browser-tasks)

Automate browser tasks with the ego-browser Node.js CLI. Execute JavaScript heredocs for seamless navigation, interaction, and screenshots with ego-lite. No boilerplate needed.

- Tags: how-to-guide
- Published: 2026-08-26

### [What CDP Methods Are Exposed by the ego‑lite Browser’s `globalThis.ego` Object?](/citrolabs/ego-lite/what-cdp-methods-are-exposed-by-the-ego-lite-browser-s-global-this-ego-object)

Discover the three Chrome DevTools Protocol CDP methods exposed by ego-lite's globalThis.ego: sendCDPMessage, onCDPMessage, and onSendCDPMessageError. Learn how to handle CDP messages.

- Tags: api-reference
- Published: 2026-08-26

### [Role of the ego-lite macOS Application in the Ego-Lite Architecture](/citrolabs/ego-lite/what-is-the-role-of-the-ego-lite-macos-application-in-the-architecture)

Discover the ego-lite macOS application's role in the ego-lite architecture. It hosts the CDP harness, manages Task Spaces, and connects the ego-browser skill to your browser environment.

- Tags: architecture
- Published: 2026-08-26

### [How AI Agents Inherit User Login State in ego-lite: Task Space Architecture Explained](/citrolabs/ego-lite/how-can-ai-agents-inherit-user-login-state-in-ego-lite)

Learn how AI agents inherit user login state in ego-lite. Discover the task space architecture and transfer ownership without clearing cookies for seamless integration.

- Tags: architecture
- Published: 2026-08-26

### [What is a Task Space in ego-lite and How Does It Provide Isolation?](/citrolabs/ego-lite/what-is-a-task-space-in-ego-lite-and-how-does-it-provide-isolation)

Discover how ego-lite's Task Space offers isolated browsing with its own tabs and history, securely inheriting your login state. Learn about its isolation features.

- Tags: internals
- Published: 2026-08-26

### [How Test Overrides and FakeEgo Doubles Enable Reliable Testing in ego-lite](/citrolabs/ego-lite/how-are-test-overrides-and-fake-ego-doubles-used-for-testing)

Learn how ego-lite uses test overrides and FakeEgo doubles to mock the Chrome DevTools Protocol, enabling fast and reliable browser testing without a real browser.

- Tags: testing
- Published: 2026-08-25

### [How the Update Notice System Detects New Browser Versions in Ego Lite](/citrolabs/ego-lite/how-does-the-update-notice-system-detect-new-browser-versions)

Discover how Ego Lite's update notice system detects new browser versions. Learn about the injected bridge, version validation, and update notifications.

- Tags: internals
- Published: 2026-08-25

### [How the `installEgoSdk` API Integrates with External Agent Runtimes: Complete Technical Guide](/citrolabs/ego-lite/how-does-the-install-ego-sdk-api-integrate-with-external-agent-runtimes)

Explore how the installEgoSdk API integrates with external agent runtimes. This guide details validation, context building, async readiness, console redirection, and safe ego object integration.

- Tags: how-to-guide
- Published: 2026-08-25

### [How Ego Lite's HTTP Fetch Façade Distinguishes Server vs Browser Origin Requests](/citrolabs/ego-lite/how-does-the-http-fetch-facade-distinguish-server-vs-browser-origin-requests)

Learn how Ego Lite's HTTP fetch facade distinguishes server vs browser origin requests using explicit wrapper functions for Node.js and in-page execution.

- Tags: internals
- Published: 2026-08-25

### [How @N Snapshot Refs Work in ego‑lite: A Complete Guide to Creation, Validity, and Re‑Snapshotting](/citrolabs/ego-lite/how-do-n-snapshot-refs-work-and-when-do-they-need-re-snapshotting)

Understand @N snapshot refs in ego-lite. Learn how these temporary DOM identifiers work, when they become invalid, and how to re-snapshot effectively for accurate page snapshots.

- Tags: deep-dive
- Published: 2026-08-25

### [How Ego‑Lite Buffers and Flushes `console.log` Output](/citrolabs/ego-lite/how-does-the-output-sink-buffer-and-flush-console-log-output)

Discover how ego-lite buffers and flushes console.log output efficiently. Learn how formatted lines are managed and atomically flushed on process exit.

- Tags: internals
- Published: 2026-08-25

### [How the Site Skill Manifest Defines Reusable Tools and Browser Tools in Ego‑Lite](/citrolabs/ego-lite/how-does-the-site-skill-manifest-define-reusable-tools-and-browser-tools)

Discover how the site skill manifest in ego-lite defines reusable Node.js utilities with nodeTools and browser helpers using browserTools for efficient automation.

- Tags: deep-dive
- Published: 2026-08-25

### [How the `page.locator()` Facade Compares to Playwright's Locator API: A Complete Technical Breakdown](/citrolabs/ego-lite/how-does-the-page-locator-facade-compare-to-playwright-s-locator-api)

Compare page.locator() facade to Playwright's Locator API. ego-lite uses a custom CDP-based implementation for robust automation. Learn the technical differences.

- Tags: deep-dive
- Published: 2026-08-25

### [How Screencast and Video Recording Works in Ego Lite: CDP and FFmpeg Explained](/citrolabs/ego-lite/how-does-the-screencast-and-video-recording-functionality-work)

Learn how Ego Lite's screencast and video recording works by exploring CDP and FFmpeg for efficient VP8 encoding into WebM files.

- Tags: internals
- Published: 2026-08-25

### [How Ego‑Lite Handles File Uploads and Downloads: CDP‑Based Implementation Explained](/citrolabs/ego-lite/how-does-the-file-upload-and-download-handling-work)

Discover how Ego-Lite handles file uploads and downloads using CDP-based Playwright helpers in ego-browser. Learn about the direct Chrome DevTools Protocol implementation.

- Tags: deep-dive
- Published: 2026-08-25

### [How Page Events Are Buffered and Drained in the Ego Lite Runtime](/citrolabs/ego-lite/how-are-page-events-buffered-and-drained-in-the-runtime)

Discover how Ego Lite buffers CDP events in memory and drains them using drainBrowserEvents. Learn about real-time callbacks and predicate-based resolution with waitForBrowserEvent.

- Tags: internals
- Published: 2026-08-25

### [How Ego-Lite Classifies Element-Resolution Errors as Transient or Permanent](/citrolabs/ego-lite/how-does-the-error-classification-system-distinguish-transient-vs-permanent-failures)

Discover how Ego-Lite classifies element-resolution errors as transient or permanent using the kind field. Learn how this distinction impacts retries and aborts for efficient error handling.

- Tags: internals
- Published: 2026-08-25

### [How Task Space Handoff and Takeover Work Between Agent and User in Ego-lite](/citrolabs/ego-lite/how-do-task-space-handoff-and-takeover-work-between-agent-and-user)

Learn how Ego-lite handles task space handoff and takeover using an ownership system. Understand how control shifts between agent and user for seamless task completion.

- Tags: internals
- Published: 2026-08-25

### [Session TTL and Caching Strategy in ego-lite browser-runtime: Complete Guide](/citrolabs/ego-lite/what-is-the-session-ttl-and-caching-strategy-in-browser-runtime)

Learn ego-lite browser-runtime's session TTL and caching strategy. Discover how it reuses sessions, re-attaches expired ones, and buffers CDP events for optimal performance.

- Tags: deep-dive
- Published: 2026-08-25

### [How the `cdp()` Function Executes Chrome DevTools Protocol Commands in ego-lite](/citrolabs/ego-lite/how-does-the-cdp-function-execute-chrome-devtools-protocol-commands)

Learn how the cdp() function executes Chrome DevTools Protocol commands via a pipeline delegating to send() and routing through browserCdp() or rawCdp() for flexible command execution.

- Tags: how-to-guide
- Published: 2026-08-25

### [How Ego-Lite Captures Snapshots and Page State: A Complete Technical Guide](/citrolabs/ego-lite/how-does-the-snapshot-and-page-state-capture-work)

Explore how Ego-Lite captures page state with its three-stage pipeline. Understand snapshotting, ref-maps, and AI agent integration for detailed technical insights.

- Tags: deep-dive
- Published: 2026-08-25

### [How Helper Functions Are Injected Into Agent Scripts in Ego‑Lite](/citrolabs/ego-lite/how-are-helper-functions-injected-into-agent-scripts)

Discover how Ego-Lite injects helper functions into agent scripts. Learn about the two-step process involving helperContext() and installEgoSdk() for global availability.

- Tags: internals
- Published: 2026-08-25

### [How the Learning Subsystem Discovers and Validates Site Skills in Ego-Lite](/citrolabs/ego-lite/how-does-the-learning-subsystem-discover-and-validate-site-skills)

Discover how the ego-lite learning subsystem finds and validates site skills by scanning your workspace and checking manifests. Learn more about efficient skill discovery.

- Tags: internals
- Published: 2026-08-25

### [Element Resolver and Locator Architecture in ego‑lite: A Complete Technical Guide](/citrolabs/ego-lite/what-is-the-architecture-of-the-element-resolver-and-locator-system)

Explore the ego-lite element resolver and locator architecture. This technical guide details its layered design for seamless DOM target translation and error handling.

- Tags: architecture
- Published: 2026-08-25

### [How Task Spaces Work in ego-lite: Ownership Model and Control Flow Explained](/citrolabs/ego-lite/how-do-task-spaces-work-in-ego-lite-and-what-s-the-ownership-model)

Discover how ego-lite task spaces provide isolated browser contexts with clear agent or user ownership. Understand control flow and ownership models for secure cross-party transfers.

- Tags: internals
- Published: 2026-08-25

### [How the Ego Lite CDP Transport Layer Handles Session Management and Auto Re-Attach](/citrolabs/ego-lite/how-does-the-cdp-transport-layer-handle-session-management-and-auto-re-attach)

Discover how Ego Lite CDP transport layer manages sessions, caching them for 2 seconds and automatically re-attaching on connection loss. Learn about on-demand session creation and command retries.

- Tags: internals
- Published: 2026-08-25

### [How to Interact with Elements Using Ego-Lite Actions: Click, Fill, and Double-Click](/citrolabs/ego-lite/how-to-interact-with-elements-ego-lite-actions)

Learn how to interact with web elements using ego-lite actions like click fill and dblclick Leverage Playwright-style helpers to automate user interactions and streamline your testing

- Tags: how-to-guide
- Published: 2026-08-24

### [How to Use getByRole, getByText, and getByLabel in ego-lite Locators](/citrolabs/ego-lite/ego-lite-locator-getbyrole-getbytext-getbylabel)

Learn to use ego-lite locators getByRole, getByText, and getByLabel. Target elements with Playwright-style accessibility helpers and auto-waiting selectors for robust testing.

- Tags: how-to-guide
- Published: 2026-08-24

### [How to Use the Page Facade API in ego-lite: A Playwright-Style Interface for Browser Automation](/citrolabs/ego-lite/how-to-use-ego-lite-page-facade-api)

Learn to use the Page Facade API in ego-lite for Playwright-style browser automation. Control Chrome DevTools Protocol commands with simple async methods like page.goto() and page.screenshot().

- Tags: how-to-guide
- Published: 2026-08-24

### [Understanding the Element Resolution Pipeline in Ego-Lite](/citrolabs/ego-lite/ego-lite-element-resolution-pipeline)

Discover Ego-Lite's element resolution pipeline. Learn how it transforms selectors into coordinates via parsing snapshot mapping and CDP commands for efficient browser automation.

- Tags: deep-dive
- Published: 2026-08-24

### [How Ego-Lite Resolves Elements Using Different Selector Types](/citrolabs/ego-lite/how-ego-lite-resolves-elements-with-selectors)

Discover how Ego-Lite resolves elements with CSS, XPath, and accessibility selectors. Learn about its unified parseLocator function for efficient element resolution.

- Tags: how-to-guide
- Published: 2026-08-24

### [Supported Selector Formats in ego-lite: CSS, XPath, Text, and loc= Syntax](/citrolabs/ego-lite/ego-lite-supported-selector-formats)

Discover ego-lite's powerful selector formats: CSS, XPath, text, loc= syntax, and more. Normalize your element selection for efficient testing and automation.

- Tags: api-reference
- Published: 2026-08-24

### [How Ego-Lite Handles Ownership Policies for Task Spaces](/citrolabs/ego-lite/ego-lite-task-space-ownership-policies)

Discover how ego-lite manages ownership policies for task spaces. Learn about the agent vs user flag controlling AI autonomy and user permissions for browser tabs.

- Tags: internals
- Published: 2026-08-24

### [How to Complete or Close a Task Space in Ego-Lite: A Developer Guide](/citrolabs/ego-lite/how-to-complete-close-ego-lite-task-space)

Learn how to close a task space in ego-lite using the completeTaskSpace helper. Discover how to keep or remove task spaces efficiently in your agent scripts.

- Tags: how-to-guide
- Published: 2026-08-24

### [How to Take Over Control of a Task Space from the User in ego-lite](/citrolabs/ego-lite/how-to-take-over-task-space-from-user-ego-lite)

Learn how to take over control of a task space in ego-lite using the takeOverTaskSpace helper. Reclaim browser control after user interaction. Find out more!

- Tags: how-to-guide
- Published: 2026-08-24

### [How to Hand Off Control of a Task Space to the User in ego-lite](/citrolabs/ego-lite/how-to-hand-off-task-space-to-user-ego-lite)

Easily hand off task space control to the user in ego-lite. Use handOffTaskSpace() for manual intervention like CAPTCHAs, logins, or confirmations.

- Tags: how-to-guide
- Published: 2026-08-24

### [How to Claim Ownership of a User-Owned Task Space in ego-lite](/citrolabs/ego-lite/how-to-claim-user-owned-task-space-ego-lite)

Learn how to claim ownership of a user-owned task space in ego-lite using taskSpaces.claim(id) or ego.claimTaskSpace(id, name?). Transfer ownership to your agent for automated interaction.

- Tags: how-to-guide
- Published: 2026-08-24

### [Understanding Task Spaces in ego-lite: Isolated Browsing Contexts for AI Agents](/citrolabs/ego-lite/what-are-ego-lite-task-spaces)

Explore task spaces in ego-lite: isolated browsing contexts for AI agents. Manage multiple workflows concurrently with separate tabs history and DOM snapshots.

- Tags: deep-dive
- Published: 2026-08-24

### [How to Set or Clear the Preferred Tab for a CDP Session in ego-lite](/citrolabs/ego-lite/ego-lite-set-clear-preferred-cdp-tab)

Learn to set or clear the preferred tab for a CDP session in ego-lite. Easily pin or revert to the active tab using setPreferredTarget and clearPreferredTarget functions.

- Tags: how-to-guide
- Published: 2026-08-24

### [How Ego-Lite Handles Session Invalidation and Reattachment](/citrolabs/ego-lite/ego-lite-session-invalidation-reattachment)

Discover how ego-lite manages CDP session invalidation and reattachment with its ensureSession helper. It automatically detects stale sessions and re-attaches to browser targets.

- Tags: internals
- Published: 2026-08-24

### [Core Components of the ego-lite Browser Runtime: CDP Transport, Session Management, and Element Resolution](/citrolabs/ego-lite/ego-lite-browser-runtime-core-components)

Discover the core components of the ego-lite browser runtime including CDP transport, session management, and element resolution. Learn how these modules enable powerful browser automation.

- Tags: internals
- Published: 2026-08-24

### [How to Install the ego-lite SDK into a Browser App: Complete Setup Guide](/citrolabs/ego-lite/how-to-install-ego-lite-sdk-into-browser-app)

Install the ego-lite SDK into your browser app with this complete setup guide. Learn how to add the ego-browser skill and verify integration easily.

- Tags: how-to-guide
- Published: 2026-08-24

### [How Ego-Lite Uses Chrome DevTools Protocol (CDP) for Headless Automation](/citrolabs/ego-lite/how-ego-lite-uses-chrome-devtools-protocol)

Discover how Ego-Lite leverages Chrome DevTools Protocol CDP for robust headless automation. Explore its three-layer CDP stack for efficient browser control.

- Tags: how-to-guide
- Published: 2026-08-24

### [ego-lite CLI Mode vs SDK Mode: Key Differences Explained](/citrolabs/ego-lite/ego-lite-cli-vs-sdk-mode)

Discover the key differences between ego-lite CLI mode and SDK mode. Learn how each invocation method impacts entry-point detection and process lifecycle for your projects.

- Tags: deep-dive
- Published: 2026-08-24

### [How to Use ego-lite to Automate Browser Tasks: A Complete Node.js SDK Guide](/citrolabs/ego-lite/how-to-use-ego-lite-for-browser-automation)

Automate browser tasks with ego-lite, a Node.js SDK. Learn how this lightweight harness simplifies Playwright-style automation and integrates seamlessly with your scripts.

- Tags: how-to-guide
- Published: 2026-08-24

### [Ego-Lite Element Resolver Selector Formats: CSS, XPath, ARIA, and Text Syntax](/citrolabs/ego-lite/what-selector-formats-does-ego-lites-element-resolver-support)

Explore ego-lite's element resolver supporting CSS, XPath, ARIA, text, and more. Efficiently target elements with diverse selector formats for robust automation.

- Tags: api-reference
- Published: 2026-08-23

### [How Task Space IDs Are Handled in Ego-Lite: Validation, Resolution, and Usage](/citrolabs/ego-lite/how-are-task-space-ids-handled-in-ego-lite)

Discover how ego-lite handles task space IDs with validation, resolution, and usage for unique browsing contexts. Learn about the numeric ID system.

- Tags: internals
- Published: 2026-08-23

### [How `useOrCreateTaskSpace()` Works in ego-lite: Task Space Management Explained](/citrolabs/ego-lite/how-does-useorcreatetaskspace-function-work-in-ego-lite)

Learn how useOrCreateTaskSpace in ego-lite automatically retrieves or creates agent-owned task spaces. Understand its ownership validation and runtime selection features.

- Tags: internals
- Published: 2026-08-23

### [How `handOffTaskSpace()` Works in ego-lite: Agent-to-User Control Transfer](/citrolabs/ego-lite/how-does-handofftaskspace-work-in-ego-lite)

Understand how handOffTaskSpace() in ego-lite returns browser control to the user. Learn about agent overlay hiding and task space ownership changes.

- Tags: internals
- Published: 2026-08-23

### [How to Claim a User-Owned Task Space in Ego-Lite: Complete SDK Guide](/citrolabs/ego-lite/how-does-an-agent-claim-a-user-owned-task-space-in-ego-lite)

Learn how to claim a user-owned task space in Ego-Lite with our SDK guide. This article explains the claimTaskSpace helper and ego.claimTaskSpace() for agent ownership transfer.

- Tags: sdk-guide
- Published: 2026-08-23

### [Understanding the Ownership Model for Task Spaces in Ego-Lite](/citrolabs/ego-lite/what-is-the-ownership-model-for-task-spaces-in-ego-lite)

Explore Ego-Lite's strict three-tier ownership model agent, agentDelegatedToUser, and user to prevent unauthorized mutations in isolated browser automation contexts.

- Tags: architecture
- Published: 2026-08-23

### [What Are Task Spaces in ego-lite? Isolated Browsing Contexts for AI Agents](/citrolabs/ego-lite/what-are-task-spaces-in-ego-lite)

Discover task spaces in ego-lite isolated browsing contexts that let AI agents manage separate tabs history and DOM snapshots for concurrent tasks without interference.

- Tags: deep-dive
- Published: 2026-08-23

### [How Browser Events Are Subscribed to in Ego-Lite: CDP Event Architecture](/citrolabs/ego-lite/how-are-browser-events-subscribed-to-in-ego-lite)

Learn how ego-lite subscribes to browser events using subscribeBrowserEvent. Discover the CDP event architecture and listener registration process within the browser-runtime.ts file.

- Tags: internals
- Published: 2026-08-23

### [How Ego-Lite Handles CDP Session Loss: Automatic Recovery and Re-Attachment](/citrolabs/ego-lite/how-does-ego-lite-handle-cdp-session-loss)

Ego-Lite automatically handles CDP session loss by detecting errors, recovering stale state, and re-attaching to browser targets without manual intervention. Learn how it works.

- Tags: internals
- Published: 2026-08-23

### [How ensureSession() Works in ego-lite: CDP Session Management Explained](/citrolabs/ego-lite/how-does-the-ensuresession-function-work-in-ego-lite)

Explore how ensureSession() in ego-lite manages CDP sessions. Learn about TTL validation, deduplication, tab discovery, and event listeners for robust session handling.

- Tags: internals
- Published: 2026-08-23

### [How Does Ego-Lite Track JavaScript Dialogs: CDP Event Handling Explained](/citrolabs/ego-lite/how-does-ego-lite-track-javascript-dialogs)

Discover how Ego-Lite tracks JavaScript dialogs using CDP event handling. Learn about session maps, pending dialogs, and accessor usage for navigation and screenshots.

- Tags: deep-dive
- Published: 2026-08-23

### [How Ego-Lite Handles Buffered CDP Events: Browser Runtime Architecture](/citrolabs/ego-lite/how-does-ego-lite-handle-buffered-cdp-events)

Discover how Ego-Lite efficiently manages buffered CDP events using a capped in-memory queue and selective direct delivery, optimizing memory for browser runtime architecture.

- Tags: architecture
- Published: 2026-08-23

### [TTL for CDP Sessions in ego-lite: Understanding the 2-Second Timeout](/citrolabs/ego-lite/what-is-the-ttl-for-cdp-sessions-in-ego-lite)

Discover the 2-second TTL for CDP sessions in ego-lite. Learn how SESSION_TTL_MS forces re-attachment to the browser and optimize your runtime.

- Tags: internals
- Published: 2026-08-23

### [How Ego-Lite Manages CDP Session Attachment and Caching](/citrolabs/ego-lite/how-does-ego-lite-manage-cdp-session-attachment-and-caching)

Discover how ego-lite manages CDP session attachment and caching with TTL-based storage and automatic re-attachment for seamless Chrome DevTools Protocol interaction.

- Tags: internals
- Published: 2026-08-23

### [Understanding the CDP Transport Layer in ego-lite: Architecture and Implementation](/citrolabs/ego-lite/what-is-the-cdp-transport-layer-in-ego-lite)

Explore the CDP transport layer in ego-lite. This promise-based abstraction simplifies browser interaction by managing sessions retries and event buffering.

- Tags: architecture
- Published: 2026-08-23

### [How Data Flows Through ego-lite: Inside the 3-Layer CDP Bridge Architecture](/citrolabs/ego-lite/how-does-the-data-flow-work-in-ego-lite)

Explore how ego-lite's 3-layer CDP bridge architecture routes browser automation commands. Learn how Playwright-style calls transform into raw Chrome DevTools Protocol messages and back.

- Tags: internals
- Published: 2026-08-23

### [Ego-Lite helperContext Helpers: Complete API Reference for Browser Automation](/citrolabs/ego-lite/what-helpers-are-available-in-ego-lites-helpercontext)

Explore ego-lite's helperContext API reference. Discover page, browser, taskSpaces, site, and fetch facades plus Playwright-style utilities for effortless browser automation.

- Tags: api-reference
- Published: 2026-08-23

### [Understanding helperContext() in ego-lite: The Agent API Foundation](/citrolabs/ego-lite/what-is-the-purpose-of-helpercontext-in-ego-lite)

Discover how helperContext() in ego-lite creates the unified Playwright-style API for your automation scripts and agents. Learn its core function today.

- Tags: deep-dive
- Published: 2026-08-23

### [How ego-lite Helpers Are Exposed in SDK Mode: A Complete Technical Guide](/citrolabs/ego-lite/how-are-ego-lite-helpers-exposed-in-sdk-mode)

Discover how ego-lite helpers are exposed in SDK mode. Learn how installEgoSdk attaches key functions like page, browser, and fetch to globalThis for easy access in your projects.

- Tags: deep-dive
- Published: 2026-08-23

### [How to Start ego-browser in SDK Mode: A Complete Guide to Embedded Browser Automation](/citrolabs/ego-lite/how-to-start-ego-browser-in-sdk-mode)

Learn how to start ego-browser in SDK mode with this guide. Import the package to automatically inject browser automation helpers onto globalThis for seamless embedded browser automation.

- Tags: how-to-guide
- Published: 2026-08-23

### [How to Start ego-browser in CLI Mode: Command-Line Automation Guide](/citrolabs/ego-lite/how-to-start-ego-browser-in-cli-mode)

Start ego-browser in CLI mode using a simple command to automate web tasks with Playwright-style APIs. Explore the citrolabs ego-lite repository.

- Tags: how-to-guide
- Published: 2026-08-23

### [How to Run Learned Site Tools and Browser Tools Using ego-lite](/citrolabs/ego-lite/how-can-i-run-learned-site-tools-or-browser-tools-using-ego-lite)

Learn to run site tools and browser tools with ego-lite. Discover capabilities using siteSkills() or learnContext(), then use runSiteTool() or runSiteBrowserTool() for seamless execution.

- Tags: how-to-guide
- Published: 2026-08-22

### [How Site Skills Are Structured in ego-lite and Where They Are Stored](/citrolabs/ego-lite/how-are-site-skills-structured-in-ego-lite-and-where-are-they-stored)

Discover how ego-lite structures site skills. Learn where these self-contained bundles are stored and what components they include for runtime discovery.

- Tags: internals
- Published: 2026-08-22

### [How to Perform Navigation Using the Ego-Lite Browser Facade API](/citrolabs/ego-lite/how-can-i-perform-navigation-using-the-ego-lite-browser-facade-api)

Learn to perform navigation with the ego-lite browser facade API. Use the nav.goto helper for simple, Promise-based page navigation with CDP command integration.

- Tags: how-to-guide
- Published: 2026-08-22

### [Browser Facade APIs in ego-lite: Playwright-Compatible Methods for Browser Automation](/citrolabs/ego-lite/what-are-the-available-browser-facade-apis-in-ego-lite-similar-to-playwright)

Discover Playwright-compatible browser facade APIs in ego-lite, including page, locator, and browser objects, for powerful agent-based browser automation.

- Tags: api-reference
- Published: 2026-08-22

### [What Selector Formats Does the Ego-Lite Element Resolver Support? A Complete Guide](/citrolabs/ego-lite/what-selector-formats-does-the-ego-lite-element-resolver-support)

Explore the unified selector language supported by ego-lite element resolver including CSS XPath ARIA text href attributes and snapshot references. Learn how parseLocator resolves elements.

- Tags: deep-dive
- Published: 2026-08-22

### [How an Agent Regains Control of a Task Space After a User Handoff in ego-lite](/citrolabs/ego-lite/how-does-an-agent-regain-control-of-a-task-space-after-a-user-handoff-in-ego-lite)

Learn how an agent regains control of a task space in ego-lite using takeOverTaskSpace or claimTaskSpace after a user handoff. Ownership transitions are tracked atomically.

- Tags: internals
- Published: 2026-08-22

### [How an Agent Hands Off a Task Space to a User in ego-lite](/citrolabs/ego-lite/what-is-the-process-for-an-agent-to-hand-off-control-of-a-task-space-to-a-user-in-ego-lite)

Learn how an agent hands off a task space to a user in ego-lite. Discover the steps involved, including validation, target resolution, and ownership checks, to seamlessly transfer control.

- Tags: how-to-guide
- Published: 2026-08-22

### [How to Create or Reuse a Task Space in Ego-Lite: A Complete API Guide](/citrolabs/ego-lite/how-can-an-agent-create-or-reuse-a-task-space-in-ego-lite)

Learn how to create or reuse a task space in ego-lite with this API guide. Discover useOrCreate new claim and switch methods for efficient agent workflow management in citrolabs/ego-lite.

- Tags: api-reference
- Published: 2026-08-22

### [How ego‑lite Task Space Ownership Models Work: Agent, User, and Delegated Control](/citrolabs/ego-lite/what-are-the-different-types-of-task-spaces-in-ego-lite-and-their-ownership-models)

Explore ego-lite task space ownership models: agent, user, and delegated control. Understand how agents manage and claim spaces for efficient task management.

- Tags: deep-dive
- Published: 2026-08-22

### [How Ego‑Lite Handles Site Skill Discovery and Execution](/citrolabs/ego-lite/how-does-ego-lite-handle-site-skill-discovery-and-execution)

Learn how Ego-Lite handles site skill discovery and execution by scanning directories, matching domains, and running tools in Node.js or the browser.

- Tags: deep-dive
- Published: 2026-08-22

### [ego-browser Driver Directory Functionalities: Core Browser Automation Primitives](/citrolabs/ego-lite/what-functionalities-are-included-in-the-package-ego-browser-src-driver-directory)

Explore the ego-browser driver functionalities in citrolabs/ego-lite. Discover core browser automation primitives like navigation, mouse/keyboard interactions, element resolution, waits, and file handling.

- Tags: api-reference
- Published: 2026-08-22

### [Understanding the Shared Mutable Runtime State in ego-lite](/citrolabs/ego-lite/what-is-the-shared-mutable-runtime-state-in-ego-lite-and-where-is-it-managed)

Explore the shared mutable runtime state in ego-lite, a singleton object managing session tracking and CDP config. Learn how the setOverrides API coordinates mutations across the browser-automation harness.

- Tags: deep-dive
- Published: 2026-08-22

### [How Ego-Lite Maps backendNodeId to Ref Numbers: Inside the Ref Map System](/citrolabs/ego-lite/how-does-ego-lite-map-backendnodeid-to-ref-numbers)

Discover how ego-lite maps backendNodeId to ref numbers using its Ref Map system for concise element references in agent scripts. Learn the internal workings of this essential mapping.

- Tags: internals
- Published: 2026-08-22

### [How the Element Resolver Works in Ego‑Lite: Architecture and Implementation](/citrolabs/ego-lite/what-is-the-function-of-the-element-resolver-in-ego-lite)

Discover how the ego-lite element resolver works. It translates selectors into browser coordinates and CDP references, ensuring reliable DOM interactions.

- Tags: architecture
- Published: 2026-08-22

### [How Ego-Lite Manages CDP Transport and Session Caching](/citrolabs/ego-lite/how-does-ego-lite-manage-cdp-transport-and-session-caching)

Discover how ego-lite efficiently manages CDP transport and session caching. Learn about its auto-reconnecting CDP transport, JSON-RPC message bundling, and smart session caching for seamless retries and performance.

- Tags: internals
- Published: 2026-08-22

### [Where to Find the Source Code for Ego‑Lite’s Agent‑Callable Helpers](/citrolabs/ego-lite/where-can-i-find-the-source-code-for-ego-lites-agent-callable-helpers)

Find ego-lite agent-callable helpers source code in helpers.ts. Discover page, browser, task-spaces, site, fetch, and utility helpers for the Ego-Lite runtime.

- Tags: api-reference
- Published: 2026-08-22

### [What Is `package/ego-browser/src/index.ts` in Ego-Lite? CLI Driver and SDK Installer Explained](/citrolabs/ego-lite/what-is-the-purpose-of-package-ego-browser-src-index-ts-in-ego-lite)

Understand ego-browser/src/index.ts in Ego-Lite. This file acts as a dual-mode entry point for the SDK, enabling CLI execution or API injection into your host environment.

- Tags: deep-dive
- Published: 2026-08-22

### [How to Trace the Data Flow from Agent JavaScript to Browser Runtime in Ego-Lite](/citrolabs/ego-lite/explain-the-data-flow-from-agent-javascript-to-browser-runtime-in-ego-lite)

Trace the data flow from agent JavaScript to browser runtime in ego-lite. Understand how agent code executes and communicates with the browser via CDP commands.

- Tags: internals
- Published: 2026-08-22

### [How Ego-Lite Handles JavaScript Execution from stdin for Agents: A Technical Deep Dive](/citrolabs/ego-lite/how-does-ego-lite-handle-javascript-execution-from-stdin-for-agents)

Learn how ego-lite handles JavaScript execution from stdin for agents. Discover its isolated execution, helper context, and output buffering for reliable agent runs.

- Tags: deep-dive
- Published: 2026-08-22

### [The Role of `globalThis.ego` Bindings in ego-lite: How the JavaScript-Host Bridge Works](/citrolabs/ego-lite/what-is-the-role-of-globalthis-ego-bindings-in-ego-lite)

Discover how globalThis.ego bindings in ego-lite create the JavaScript-host bridge for browser automation, task management, and CDP communication. Learn about this essential native object.

- Tags: internals
- Published: 2026-08-22

### [How the Open-Source ego-browser Package Drives the ego-lite Browser App](/citrolabs/ego-lite/how-does-the-open-source-ego-browser-package-drive-the-ego-lite-browser-app)

Discover how the open-source ego-browser package, a Node.js harness, translates commands into CDP messages for the ego-lite browser app. Explore the inner workings.

- Tags: how-to-guide
- Published: 2026-08-22

### [What Are the Two Main Components of the ego-lite Architecture?](/citrolabs/ego-lite/what-are-the-two-main-components-of-the-ego-lite-architecture)

Discover the two main components of the ego-lite architecture: a custom Chromium browser and a Node.js CDP harness for AI agent browser interaction.

- Tags: architecture
- Published: 2026-08-22

### [How ego-lite Enables Parallel Execution for AI Agents and Human Users in a Browser](/citrolabs/ego-lite/how-does-ego-lite-enable-parallel-execution-for-ai-agents-and-human-users-in-a-browser)

Discover how ego-lite enables parallel execution for AI agents and human users in a browser. Its task space isolation prevents state collisions for seamless concurrent operation.

- Tags: how-to-guide
- Published: 2026-08-22

### [How to Discover and Run Learned Site Tools and Browser Tools With ego-lite](/citrolabs/ego-lite/discover-run-learned-site-tools-browser-tools-ego-lite)

Discover and run site and browser tools with ego-lite. Use siteSkills or learnContext to find capabilities, then run tools with runSiteTool or runSiteBrowserTool.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Use Snapshot References (backendNodeId) for Element Interaction in Ego Lite](/citrolabs/ego-lite/use-snapshot-references-backendnodeid-element-interaction-ego-lite)

Learn how Ego Lite uses backendNodeId snapshot references for fast element interaction, bypassing slow DOM queries for efficient automation.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Take Full Page Snapshots and Screenshots with ego-lite](/citrolabs/ego-lite/take-full-page-snapshots-screenshots-ego-lite)

Learn to take full page screenshots and semantic HTML snapshots with ego-lite using simple code. Capture complete page images or DOM snapshots effortlessly.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Perform Network Requests from the Node.js Server or Browser Context in Ego-Lite](/citrolabs/ego-lite/perform-network-requests-node-browser-context-ego-browser)

Easily perform network requests in Node.js or browser contexts with Ego-Lite. Discover the unified fetch facade for server and browser HTTP calls.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Evaluate JavaScript in the Browser Context Using ego-browser](/citrolabs/ego-lite/evaluate-javascript-browser-context-ego-browser)

Evaluate JavaScript in the browser context using ego-browser. Leverage evaluate() or js() helpers with the Chrome DevTools Protocol for seamless execution.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Execute Raw CDP Commands with ego-browser: A Complete Guide](/citrolabs/ego-lite/execute-raw-cdp-commands-ego-browser)

Learn to execute raw CDP commands with ego-browser using cdp() and browserCdp() helpers for direct Chromium communication. A complete guide for ego-lite.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Wait for Specific Page Conditions in ego-lite: Load States, URLs, and Element Visibility](/citrolabs/ego-lite/wait-for-page-conditions-load-state-element-appearance-ego-browser)

Master ego-lite waits to pause script execution for load states, URLs, and element visibility. Enhance your Playwright-style tests with efficient condition handling.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Check the State of an Element in Ego-Browser: Visibility, Enabled, and Checked Status](/citrolabs/ego-lite/check-element-state-visible-enabled-checked-ego-browser)

Learn how to check element state like visibility, enabled, and checked status in Ego-Browser using simple helper functions. Query DOM state effortlessly with Ego-Lite.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Click, Fill, and Hover on Located Elements in Ego-Browser](/citrolabs/ego-lite/perform-actions-click-fill-hover-elements-ego-browser)

Learn how to click, fill, and hover on located elements using Ego-Browsers Playwright-style API. This guide explains how to interact with DOM elements via CDP events.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Locate Elements on a Page Using CSS, Roles, Text, or Labels in ego-lite](/citrolabs/ego-lite/locate-elements-css-roles-text-labels-ego-browser)

Learn to locate elements on a page using CSS roles text or labels with ego-lites unified loc selector syntax for efficient web testing.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Navigate to a URL Using the ego-browser Page Facade](/citrolabs/ego-lite/navigate-to-url-ego-browser-page-facade)

Learn to navigate to a URL using the ego-browser page facade with the page.goto method. This guide explains how to send CDP Page navigate commands and handle load events efficiently.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Wait for Agent Control in ego-lite: A Complete Guide](/citrolabs/ego-lite/wait-for-agent-control-ego-lite)

Learn how to wait for agent control in ego-lite using taskSpaces.waitForAgentControl(). This guide details blocking execution and handling timeouts for seamless agent control.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Take Back Control of a Task Space from the User in ego-lite](/citrolabs/ego-lite/take-back-control-task-space-from-user)

Learn how to take back control of a task space in ego-lite by calling await takeOverTaskSpace. Reclaim ownership and resume automation workflows seamlessly.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Hand Off Control of a Task Space Back to the User in ego-lite](/citrolabs/ego-lite/hand-off-task-space-control-to-user)

Learn how to hand off control of a task space back to the user in ego-lite using the handOffTaskSpace helper. Seamlessly transfer ownership for manual interaction.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Complete a Task Space and Dismiss or Close the Overlay Using ego-lite](/citrolabs/ego-lite/complete-task-space-dismiss-close-overlay)

Learn to close ego-lite overlays and complete task spaces. Use the completeTaskSpace helper with keep: false to destroy or keep: true to hide UI elements.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Switch to an Agent-Owned Task Space in ego-lite: A Complete Developer Guide](/citrolabs/ego-lite/switch-agent-owned-task-space-ego-lite)

Learn how to switch to an agent-owned task space in ego-lite. This guide details using the switchTaskSpace helper and its permission validations for developers.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Claim Ownership of a User-Owned Task Space in ego-lite](/citrolabs/ego-lite/claim-user-owned-task-space-ego-lite)

Learn how to claim ownership of a user-owned task space in ego-lite with taskSpaces.claim or ego.claimTaskSpace. Transfer control to your agent for automated browsing.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Manage Isolated Browser Contexts Using Task Spaces in ego-lite](/citrolabs/ego-lite/manage-isolated-browser-contexts-task-spaces-ego-lite)

Learn to manage isolated browser contexts with ego-lite task spaces. Group tabs, snapshots, and UI state for seamless agent control and ownership management in browser automation.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Inject Ego-Browser SDK Helpers into globalThis: Complete Guide](/citrolabs/ego-lite/how-to-inject-ego-browser-sdk-helpers-into-globalthis)

Easily inject ego-browser SDK helpers into globalThis using installEgoSdk. This guide shows how to create helper contexts and define facades like page and browser for your application.

- Tags: how-to-guide
- Published: 2026-08-21

### [CLI Mode vs Module Mode in ego-browser: How the ego-lite Runtime Works](/citrolabs/ego-lite/cli-mode-vs-module-mode-ego-browser)

Understand ego-browser's CLI mode vs module mode. Learn how the ego-lite runtime executes JavaScript as a standalone program or integrates as a library. Explore the ego-lite runtime.

- Tags: internals
- Published: 2026-08-21

### [How to Run ego-browser Scripts from the Command Line](/citrolabs/ego-lite/how-to-run-ego-browser-scripts-from-command-line)

Learn how to run ego-browser scripts from the command line using ego-lite. Execute JavaScript heredocs with browser-automation helpers against a managed Chromium instance.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Install and Use ego-browser as a Node.js Module](/citrolabs/ego-lite/how-to-install-and-use-ego-browser-as-node-js-module)

Learn to install and use ego-browser as a Node.js module. Inject automation helpers like openOrReuseTab and snapshotText onto the global object with easy steps.

- Tags: how-to-guide
- Published: 2026-08-21

### [How handOffTaskSpace and takeOverTaskSpace Operations Transfer Control in ego-lite](/citrolabs/ego-lite/handofftaskspace-takeovertaskspace-control-handoff-flow)

Understand how handOffTaskSpace and takeOverTaskSpace transfer control in ego-lite. Learn about context lookup, runtime switching, and ego binding delegation.

- Tags: internals
- Published: 2026-08-16

### [How the Ego-Lite Element-Resolver Classifies Errors as Transient or Permanent](/citrolabs/ego-lite/element-resolver-classify-errors-transient-permanent)

Discover how the ego-lite element-resolver classifies errors as transient or permanent. Learn about retryable issues and unresolvable ambiguities using matchCountKind.

- Tags: internals
- Published: 2026-08-16

### [What Is the elementCenter Calculation Used for Screenshot Clipping in ego-browser?](/citrolabs/ego-lite/element-center-calculation-screenshot-clipping)

Learn how ego-browser uses the elementCenter calculation for precise screenshot clipping. Discover its role in anchoring clip regions for Chrome DevTools Protocol commands.

- Tags: internals
- Published: 2026-08-16

### [How the installEgoSdk Function Wraps Helpers with Ready Signal Handling](/citrolabs/ego-lite/installegosdk-wrap-helpers-ready-signal-handling)

Discover how citrolabs/ego-lite's installEgoSdk function ensures helpers wait for runtime initialization by wrapping them with ready signal handling.

- Tags: how-to-guide
- Published: 2026-08-16

### [What Triggers Session Re-Attachment After Session Loss in Ego-Lite?](/citrolabs/ego-lite/session-reattachment-trigger-session-loss-detection)

Discover what triggers session re-attachment in Ego-Lite after session loss. Learn how CDP errors, TTL expiration, new targets, or resets ensure seamless session continuity.

- Tags: internals
- Published: 2026-08-16

### [How claimTaskSpace Transfers Ownership from a User to an Agent in ego-lite](/citrolabs/ego-lite/claimtaskspace-transfer-ownership-user-to-agent)

Learn how ego-lite's claimTaskSpace transfers ownership from user to agent. This helper flips ownership and activates the space for agent operations.

- Tags: internals
- Published: 2026-08-16

### [page.locator() Chainable API and Filtering Capabilities in Ego Browser](/citrolabs/ego-lite/page-locator-chainable-api-filtering-mechanism)

Explore Ego Browser's page locator chainable API and filtering. Discover Playwright-style locators with auto-wait and advanced element narrowing for efficient web automation.

- Tags: deep-dive
- Published: 2026-08-16

### [How the Ego‑Lite cliLog Output Sink Buffers and Flushes Agent Console Output](/citrolabs/ego-lite/clilog-output-sink-buffer-flush-agent-console)

Discover how Ego-Lite cliLog output sink buffers and flushes agent console logs at process exit. Learn about error handling and update notices.

- Tags: internals
- Published: 2026-08-16

### [Preferred Target Mechanism for Tab Selection in the ensureSession Function](/citrolabs/ego-lite/ensuresession-tab-selection-target-mechanism)

Discover the preferred target mechanism for tab selection in ego-lite's ensureSession function. Learn how targetId binds, caches, and re-attaches Chrome DevTools Protocol sessions.

- Tags: deep-dive
- Published: 2026-08-16

### [How the ego-lite help() Runtime Parses JSDoc to Generate Dynamic Documentation](/citrolabs/ego-lite/help-runtime-jsdoc-parsing-dynamic-documentation)

Discover how ego-lite's help() runtime efficiently generates dynamic documentation by parsing JSDoc into a pre-computed JSON dataset, deserializing it on demand.

- Tags: internals
- Published: 2026-08-16

### [How to Switch Between Task Spaces Using the Ego‑Lite Ownership Model](/citrolabs/ego-lite/switching-task-spaces-ownership-model)

Learn how to switch task spaces in ego-lite. This guide explains the ownership model that secures user-owned browser sessions, preventing unauthorized access and control.

- Tags: how-to-guide
- Published: 2026-08-16

### [How Ego-Lite Handles CDP Session Invalidation When Tabs and Task Spaces Change](/citrolabs/ego-lite/session-invalidation-logic-tab-task-space-change)

Discover how Ego-Lite invalidates CDP sessions when tabs close or task spaces change. Ensure your automation runtime targets live browser contexts with robust session management.

- Tags: internals
- Published: 2026-08-16

### [What Is the Buffered Event Queue in Ego-Browser? 10K CDP Event Handling Explained](/citrolabs/ego-lite/buffered-event-queue-cdp-events-10k-cap)

Discover the buffered event queue in ego-browser. Learn how this 10k capacity FIFO buffer efficiently handles CDP events, discarding old entries to prevent memory issues.

- Tags: internals
- Published: 2026-08-16

### [How Site Skills and Learnings Drive Experience Accumulation in ego-lite](/citrolabs/ego-lite/site-skills-learnings-experience-accumulation-ego-lite)

Discover how ego-lite accumulates experience using site skills and learning packs to load website capabilities and expose domain-specific tools for AI agents.

- Tags: internals
- Published: 2026-08-16

### [Ego-Browser Page Facade API: A Playwright-Compatible Interface for Browser Automation](/citrolabs/ego-lite/ego-browser-page-facade-api-vs-playwright)

Explore the ego-browser page facade API, a Playwright-compatible interface. It simplifies browser automation by wrapping CDP commands with unique ego-lite features for efficient task management and site interaction.

- Tags: api-reference
- Published: 2026-08-16

### [Difference Between serverFetch and browserFetch in Ego-Lite HTTP Module](/citrolabs/ego-lite/difference-serverfetch-browserfetch-ego-lite-http-module)

Understand the difference between serverFetch and browserFetch in Ego-Lite. Learn how serverFetch uses Nodejs for requests and browserFetch leverages CDP for browser-context fetching.

- Tags: deep-dive
- Published: 2026-08-16

### [How the Ego-Browser Snapshot and Ref System Persists Across Heredoc Rounds](/citrolabs/ego-lite/ego-browser-snapshot-ref-system-heredoc-rounds)

Discover how ego-browser's snapshot and ref system maintains self-healing ref maps across heredoc rounds for seamless DOM reference reuse without manual calls.

- Tags: internals
- Published: 2026-08-16

### [ego-browser Element Locator Strategies: XPath, ARIA Roles, Text Matchers, and More](/citrolabs/ego-lite/ego-browser-element-locator-strategies-beyond-css-selectors)

Discover ego-browser's advanced element locator strategies beyond CSS selectors, including XPath, ARIA roles, and text matchers, to enhance your test automation.

- Tags: deep-dive
- Published: 2026-08-16

### [How Task Spaces Isolate Agent and User Browsing Contexts in Ego‑Lite](/citrolabs/ego-lite/task-spaces-isolation-agent-user-browsing-contexts)

Discover how ego-lite task spaces isolate agent and user browsing contexts using independent Chrome DevTools Protocol sessions. Learn about navigation states, cookie stores, and element reference maps for seamless automation.

- Tags: internals
- Published: 2026-08-16

### [Session Caching Mechanism in browser-runtime.ts: How ego-lite Manages CDP Sessions with 2-Second TTL](/citrolabs/ego-lite/session-caching-mechanism-browser-runtime-ts-2s-ttl)

Discover ego-lite's session caching mechanism in browser-runtime.ts. Learn how it manages CDP sessions with a 2-second TTL, preventing redundant calls and recovering lost connections.

- Tags: internals
- Published: 2026-08-16

### [How ego-browser Uses Chrome DevTools Protocol (CDP) for Communication](/citrolabs/ego-lite/ego-browser-chrome-devtools-protocol-communication)

Discover how ego-browser leverages Chrome DevTools Protocol (CDP) for communication through a three-layer architecture. Learn about raw transport, session management, and evaluation helpers.

- Tags: internals
- Published: 2026-08-16

### [How ego-browser Integrates With External Agent CLIs Like Claude Code](/citrolabs/ego-lite/ego-browser-external-agent-cli-integration-claude-code)

Discover how ego-browser connects AI agent CLIs like Claude Code to ego-lite via a three-step pipeline. Integrate your favorite AI tools seamlessly.

- Tags: how-to-guide
- Published: 2026-08-15

### [How `ref-map` and `ref-state` Manage Element References in ego-browser](/citrolabs/ego-lite/ego-browser-ref-map-ref-state-element-references)

Learn how ego-browser uses ref-map and ref-state to manage element references. Discover how they convert numeric refs to stable handles for efficient DOM manipulation.

- Tags: internals
- Published: 2026-08-15

### [How `ego.sendCDPMessage` Works: The CDP Transport Mechanism in Ego‑Lite](/citrolabs/ego-lite/ego-sendcdp-message-mechanism)

Understand how ego.sendCDPMessage functions as the CDP transport mechanism in Ego-Lite. Learn how JavaScript sends Chrome DevTools Protocol commands and receives promise-based responses.

- Tags: internals
- Published: 2026-08-15

### [How ego-browser Manages Tabs with openOrReuseTab and ensureRealTab](/citrolabs/ego-lite/ego-browser-tab-management-openorreusetab-ensure-realtab)

Discover how ego-browser uses openOrReuseTab and ensureRealTab to intelligently manage Chrome tabs, simplifying CDP interactions for a reliable agent API.

- Tags: internals
- Published: 2026-08-15

### [Ego-Browser Snapshot vs Screenshot: Three Observation Methods Compared](/citrolabs/ego-lite/ego-browser-snapshot-vs-screenshot-observation)

Compare ego browser snapshot snapshotRaw and screenshot observation methods. Learn when to use each for text DOM data or visual captures to improve your testing.

- Tags: deep-dive
- Published: 2026-08-15

### [ego-browser Screencast: How to Record Video with FFmpeg-Based Video Recording](/citrolabs/ego-lite/ego-browser-screencast-feature-video-recording)

Discover the ego-browser screencast feature for recording browser automation sessions as WebM videos. Learn how it uses FFmpeg and Chrome DevTools Protocol for seamless video capture.

- Tags: how-to-guide
- Published: 2026-08-15

### [How Task Space Operations Handle Ownership Transfers in ego-lite](/citrolabs/ego-lite/ego-lite-task-space-operations-ownership-transfer)

Learn how ego-lite task space operations like claim and complete manage ownership transfers. Understand agent control and user-owned contexts for efficient task management.

- Tags: internals
- Published: 2026-08-15

### [Ego‑Browser CDP Transport and Session Caching Architecture Explained](/citrolabs/ego-lite/ego-browser-cdp-transport-session-caching-architecture)

Explore the ego-browser CDP transport architecture, featuring a lightweight request-response system and short-lived session caching. Discover how it optimizes CDP message handling and reduces redundant calls.

- Tags: architecture
- Published: 2026-08-15

### [How Site Skills and Learnings Accumulation Work in ego-browser](/citrolabs/ego-lite/ego-browser-site-skills-learnings-accumulation)

Discover how ego-browser manages site skills and learnings accumulation. Explore metadata, notes, Node.js tools, and scripts for agent discovery and serving based on URL matching within the learnings directory.

- Tags: internals
- Published: 2026-08-15

### [Ego-Browser Element Resolver Logic for Different Selectors: A Deep Dive](/citrolabs/ego-lite/ego-browser-element-resolver-selector-logic)

Explore ego-browser element resolver logic. Learn how Ego-Browser parses selectors into kinds and executes queries or accessibility tree lookups for DOM elements.

- Tags: deep-dive
- Published: 2026-08-15

### [Understanding the ego-browser page.locator API and Comparison to Playwright](/citrolabs/ego-lite/ego-browser-page-locator-vs-playwright)

Explore the ego-browser page.locator API, a Playwright-compatible facade for element selection and interaction in ego-lite. Discover its advantages and compare it to Playwright.

- Tags: comparison
- Published: 2026-08-15

### [Understanding `helperContext()` and Its Facades in ego-browser Agent Scripts](/citrolabs/ego-lite/ego-browser-helpercontext-facades-agent-scripts)

Discover how helperContext() injects a Playwright-like API into ego-browser agent scripts. Learn about its facades for page automation, tab management, and more.

- Tags: deep-dive
- Published: 2026-08-15

### [How Task Space Ownership Policies Affect Helper Behavior in ego-browser](/citrolabs/ego-lite/ego-browser-task-space-ownership-helper-behavior)

Explore how task space ownership policies in ego-browser shape helper agent behavior. Understand agent, agentDelegatedToUser, and user categories and their impact on control.

- Tags: deep-dive
- Published: 2026-08-15

### [Ego‑Browser Workflows Explained: Semantic, Visual, and Direct DOM Automation](/citrolabs/ego-lite/ego-browser-workflows-semantic-visual-dom)

Explore Ego-Browser workflows: semantic, visual, and direct DOM automation. Choose the right approach for reliable DOM, canvas rendering, or low-level browser access with Ego-Lite.

- Tags: deep-dive
- Published: 2026-08-15

### [Ego-Lite Control Handoff Mechanism in Task Spaces: How Agents Yield and Reclaim Browser Control](/citrolabs/ego-lite/ego-lite-task-space-control-handoff)

Understand the ego-lite control handoff mechanism for agents and users to seamlessly yield and reclaim browser task spaces. Learn how to manage control flow.

- Tags: internals
- Published: 2026-08-15

### [How ego-browser Integrates with the Chrome DevTools Protocol (CDP) for Browser Control](/citrolabs/ego-lite/ego-browser-cdp-integration-low-level-control)

Discover how ego-browser integrates with the Chrome DevTools Protocol for robust browser control. Learn about its session management, message transport, and auto-reconnection features.

- Tags: internals
- Published: 2026-08-15

### [How Ego-Browser Element Refs (`@N` Format) Work and Why Re‑snapshot Is Required](/citrolabs/ego-lite/ego-browser-element-refs-resnapshotting)

Learn how ego-browser @N element refs map to Chromium DevTools backendNodeIds and why automatic re-snapshotting is essential to avoid stale node errors in your application.

- Tags: internals
- Published: 2026-08-15

### [How Ego-Browser Implements Task Space Isolation and Agent/User Ownership](/citrolabs/ego-lite/ego-browser-task-space-isolation-ownership)

Learn how Ego-Browser secures task space isolation and defines agent/user ownership. Discover how explicit flags enable automation and block unauthorized agent commands.

- Tags: internals
- Published: 2026-08-15

### [ego-lite CLI Entry Point vs installEgoSdk: How the Runtime Chooses Its Mode](/citrolabs/ego-lite/cli-entry-point-install-egosdk-relationship)

Understand how the ego-lite CLI entry point and installEgoSdk command determine its runtime mode. Learn about script execution versus SDK bootstrapping.

- Tags: internals
- Published: 2026-08-07

### [How the ego-lite Screencast Driver Captures Video and Manages Quality Settings](/citrolabs/ego-lite/screencast-driver-video-capture-quality-settings)

Discover how the ego-lite screencast driver captures video using CDP commands and manages quality settings from 0-100, encoding output as VP8 WebM.

- Tags: how-to-guide
- Published: 2026-08-07

### [Task Space Lifecycle in ego-lite: From Creation to Completion](/citrolabs/ego-lite/task-space-lifecycle-creation-completion)

Explore the ego-lite task space lifecycle from creation to completion. Understand the eight distinct stages and how async helpers manage each step in the process.

- Tags: internals
- Published: 2026-08-07

### [How the Ego-Lite Site Skills System Validates Learned Tools and Their Manifests](/citrolabs/ego-lite/site-skills-system-validate-tools-manifests)

Discover how ego-lite site skills validates learned tools and manifests using a three-stage pipeline. Ensure safe, well-defined tools are loaded for your projects.

- Tags: how-to-guide
- Published: 2026-08-07

### [How the Ref-Map Gets Rebuilt on Snapshots to Keep @N References Valid in ego-lite](/citrolabs/ego-lite/ref-map-rebuild-snapshot-validity)

Learn how the ref-map rebuilds on snapshots in ego-lite to keep @N references valid. Discover the process of clearing and repopulating mappings for accurate DOM node references.

- Tags: internals
- Published: 2026-08-07

### [How Ego-Browser Implements Pointer Actions: Click, Hover, Drag, and Wheel](/citrolabs/ego-lite/pointer-actions-implementation-click-hover-drag-wheel)

Discover how Ego-Browser implements pointer actions click hover drag and wheel using a four-stage pipeline in pointer.ts. Learn about target resolution state tracking CDP events and synthetic DOM events.

- Tags: internals
- Published: 2026-08-07

### [How Agent-User Control Handoff Works in Ego-Lite Task Spaces](/citrolabs/ego-lite/control-handoff-agent-user-task-spaces)

Discover how agent-user control handoff works in ego-lite task spaces. Learn about the ownership flag and the handOffTaskSpace function for seamless control transitions.

- Tags: how-to-guide
- Published: 2026-08-07

### [serverFetch vs browserFetch in ego-lite: HTTP Request Handling Guide](/citrolabs/ego-lite/http-requests-serverfetch-vs-browserfetch)

Understand serverFetch vs browserFetch in ego-lite for efficient HTTP request handling. Learn how to execute requests from Node.js or your browser context.

- Tags: how-to-guide
- Published: 2026-08-07

### [How the Video Recorder Is Integrated with the Ego-Browser Runtime](/citrolabs/ego-lite/video-recorder-integration-browser-runtime)

Discover how the Ego-Browser runtime integrates the video recorder using the screencast driver and VideoRecorder class. Learn more about page video recording in ego-lite.

- Tags: internals
- Published: 2026-08-07

### [What Is the State Singleton in Ego-Lite? Centralized Runtime Management Explained](/citrolabs/ego-lite/state-singleton-runtime-purpose-function)

Explore the Ego-Lite state singleton, the centralized store for CDP communication, session tracking, and runtime configuration. Understand its purpose and function in browser automation.

- Tags: internals
- Published: 2026-08-07

### [How ego-browser Handles File Uploads with setInputFiles: A CDP Deep Dive](/citrolabs/ego-lite/ego-browser-file-downloads-uploads-setinputfiles)

Learn how ego-browser handles file uploads using setInputFiles. This CDP deep dive explains invoking DOM.setFileInputFiles via Chrome DevTools Protocol for efficient file uploads.

- Tags: deep-dive
- Published: 2026-08-07

### [Ego-Browser Buffered Event Queue Design: 10K Capacity CDP Event Buffering](/citrolabs/ego-lite/buffered-event-queue-design-10k-capacity)

Explore the ego-browser's 10k capacity CDP event buffer design. Learn how this fixed FIFO buffer efficiently manages Chrome DevTools Protocol events, ensuring atomic batch retrieval.

- Tags: internals
- Published: 2026-08-07

### [Implementation Details of getByRole, getByText, and getByLabel in ego-lite](/citrolabs/ego-lite/locator-methods-implementation-getbyrole-getbytext-getbylabel)

Discover ego-lite's getByRole, getByText, and getByLabel implementation. Learn how it uses CDP queries and accessibility tree resolution for efficient element selection.

- Tags: internals
- Published: 2026-08-07

### [How the Ego-Browser Wait System Handles Timeouts, Load States, and Selector Waits](/citrolabs/ego-lite/wait-system-timeouts-load-states-selector-waits)

Learn how Ego-Browser's wait system manages timeouts, load states, and selector waits with a unified API and deadline-based polling. Optimize your tests now.

- Tags: internals
- Published: 2026-08-07

### [CDP Message Protocol and Session Attachment Flow in Ego-Lite: A Deep Dive](/citrolabs/ego-lite/cdp-message-protocol-session-attachment-flow)

Understand the CDP message protocol and session attachment flow in Ego-Lite. Discover how Ego-Lite manages requests, responses, timeouts, and automatic retries for seamless session management.

- Tags: deep-dive
- Published: 2026-08-07

### [How ego-browser Manages Keyboard Input, Form Filling, and the selectOption Function](/citrolabs/ego-lite/ego-browser-keyboard-input-form-filling-selectoption)

Discover how ego-browser simulates keyboard input and form filling using CDP events and directly manipulates DOM properties for selectOption functionality. Learn more now.

- Tags: how-to-guide
- Published: 2026-08-07

### [How the Ego-Browser Snapshot System Uses Action Marks and Stable Locators](/citrolabs/ego-lite/snapshot-system-action-marks-stable-locators)

Learn how the ego-browser snapshot system uses action marks and stable locators to create semantic page representations. Enable AI agents to interact reliably across multiple execution rounds.

- Tags: internals
- Published: 2026-08-07

### [Ego-Lite Helper Context Injection Architecture: How Agent Scripts Access the Unified API](/citrolabs/ego-lite/agent-script-helper-context-injection-architecture)

Discover the ego-lite helper context injection architecture. Learn how agent scripts access the unified API via centralized helperContext() for SDK or CLI execution.

- Tags: architecture
- Published: 2026-08-07

### [How Site-Specific Learnings Are Loaded from the Skills Directory in ego-lite](/citrolabs/ego-lite/site-specific-learnings-skills-directory)

Discover how ego-lite loads site-specific learnings from the skills directory. Understand the runtime process for domain-specific capabilities in this technical guide.

- Tags: internals
- Published: 2026-08-07

### [How Ego‑Browser Handles Browser Navigation, Tab Management, and the openOrReuseTab Function](/citrolabs/ego-lite/ego-browser-navigation-tab-management-openor-reusetab)

Discover how Ego-Browser simplifies tab management and navigation using the openOrReuseTab function. Learn how CDP operations are abstracted for efficient browser control.

- Tags: how-to-guide
- Published: 2026-08-07

### [How the Element Resolver Differentiates Transient vs Permanent Errors for Retry Logic in Ego-Lite](/citrolabs/ego-lite/element-resolver-error-handling-retry)

Learn how Ego-Lite's element resolver differentiates transient vs permanent errors for retry logic. Understand the `kind` property of ElementResolutionError for smarter retries.

- Tags: internals
- Published: 2026-08-07

### [Task Space Ownership Model in ego-lite: How Agent vs User Control Works](/citrolabs/ego-lite/task-space-ownership-agent-user-control)

Understand the ego-lite task space ownership model. Learn how agent vs user control works with explicit claims for agent access to user spaces.

- Tags: internals
- Published: 2026-08-07

### [How @N Element References Are Resolved and Mapped Across Page Snapshots in ego-lite](/citrolabs/ego-lite/element-references-snapshot-mapping)

Discover how ego-lite resolves @N element references by mapping numeric IDs to backendNodeIds. Learn about automatic fallback for stale DOM nodes.

- Tags: internals
- Published: 2026-08-06

### [How ego-browser Manages CDP Sessions and Re-attaches After Disconnection](/citrolabs/ego-lite/ego-browser-cdp-session-management-reattach)

Discover how ego-browser in ego-lite manages CDP sessions with automatic re-attachment via TTL caching and retry logic. Learn to maintain stable connections even after disconnections.

- Tags: internals
- Published: 2026-08-06

### [How to Integrate ego-browser in a Host Application: The Complete SDK Embedding Pattern](/citrolabs/ego-lite/ego-browser-integration-pattern-embedding-host-application)

Integrate ego-browser SDK into your host app using the installEgoSdk function. Embed browser automation helpers directly for seamless programmatic control without a separate CLI.

- Tags: how-to-guide
- Published: 2026-08-06

### [How the Ego-Browser Help System Generates Documentation from JSDoc at Runtime](/citrolabs/ego-lite/ego-browser-help-system-generate-documentation-jsdoc-runtime)

Discover how ego-browser generates runtime documentation from JSDoc comments using Acorn parsing. Learn how this eliminates the need for a separate build step in your JavaScript projects.

- Tags: internals
- Published: 2026-08-06

### [How to Implement Site-Specific Selectors That Survive DOM Changes in ego-browser](/citrolabs/ego-lite/ego-browser-implement-site-specific-selectors-survive-dom-changes)

Master ego-browser's layered locators to create robust site-specific selectors. Combine CSS speed with role-based fallbacks to survive DOM changes and ensure reliable automation.

- Tags: how-to-guide
- Published: 2026-08-06

### [Ego-Browser Preferred Target Selection in Multi-Tab Scenarios: How It Works](/citrolabs/ego-lite/ego-browser-preferred-target-selection-multi-tab-scenarios)

Discover how Ego-Browser's preferred target selection works in multi-tab scenarios. Learn about the `preferredTargetId` and fallback logic for consistent tab targeting.

- Tags: internals
- Published: 2026-08-06

### [How ego-browser Handles Video Recording and Screencast Features: CDP, FFmpeg, and the VideoRecorder Class](/citrolabs/ego-lite/ego-browser-handle-video-recording-screencast)

Discover how ego-browser handles video recording and screencast with its VideoRecorder class, CDP, and FFmpeg. Learn to capture and stitch frames into MP4.

- Tags: how-to-guide
- Published: 2026-08-06

### [How to Extend ego-browser with Custom Agent Helpers in agent_helpers.js](/citrolabs/ego-lite/ego-browser-extend-custom-agent-helpers-agent_helpers.js)

Learn how to extend ego-browser with custom agent helpers by creating an agent_helpers.js file. ego-browser automatically loads and merges your custom helper functions for enhanced agent functionality.

- Tags: how-to-guide
- Published: 2026-08-06

### [How to Complete a Task Space with keep:true vs keep:false in ego-browser](/citrolabs/ego-lite/ego-browser-complete-task-space-keep-true-vs-false)

Learn how ego-browser's keep:true and keep:false options complete task spaces. Decide whether to keep or close spaces for your workflow.

- Tags: how-to-guide
- Published: 2026-08-06

### [How to Handle Iframe Targeting and Nested Browsing Contexts in ego-browser](/citrolabs/ego-lite/ego-browser-handle-iframe-targeting-nested-browsing-contexts)

Master iframe targeting and nested browsing contexts in ego-browser. Learn to discover CDP targets by URL and route commands effectively for advanced browser automation.

- Tags: how-to-guide
- Published: 2026-08-06

### [Locator Facade and Selector Transformation System in ego-browser: Architecture Deep Dive](/citrolabs/ego-lite/ego-browser-locator-facade-selector-transformation-architecture)

Explore the ego-browser locator facade architecture. Learn how CSS, XPath, text, and role selectors are transformed into JavaScript queries for resilient element interactions via CDP.

- Tags: architecture
- Published: 2026-08-06

### [How to Implement `waitForAgentControl` for User Handoff Synchronization in ego‑browser](/citrolabs/ego-lite/ego-browser-implement-waitforagentcontrol-user-handoff)

Learn how to implement waitForAgentControl in ego-browser for seamless user handoff synchronization. Pause agent execution until user returns control of browsing sessions.

- Tags: how-to-guide
- Published: 2026-08-06

### [How the Buffered Event System Handles Overflow in Long-Running Tasks in Ego-Browser](/citrolabs/ego-lite/ego-browser-buffered-event-system-overflow-long-running-tasks)

Learn how Ego-Browser's buffered event system handles overflow in long-running tasks. It caps its buffer at 10,000 entries, discarding old events to manage memory efficiently.

- Tags: internals
- Published: 2026-08-06

### [How to Migrate Chrome Profile Data to Ego Lite on First Launch](/citrolabs/ego-lite/ego-lite-migrate-chrome-profile-data-first-launch)

Seamlessly migrate Chrome profile data to Ego Lite on first launch. Enjoy one-click transfer of logins, cookies, extensions, and bookmarks for an effortless transition.

- Tags: migration-guide
- Published: 2026-08-06

### [ego-browser Session TTL Mechanism: Why It's Set to 2 Seconds](/citrolabs/ego-lite/ego-browser-session-ttl-mechanism-2-seconds)

Discover the ego-browser session TTL mechanism, explaining the 2-second cache for CDP sessions to prevent stale states and optimize connections. Learn how ensureSession() works.

- Tags: internals
- Published: 2026-08-06

### [How Ego-Browser Handles JavaScript Dialogs (Alert, Confirm, Prompt)](/citrolabs/ego-lite/ego-browser-handle-javascript-dialogs)

Learn how Ego Browser handles JavaScript dialogs like alert, confirm, and prompt using Chrome DevTools Protocol events. Discover its efficient tracking mechanism for seamless testing.

- Tags: how-to-guide
- Published: 2026-08-06

### [How to Implement a Custom Browser Tool in the ego-browser Learning Subsystem](/citrolabs/ego-lite/ego-browser-implement-custom-browser-tool-learning-subsystem)

Implement a custom browser tool in ego-browser by creating a manifestjson file and a JavaScript module. Learn how to invoke your tool using site runBrowserTool without core engine changes.

- Tags: how-to-guide
- Published: 2026-08-06

### [How the Ref-Map Works Across Multiple Snapshots in ego-browser](/citrolabs/ego-lite/ego-browser-ref-map-multiple-snapshots)

Explore how the ref-map in ego-browser reconstructs itself on each snapshot for efficient performance. Learn about stale ref detection and auto-resnapshotting.

- Tags: internals
- Published: 2026-08-06

### [How to Debug CDP Timeout Errors in Ego-Browser Automation Scripts](/citrolabs/ego-lite/ego-browser-debug-cdp-timeout-errors)

Debug CDP timeout errors in ego-browser automation. Learn to resolve stalled channels, closed tabs, and stale session IDs with expert tips.

- Tags: how-to-guide
- Published: 2026-08-06

### [Ego-Browser Snapshot System Architecture: How It Differs from Playwright](/citrolabs/ego-lite/ego-browser-snapshot-system-architecture-vs-playwright)

Discover how Ego-Browser's snapshot system architecture differs from Playwright. Learn about ref-aware layers, stable locators, and semantic snapshots.

- Tags: architecture
- Published: 2026-08-06

### [How the Element Resolver Distinguishes Between Transient and Permanent Resolution Failures in ego-lite](/citrolabs/ego-lite/ego-browser-element-resolver-transient-vs-permanent-failures)

Discover how ego-lite's element resolver differentiates transient from permanent resolution failures using the kind field on ElementResolutionError. Learn the key indicators for retryable vs non-retryable errors.

- Tags: internals
- Published: 2026-08-06

### [How to Create Custom Site Skills in ego-browser: A Complete Guide for Website-Specific Automation](/citrolabs/ego-lite/ego-browser-create-custom-site-skills)

Learn to create custom site skills in ego-browser with our guide. Extend ego harness with domain-specific tools for website automation. Get started now.

- Tags: how-to-guide
- Published: 2026-08-06

### [Agent vs User Task Space Ownership in ego‑lite: Complete Guide to Control Models](/citrolabs/ego-lite/ego-lite-task-space-ownership-models-agent-vs-user)

Understand agent vs user task space ownership in ego-lite. Learn the three states agentDelegatedToUser and user and how the agent claims user owned spaces for control.

- Tags: deep-dive
- Published: 2026-08-06

### [How ego-browser's CDP Session Management Handles Tab Switching and Reconnection](/citrolabs/ego-lite/ego-browser-cdp-session-management-tab-switching-reconnection)

Discover how ego-browser's CDP session management seamlessly handles tab switching and reconnection with a self-healing runtime. Learn more about its automated tab tracking and recovery.

- Tags: internals
- Published: 2026-08-06

### [How the help() Function Parses JSDoc to Provide Runtime Documentation in ego-lite](/citrolabs/ego-lite/how-does-the-help-function-parse-jsdoc-to-provide-runtime-documentation)

Discover how ego-lite's help() function uses build-time JSDoc extraction for efficient runtime documentation. Learn how it deserializes data for on-demand insights.

- Tags: internals
- Published: 2026-08-04

### [How Task Space Functions Interact in Ego Lite: `useOrCreateTaskSpace`, `claimTaskSpace`, and `completeTaskSpace`](/citrolabs/ego-lite/how-do-the-task-space-functions-interact-with-each-other)

Explore how useOrCreateTaskSpace, claimTaskSpace, and completeTaskSpace work together in Ego Lite to manage isolated browsing contexts through their coordinated lifecycle.

- Tags: internals
- Published: 2026-08-04

### [How Keyboard Input Actions Work in ego-browser: fill, press, and pressSequentially Explained](/citrolabs/ego-lite/explain-the-mechanics-of-keyboard-input-actions-in-ego-browser)

Understand ego-browser keyboard input actions fill, press, and pressSequentially. Learn how CDP wrappers ensure reliable input delivery for your automation.

- Tags: deep-dive
- Published: 2026-08-04

### [How Pointer Operations Handle Coordinate Systems in ego-browser: Click, Drag, and Wheel Explained](/citrolabs/ego-lite/how-do-pointer-operations-handle-coordinate-systems-in-ego-browser)

Discover how ego-browser manages pointer operations like click, drag, and wheel using CSS-pixel viewport positions for precise coordinate system handling. Learn how ego-browser resolves coordinates for DevTools Protocol.

- Tags: internals
- Published: 2026-08-04

### [Understanding the Difference Between snapshot and snapshotRaw APIs in ego-browser](/citrolabs/ego-lite/what-is-the-difference-between-the-snapshot-and-snapshotraw-apis-in-ego-browser)

Explore the difference between snapshot and snapshotRaw APIs in ego-browser. Learn how to access formatted or structured data for your applications.

- Tags: deep-dive
- Published: 2026-08-04

### [How the Output Sink in Ego‑Lite Buffers and Handles Console.log Output](/citrolabs/ego-lite/how-does-the-output-sink-in-ego-lite-buffer-and-handle-console.log-output)

Discover how the ego-lite output sink buffers and handles console.log output asynchronously using CDP commands. Learn about its patched console and circular buffer implementation.

- Tags: internals
- Published: 2026-08-04

### [How to Add Custom Agent Helpers to ego-browser Using `agent_helpers.js`](/citrolabs/ego-lite/how-can-i-extend-ego-browser-by-adding-custom-agent_helpers.js-files)

Learn to extend ego-browser with custom agent_helpers.js files. Easily add new helper functions to your agent workspace and enhance its capabilities.

- Tags: how-to-guide
- Published: 2026-08-04

### [How Ego-Browser Implements Download Tracking and the waitForEvent System](/citrolabs/ego-lite/explain-the-download-tracking-and-waitforevent-system-in-ego-browser)

Discover how ego-browser implements download tracking and the waitForEvent system using CDP messages for seamless file download monitoring. Learn more about this Playwright compatible API.

- Tags: internals
- Published: 2026-08-04

### [How Default Timeouts Work in ego‑browser and How to Configure Them](/citrolabs/ego-lite/how-do-default-timeouts-function-in-ego-browser-and-how-can-they-be-configured)

Learn how ego-browser default timeouts work and how to configure them. Optimize your tests by setting custom timeout values for smoother execution.

- Tags: how-to-guide
- Published: 2026-08-04

### [Ego-Browser Wait Functions: Complete Guide to Handling Different Waiting Conditions](/citrolabs/ego-lite/what-wait-functions-are-available-in-ego-browser-and-how-do-they-handle-different-waiting-conditions)

Discover ego browser wait functions. This guide details eight helpers for timeouts, DOM elements, page functions, URLs, network activity, load states, and agent ownership.

- Tags: how-to-guide
- Published: 2026-08-04

### [How Ego-Browser Tab Management Works: switchTab, openOrReuseTab, and closeTab Explained](/citrolabs/ego-lite/how-do-the-tab-management-functions-work-in-ego-browser)

Learn how ego-browser's switchTab, openOrReuseTab, and closeTab functions simplify browser tab management for AI agents by wrapping Chrome DevTools Protocol commands.

- Tags: how-to-guide
- Published: 2026-08-04

### [How ego-browser Handles JavaScript Dialogs: Alerts, Confirms, and Prompts](/citrolabs/ego-lite/how-does-ego-browser-handle-javascript-dialogs-like-alerts-confirms-and-prompts)

Learn how ego-browser handles JavaScript dialogs. Discover its use of Chrome DevTools Protocol events for managing alerts, confirms, and prompts during runtime.

- Tags: internals
- Published: 2026-08-04

### [How ego-browser Implements Screencast Recording: CDP Events and FFmpeg Pipeline](/citrolabs/ego-lite/how-does-ego-browser-implement-screencast-recording-and-what-are-the-available-options)

Discover how ego-browser records screencasts using CDP events and FFmpeg. Learn about output path, frame quality, and viewport size options for your recordings.

- Tags: how-to-guide
- Published: 2026-08-04

### [How to Debug Element Resolution Failures Using ElementResolutionError in ego-browser](/citrolabs/ego-lite/how-can-i-debug-element-resolution-failures-using-elementresolutionerror-in-ego-browser)

Debug element resolution failures in ego-browser by catching ElementResolutionError. Inspect the kind property transient for retries or permanent for selector issues. Fix locators effectively.

- Tags: how-to-guide
- Published: 2026-08-04

### [Ego-Lite Page Facade API and Fluent Locator Interface: A Complete Guide](/citrolabs/ego-lite/what-is-the-page-facade-api-in-ego-lite-and-how-do-locators-work-as-a-fluent-interface)

Discover Ego-Lite's page facade API and fluent locator interface for robust browser automation. Learn how this Playwright-style approach ensures resilient element interaction.

- Tags: deep-dive
- Published: 2026-08-04

### [How ego-browser Resolves Elements Inside IFrames: CDP Session Isolation Explained](/citrolabs/ego-lite/how-does-ego-browser-handle-element-resolution-when-dealing-with-elements-inside-iframes)

Discover how ego-browser's CDP session isolation resolves iframe elements. Learn about its frame-aware resolver for seamless nested element interaction.

- Tags: deep-dive
- Published: 2026-08-04

### [How the State Singleton in ego-browser Manages Session and Target Information](/citrolabs/ego-lite/how-does-the-state-singleton-in-ego-browser-manage-session-and-target-information)

Discover how the state singleton in ego-browser manages session and target information. Centralize mutable CDP data for a consistent runtime view of your browser attachment.

- Tags: internals
- Published: 2026-08-04

### [browserFetch vs serverFetch in ego-lite: HTTP Helper Functions Explained](/citrolabs/ego-lite/what-is-the-difference-between-the-browserfetch-and-serverfetch-helper-functions-in-ego-lite)

Understand the difference between browserFetch and serverFetch in ego-lite. Learn how serverFetch uses Node.js fetch while browserFetch leverages CDP for in-browser requests. Optimize your HTTP calls.

- Tags: deep-dive
- Published: 2026-08-04

### [How the Site Skills Learning System in Ego-Lite Accumulates Knowledge Across Tasks](/citrolabs/ego-lite/how-does-the-site-skills-learning-system-in-ego-lite-accumulate-knowledge-across-different-tasks)

Discover how Ego-Lite's site skills learning system accumulates knowledge by persisting reusable skill packs and merging domain entries for a unified context. Learn more!

- Tags: deep-dive
- Published: 2026-08-04

### [How Snapshot References (@N) Work in ego-browser: Mapping to Backend Node IDs](/citrolabs/ego-lite/how-do-snapshot-references-function-in-ego-browser-and-why-are-they-linked-to-backendnodeid)

Understand how ego-browser snapshot references @N map to backend node IDs. Learn to target elements stably in automation scripts with the RefMap class.

- Tags: internals
- Published: 2026-08-04

### [ego-browser Locator Types: Complete Guide to Element Selection Methods](/citrolabs/ego-lite/what-types-of-locators-does-ego-browser-support-for-element-selection)

Discover ego-browser locator types for element selection. Explore 11 methods like CSS, XPath, text matching, attributes, and ARIA roles for robust automation.

- Tags: deep-dive
- Published: 2026-08-04

### [How Ego-Browser Differentiates Between Transient and Permanent Errors During Element Resolution](/citrolabs/ego-lite/how-does-ego-browser-differentiate-between-transient-and-permanent-errors-during-element-resolution)

Learn how ego-browser distinguishes transient from permanent errors in element resolution. Discover the retry logic to optimize your test stability.

- Tags: internals
- Published: 2026-08-04

### [Ego-Lite Task Space Ownership Model and Agent-User Handoff Explained](/citrolabs/ego-lite/what-is-the-task-space-ownership-model-in-ego-lite-and-how-does-handoff-between-agent-and-user-work)

Explore the ego-lite task space ownership model agent agentDelegatedToUser and user states and discover how agent user handoff works with citrolabs ego-lite helpers.

- Tags: deep-dive
- Published: 2026-08-04

### [How ego-browser Manages CDP Session Management and Automatic Reconnection](/citrolabs/ego-lite/how-does-ego-browser-manage-cdp-session-management-and-automatic-reconnection)

Discover how ego-browser handles CDP session management and automatic reconnection with TTL cache and transparent retry logic for seamless target reattachment. Learn more!

- Tags: deep-dive
- Published: 2026-08-04

### [Ego-Lite Entry Points Explained: CLI vs. Module API for Browser Automation](/citrolabs/ego-lite/what-are-the-main-entry-points-for-ego-lite)

Explore ego-lite entry points: CLI vs. Module API. Discover how to use runMain() or installEgoSdk() for browser automation and learn about their shared helper surface.

- Tags: deep-dive
- Published: 2026-08-03

### [How to Debug ego-lite Applications: CLI Flags, CDP Tracing, and Best Practices](/citrolabs/ego-lite/how-to-debug-ego-lite-applications)

Debug ego-lite applications effectively using CLI flags like --debug-clicks and EGO_BROWSER_DEBUG_CDPMESSAGES. Inspect CDP traffic and console logs for efficient troubleshooting.

- Tags: how-to-guide
- Published: 2026-08-03

### [Best Practices for Using ego-lite: Reliable Browser Automation for AI Agents](/citrolabs/ego-lite/what-are-the-best-practices-for-using-ego-lite)

Master ego-lite browser automation for AI agents. Learn best practices for stable selectors, state verification, and isolated task spaces to enhance reliability and efficiency. Optimize your automation workflows.

- Tags: best-practices
- Published: 2026-08-03

### [How to Use the API Provided by ego-lite: Complete SDK Reference](/citrolabs/ego-lite/how-to-use-the-api-provided-by-ego-lite)

Explore the ego-lite API with this comprehensive SDK reference. Learn to initialize the SDK and inject powerful navigation, element control, and task management helpers into your projects.

- Tags: api-reference
- Published: 2026-08-03

### [What Is the Purpose of the `cmd` Directory in ego-lite?](/citrolabs/ego-lite/what-is-the-purpose-of-the-cmd-directory-in-ego-lite)

Discover the purpose of the cmd directory in ego-lite. Learn why this codebase, citrolabs/ego-lite, does not feature a cmd directory and its implications for your understanding.

- Tags: internals
- Published: 2026-08-03

### [How to Test ego-lite Components: A Complete Guide to Node.js Native Testing](/citrolabs/ego-lite/how-to-test-ego-lite-components)

Learn how to test ego-lite components using Node.js 22 test runner and FakeEgo mocks. This guide covers asserting CDP sequences without a real browser for efficient testing.

- Tags: how-to-guide
- Published: 2026-08-03

### [Where to Find the Documentation for ego-lite: Complete Guide to Official Resources](/citrolabs/ego-lite/where-to-find-the-documentation-for-ego-lite)

Find ego-lite documentation easily within the official GitHub repository. Access the README and specialized guides for quick setup and detailed information.

- Tags: getting-started
- Published: 2026-08-03

### [How to Report a Bug in ego‑lite: A Complete Guide for Developers](/citrolabs/ego-lite/how-to-report-a-bug-in-ego-lite)

Report a bug in ego-lite efficiently by opening a GitHub issue. Follow our guide to include version numbers, reproducible scripts, and logs for faster resolution.

- Tags: how-to-guide
- Published: 2026-08-03

### [What Is the License of Ego‑Lite? MIT License Explained](/citrolabs/ego-lite/what-is-the-license-of-ego-lite)

Discover the MIT License for Ego-Lite. Understand its permissive terms for free use, modification, and distribution of the ego-lite repository.

- Tags: getting-started
- Published: 2026-08-03

### [How to Check for ego-lite Updates: 3 Methods Explained](/citrolabs/ego-lite/how-to-check-for-ego-lite-updates)

Learn how to check for ego-lite updates with 3 simple methods. Discover automatic checks and manual verification for the citrolabs/ego-lite runtime.

- Tags: how-to-guide
- Published: 2026-08-03

### [What Are the Dependencies of ego‑lite? Complete Breakdown of the CDP Harness Package](/citrolabs/ego-lite/what-are-the-dependencies-of-ego-lite)

Discover the dependencies of ego-lite. Learn about its single runtime dependency acorn and its nine development dependencies including Rollup, esbuild, and TypeScript for efficient builds and quality.

- Tags: deep-dive
- Published: 2026-08-03

### [How to Integrate ego-lite with Other Tools: 5 Integration Patterns for Browser Automation](/citrolabs/ego-lite/how-to-integrate-ego-lite-with-other-tools)

Discover 5 essential integration patterns for ego-lite. Seamlessly connect ego-lite with your existing tools for advanced browser automation and efficient CI/CD workflows.

- Tags: how-to-guide
- Published: 2026-08-03

### [ego-lite CLI Commands: Complete Reference for the Browser Automation Tool](/citrolabs/ego-lite/what-are-the-available-cli-commands-for-ego-lite)

Explore the complete ego-lite CLI command reference. Learn to execute JavaScript heredocs, check your environment, clear cache, and enable verbose logging with this browser automation tool.

- Tags: api-reference
- Published: 2026-08-03

### [How to Use the ego-lite Command-Line Interface (CLI): A Complete Guide](/citrolabs/ego-lite/how-to-use-the-command-line-interface-cli-of-ego-lite)

Learn to use the ego-lite command-line interface CLI to run JavaScript against an embedded browser runtime. This complete guide covers the ego-browser skill.

- Tags: how-to-guide
- Published: 2026-08-03

### [Where Are the Configuration Files for Ego-Lite Located? A Complete Guide](/citrolabs/ego-lite/where-are-the-configuration-files-for-ego-lite-located)

Discover where ego-lite configuration files reside. This guide details locations in environment variables, TS compiler settings, package metadata, and CI/CD within the citrolabs/ego-lite repo.

- Tags: how-to-guide
- Published: 2026-08-03

### [Main Modules of ego-lite: A Deep Dive into the Browser Automation SDK](/citrolabs/ego-lite/what-are-the-main-modules-of-ego-lite)

Explore the main modules of ego-lite, a browser automation SDK. Understand CDP session management, element resolution, and site-specific learning within the ego-lite codebase.

- Tags: deep-dive
- Published: 2026-08-03

### [How to Contribute to ego-lite: A Complete Guide to the ego-browser SDK](/citrolabs/ego-lite/how-to-contribute-to-ego-lite)

Learn how to contribute to ego-lite. Follow our guide to clone the repo, set up the Node.js environment, write tests, and submit a PR for the ego-browser SDK.

- Tags: how-to-guide
- Published: 2026-08-03

### [What Programming Language Is ego-lite Written In? A Deep Dive into Its TypeScript Architecture](/citrolabs/ego-lite/what-programming-language-is-ego-lite-written-in)

Discover what programming language ego-lite uses. Explore its TypeScript architecture and Node.js runtime, built with a modern ESM pipeline. Learn more now.

- Tags: deep-dive
- Published: 2026-08-03

### [How to Run the Examples in ego-lite: A Complete Step-by-Step Guide](/citrolabs/ego-lite/how-to-run-the-examples-in-ego-lite)

Learn how to run examples in ego-lite with this step-by-step guide. Install the skill, build the runtime, and pipe JavaScript to the CLI for effortless execution.

- Tags: how-to-guide
- Published: 2026-08-03

### [ego-lite Project Structure: A Complete Guide to the CDP Browser Automation Runtime](/citrolabs/ego-lite/what-is-the-project-structure-of-ego-lite)

Explore the ego-lite project structure for the CDP browser automation runtime. Understand its three core layers: TypeScript runtime, agent skills, and project boilerplate.

- Tags: internals
- Published: 2026-08-03

### [How to Build ego-lite from Source: Complete Step-by-Step Guide for Browser Automation](/citrolabs/ego-lite/how-to-build-ego-lite-from-source)

Learn how to build ego-lite from source with this step-by-step guide. Get your browser automation script ready by following simple Node npm install and build commands.

- Tags: how-to-guide
- Published: 2026-08-03

### [Ego‑lite Prerequisites: Complete Requirements for Installation and Setup](/citrolabs/ego-lite/what-are-the-prerequisites-for-ego-lite)

Discover the essential ego-lite prerequisites. Learn what you need for installation including macOS, Node.js 22+, npm/npx, and an internet connection.

- Tags: getting-started
- Published: 2026-08-03

### [How to Install Ego-Lite on macOS: Complete Setup Guide](/citrolabs/ego-lite/how-to-install-ego-lite)

Easily install Ego-Lite on macOS with our complete setup guide. Run a single bash script to download, install, and register the ego-browser command. Get started now.

- Tags: getting-started
- Published: 2026-08-03

### [How the Element-Ops Driver Handles ObjectId References for Element Manipulation in ego-lite](/citrolabs/ego-lite/how-element-ops-driver-handle-objectid-references-element-manipulation-ego-lite)

Discover how the element-ops driver in ego-lite manages ObjectId references using CDP Runtime Object IDs and ensures automatic release to prevent memory leaks.

- Tags: internals
- Published: 2026-08-02

### [What Is the EGO_WRAPPED Symbol in ego-lite and Why Is It Used in installEgoSdk?](/citrolabs/ego-lite/what-ego-wrapped-symbol-why-used-installegosdk-ego-lite)

Discover the EGO_WRAPPED symbol in ego-lite. Learn why it prevents duplicate helper injection and ensures idempotent installation with installEgoSdk.

- Tags: deep-dive
- Published: 2026-08-02

### [How the Output Sink Buffer and Flush Works for console.log in ego-lite](/citrolabs/ego-lite/how-output-sink-buffer-flush-work-console-log-ego-lite)

Understand how ego-lite buffers and flushes console.log output, preventing duplicate errors and adding update notices. Learn about normal script completion and hard-stop error handling.

- Tags: internals
- Published: 2026-08-02

### [How Task‑Space Hand‑Off and Take‑Over Work Between Agent and User in ego‑lite](/citrolabs/ego-lite/control-handoff-mechanism-handofftaskspace-takeovertaskspace-agent-user-ego-lite)

Understand ego-lite's control handoff mechanism for agent and user task switching. Learn how handOffTaskSpace and takeOverTaskSpace manage context ownership and overlay visibility.

- Tags: internals
- Published: 2026-08-02

### [How Ref-Map Rebuilds on Every Snapshot and What Triggers Auto Re-snapshot in ego-lite](/citrolabs/ego-lite/how-ref-map-rebuild-every-snapshot-triggers-auto-re-snapshot-ego-lite)

Discover how ego-lite rebuilds its ref-map on every snapshot and the triggers for automatic re-snapshotting. Learn about browserSnapshotRefsToRefMap and snapshot references.

- Tags: internals
- Published: 2026-08-02

### [How the ego-lite Learning Subsystem Discovers and Loads Site-Specific Tools](/citrolabs/ego-lite/how-learning-subsystem-discover-load-site-specific-tools-ego-lite)

Discover how ego-lite's learning subsystem finds and loads site-specific tools using a three-stage pipeline for Node and browser execution.

- Tags: internals
- Published: 2026-08-02

### [snapshot vs snapshotRaw in ego-lite: When to Use Each Browser Automation Helper](/citrolabs/ego-lite/difference-snapshot-snapshotraw-ego-lite-context)

Understand the difference between snapshot and snapshotRaw in ego-lite. Learn when to use snapshot for readable text and snapshotRaw for advanced DOM manipulation with structured data.

- Tags: deep-dive
- Published: 2026-08-02

### [How Iframe Targets Are Resolved and Navigated in Ego-Browser: A Complete Technical Guide](/citrolabs/ego-lite/how-iframe-targets-resolved-navigated-ego-browser)

Discover how Ego Browser resolves and navigates iframe targets with a detailed technical guide. Learn about target discovery, session mapping, and navigation.

- Tags: deep-dive
- Published: 2026-08-02

### [Session Invalidation Flow When Switching Task Spaces in ego-lite: A Deep Dive](/citrolabs/ego-lite/session-invalidation-flow-switching-task-spaces-ego-lite)

Understand the ego-lite session invalidation flow when switching task spaces. Learn how ego-lite automatically invalidates and re-establishes CDP sessions for seamless task space transitions.

- Tags: deep-dive
- Published: 2026-08-02

### [How the Ego-Lite Keyboard Driver Handles `fill`, `press`, `pressSequentially`, and `selectOption`](/citrolabs/ego-lite/how-keyboard-driver-ego-lite-handle-fill-press-presssequentially-selectoption)

Explore how the Ego-Lite keyboard driver simplifies form interactions with fill, press, pressSequentially, and selectOption. Learn about its Playwright-style helpers and CDP command integration.

- Tags: internals
- Published: 2026-08-02

### [How page.getByRole, page.getByText, and page.locator.filter Work Together in ego-browser](/citrolabs/ego-lite/how-locators-page-getbyrole-getbytext-locator-filter-work-together-ego-browser)

Understand how Playwright-style locators like getByRole, getByText, and filter work together in ego-browser. Learn to chain these methods for powerful DOM queries and efficient testing.

- Tags: deep-dive
- Published: 2026-08-02

### [Event Queue Buffer Capacity and Overflow Handling in ego-browser](/citrolabs/ego-lite/event-queue-buffer-capacity-ego-browser-overflow-handling)

Discover ego-browser's event queue buffer capacity of 10,000 events. Learn how overflow is handled by discarding old entries to prevent memory issues.

- Tags: internals
- Published: 2026-08-02

### [How Ego‑Browser Manages JavaScript Dialogs (alert, confirm, prompt): CDP Event Handling Explained](/citrolabs/ego-lite/how-ego-browser-manage-js-dialogs-alert-confirm-prompt)

Discover how ego-browser handles JavaScript dialogs using CDP events. Learn about event tracking and session-scoped Map storage for seamless alert, confirm, and prompt management.

- Tags: internals
- Published: 2026-08-02

### [ego-browser Wait Conditions: Complete Guide to Element Resolution and Timing Controls](/citrolabs/ego-lite/wait-conditions-available-ego-browser-interact-element-resolution)

Explore ego-browser wait conditions, including timeouts and network idle states. Learn how these helpers manage element resolution and timing for efficient web automation.

- Tags: deep-dive
- Published: 2026-08-02

### [How the Pointer Driver in ego-browser Handles Click, Hover, Drag, and Wheel Actions](/citrolabs/ego-lite/how-pointer-driver-ego-browser-handle-click-hover-drag-wheel)

Learn how the ego-browser pointer driver uses Playwright-style mouse abstraction and CDP to handle click, hover, drag, and wheel actions with synthetic DOM event fallbacks.

- Tags: internals
- Published: 2026-08-02

### [browserFetch vs serverFetch in ego-lite: Execution Context and Use Cases Explained](/citrolabs/ego-lite/difference-browserfetch-serverfetch-helper-functions-ego-lite)

Understand browserFetch vs serverFetch in ego-lite. Learn how each helper function executes requests from the browser or Node.js agent and their key use cases.

- Tags: deep-dive
- Published: 2026-08-02

### [How ego-lite's `help()` Function Uses Runtime JSDoc Parsing for Live API Documentation](/citrolabs/ego-lite/how-help-function-ego-lite-powered-jsdoc-parsing-runtime)

Discover how ego-lite's help() function uses runtime JSDoc parsing for live API documentation. Learn how build-time comments become on-demand help.

- Tags: internals
- Published: 2026-08-02

### [How Site Skills (Learnings) Work in ego-lite: Discovery, Loading, and Validation](/citrolabs/ego-lite/how-site-skills-learnings-function-ego-lite-validation-process)

Discover how site skills work in ego-lite, from loading to validation. Understand how these reusable knowledge packs empower agents with contextual data and executable tools.

- Tags: deep-dive
- Published: 2026-08-02

### [Locator Strategies Supported by ego-browser and Their Classification in element-resolver.ts](/citrolabs/ego-lite/locator-strategies-supported-ego-browser-element-resolver-ts-classification)

Discover the 12 locator strategies in ego-browser including CSS, text, and XPath. Learn how element-resolver.ts classifies them for DOM or Accessibility-Tree resolution.

- Tags: api-reference
- Published: 2026-08-02

### [How ego‑browser Integrates With External Agent CLIs Like Claude Code](/citrolabs/ego-lite/how-ego-browser-integrate-external-agent-clis-claude-code)

Learn how ego-browser connects AI agent CLIs like Claude Code. It injects an SDK and bridges calls via CDP messages, enabling seamless browser control.

- Tags: how-to-guide
- Published: 2026-08-02

### [How Ego-Lite Isolates Task Spaces and Implements Its Ownership Model](/citrolabs/ego-lite/how-task-spaces-isolated-ego-lite-ownership-model)

Discover how Ego-Lite isolates task spaces for browser automation with dedicated resources. Learn about its ownership model preventing unauthorized context mutations. Learn more!

- Tags: internals
- Published: 2026-08-02

### [Transient vs Permanent Element Resolution Failures in ego-lite](/citrolabs/ego-lite/difference-transient-permanent-element-resolution-failures-ego-lite)

Understand transient vs permanent element resolution failures in ego-lite. Learn to identify temporary issues and definitive errors for faster debugging.

- Tags: deep-dive
- Published: 2026-08-02

### [How Snapshot References (`@N`) Work Across Multiple Heredoc Execution Rounds in Ego-Lite](/citrolabs/ego-lite/how-snapshot-references-work-multiple-heredoc-rounds)

Learn how snapshot references @N work across multiple heredoc rounds in Ego-Lite. Discover how refMap rebuilds enable lazy re-resolution for persistent references.

- Tags: internals
- Published: 2026-08-02

### [How ego-browser Manages CDP Sessions and the 2-Second TTL Behavior in ego-lite](/citrolabs/ego-lite/how-ego-browser-manage-cdp-sessions-2s-ttl-behavior)

Discover how ego-browser manages CDP sessions with a 2-second TTL in ego-lite. Learn how it reattaches to active tabs for optimal performance and resource management.

- Tags: internals
- Published: 2026-08-02

### [How ego-lite's Build System Produces Both Per-File dist and Rollup Bundles](/citrolabs/ego-lite/how-does-ego-lites-build-system-produce-both-per-file-dist-and-rollup-bundles)

Discover how ego-lite's build system creates per-file dist and Rollup bundles using a two-stage Node.js script with esbuild and Rollup for granular modules and executable artifacts.

- Tags: internals
- Published: 2026-08-01

### [EGO_BROWSER_AGENT_WORKSPACE Environment Variable in ego-lite: Purpose and Usage Guide](/citrolabs/ego-lite/what-is-the-purpose-of-the-ego-browser-agent-workspace-environment-variable-in-ego-lite)

Learn the purpose and usage of the EGO_BROWSER_AGENT_WORKSPACE environment variable in ego-lite. Discover how it customizes agent skill file loading.

- Tags: how-to-guide
- Published: 2026-08-01

### [How ego-lite's Pointer Driver Handles Clicks, Hovers, Drags, and Wheel Events](/citrolabs/ego-lite/how-does-ego-lites-pointer-driver-handle-clicks-hovers-drags-and-wheel-events)

Explore how ego-lite's pointer driver converts semantic actions like click hover drag and wheel into precise Chrome DevTools Protocol mouse events for your embedded browser.

- Tags: deep-dive
- Published: 2026-08-01

### [How `fill`, `press`, and `insertText` Are Implemented in ego-lite: A Deep Dive into Keyboard Automation](/citrolabs/ego-lite/how-are-keyboard-interactions-like-fill-press-and-inserttext-implemented-in-ego-lite)

Explore how ego-lite implements keyboard automation using CDP key events and DOM manipulation. Understand the distinct event patterns for fill, press, and insertText.

- Tags: deep-dive
- Published: 2026-08-01

### [How ego-lite's element-resolver Classifies Failures as Retryable vs Permanent](/citrolabs/ego-lite/how-does-ego-lites-element-resolver-classify-failures-as-retryable-vs-permanent)

Learn how ego-lite's element-resolver classifies failures. Understand transient vs permanent errors with ElementResolutionError kind for efficient retries.

- Tags: internals
- Published: 2026-08-01

### [How Ego-Lite Implements the State Singleton Pattern in `src/state.ts`](/citrolabs/ego-lite/what-is-the-state-singleton-pattern-used-in-ego-lites-src-state-ts)

Discover how Ego-Lite implements the state singleton pattern in src/state.ts using a global object for mutable runtime info shared across modules via Node's caching.

- Tags: internals
- Published: 2026-08-01

### [browserFetch vs serverFetch in ego-lite: HTTP Client Context Explained](/citrolabs/ego-lite/what-is-the-difference-between-browserfetch-and-serverfetch-in-ego-lites-http-client)

Understand browserFetch vs serverFetch in ego-lite. Learn how each handles HTTP client context, cookies, and authentication for Node.js or browser execution.

- Tags: deep-dive
- Published: 2026-08-01

### [How ego-lite's Wait Functions Handle Load States and Selectors: A Complete Technical Guide](/citrolabs/ego-lite/how-do-ego-lites-wait-functions-handle-different-load-states-and-selectors)

Explore ego-lites wait functions and their unified polling architecture using CDP and timeouts to manage page load states and selector availability for efficient testing.

- Tags: deep-dive
- Published: 2026-08-01

### [Buffered Output Sink in Ego-Lite: How It Prevents Duplicate Error Noise](/citrolabs/ego-lite/what-is-the-buffered-output-sink-in-ego-lite-and-why-is-it-utilized)

Discover the buffered output sink in ego-lite. Learn how it captures and flushes console logs to prevent duplicate error noise, ensuring clean, deduplicated messages, especially during hard-stop errors.

- Tags: internals
- Published: 2026-08-01

### [How ego-lite's help() Function Is Powered by Runtime JSDoc Parsing: A Technical Deep Dive](/citrolabs/ego-lite/how-is-ego-lites-help-function-powered-by-runtime-jsdoc-parsing)

Discover how ego-lite's help() function uses runtime JSDoc parsing to serve API docs on demand without file-system access. Learn the technical details.

- Tags: deep-dive
- Published: 2026-08-01

### [How Task Space Handoff and Takeover Work Between Agent and User in ego-lite](/citrolabs/ego-lite/how-do-task-space-handoff-and-takeover-work-between-agent-and-user-in-ego-lite)

Learn how ego-lite enables task space handoff and takeover between agents and users with three core helpers. Master browser control transitions effectively.

- Tags: internals
- Published: 2026-08-01

### [Ego-Lite Download Tracking System and How drainEvents Works](/citrolabs/ego-lite/what-is-ego-lites-download-tracking-system-and-how-does-drainevents-work)

Discover ego-lite download tracking using Chrome DevTools Protocol events. Learn how drainEvents flushes the internal browser event buffer for efficient tracking.

- Tags: internals
- Published: 2026-08-01

### [How to Handle File Uploads Using `setInputFiles` in ego-lite](/citrolabs/ego-lite/how-are-file-uploads-handled-using-setinputfiles-in-ego-lite)

Learn to handle file uploads with ego-lite's setInputFiles helper. This guide explains how to resolve selectors and send CDP commands for seamless file uploads to input elements.

- Tags: how-to-guide
- Published: 2026-08-01

### [How ego-lite's Video and Screencast Recording Feature Works: A Deep Dive into the VideoRecorder Pipeline](/citrolabs/ego-lite/how-does-ego-lites-video-and-screencast-recording-feature-function)

Discover how ego-lite's VideoRecorder pipeline streams CDP image frames via FFmpeg to create WebM video files for browser session recording. Learn the technical details.

- Tags: deep-dive
- Published: 2026-08-01

### [How Ego-Lite Locators Resolve @N Refs, loc=css, loc=role, and xpath Selectors](/citrolabs/ego-lite/how-do-ego-lite-locators-resolve-n-refs-loc-css-loc-role-and-xpath-selectors)

Discover how ego-lite locators efficiently resolve @N refs, loc=css, loc=role, and xpath selectors by leveraging snapshot refs, AX tree, and document queries.

- Tags: how-to-guide
- Published: 2026-08-01

### [`snapshot()` vs `snapshotRaw()` in ego-lite: Key Differences and When to Use Each](/citrolabs/ego-lite/what-is-the-difference-between-snapshot-and-snapshotraw-in-ego-lite)

Understand the key differences between ego-lite's snapshot() and snapshotRaw(). Learn when to use each to get plain strings or structured data with metadata.

- Tags: deep-dive
- Published: 2026-08-01

### [How the `cdp()` Function Evaluates JavaScript Expressions in ego-lite: A Deep Dive into Chrome DevTools Protocol Integration](/citrolabs/ego-lite/how-does-the-cdp-function-in-ego-lite-evaluate-javascript-expressions-in-the-browser)

Discover how ego-lite's cdp() function evaluates JavaScript expressions using Chrome DevTools Protocol. Understand Runtime.evaluate with automatic serialization and error handling.

- Tags: deep-dive
- Published: 2026-08-01

### [How ego‑lite's installEgoSdk Injects Helper Functions into the Global Scope](/citrolabs/ego-lite/how-does-ego-lites-installegosdk-inject-helper-functions-into-the-global-scope)

Discover how ego-lite's installEgoSdk injects helper functions into the global scope. Learn about readiness logic and Object.defineProperty for non-enumerable descriptors. Understand ego-lite's inner workings.

- Tags: internals
- Published: 2026-08-01

### [How stdin JavaScript Becomes Browser Commands in ego-lite: Complete Data Flow Explained](/citrolabs/ego-lite/what-is-the-data-flow-from-stdin-javascript-to-browser-commands-in-ego-lite)

Explore the 7-stage pipeline of stdin JavaScript to browser commands in ego-lite. Understand the complete data flow from input to Chrome DevTools Protocol execution.

- Tags: internals
- Published: 2026-08-01

### [How Ego-Lite Discovers and Executes Site Skills (Learnings)](/citrolabs/ego-lite/how-are-site-skills-learnings-discovered-and-executed-within-ego-lite)

Learn how Ego-Lite discovers and executes site skills by scanning for domain-matching manifests, dynamically loading notes and tool signatures for import or evaluation.

- Tags: internals
- Published: 2026-08-01

### [How Ego-Lite Uses Backend Node IDs to Persist Refs Across Heredoc Rounds](/citrolabs/ego-lite/how-does-the-snapshot-ref-system-in-ego-lite-use-backendnodeid-across-heredoc-rounds)

Discover how Ego-lite's snapshot/ref system uses backendNodeId to persist DOM element references across heredoc rounds, simplifying agent interactions without rebuilding selectors.

- Tags: internals
- Published: 2026-08-01

### [How Task Spaces Work With the Agent vs User Ownership Model in ego-lite](/citrolabs/ego-lite/how-do-task-spaces-work-with-the-agent-vs-user-ownership-model-in-ego-lite)

Understand ego-lite task spaces and the agent vs user ownership model. Learn how three states control AI agent browser context manipulation for seamless operation.

- Tags: internals
- Published: 2026-08-01

### [ego-lite Element Resolution System: How Transient vs Permanent Failures Work](/citrolabs/ego-lite/what-is-ego-lites-element-resolution-system-and-how-does-it-differentiate-transient-vs-permanent-failures)

Understand ego-lite's element resolution system. Learn how the kind property on ElementResolutionError differentiates transient vs permanent failures, guiding runtime decisions on polling or aborting.

- Tags: internals
- Published: 2026-08-01

### [How ego-browser Manages CDP Sessions and Automatic Reconnections](/citrolabs/ego-lite/how-does-ego-browser-manage-cdp-sessions-and-reconnections)

Discover how ego browser manages CDP sessions and reconnections with automatic reattachment, retry logic, and TTL-based refresh for seamless control.

- Tags: internals
- Published: 2026-08-01

### [How the Ego-Lite Reference System Maps Numeric Backend Node IDs](/citrolabs/ego-lite/ego-lite-reference-system-node-ids)

Discover how the ego-lite reference system maps numeric backend node IDs using RefMap. Learn to quickly find DOM nodes with @N syntax for efficient debugging and development.

- Tags: internals
- Published: 2026-07-31

### [What Information Is Included in an Ego-Lite Snapshot? A Complete Technical Breakdown](/citrolabs/ego-lite/ego-lite-snapshot-information)

Discover what an ego-lite snapshot contains. Get a technical breakdown of the structured object, including page content and a stable identifier reference map for reliable DOM node lookup.

- Tags: deep-dive
- Published: 2026-07-31

### [Transient vs Permanent Element Resolution Failures in ego-lite: A Complete Guide](/citrolabs/ego-lite/ego-lite-element-resolution-failure-types)

Understand transient vs permanent element resolution failures in ego-lite. Learn how the kind property dictates retries or immediate aborts for automation.

- Tags: deep-dive
- Published: 2026-07-31

### [How Ego-Lite's Element Resolver Handles Different Selector Formats](/citrolabs/ego-lite/ego-lite-element-resolver-selectors)

Discover how ego-lite's element resolver expertly handles various selector formats including css xpath role text href and snapshots resolving them efficiently via CDP accessibility tree or injected JavaScript.

- Tags: internals
- Published: 2026-07-31

### [What Is the Site Facade in ego-lite? Purpose, API, and Implementation](/citrolabs/ego-lite/ego-lite-site-facade-purpose)

Discover the site facade in ego-lite. This abstraction layer unifies website interactions, simplifying navigation, element resolution, and action execution for automation agents.

- Tags: deep-dive
- Published: 2026-07-31

### [How the taskSpaces Facade Manages Agent Collaboration Environments in ego-lite](/citrolabs/ego-lite/ego-lite-taskspaces-facade-agent-collaboration)

Learn how the taskSpaces facade in ego-lite manages AI agent collaboration. Discover how it handles creating, claiming, and switching browsing contexts with ownership rules and session state.

- Tags: internals
- Published: 2026-07-31

### [Browser Facade in ego-lite: Functions, API Reference, and Usage Guide](/citrolabs/ego-lite/ego-lite-browser-facade-functions)

Explore the browser facade in ego-lite. Control embedded browsers with a simple JavaScript API for CDP operations, element interaction, network requests, and more. Learn usage and API reference.

- Tags: api-reference
- Published: 2026-07-31

### [How the `page.locator()` Method Works in Ego‑Lite: A Complete Guide to Element Selection](/citrolabs/ego-lite/ego-lite-page-locator-method)

Learn how page.locator() in ego-lite provides auto-waiting locators for reliable element interaction. Discover its helper methods and automatic error handling.

- Tags: how-to-guide
- Published: 2026-07-31

### [ego-lite `page` Facade: Complete Capabilities and API Reference](/citrolabs/ego-lite/ego-lite-page-facade-capabilities)

Explore the ego-lite page facade capabilities. Get a Playwright-style API for navigation, element location, waiting, interaction, screenshots, and screencasts. Learn more.

- Tags: api-reference
- Published: 2026-07-31

### [How AI Agents Interact with the ego-lite Browser Using the Helper System](/citrolabs/ego-lite/ai-agent-interaction-ego-lite-helpers)

Discover how AI agents interact with the ego-lite browser via its helper system. Learn about the Playwright-style API for page interaction and browser management within agent scripts.

- Tags: how-to-guide
- Published: 2026-07-31

### [Understanding the 2-Second TTL for Ego-Lite Sessions](/citrolabs/ego-lite/ego-lite-session-ttl)

Discover why ego-lite enforces a 2-second TTL for Chrome DevTools Protocol sessions. Learn how this setting optimizes caching and avoids repeated attachments in the citrolabs/ego-lite repository.

- Tags: deep-dive
- Published: 2026-07-31

### [How Ego-Lite Manages CDP Session Attachment and Re-Attachment](/citrolabs/ego-lite/ego-lite-cdp-session-management)

Discover how ego-lite manages CDP session attachment and re-attachment with TTL caching, auto-retry, and self-healing for seamless debugging. Learn more!

- Tags: internals
- Published: 2026-07-31

### [What Is globalThis.ego.sendCDPMessage in ego-lite? The CDP Transport Bridge](/citrolabs/ego-lite/ego-lite-sendcdpmessage-purpose)

Understand globalThis.ego.sendCDPMessage, the CDP transport bridge in ego-lite. Learn how it enables sending Chrome DevTools Protocol commands and receiving responses.

- Tags: deep-dive
- Published: 2026-07-31

### [How to Use the ego-browser Harness as a Module in Node.js](/citrolabs/ego-lite/use-ego-browser-harness-as-module)

Easily integrate ego-browser harness into your Node.js project. Install ego-browser-v2 and import installEgoSdk to leverage Playwright-style helpers for efficient testing.

- Tags: how-to-guide
- Published: 2026-07-31

### [ego-browser Harness Architecture: Modular CDP-Based Agent Runtime](/citrolabs/ego-lite/ego-browser-harness-architecture)

Explore the ego-browser harness architecture, a modular CDP-based agent runtime. Discover how it uses a Node.js layered approach and JavaScript SDK to expose Chrome DevTools Protocol capabilities for AI agents.

- Tags: architecture
- Published: 2026-07-31

### [How ego-lite's Code-Based Function Call Interface Improves Agent Interaction](/citrolabs/ego-lite/ego-lite-code-based-function-calls-vs-cli)

Discover how ego-lite's code-based function call interface simplifies agent interaction. Experience deterministic browser automation without CDP complexity.

- Tags: deep-dive
- Published: 2026-07-31

### [What Are Ego-Lite Spaces and How Do They Prevent Interference?](/citrolabs/ego-lite/ego-lite-spaces-interference-prevention)

Discover Ego-Lite Spaces: logical containers that isolate browser tabs and prevent interference. Learn how strict ownership rules protect your automation and user sessions.

- Tags: explanation
- Published: 2026-07-31

### [How Ego-Lite Enables AI Agents to Inherit User Login States and Cookies](/citrolabs/ego-lite/ego-lite-inherit-user-logins-cookies)

Discover how Ego-Lite enables AI agents to inherit user login states and cookies by sharing a persistent headless Chrome instance and CDP session. Streamline your AI browser automation.

- Tags: how-to-guide
- Published: 2026-07-31

### [What Is the ego-browser Node.js Harness? A Complete Technical Guide](/citrolabs/ego-lite/ego-browser-nodejs-harness-role)

Discover the ego-browser Node.js harness, a lightweight automation bridge that provides a unified Playwright-style API for AI agents to control the ego-lite browser runtime via CDP bindings. Learn more now.

- Tags: deep-dive
- Published: 2026-07-31

### [How ego-lite Differs from Traditional Browser Automation Frameworks](/citrolabs/ego-lite/ego-lite-vs-traditional-browser-automation)

Discover how ego-lite revolutionizes browser automation with its CDP-first, snapshot-aware architecture, empowering AI agents to collaborate with users unlike traditional frameworks.

- Tags: deep-dive
- Published: 2026-07-31

### [How to Integrate ego-browser with External Agent CLIs Like Claude Code](/citrolabs/ego-lite/ego-browser-integrate-external-agent-cli)

Integrate ego-browser with external agent CLIs like Claude Code. Easily inject Playwright-style browser helpers into your JavaScript global scope using installEgoSdk from @citrolabs/ego-browser.

- Tags: how-to-guide
- Published: 2026-07-30

### [How ego-browser Handles Mouse Interactions: Click, Hover, and Drag Implementation](/citrolabs/ego-lite/ego-browser-mouse-interactions-click-hover-drag)

Discover how ego-browser handles mouse interactions like click hover and drag using Chrome DevTools Protocol and fallback DOM events. Learn more about its robust input handling.

- Tags: internals
- Published: 2026-07-30

### [How to Use Ego-Browser Wait Helpers: Mastering waitForSelector and waitForURL](/citrolabs/ego-lite/ego-browser-wait-helpers-usage)

Master ego-browser wait helpers like waitForSelector and waitForURL. Eliminate manual loops with auto-polling for DOM elements and URL patterns, ensuring consistent timeouts and error handling.

- Tags: how-to-guide
- Published: 2026-07-30

### [Ego-Browser CDP Transport Layer Architecture: How It Works](/citrolabs/ego-lite/ego-browser-cdp-transport-layer-architecture)

Understand the ego-browser CDP transport layer architecture. Learn how it manages framing, requests, session, and error recovery for efficient communication.

- Tags: architecture
- Published: 2026-07-30

### [How Ego-Lite Achieves Parallel Multitasking Using Multiple Task Spaces](/citrolabs/ego-lite/ego-lite-parallel-multitasking-multiple-spaces)

Learn how Ego-Lite achieves parallel multitasking by isolating browser sessions into independent task spaces. Run concurrent workflows without interference.

- Tags: internals
- Published: 2026-07-30

### [How to Debug Element Resolution Failures in ego-browser: A Complete Guide](/citrolabs/ego-lite/ego-browser-debug-element-resolution-failures)

Debug ego-browser element resolution failures. Understand transient vs permanent errors to fix timing issues or locator syntax in this complete guide.

- Tags: how-to-guide
- Published: 2026-07-30

### [How to Handle Keyboard Input and Special Key Presses in ego-browser](/citrolabs/ego-lite/ego-browser-keyboard-input-special-keys)

Learn to handle keyboard input and special key presses in ego-browser with its Playwright-style keyboard API. Use simple methods for typing, pressing keys, and managing modifiers effortlessly.

- Tags: how-to-guide
- Published: 2026-07-30

### [Semantic vs Visual vs Direct DOM Workflows in ego-browser: A Complete Guide](/citrolabs/ego-lite/ego-browser-semantic-visual-dom-workflows)

Explore semantic, visual, and direct DOM workflows in ego-browser. Understand each model to reliably interact with web pages using the best integration method.

- Tags: deep-dive
- Published: 2026-07-30

### [Navigation and Waiting Strategies in ego-browser: Complete CDP Automation Guide](/citrolabs/ego-lite/ego-browser-navigation-waiting-strategies)

Master ego-browser navigation and waiting strategies for precise CDP automation. Learn to manage tabs and sync page states without arbitrary delays.

- Tags: deep-dive
- Published: 2026-07-30

### [How to Use CDP Commands Directly in ego-browser with the cdp Helper](/citrolabs/ego-lite/ego-browser-cdp-commands-cdp-helper)

Learn how to use CDP commands directly in ego-browser with the cdp helper. Send raw Chrome DevTools Protocol commands from agent scripts effortlessly.

- Tags: how-to-guide
- Published: 2026-07-30

### [Ego-Browser Element Resolution System: Architecture and Failure Classification](/citrolabs/ego-lite/ego-browser-element-resolution-system-failures)

Discover the ego-browser element resolution system's architecture. Learn how it translates selectors and classifies failures as transient or permanent with citrolabs/ego-lite.

- Tags: architecture
- Published: 2026-07-30

### [How to Upload Files in ego-browser Using the setInputFiles Helper](/citrolabs/ego-lite/ego-browser-uploadfile-helper)

Learn to upload files in ego-browser with setInputFiles. Programmatically upload files to input type file elements using Chrome DevTools Protocol for seamless testing.

- Tags: how-to-guide
- Published: 2026-07-30

### [How ego-browser Manages Session Persistence and Reattachment in CDP](/citrolabs/ego-lite/ego-browser-session-persistence-reattachment)

Discover how ego-browser ensures session persistence and reattachment via its cached-with-TTL model. Learn about its automatic reattachment and transparent retry logic for CDP targets.

- Tags: internals
- Published: 2026-07-30

### [Interacting with Canvas-Like Applications in ego-browser: Viewport Coordinate Workflow](/citrolabs/ego-lite/ego-browser-canvas-app-workflow)

Learn the recommended workflow for interacting with canvas-like applications in ego-browser. Use viewport coordinates and the MouseTarget API for efficient clicking, dragging, and scrolling.

- Tags: how-to-guide
- Published: 2026-07-30

### [How to Perform Control Handoff Between an ego-lite Agent and the User](/citrolabs/ego-lite/ego-lite-agent-user-control-handoff)

Learn about control handoff in ego-lite. Use handOffTaskSpace to transfer browser control to the user, waitForAgentControl to pause automation, and takeOverTaskSpace to resume.

- Tags: how-to-guide
- Published: 2026-07-30

### [Element Refs (@N) and Locators in Ego-Browser Snapshots: The Dual Addressing System](/citrolabs/ego-lite/ego-browser-element-refs-locators-snapshots)

Discover element refs @N and locators in ego-browser snapshots. Learn how this dual addressing system offers stable IDs and flexible selectors for robust automation.

- Tags: deep-dive
- Published: 2026-07-30

### [How to Manage Page Dialogs (Alerts, Prompts, Confirms) in Ego-Browser](/citrolabs/ego-lite/ego-browser-handle-page-dialogs)

Learn how to manage page dialogs alerts prompts and confirms in ego-browser using the pendingDialog helper and pageInfo API with Chrome DevTools Protocol commands.

- Tags: how-to-guide
- Published: 2026-07-30

### [serverFetch vs browserFetch in ego-browser: Key Differences Explained](/citrolabs/ego-lite/ego-browser-serverfetch-vs-browserfetch)

Discover the key differences between serverFetch and browserFetch in ego-browser. Understand how each executes HTTP requests from the Node.js host or browser page.

- Tags: deep-dive
- Published: 2026-07-30

### [How ego-lite Implements Task Space Isolation for Concurrent Agent Tasks](/citrolabs/ego-lite/ego-lite-task-space-isolation-concurrent-agents)

Discover how ego-lite achieves task space isolation for concurrent agent tasks. Learn about sandboxed contexts preventing state leakage in parallel automation workflows.

- Tags: internals
- Published: 2026-07-30

### [How the Ref-Map Uses Backend Node IDs for Stable Element References Across Snapshots](/citrolabs/ego-lite/how-does-ref-map-use-backendnodeid-for-stable-element-references)

Discover how Ego-Lite's RefMap uses backendNodeId for stable element references across snapshots. Learn how it ensures valid refs with numeric IDs and role-based fallbacks for stale nodes.

- Tags: internals
- Published: 2026-07-28

### [Site Learnings manifest.json Format in ego-lite: Schema, Examples, and Directory Layout](/citrolabs/ego-lite/what-is-site-learnings-manifest-json-format-and-directory-structure)

Explore the site learnings manifest.json format in ego-lite. Understand its schema, see examples, and learn about the directory layout for organized site configurations.

- Tags: api-reference
- Published: 2026-07-28

### [How to Debug Clicks with the `--debug-clicks` Flag for Visual Highlighting in ego-lite](/citrolabs/ego-lite/how-to-debug-with-debug-clicks-flag)

Debug ego-lite clicks visually with the --debug-clicks flag. Highlight automated clicks instantly to verify target coordinates and improve your testing.

- Tags: how-to-guide
- Published: 2026-07-28

### [How the EGO_BROWSER_AGENT_WORKSPACE Environment Variable Is Resolved in citrolabs/ego-lite](/citrolabs/ego-lite/how-is-ego-browser-agent-workspace-environment-variable-resolved)

Discover how citrolabs/ego-lite resolves the EGO_BROWSER_AGENT_WORKSPACE env variable through a three-step hierarchy: user overrides, skill directories, and default repository locations.

- Tags: internals
- Published: 2026-07-28

### [How the Video Recorder (Screencast) Works in Ego‑Lite: Capturing Browser Sessions with FFmpeg and CDP](/citrolabs/ego-lite/how-does-video-recorder-work-for-capturing-browser-sessions)

Discover how Ego-Lite captures browser sessions using CDP and FFmpeg. Learn its video recorder works to create silent VP8 encoded WebM files.

- Tags: internals
- Published: 2026-07-28

### [How to Distinguish Transient vs Permanent Element Resolution Errors in ego-lite](/citrolabs/ego-lite/how-to-distinguish-transient-vs-permanent-element-resolution-errors)

Learn to distinguish transient versus permanent element resolution errors in ego-lite. Understand the 'kind' property for retryable or non-retryable failures.

- Tags: how-to-guide
- Published: 2026-07-28

### [Understanding Ego‑Lite Snapshot Output Format and Using loc= Values](/citrolabs/ego-lite/what-is-snapshot-output-format-and-how-to-use-loc-values)

Learn Ego-Lite snapshot output formats and use resilient loc= values like css, xpath, text, role, and href to navigate DOM changes effectively.

- Tags: api-reference
- Published: 2026-07-28

### [How the ego-lite `help()` Function Uses JSDoc Parsing for Runtime Documentation](/citrolabs/ego-lite/how-is-help-function-implemented-using-jsdoc-parsing)

Discover how ego-lite's help() function uses JSDoc parsing at runtime via a pre-computed map for instant, efficient documentation access. Learn more!

- Tags: internals
- Published: 2026-07-28

### [How the Ego-Lite Learning Subsystem Discovers and Validates Site Skills](/citrolabs/ego-lite/how-does-learning-subsystem-discover-and-validate-site-skills)

Learn how the ego lite learning subsystem discovers site skills by scanning manifest files and validates pack structure and tool schemas. See how it integrates with browser automation helpers.

- Tags: internals
- Published: 2026-07-28

### [serverFetch vs browserFetch in ego-lite: Choosing the Right HTTP Context](/citrolabs/ego-lite/when-to-use-serverfetch-vs-browserfetch)

Learn when to use serverFetch vs browserFetch in ego-lite for Node.js or browser HTTP requests. Understand context specific needs like cookies and credentials.

- Tags: api-reference
- Published: 2026-07-28

### [How to Upload Files Using `setInputFiles` in ego-browser](/citrolabs/ego-lite/how-to-upload-files-with-setinputfiles-and-uploadfile)

Learn to upload files with setInputFiles in ego-browser. Attach local files to inputs using Chrome DevTools Protocol and selector strings or Playwright locators.

- Tags: how-to-guide
- Published: 2026-07-28

### [How the Ego-Lite Keyboard Helper Works: fillInput, typeText, pressKey, and dispatchKey Explained](/citrolabs/ego-lite/how-does-keyboard-helper-work)

Explore the Ego-Lite keyboard helper API including fillInput, typeText, pressKey, and dispatchKey. Understand how it simplifies Chrome DevTools Protocol input events for efficient automation.

- Tags: how-to-guide
- Published: 2026-07-28

### [How to Use Pointer Actions in ego-lite: click, doubleClick, hover, drag, and wheel](/citrolabs/ego-lite/how-to-use-pointer-actions)

Master ego-lite pointer actions: click, doubleClick, hover, drag, and wheel. Easily control mouse events in your tests using page.mouse or locator methods for efficient web automation.

- Tags: how-to-guide
- Published: 2026-07-28

### [How Ego-Browser Wait Functions Work: `waitForSelector`, `waitForFunction`, `waitForLoadState`, and `waitForTimeout`](/citrolabs/ego-lite/how-do-wait-functions-work)

Discover how Ego-Browser's wait functions like waitForSelector and waitForFunction work. Learn about CDP evaluation, error retries, and timeout management for efficient browser automation.

- Tags: internals
- Published: 2026-07-28

### [How the Buffered Event Queue Works with 10k Capacity in Ego-Lite](/citrolabs/ego-lite/how-does-buffered-event-queue-work)

Discover how Ego-Lite's 10k capacity buffered event queue discards old events when full. Learn about its efficient memory management for CDP events.

- Tags: internals
- Published: 2026-07-28

### [How to Create and Validate Site-Specific Learnings with manifest.json in ego-lite](/citrolabs/ego-lite/how-to-create-and-validate-site-specific-learnings)

Learn to create and validate site-specific learnings using manifest.json in ego-lite. Follow our guide to define and enforce schema compliance for your custom learnings.

- Tags: how-to-guide
- Published: 2026-07-28

### [Session Caching Mechanism with 2s TTL and Auto Re‑attach in Ego‑Lite](/citrolabs/ego-lite/what-is-session-caching-mechanism-with-2s-ttl-and-auto-re-attach)

Ego-Lite's session caching offers 2s TTL and auto re-attach to eliminate overhead and ensure seamless automation without manual reconnection. Discover how.

- Tags: internals
- Published: 2026-07-28

### [How the CDP Transport and Session Caching Work in browser-runtime.ts](/citrolabs/ego-lite/how-does-cdp-transport-work-with-session-caching)

Explore the CDP transport in browser-runtime.ts. Learn how it combines JSON-RPC with session caching and TTL for efficient Chrome DevTools Protocol communication and recovery.

- Tags: internals
- Published: 2026-07-28

### [How the ego-lite Element Resolver Handles CSS, XPath, loc=, and @N Locators](/citrolabs/ego-lite/how-does-element-resolver-handle-different-locator-types)

Discover how ego-lite's element resolver efficiently handles CSS, XPath, loc=, and @N locators. Learn how it translates various selectors into DOM elements using specialized strategies and CDP.

- Tags: internals
- Published: 2026-07-28

### [How Snapshot Refs (@N) Work in ego-lite: Validity and Lifecycle Rules](/citrolabs/ego-lite/how-do-snapshot-refs-work-and-when-do-they-become-invalid)

Learn how egol-lite snapshot refs (@N) work. Discover their validity and lifecycle rules, including expiration after navigation, DOM mutations, or a 2-second TTL.

- Tags: deep-dive
- Published: 2026-07-28

### [How to Handle Control Handoff Between Agent and User with `handOffTaskSpace` and `takeOverTaskSpace` in ego-lite](/citrolabs/ego-lite/how-to-handle-control-handoff-with-handof-taskspace-and-takeover-taskspace)

Learn how to manage agent-user control handoff in ego-lite with handOffTaskSpace and takeOverTaskSpace. Seamlessly transfer and reclaim browser control.

- Tags: how-to-guide
- Published: 2026-07-28

### [How the Task Space Ownership Model Works in ego-browser](/citrolabs/ego-lite/how-does-task-space-ownership-work-in-ego-browser)

Understand the ego-browser task space ownership model. Learn how it isolates browsing into agent or user-owned contexts with strict permission checks, enhancing security and control.

- Tags: internals
- Published: 2026-07-28

### [How to Validate Learned Site Skills Using the Validation Script in Ego-Lite](/citrolabs/ego-lite/how-to-validate-learned-site-skills-validation-script)

Learn how to validate learned site skills using the ego-lite validation script. Ensure your site skill manifests and tools meet schema requirements with this easy-to-use TypeScript script.

- Tags: how-to-guide
- Published: 2026-07-27

### [How elementCenter Calculates Click Coordinates in Ego-Lite](/citrolabs/ego-lite/how-elementcenter-helper-calculate-click-coordinates)

Learn how elementCenter calculates viewport-relative click coordinates in ego-lite. Discover the process of resolving selectors, scrolling, and finding the element's center.

- Tags: internals
- Published: 2026-07-27

### [What Is the Difference Between `snapshot` and `snapshotRaw` in Ego‑Lite](/citrolabs/ego-lite/difference-between-snapshot-and-snapshotraw)

Understand the difference between snapshot and snapshotRaw in ego-lite. Learn how snapshotRaw provides detailed page data while snapshot offers plain text for easier agent integration.

- Tags: deep-dive
- Published: 2026-07-27

### [How to Use waitForFunction for Custom Polling Conditions in ego-browser](/citrolabs/ego-lite/how-to-use-waitforfunction-custom-polling-conditions)

Learn how to use waitForFunction in ego-browser to create custom polling conditions. This article explains how to evaluate JavaScript until a truthy value or timeout is reached.

- Tags: how-to-guide
- Published: 2026-07-27

### [Understanding the bufferOutput Mechanism in Ego-Lite: When and How It Flushes](/citrolabs/ego-lite/what-is-bufferoutput-mechanism-and-when-flushed)

Discover the bufferOutput mechanism in ego-lite. Learn how it captures console.log output and when it flushes during process teardown for efficient logging.

- Tags: internals
- Published: 2026-07-27

### [How to Handle File Uploads with setInputFiles in ego-lite](/citrolabs/ego-lite/how-to-handle-file-uploads-with-setinputfiles-ego-lite)

Learn how to handle file uploads with ego-lite's setInputFiles. This helper efficiently uploads local files to input elements using CDP commands for seamless browser interaction.

- Tags: how-to-guide
- Published: 2026-07-27

### [Keyboard Modifiers and Shortcuts in ego-browser: Complete Guide](/citrolabs/ego-lite/keyboard-modifiers-shortcuts-supported-ego-browser)

Discover ego-browser keyboard modifiers and shortcuts for powerful automation. Learn to use Alt, Control, Meta, Shift, and more with the page.keyboard.press() method for efficient agent control.

- Tags: complete-guide
- Published: 2026-07-27

### [How the 2-Second Session TTL and Auto-Reattachment Work in ego-browser](/citrolabs/ego-lite/how-does-2-second-session-ttl-auto-reattachment-work)

Understand the 2-second session TTL and auto-reattachment in ego-browser. Learn how it minimizes overhead, invalidates stale sessions, and re-attaches to targets for efficient operation.

- Tags: internals
- Published: 2026-07-27

### [How to Use the Screencast API for Real-Time Browser Observation in Ego Lite](/citrolabs/ego-lite/how-to-use-screencast-api-real-time-browser-observation)

Learn how to use the screencast API in Ego Lite for real-time browser observation. Capture WebM video of browser viewports using the Chrome DevTools Protocol.

- Tags: how-to-guide
- Published: 2026-07-27

### [Best Practices for Writing Stable Site Skills in ego-lite](/citrolabs/ego-lite/best-practices-writing-stable-site-skills-learnings)

Write stable site skills for ego-lite using best practices like fixed folders, stable selectors, and URL validation. Create resilient learning packs that avoid browser update issues.

- Tags: best-practices
- Published: 2026-07-27

### [How Ego-Lite Manages Parallel Agent Workspaces: Task Spaces and Isolation Explained](/citrolabs/ego-lite/how-ego-lite-manages-parallel-agent-workspaces)

Discover how Ego-Lite manages parallel agent workspaces using task spaces and isolated Chrome DevTools Protocol sessions for interference-free agent execution.

- Tags: internals
- Published: 2026-07-27

### [How to Debug Element Resolution Failures with the @N Reference System in Ego Lite](/citrolabs/ego-lite/debug-element-resolution-failures-with-n-reference-system)

Debug @N reference system failures in Ego Lite. Inspect RefMap, handle transient or permanent errors, and verify fallback lookups for element resolution.

- Tags: how-to-guide
- Published: 2026-07-27

### [Architecture of Ego-Browser's CDP Transport Layer: Inside the Chrome DevTools Protocol Implementation](/citrolabs/ego-lite/architecture-of-ego-browser-cdp-transport-layer)

Explore the architecture of Ego-Browser's CDP transport layer. Discover its resilient, session-aware design handling message framing and request tracking for seamless Chrome DevTools Protocol integration via a Promise-based int...

- Tags: architecture
- Published: 2026-07-27

### [How to Use Task Space Handoff and Takeover APIs in ego-lite](/citrolabs/ego-lite/how-to-use-task-space-handoff-and-takeover-apis)

Learn to use ego-lite task space handoff and takeover APIs. Transfer and reclaim browser control programmatically with handOffTaskSpace() and takeOverTaskSpace() helpers.

- Tags: how-to-guide
- Published: 2026-07-27

### [How to Handle JavaScript Dialogs in ego-lite: Detection and Resolution Patterns](/citrolabs/ego-lite/how-to-handle-javascript-dialogs-in-ego-lite)

Learn to handle JavaScript dialogs in ego-lite using CDP Page events. Discover detection patterns and resolution strategies to accept, dismiss, or respond to prompts effectively.

- Tags: how-to-guide
- Published: 2026-07-27

### [What's the Difference Between serverFetch and BrowserFetch in ego-browser?](/citrolabs/ego-lite/difference-between-serverfetch-and-browserfetch-ego-browser)

Discover the difference between serverFetch and browserFetch in ego-browser. Learn how serverFetch uses Node.js fetch while browserFetch leverages the controlled browser's context for HTTP requests.

- Tags: deep-dive
- Published: 2026-07-27

### [How ego-lite Manages CDP Sessions and Automatic Re-attachment](/citrolabs/ego-lite/how-does-ego-lite-handle-session-management-and-re-attachment)

Discover how ego-lite manages CDP sessions with a 2-second TTL and automatic re-attachment. Learn about its centralized state management and transparent retry logic.

- Tags: internals
- Published: 2026-07-27

### [How to Implement Custom Site-Specific Learnings in ego-lite: A Complete Developer Guide](/citrolabs/ego-lite/how-to-implement-custom-site-specific-learnings-in-ego-lite)

Learn to implement custom site-specific learnings in ego-lite. This guide shows developers how to create custom AI agent behaviors using manifest.json and JavaScript for targeted site interactions.

- Tags: how-to-guide
- Published: 2026-07-27

### [How the Snapshot/Ref Workflow Works in ego-browser: Stable References for AI Agents](/citrolabs/ego-lite/how-does-snapshot-ref-workflow-work-in-ego-browser)

Understand the snapshot/ref workflow in ego-browser for stable AI agent references. Learn how it maintains element IDs with automatic DOM snapshot refreshes.

- Tags: how-to-guide
- Published: 2026-07-27

### [What Locator Strategies Does ego-browser Support? A Complete Guide to Element Selection](/citrolabs/ego-lite/what-locator-strategies-does-ego-browser-support)

Discover the 11 locator strategies ego-browser supports for effortless element selection including CSS XPath ARIA roles text and more Learn effective techniques for web automation

- Tags: deep-dive
- Published: 2026-07-27

### [How to Use CDP Evaluation APIs in ego-browser: Complete Guide](/citrolabs/ego-lite/how-to-use-cdp-evaluation-apis-in-ego-browser)

Learn to use CDP evaluation APIs in ego-browser. This guide shows how to control the embedded browser and extract data using cdp() and evaluate() helpers in your scripts.

- Tags: how-to-guide
- Published: 2026-07-27

### [Understanding Ego‑Lite's Task Space Ownership Model: Agent vs User Control](/citrolabs/ego-lite/how-does-ego-lite-task-space-ownership-model-work)

Explore ego-lites task space ownership model. Understand agent versus user control for autonomous AI operations and human oversight. Learn how ego-lite governs AI permissions.

- Tags: deep-dive
- Published: 2026-07-27

### [Understanding the @N Ref System (backendNodeId) in ego-browser and How RefMap Rebuilds on Snapshots](/citrolabs/ego-lite/ego-browser-n-ref-system-backendnodeid-refmap-rebuild)

Explore the @N ref system in ego-browser and how it uses backendNodeId for stable DOM references. Learn how the RefMap rebuilds on snapshots to maintain page state synchronization.

- Tags: internals
- Published: 2026-07-26

### [How `useOrCreateTaskSpace` Differentiates Between User-Owned and Agent-Owned Spaces](/citrolabs/ego-lite/ego-browser-useorcreatetaskspace-user-vs-agent-owned)

Discover how useOrCreateTaskSpace differentiates user-owned and agent-owned spaces by checking the ownership field. It prioritizes agent spaces and respects user control for user-owned ones.

- Tags: internals
- Published: 2026-07-26

### [How to Use `page.locator` with Playwright-Style Methods (`first`, `nth`, `last`, `filter`) in ego-browser](/citrolabs/ego-lite/ego-browser-pagelocator-playwright-methods)

Master ego-browser's page.locator with Playwright-style methods like first, nth, last, and filter for efficient DOM element selection and testing.

- Tags: how-to-guide
- Published: 2026-07-26

### [How browserFetch Differs from serverFetch in ego-browser: Network Origin Explained](/citrolabs/ego-lite/ego-browser-browserfetch-vs-serverfetch-network-origin)

Discover how ego-browser's browserFetch and serverFetch differ in network origin. Understand their unique execution environments and implications for HTTP requests.

- Tags: deep-dive
- Published: 2026-07-26

### [Snapshot vs snapshotRaw in ego-browser: Key Differences and When to Use Each](/citrolabs/ego-lite/ego-browser-snapshot-vs-snapshotraw)

Understand the difference between page.snapshot and page.snapshotRaw in ego-browser. Learn when to use the human-readable string or the structured object for your needs.

- Tags: deep-dive
- Published: 2026-07-26

### [How File Uploads Work with the setInputFiles Method in ego-browser](/citrolabs/ego-lite/ego-browser-file-uploads-setinputfiles)

Learn how file uploads work in ego-browser using the setInputFiles method. Upload files programmatically with Chrome DevTools Protocol integration.

- Tags: how-to-guide
- Published: 2026-07-26

### [elementCenter vs boundingBox in ego-browser: Understanding Element Positioning Helpers](/citrolabs/ego-lite/ego-browser-elementcenter-vs-boundingbox)

Understand elementCenter vs boundingBox in ego-browser for precise element positioning. Learn how each helper provides unique viewport data for developers.

- Tags: deep-dive
- Published: 2026-07-26

### [How to Perform Mouse Drag Operations in ego-browser Using Coordinate Arrays vs. Selectors](/citrolabs/ego-lite/ego-browser-mouse-drag-coordinates-vs-selectors)

Master ego browser mouse drag operations. Learn to use coordinate arrays and selectors with the dragMouse helper for efficient UI automation. Optimize your tests.

- Tags: how-to-guide
- Published: 2026-07-26

### [How Locator Filter Selectors Work in ego-browser: hasText, hasNotText, has, and hasNot Explained](/citrolabs/ego-lite/ego-browser-locator-filter-selectors-usage)

Master ego browser locator filter selectors like hasText, hasNotText, has, and hasNot. Learn how to precisely target DOM elements using text matching and descendant checks for efficient web scraping.

- Tags: how-to-guide
- Published: 2026-07-26

### [How to Record Screencasts in ego-browser Using `page.screencast.start()`](/citrolabs/ego-lite/ego-browser-screencast-recording-api-usage)

Learn to record ego-browser screencasts using page.screencast.start() capture viewport as a silent VP8 WebM video. Get automatic stop on dispose.

- Tags: how-to-guide
- Published: 2026-07-26

### [How Ego‑Browser Handles JavaScript Dialogs (alert, confirm, prompt)](/citrolabs/ego-lite/ego-browser-javascript-dialog-handling)

Discover how Ego-Browser handles JavaScript dialogs like alert, confirm, and prompt. Learn about its interception via Chrome DevTools Protocol and session-scoped storage to keep your tests running smoothly.

- Tags: internals
- Published: 2026-07-26

### [How the Ego-Browser Learning Subsystem Loads and Executes Site-Specific Browser Tools](/citrolabs/ego-lite/ego-browser-learning-subsystem-tool-execution)

Discover how the ego-browser learning subsystem loads and executes site-specific tools. Learn about dynamic JavaScript loading, async IIFE wrapping, and CDP dispatch.

- Tags: internals
- Published: 2026-07-26

### [Understanding the Task Space Handoff Protocol Between Agent and User Control in ego-browser](/citrolabs/ego-lite/ego-browser-task-space-handoff-protocol)

Learn how ego-browser's task space handoff protocol safely transfers control from AI to user. Discover validation, ownership verification, and secure method invocation for seamless transitions.

- Tags: deep-dive
- Published: 2026-07-26

### [How to Implement Custom Agent Helpers Using the agent_helpers.js Extension System in ego-browser](/citrolabs/ego-lite/ego-browser-custom-agent-helpers-extension)

Learn to implement custom agent helpers in ego-browser using the agent_helpers.js extension system by creating a file in your agent's workspace and leveraging the helperContext function.

- Tags: how-to-guide
- Published: 2026-07-26

### [Event Buffering System Architecture in ego-browser: Understanding the 10K IOk Cap](/citrolabs/ego-lite/ego-browser-event-buffering-architecture-10k-cap)

Explore the ego-browser event buffering system and its 10k IOk cap. Learn how it captures CDP events efficiently, preventing memory overflow with a FIFO queue.

- Tags: architecture
- Published: 2026-07-26

### [How the Snapshot Mechanism Works in ego-browser: Configuration and Implementation](/citrolabs/ego-lite/ego-browser-snapshot-mechanism-configuration)

Discover how ego-browser's snapshot mechanism captures semantic DOM views and maintains numeric references. Learn about configuration options like maxResultLength and includeRefs.

- Tags: deep-dive
- Published: 2026-07-26

### [Session TTL in ego-browser: How 2-Second CDP Caching Impacts Session Management](/citrolabs/ego-lite/ego-browser-session-ttl-cdp-impact)

Understand how ego-browser's 2-second session TTL impacts CDP session management. Learn how this short cache affects session reuse and recreation for smoother debugging.

- Tags: deep-dive
- Published: 2026-07-26

### [How the Site Skills System in Ego-Browser Discovers and Executes Site-Specific Tools](/citrolabs/ego-lite/ego-browser-site-skills-tool-execution)

Discover how ego-browsers site skills system matches URLs with manifest.json patterns to dynamically execute site-specific Node.js or browser JavaScript for automation.

- Tags: internals
- Published: 2026-07-26

### [Locator Facade Architecture in ego-browser: How Selector Resolution Functions](/citrolabs/ego-lite/ego-browser-locator-facade-selector-resolution)

Discover ego-browser's locator facade architecture and understand how selector resolution handles CSS, XPath, rolre locators, and numeric refs with automatic retries.

- Tags: architecture
- Published: 2026-07-26

### [How ego-browser Handles CDP Session Management and Automatic Re-attachment After Session Loss](/citrolabs/ego-lite/ego-browser-cdp-session-management-reattachment)

Learn how ego-browser manages CDP sessions and automatically re-attaches after loss. Discover its resilient caching and retry logic for seamless Chrome DevTools Protocol integration.

- Tags: internals
- Published: 2026-07-26

### [claimTaskSpace vs useOrCreateTaskSpace in ego-browser: Task Space Ownership Explained](/citrolabs/ego-lite/ego-browser-claimtaskspace-vs-useorcreatetaskspace)

Understand the difference between claimTaskSpace and useOrCreateTaskSpace in ego-browser. Learn how to manage task space ownership effectively with ego-lite in Citrolabs.

- Tags: deep-dive
- Published: 2026-07-26

### [How Ego-Browser Manages Task Space Ownership and Control Handoff Between Agents and Users](/citrolabs/ego-lite/ego-browser-task-space-ownership-and-handoff)

Learn how ego-browser manages task space ownership and control handoff between agents and users using strict ownership flags and atomic helper functions to prevent race conditions.

- Tags: internals
- Published: 2026-07-26

### [How ego-browser's Element Resolver Integrates with the Accessibility Tree for Resilient AI Automation](/citrolabs/ego-lite/ego-browser-element-resolver-accessibility-tree-integration-architecture)

Explore ego-browser's element resolver integration with the accessibility tree for resilient AI automation. Learn how this two-tier architecture ensures robust element location against DOM changes.

- Tags: architecture
- Published: 2026-07-24

### [How the Pointer and Keyboard Drivers in Ego-Browser Implement Click, Fill, and Press Interactions](/citrolabs/ego-lite/ego-browser-pointer-keyboard-drivers-interaction-implementation)

Discover how Ego-Browser's PointerDriver and KeyboardDriver use Chrome DevTools Protocol to perform reliable clicks, fills, and key presses. Learn about interaction implementation.

- Tags: internals
- Published: 2026-07-24

### [How ego-browser Handles Chrome Data Migration and Login Inheritance](/citrolabs/ego-lite/ego-browser-chrome-data-migration-login-inheritance)

Discover how ego-browser manages Chrome data migration and login inheritance. Learn how ego-lite ensures cookies and logins persist across automation tasks for a seamless experience.

- Tags: internals
- Published: 2026-07-24

### [Understanding the Helper Context Architecture and Page/Browser Facades in ego-browser](/citrolabs/ego-lite/ego-browser-helper-context-page-browser-facade-architecture)

Explore the ego-browser helper context architecture and its page/browser facades. Gain a Playwright-style API for AI agents to control browser tabs, navigation, and task isolation.

- Tags: architecture
- Published: 2026-07-24

