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.

▸ try a starter agent install the extension 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 ~600 chars of URL fragment. 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

Prepend it to your own LLM's system prompt:

const agent = window.pocketAgentRead?.() || '';
const systemPrompt = (agent ? agent + '\n\n' : '') + yourBasePrompt;
// feed systemPrompt to WebLLM / Ollama / remote API

Compose your own URL

const payload = window.PocketAgent.buildPayloadFromLocalStorage({
  name: 'my-reviewer',
  role: 'You are a careful code reviewer…',
  tags: ['code review'],
  rules: ['always explain your reasoning'],
});
const { url } = await window.PocketAgent.composeUrl(payload);
// → "https://yoursite/#pa=H4sIAAA…"
§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

§06 · security

Untrusted by default.

§07 · spec

PocketAgent v1 specification.

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