Space Agent

Space Agent: The AI That Rewrites Its Own Interface While You Watch Every AI agent you've ever used shares a fundamental limitation: the interface is fixed. Someone else designed the chat window, the terminal, the web dashboard. The agent can think, reason, and execute — but it can't change how you see and interact with it. The interface is a wall the agent can talk through but never reshape. Space Agent from the Agent Zero project tears that wall down. At 1,100+ GitHub stars and growing fast, it's not the biggest agent project. But it might be the most radical. It doesn't just have a web UI — it lives in the web UI. And it can change that UI at runtime, in real time, based on what you ask it to do. ─── What Space Agent Actually Is Space Agent is a browser-native AI agent. Not "it has a web UI." Not "there's a frontend that talks to a backend agent." The agent literally executes inside your browser's JavaScript runtime. It runs in the same environment that renders the page you're looking at. This architectural choice — described by creator Yan as "the agent lives and executes inside the browser's JavaScript runtime" — unlocks capabilities no other agent has. Because the agent and the UI share the same runtime, the agent can mutate the DOM directly. It can create new interface elements on the fly. It can build dashboards, widgets, games, and tools — not by generating static images or running a server-side process, but by writing and injecting JavaScript that runs right there in your tab. You ask for a crypto dashboard. It fetches prices via API, generates renderer functions, and draws ticker prices, charts, and news feeds directly onto an infinite canvas grid — all instantly, all interactive. You say "make me four world clocks for Tokyo, Rome, London, and New York." Sixty seconds later you have live-updating clocks. 7,000 tokens total, including refinements. You want a notes app with folders, markdown support, and drag-and-drop? It builds one. From scratch. In your browser. ─── The Core Innovation: Client-Side Agency This is the conceptual breakthrough that makes Space Agent different from everything else: Most agent architectures stack layers. The agent runs on a server (Python, Node.js). You interact through an intermediary: Telegram, Discord, a terminal, or a pre-built web dashboard. The agent controls its own layer but cannot touch the layers above it. Space Agent collapses the stack. The agent runs on the client side — the same layer that renders the UI. When it needs to show you something, it doesn't generate an artifact and hope the right software opens it. It writes code into the page you're looking at. This matters for three reasons:

1. Instant, Interactive Output When Space Agent builds a weather widget, it's not a generated image. It's a live, interactive component — JavaScript, HTML, and CSS — that updates, responds to clicks, and can be modified further. The agent can come back to it later and add features.

2. Token Efficiency Through Architecture Space Agent doesn't use tool calling, structured output, or JSON schemas. Those add overhead — sometimes doubling the token cost of an interaction. Instead, Space Agent uses natural language for everything. When it needs to execute code, it appends a two-token marker (__javascript) followed by raw JavaScript. The browser detects the marker and runs the code. Web browsing is similarly lean. A full session that navigates to Google, accepts cookies, searches for "agent zero," opens the official site, navigates to GitHub, and finds the oldest release — the entire browsing part adds just 6,000 tokens. The trick: website DOM trees get transcribed into lists of images, links, and text elements in "transient space" — appended after the last caching breakpoint so they don't accumulate in chat history. Yan is explicit about the philosophy: "It's much more important for a codebase to be optimized for agents than for humans."

3. True Persistence Without Infrastructure Widgets persist across page refreshes because their state lives in the DOM. Spaces are just folders of text files — kilobytes, not gigabytes. No database, no Redis, no S3. Close the tab, come back in a week, and your workspace is exactly how you left it. ─── How It Works Under the Hood Space Agent runs entirely on standard web technologies: • Frontend: React + TypeScript, rendered in a browser tab • Agent execution: Browser JavaScript runtime — no WebAssembly, no plugins • LLM communication: Direct API calls to your chosen provider (OpenRouter with 200+ models, Anthropic, OpenAI, or local models via WebGPU) • Persistence: Widgets saved as text files. An optional thin Node.js backend handles file storage and permissions for multi-user setups The backend, when used, is deliberately dumb. It serves files and manages permissions. It never runs agent logic. All reasoning and UI generation happens client-side. This means: •   No server costs for inference (you pay only for LLM API calls) •   No data leaves your machine unless you choose a cloud model •   Instant UI updates — no page reloads, no WebSocket latency •   Full browser APIs available: Canvas, Audio, WebGL, file system access ─── The Skill System: Everything Is a SKILL.md Space Agent's modularity is built into its foundation. Every capability — the browser, the spaces system, development documentation, even core framework pieces — lives as a SKILL.md file in a virtual filesystem. The agent can read these files. And it can modify them. "Everything in the framework including the core is built as a module," Yan explains. "Modules can be added or removed at any time, and they can be developed by the agent itself." No server restart. No rebuild. The agent extends its own capabilities at runtime. This creates a feedback loop that no other agent system has: the agent gets better over time not because the model improved, but because the agent wrote better tools for itself. ─── Documentation-Driven Development Space Agent uses a hierarchical AGENTS.md system — Markdown documentation that lives alongside the code. When the agent needs to modify a widget or extend a capability, it reads the relevant documentation first to understand design intent, constraints, and patterns. This solves the core problem that plagues AI-assisted development: context fragmentation. Without persistent documentation, agents rewrite working code because they forgot why it was written that way, introduce breaking changes by not understanding dependencies, and repeat the same mistakes across sessions. With AGENTS.md files, the agent has persistent, searchable memory of design decisions. It's a blueprint for how all AI-assisted development should work. ─── Multi-User Architecture: Personal to Hierarchical Space Agent supports deployment from personal use to team infrastructure: • Per-user isolation: Users build in their own layer without affecting anyone else • Group sharing: Teams can share tools, workflows, and behavior when ready • Permission granularity: Read-only or read-write per folder, per group • Home directory development: Users can create custom capabilities in their home directory that only they see An accounting department could have specialized financial tools. An engineering team could share deployment scripts. Individual users keep personal workflows private. All in the same instance. ─── Time Travel and Admin Mode Self-modifying systems raise an obvious question: what happens when the agent writes buggy code that breaks its own runtime? Space Agent handles this better than any agent framework I've seen. Every user and group folder maintains an automatic Git repository. Break something? Revert to any previous state immediately.

The page won't even render? Admin mode splits the screen — one side runs static firmware that lets you browse files and time travel even when the main interface is completely broken. It's a control plane separate from the agent's workspace, inspired by what makes hardware devices recoverable. ─── Sandboxed Sharing One of the most practical features: create something interesting and generate a share link. Recipients open it in their browser without installing anything. "They don't need to worry about malicious code stealing their secrets," Yan notes — the shared workspace runs isolated in their browser, separate from their own Space Agent instance. No risk to their data, no installation friction. This lowers the barrier between "I built something cool" and "someone else can use it" to almost zero. Expect to see interactive AI-built tools shared the way people share Notion templates or Figma mockups. ─── The Rough Edges Space Agent is young. 47 open issues, 1,100 stars — this is an early-stage project from a small team (Agent Zero). It's not battle-tested at scale. Browser-sandbox limitations are real. Everything runs in the browser sandbox. No native OS control. No desktop app integration beyond what JavaScript can do. UI-TARS can click system tray icons and change OS settings; Space Agent cannot. Dependent on your LLM. Space Agent provides an efficient runtime, not better AI. If your chosen model can't handle the task, no amount of architectural cleverness helps. The system prompt is 9,000 tokens, leaving roughly 7,000 for conversation context — tight for complex multi-turn work. WebGPU inference is aspirational. Local model inference via WebGPU works but requires "a beefy GPU." Yan is realistic: "I don't expect the speed to be great here." For practical use, you'll be calling cloud APIs. The demo server's guest accounts are temporary. Deleted after a few days of inactivity. Self-hosting is straightforward but adds a Node.js process to manage. ─── How It Compares copy
| Aspect               | Space Agent                  | UI-TARS Desktop             | holaOS                  | OpenClaw/Hermes       |
| -------------------- | ---------------------------- | --------------------------- | ----------------------- | --------------------- |
| Where agent runs     | Browser JS runtime           | Model backend + OS          | Electron desktop        | Server-side           |
| Interface mutability | Agent builds UI in real time | Sees but doesn't reshape    | Shared visual workspace | Fixed (terminal/text) |
| OS-level control     | No (browser sandbox)         | Yes (native mouse/keyboard) | Via agent harness       | Shell only            |
| Token efficiency     | Very high (no JSON/tools)    | Moderate                    | Moderate                | Low (JSON tool calls) |
| Self-modification    | Agent extends its own skills | No                          | No                      | No                    |
| Multi-user           | Hierarchical, built-in       | No                          | Workspace-level         | Single-tenant         |
| Time travel/rollback | Git-backed, admin mode       | No                          | Via filesystem          | Backups only          |
| License              | MIT                          | Apache 2.0                  | Modified Apache 2.0     | MIT                   |
| Stars                | 1.1K+                        | 31K+                        | 4.5K+                   | 370K+ (OC)            |
| Maturity             | Early (Mar 2026)             | Production (1yr+)           | Mid                     | Varies                |

Space Agent occupies a unique position. It's not trying to control your OS (UI-TARS) or be a shared desktop (holaOS) or be a personal terminal agent (OC/Hermes). It's trying to answer a different question: what happens when the agent is the interface?

─── Who This Is For

Space Agent is for builders who want their AI to build with them. If your workflow involves: • Rapidly prototyping interactive dashboards and tools • Creating custom visualizations from data without writing frontend code • Exploring ideas visually — "show me what that would look like" • Sharing interactive AI-built tools without recipients installing anything • Extending your agent's capabilities over time through self-written skills ...Space Agent offers something no other agent can. It's also for developers who care about token economics. The architectural efficiency gains — no JSON tool schemas, transient web browsing messages, two-token code execution markers — add up to real savings at scale. If you're paying per token, Space Agent's approach cuts overhead dramatically. ─── Links: • Website: space-agent.ai — try it live, no install • GitHub: github.com/agent0ai/space-agent — 1.1K+ stars, MIT license • Demo: Guest account with one click, just add your API key • Self-host: git clone && npm install && node space serve • Discord: discord.gg/B8KZKNsPpj • DeepWiki: deepwiki.com/agent0ai/space-agent