Space
The parallel workspace where agents run web tasks inside ego lite.
A Space is a parallel workspace ego lite carves out for an AI agent. The agent opens pages, reads them, clicks, fills forms, and downloads files inside its Space while you keep working in your own tabs. Both sides share one ego lite browser process, but neither interrupts the other.
What it is, and what it isn't
A Space is:
- A parallel workspace inside the same ego lite browser process.
- One isolated BrowserContext per task, with its own cookies and storage.
A Space is not:
- Not a new browser window or a new Chrome profile.
- Not headless Chrome or offscreen rendering.
- Not a cloud browsing session — every byte stays on your machine.
Why Space exists
When you want an agent to drive a real browser, the usual answer is to spin up a separate Chromium instance per task (headless, or with a profile copy). Chrome's user-data-dir is normally locked to a single process, so reusing your real logins across many sessions means either fighting for the lock or copying the profile into a temp directory.
Space takes a different route: every agent task shares ego lite's main process and gets its own native BrowserContext for cookies and storage, while reusing the browser infrastructure and the login environment you already have.
A six-way concurrent test that only opens about:blank:
| Approach | Memory added | Processes added | Concurrent start time |
|---|---|---|---|
| Separate browser instances + profile copy | ~15 GB | ~84 | ~2.5 s |
| ego lite Space | ~0.9 GB | ~6 | ~0.6 s |
The numbers exist to show the resource model, not to be a precise benchmark. Real costs shift with page complexity, extensions, site scripts, and concurrency.
What belongs in a Space
Use a Space when you need a real browser, a real login, or file interaction:
- Logged-in dashboards, personal workspaces, order pages, private docs.
- Anything that needs clicking, typing, paging, filtering, uploading, or downloading.
- Reusing the logins already in ego lite, instead of re-authenticating every time.
- Tasks you want to audit afterwards — which pages did the agent visit, what did it do.
For purely public information, a regular web search is lighter.
How you and the agent collaborate
While the agent works in its Space, it doesn't steal your current page, mouse, or focus. You can keep browsing, or jump into a Space anytime to see progress.
A typical flow:
- You describe a web task in Codex, Claude Code, Cursor, or another agent.
- The agent uses
ego-browserto write code that drives the browser, opening the target site in a Space. - The agent reads a Snapshot and acts on it.
- For steps that need you — captcha, QR-code login, payment confirmation — the agent pauses and waits for you to step in.
- Once you're done, the agent continues.
- After the task finishes, the tabs in the Space stay open so you can audit.
Logged-in state
For sites you're already signed into in ego lite, the agent normally lands directly on the post-login page — no cookie re-import needed.
The agent should pause and hand control back for situations like:
- SMS or email codes, QR-code login, hardware security keys.
- Payment, ordering, transfers, refunds.
- Publishing, deleting, archiving, or any bulk modification that isn't easy to undo.
- Authorizing a third-party app to access your account.
You can also draw the boundaries up front, e.g. "read-only, don't modify" or "stop and confirm before submitting."
Many tasks at once
A Space can hold multiple tasks at once, each with its own tabs, cookies, and storage. useOrCreateTaskSpace(name) reuses or creates a space by name, and the rest of the script runs inside it:
ego-browser nodejs <<'EOF'
const task = await useOrCreateTaskSpace('describe your task')
await openOrReuseTab('https://example.com', { wait: true, timeout: 20 })
cliLog(await snapshotText())
await click('button.primary', { label: 'click the submit button' })
EOF
Different tasks don't share page refs. After navigation, form submit, tab switch, or any dynamic rerender, take a fresh snapshot — see Snapshot.
Install and enable
Ships with ego lite — see Quick start.
If you already use a Skills-capable agent, you can install the skill standalone:
npx skills add github:CitroLabs/ego-lite/skills/ego-browser
FAQ
Will a Space affect my current page?
No. The agent works inside the Space; your tabs, focus, and mouse aren't touched.
Do the tabs close after the task?
No. The Space keeps the tabs around so you can review what the agent did.
When don't I need a Space?
When you're just searching public material or summarizing a public page — and don't need a login or interactive browser — a regular web search is the simpler tool.