Sandbox
@sligter/OnePagent

Single-file browser workbench for AI agents

OnePagent puts an AI agent workbench into one HTML file. It runs in the browser and supports chat, tool use, skills, memory, MCP server imports, and Python execution without a backend.

157 stars18 forksHTMLUpdated 1mo ago
Who it's for

Builders who want a browser-based agent workspace they can run locally or deploy as static files.

What it delivers

You can run and extend an agent workflow from one local page instead of wiring up a separate app and backend.

What it does

Single-file deployment

Open `onepagent.html` locally or put it on any static host.

Multi-provider model support

Connect Anthropic, OpenAI, or DeepSeek endpoints with BYOK keys stored in the browser.

Long-term memory

Save facts, preferences, events, and skills across sessions with search and CRUD tools.

Skills system

Install `.skill` and `.zip` packs, pull from GitHub, or create skills in the app.

MCP server import

Paste `mcpServers` JSON to add `streamable_http` or `sse` connectors.

Python sandbox

Run Python in-browser through Pyodide, with an optional remote sandbox for heavier tasks.

Agent workflows

Use Plan Mode, Ralph Loop, sub-agents, human approval prompts, and swarm-style parallel runs.

Cloud sync

Sync browser state to S3-compatible storage with optional AES-256-GCM encryption.

How to get it

  1. 1Run
    git clone https://github.com/sligter/OnePagent.git
    cd OnePagent
  2. 2Double-click onepagent.html, or serve it from any static server
    python -m http.server 8000
    # or
    npx serve .

README

OnePagent

OnePagent

One Page, Omnipotent Agent.

The browser-native AI agent workbench that lives in a single file.

HTML Zero Build BYOK License

English  |  简体中文

Live Demo  ·  Deploy Your Own  ·  Configuration


Open one HTML file and you get a fully-featured, internet-aware, programmable, extensible AI agent — multi-turn chat, tool calls, Python sandbox, web search, skills, context compaction, long-term memory, file operations, cloud sync — all running on a single page.

No backend. No npm install. No Docker. Just one .html that carries an entire universe.


Preview

OnePagent preview


Highlights

CapabilityDescription
Single-file deploymentDrop onepagent.html on any static host or open it locally
Multi-provider LLMAnthropic / OpenAI / DeepSeek with custom endpoints; BYOK keys are stored locally and sent directly to the configured API endpoint
Reasoning levelsInline selector with OpenAI none / low / medium / high / xhigh / max tiers (plus Auto)
Long context compactionPer-model context window with automatic LLM-driven summary compression
Long-term memoryOpt-in persistent facts / preferences / events / skills across sessions — auto-extraction, agent tools, manual CRUD, tag & keyword search
MCP ServersPaste mcpServers JSON to import (streamable_http / sse), Bearer auth, optional CORS proxy
Plan ModeAgent investigates with read-only tools, drafts a Markdown plan for approval, then executes
Ralph LoopFully unattended continue-until-done mode with marker, max/unlimited iterations, Stop, and no-progress guard
Sub-agentsDelegate bounded read-only research tasks and monitor runs in the side panel
Agent SwarmOpt-in parallel orchestrator-worker fanout: lead emits multiple SwarmSpawn calls in one turn, role-scoped workers (researcher / critic / writer / coder) run concurrently with token budgets
Human-in-the-loopAgent can ask for text, choices, or confirmations when a task needs user input
TodoWriteAgent maintains a visible task list (pending / in-progress / completed)
HooksUser-defined JS handlers on 6 agent lifecycle events
Python sandboxExecute Python in-browser via Pyodide
Remote sandboxOptional isolated runtime for heavier code tasks
Web SearchTavily integration with basic / advanced depth modes
Skills systemInstall .skill / .zip packs, pull from GitHub, create in-page, or let AI manage skills with SkillManager
Conversation managementMultiple sessions, folders, drag-and-drop, IndexedDB persistence, one-click export
Cloud SyncIncremental sync to S3-compatible buckets with optional AES-256-GCM encryption

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    onepagent.html                           │
│  ┌───────────┐  ┌──────────┐  ┌────────────┐  ┌──────────┐  │
│  │  UI Shell │  │  Chat /  │  │  Tools /   │  │  Skills  │  │
│  │ (3-column)│  │  Streams │  │  MCP Bus   │  │ Registry │  │
│  └─────┬─────┘  └────┬─────┘  └─────┬──────┘  └────┬─────┘  │
│        │             │              │              │        │
│  ┌─────┴─────────────┴──────────────┴──────────────┴─────┐  │
│  │          Pretext Layout Engine (inlined)             │  │
│  │  markdown → blocks → lines → flowed DOM              │  │
│  └──────────────────────────────────────────────────────┘  │
│        │                                                    │
│  ┌─────┴───────┐ ┌──────────────┐ ┌───────────┐ ┌────────┐  │
│  │ Service     │ │ LocalStorage │ │ Pyodide   │ │ S3     │  │
│  │ Worker      │ │ + IndexedDB  │ │ (Python)  │ │ SigV4  │  │
│  │ (PWA cache) │ │ (all state)  │ │           │ │ Client │  │
│  └─────┬───────┘ └──────────────┘ └───────────┘ └───┬────┘  │
└────────┼──────────────────────────────────────────────┼─────┘
         │                                              │
         ▼                                              ▼
  ┌──────────────┐  ┌────────────┐  ┌──────────┐  ┌─────────────┐
  │  Anthropic   │  │  OpenAI    │  │  Tavily  │  │ Your bucket │
  │  DeepSeek    │  │  …         │  │          │  │ AWS/R2/MinIO│
  └──────────────┘  └────────────┘  └──────────┘  └─────────────┘

Getting Started

git clone https://github.com/sligter/OnePagent.git
cd OnePagent

Double-click onepagent.html, or serve it from any static server:

python -m http.server 8000
# or
npx serve .

Visit http://localhost:8000/onepagent.html, click Settings in the top bar to configure Provider / API Key / Models. Takes effect immediately.

Service Worker note: the bundled sw.js is only a PWA/offline cache for the app shell and static assets. LLM and Tavily requests are browser direct fetches with the configured BYOK credentials; the Service Worker does not proxy, inject, or hide API keys.


Skills

Install skills from the left Skills panel via Market, .skill/.zip, GitHub, or Create. GitHub folder URLs are supported, e.g. https://github.com/anthropics/skills/tree/main/skills/skill-creator.

The agent can also use SkillManager to list, install, update, enable/disable, or remove skills; remote installs and destructive/high-risk changes require confirmation.


Remote Sandbox

Remote sandbox gives OnePagent an optional isolated runtime for code-heavy work while keeping the app itself a single static HTML file.


Deploy

OnePagent is a pure static site — runs on any static host:

Deploy with Vercel   Deploy on Zeabur   Deploy to Cloudflare Pages

PlatformSteps
VercelClick button, sign in, Deploy — done in ~10 seconds
ZeaburClick button, select your fork, auto-detected as static, Generate Domain
Cloudflare PagesConnect to Git, Framework: None, Build command: empty, Output: /, Deploy
GitHub PagesSettings, Pages, Source: GitHub Actions, push to deploy

All data lives in the browser. Different domains do not share state. Use Cloud Sync for cross-domain / cross-device sync.


Cloud Sync

Back up and sync across devices via any S3-compatible bucket. Configure it in Settings → Cloud Sync.

  • Supports AWS S3, Cloudflare R2, Backblaze B2, and MinIO.
  • Required fields: Endpoint, Region, Bucket, Access Key ID, and Secret Access Key.
  • Optional: Prefix, AES-256-GCM encryption passphrase, auto-push, and path-style URLs for MinIO / R2.
  • Use Test connection / Show CORS config in Settings, then Sync → Push now / Pull now from the top bar.
  • LLM keys stay device-local and are never synced.

Ralph Loop

Ralph Loop keeps the agent working after a normal response ends. Turn on Ralph, send a task, and OnePagent will re-enter it until it sees the completion marker or a guard stops the run.

  • Configure defaults in Settings → Ralph Loop: max iterations, Unlimited, and completion marker (default RALPH_DONE).
  • Use the top-bar Stop button to cancel a run.
  • AskUser uses defaults or cancels instead of opening a modal; Plan Mode is never auto-approved.

Example: Audit this page, fix what you can, and when finished include RALPH_DONE.


Memory

Long-term memory stores reusable facts across conversations. Enable it in Settings → Memory.

  • Stores fact / preference / event / skill / note records in IndexedDB.
  • Optional auto-extraction keeps durable facts after assistant turns.
  • Recall uses recency, tags, keywords, and prompt caching.
  • Tools: memory_save, memory_search, memory_update, memory_forget.
  • Memory Viewer supports search, filters, JSON import/export, and retired records.

Agent Workflow

  • Sub-agents: the main agent can spawn bounded read-only research workers; runs and previews appear in the side panel.
  • Human-in-the-loop: AskUser supports text, choices, and confirmations for decisions the model should not guess.
  • Media tools: image/video generation is explicit through tools and configured generation models, not automatic after every turn.
  • Diagnostics: file-system diagnostics live in Settings → Diagnostics.

Agent Swarm

Opt-in parallel multi-agent runtime. Enable in Settings → Agent Swarm.

  • Fanout — lead emits several SwarmSpawn(role, task) calls in one turn; they run in parallel up to Max concurrency. Built-in roles: researcher, critic, writer, coder.
  • Handoff — workers chain via SwarmHandoff(role, brief), e.g. researcher → critic → writer. Cycles and depth-overflow rejected.
  • Blackboard — per-turn shared workspace: bb_write / bb_read / bb_list / bb_post_task / bb_claim. Latest entries auto-injected into each worker's prompt.
  • Custom roles — manage in the left Swarms panel: own system prompt, tool whitelist, handoff targets, budgets. bindSkills grants any installed skill's tools. JSON import / export.
  • RoleManager (opt-in) — lead-only tool that creates / updates / deletes / duplicates roles at runtime. Storage choice: memory, global, or per-conversation. Built-in and user-authored roles are protected.

Guards: per-worker and per-turn token budgets, concurrency cap, Plan Mode inheritance, Ralph Loop mutex, recursion blocked. Hooks pre_swarm_spawn / post_swarm_spawn join the existing six. Set Worker model override (e.g. Haiku) to keep workers cheap while the lead runs on a frontier model.

Best for breadth-first work (research, comparison). Skip for tightly coupled refactors.


Configuration

All settings and conversations live in the browser (localStorage + IndexedDB). OnePagent has no server; requests go from your browser to your configured API endpoint.


Contributing

Single-file project — fork it, edit it, send a PR.

  • Keep onepagent.html runnable on its own
  • Avoid dependencies that require a build step
  • index.html is a redirect shim only — no real logic

Star History

Star History Chart


Friends

  • Linux Do — A community for developers, by developers.

License

MIT (c) OnePagent contributors


One Page. Omnipotent Agent.

Built for people who believe a single HTML can still do everything.

Files in the repo

Repository payload12 top-level entries
  • .github
  • icons
  • .gitignore
  • CNAME
  • index.html
  • logo.svg
  • manifest.webmanifest
  • onepagent.html
  • README.md
  • README.zh.md
  • sw.js
  • test-regressions.js

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k