open spec · zero cloud · portable

LLM agents,
as URLs.

PocketAgent packs a complete agent — role, rules, few-shot examples, persona — into a single URL. Send it in a DM. Paste it into a gist. Print a QR on a sticker. Receivers install it with one click, and their local LLM takes on that agent's behavior. No server. No account. No cloud.

▸ chat in your browser → try a starter agent browse the registry adopt on your site
§01 · why

Every agent lives on someone's server. Until now.

The problem

OpenAI's GPTs live in OpenAI's store. Claude's Projects live in Anthropic's account. Custom instructions stick to one app. If you built a great agent, you can't just send it to a friend — you have to send them back to the host.

The move

Compress the whole agent into a URL fragment — a few hundred chars for a lean agent, up to a few KB for a maximal one. The fragment never touches a server (no access log, no referrer). Any page that reads window.pocketAgentRead() picks it up. The browser extension exposes that reader on every site. Paste, preview, install. Done.

§03 · extension

Install PocketAgent Companion.

The browser extension adds window.pocketAgentRead() to every site you visit (passive mode) and, with your per-domain opt-in, prepends your agent to chat textareas on sites like chat.openai.com, claude.ai, gemini.google.com, and chat.mistral.ai (active mode).

Load the dev build

git clone https://github.com/johnjboren/johnjboren.github.io.git
cd johnjboren.github.io/pocketagent-extension
# Chrome / Edge:
#   1. Visit chrome://extensions
#   2. Turn on Developer mode
#   3. Load unpacked → select this directory
# Firefox:
#   1. Visit about:debugging#/runtime/this-firefox
#   2. Load Temporary Add-on → pick manifest.json

Web store submission is a TODO. Until then, the unpacked load above is the install path. Read the extension README for the full spec.

§04 · quickstart

Adopt PocketAgent on your own site.

Three <script> tags and an opt-in attribute. After that, every URL with #pa=… gets a preview card; every <install-pocketagent> tag renders as a styled install button.

<html data-pocketagent-auto>
<head>
  <script src="https://johnjboren.github.io/scripts/pocketagent/pocketagent-codec.js"></script>
  <script src="https://johnjboren.github.io/scripts/pocketagent/pocketagent-reader.js"></script>
  <script src="https://johnjboren.github.io/scripts/pocketagent/pocketagent-ui.js"></script>
  <script src="https://johnjboren.github.io/scripts/pocketagent/pocketagent-embed.js"></script>
</head>
<body>
  <install-pocketagent href="https://example.com/#pa=H4sIAAA...">
    install pirate-reviewer
  </install-pocketagent>
</body>

Read the installed agent

This is exactly what a consumer page prepends to its LLM's system prompt:

show the API
const agent = window.pocketAgentRead?.() || '';
const systemPrompt = (agent ? agent + '\n\n' : '') + yourBasePrompt;

Compose your own URL

Build an agent here and get a shareable #pa= link + QR — all in your browser, nothing sent anywhere:

§05 · integrations

Works with anything that takes a system prompt.

In-browser (WebLLM)

Try your installed agent against a local LLM running entirely in your browser tab — no server, no API key.

▸ open chat

Ollama (local server)

Chat with a model from your local localhost:11434 Ollama server with the installed agent prepended automatically.

▸ open Ollama bridge

Remote APIs

Read pocketAgentRead() in your app, prepend to any system prompt you send to OpenAI, Anthropic, Mistral, etc. PocketAgent is provider-agnostic — it's just text.

▸ full spec

ZeroClaw (author & export)

Install an agent into The Editor's Desk, tune the persona against real sessions, then export the desk you tuned back out as a #pa= URL, QR, or signed PNG card — install it anywhere and it's the same agent. Installed back into ZeroClaw it becomes a native identity, deduped so the persona is never double-wrapped.

▸ open The Editor's Desk

Standards bridges (A2A · Skills)

Every agent also publishes an A2A-compatible Agent Card (/.well-known/agent-card.json), so a PocketAgent persona is legible to the agent-interop ecosystem; and a two-way SKILL.md bridge exports any persona as an Anthropic SKILL.md — installable in Claude Code, Codex, or Cursor — and imports one back.

▸ agent-card.json

Discovery index (one fetch)

One well-known URL — /.well-known/pocketagent-interop.json — lists every registry agent with its install link, A2A agent-card, and SKILL.md, so an A2A or Claude-Code client can discover the whole catalog from a single fetch. Each index entry carries a signed flag that matches whether that agent is Ed25519-signed in the registry, plus the short author-key fingerprint — so discovery clients can tell signed personas from unsigned ones before installing. The discovery index is generated deterministically and gated in CI, so it can never drift out of sync with the registry it indexes.

▸ interop.json

One-tag adoption

Any receiver adopts PocketAgent with one script tag: it lazy-loads the codec, reader, and preview modal it needs, detects an incoming #pa= agent, and routes it through the same install-preview path — never re-implementing the codec.

▸ pocketagent-auto.js

§06 · security

Untrusted by default.

§07 · spec

PocketAgent v1 specification.

Full schema, encoding format, storage keys, read API, and versioning rules: