# This AI Agent can actually self-evolve… just watch <!-- ref: @content/youtube/david-ondrej/2026-04-27-this-ai-agent-can-actually-self-evolve-just-watch tags: [self-updating-agents, browser-based-agents, generative-ui, token-efficiency, agent-harnesses, vibe-coding, time-travel-versioning, local-inference] version: 2 updated_at: 2026-11-21T21:30:39.912Z --> **[Watch on YouTube](https://www.youtube.com/watch?v=F3ZzNgf-R7Y)** *Synthesized from Van, creator of Space Agent and founder of Agent Zero, in conversation with David on David Ondrej, 2026-04-27.* Van is the creator of Space Agent and the founder of Agent Zero; David hosts and asks the questions and also runs the demos on screen. The guest's name appears in the transcript only as "Van" (once as "Yan" in the closing), so only the first name is used. ## Core Thesis Van argues that most agents are stuck in the layer where they run, such as a Python or Node back end reached through WhatsApp or Telegram, so they can change files or skills but not the interface the user sees. Space Agent runs its agent in the browser's JavaScript runtime, so the agent can build and mutate the page itself, and it does this with a token-cheap protocol in which plain text is the default answer and JavaScript is the only extra step. ## Key Insights - **Client-side runtime:** the agent runs in the browser, so it can render "spaces" and widgets on demand (weather, charts, dashboards, a notes app, a Trello-style kanban board, a step sequencer). Van says the back end is only a thin Node.js layer that handles accounts, permissions and file storage, and the demo server runs at about 2% CPU and 6% memory. - **Token-efficient protocol:** a plain text reply ends the loop with no tool-call or JSON overhead. When the model needs to act, it emits a special token followed by JavaScript that runs in the browser. A weather check plus its reply took 97 tokens, and building a widget took about 280 tokens. - **Page transcription:** the agent does not read the HTML. The page is converted to markdown in which every interactive element gets a reference number (for example "button 47"), and the agent acts by number. Van says the context is about 13,600 tokens, only about 2,000 more than at the start. - **Transient context:** the changing state (such as the current widget source) is placed after the last cache breakpoint and replaced each turn, so it does not accumulate in history and the prompt cache is not broken. - **Widgets persist as functions:** the agent writes a function that rebuilds the widget, and the function is stored, so the widget survives refreshes and returns exactly as it was. - **Prompt iteration:** the system prompt was refined by automated research in Codex, generating three variants per round (conservative, medium, wild) with test suites, and it reached about version 250. - **Versioning:** each user and group directory is a git repository, so the user can travel back in time, for example undoing the last two hours of changes. An admin mode with a fixed firmware layer lets a broken UI be repaired. - **Modules:** the agent can write its own modules per user, per group or globally, which Van contrasts with Agent Zero's Python plug-in system and its dependency problems. - **Limits:** Van says it cannot install Linux packages or run a server, and it has no background jobs because it needs the front end open. Agent Zero covers those cases. The browser also avoids data-center IP blocks, since the code runs on the user's machine. - **Development approach:** Van wrote none of the code by hand and used Codex across six CLI windows. The project is documented in per-folder documentation files (captioned as agents.mmd), which Van calls the most important part of the project. He says he prefers Codex to Claude Code for disciplined updates to those files, and reports that Claude Code once spent about 2 hours and 20 iterations on one button alignment while claiming it was fixed. Van built the MVP in about two weeks and the product in about 25 days. - **Models:** the demos used Opus 4.7, and David notes that GPT-5.4 mini was fast but less reliable. Van says Gemma 4 was at least on par with it in his tests. Local inference is supported for models in the NNX format, with a 10 GB download and a beefy GPU needed. - **Setup:** a guest account is available on the demo site with no install. The default key path goes through OpenRouter, which gives access to several providers on one credit balance. ## Actionable Takeaways 1. Try the hosted version at space-agent.ai with a guest account, set an OpenRouter API key, and ask for a result first in chat and then "show it to me in a widget". 2. For a durable install, use the native app, which bundles the back end, so that data stays on the machine. Hosting it yourself on a VPS or local machine supports multiple users and groups. 3. To keep token costs down, put changing state at the end of the prompt after the last cache breakpoint, and do not keep old page snapshots in the history, since they add tokens on every later turn. 4. Keep a documentation file in every folder that the coding agent reads first, with rationale and "what not to do" notes, so that later edits repeat fewer mistakes. 5. Use the built-in git history to roll back a bad change instead of asking an agent to repair it. 6. Use a stronger model (Van and David use Opus 4.7 and Sonnet) for building widgets, and treat very small models as a source of unreliable JavaScript. ## Notable Quotes > "the agent can actually mutate the page that it's displayed on" — Van > "the problem with AI coding is that it cannot hold the full scope of the project in the context window" — Van > "Documentation is the most important part of this project" — Van --- *Related: `@content/youtube/starter-story/no-code-10k-mo-apps` · `@content/youtube/sean-kochel/3-step-claude-code-system-pro-level-designs` · `@content/youtube/nate-herk/karpathy-llm-wiki-obsidian-claude-code-setup` · `@content/youtube/liam-ottley/how-to-build-sell-ai-agents-in-2026-ultimate-beginners-guide` · `@content/youtube/bmad-code/better-than-vibe-coding-agile-ai-driven-developmen`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*