Agent Socket · a link any AI agent can use

Every agent needs a connection.

Give any AI agent a link to your app or your browser.

Paste one link into Claude Code, Codex, Cursor, OpenCode or your own agent harness. The agent reads what it can do and does it over plain HTTPS: no MCP server, no OAuth, nothing to install on its side.

Try it on this page No install: connect this page, give your agent the link.

Open source, Apache 2.0Hosted, or run your ownLinks survive 24 h offline

0000

This page is an app too. Connect it, give your agent the link, and it works the switchboard above. Nothing connects until you press the button; Stop or leaving the page kills the link.
    A link: a patch cord in its socketCallers: an agent in the cloud, a terminal, a scriptThe relay as a switchboard. Every caller on the left reaches your tab or your app through one link, the patch cord. Close the laptop and the switchboard holds the line; open it and the same link carries on. Pull the plug and that link is dead.

    What's different

    01

    Most ways of letting an AI use your software tie you to one vendor or one machine. Agent Socket is a relay with one idea: your tab or app keeps an open line to it, and you give the agent a URL. Everything the agent does is an ordinary web request to that URL, answered by your tab or app as it happens.

    • It's a link, not a plugin. Anything that can send an HTTPS request can use it: Claude Code on your laptop or in a cloud session, Codex, Cursor, OpenCode, an agent harness of your own, a twenty-line script. An agent running in the cloud can work in the browser on your laptop, signed in as you. Browser helpers built into one AI product work with that product, on that computer.
    • Any web app can offer it. About ten lines of the SDK turn your app's actions into URLs an agent can call. There's no MCP server to host, no OAuth to set up and no backend of your own: the page itself answers. The Chrome extension is one app built this way.
    • A link that holds. If your laptop sleeps, the Wi-Fi drops or Chrome restarts the extension, the relay keeps the session for up to 24 hours and the agent is told to retry. When your side comes back, the same link works again; you don't paste a new one.
    • Skills agents share. A public registry of site profiles: notes and ready-made tools for a site, like reading Google Sheets' canvas grid. When you connect a tab, its site's profile loads, so the next agent doesn't spend ten minutes working the site out again. New profiles are reviewed before they're published.

    How it works

    02

    Here is one call, from the moment your tab or app connects to the moment the agent has its answer.

    one connection, held open while the session lastsThe agentClaude Code, OpenCode…The relayagentsocket.dev, or your ownYour tab or appthe extension, or the SDK1connects, lists its actionsa link for this session2you paste the link into the agent's chat3GET agents.md, tools.jsonanswered by the relay itself4POST …/click {"selector": …}forwarded down the open line{"clicked": true}done in your tab, the reply
    Your side opens the line; the agent only makes web requests. The relay answers the agent's reading itself and passes every action down the open connection.
    1. Your side connects. The extension, or your app through the SDK, opens one WebSocket to the relay and lists the actions it offers. It gets back a link for this session.
    2. You give the agent the link. Paste it into the chat. The agent fetches agents.md for instructions and tools.json for the list of actions; the relay answers both itself.
    3. Every action is a web request. The agent calls an action like any URL. The relay passes it down the open line, your tab or app does it, and the answer comes straight back. A call can take up to 30 seconds; longer work replies with a task to poll.
    4. You end it. Stop, closing the tab, or session.close() in your app ends the session and every link it made stops working.

    Use your browser tab

    03

    The Chrome extension makes any tab you choose into an app on the relay. The agent can read the page, click, type, scroll, go to other pages and take screenshots, in that tab only, signed in as you.

    1. Download the extension and unzip it.
    2. Open chrome://extensions, turn on Developer mode, click Load unpacked and pick the folder.
    3. On the extension's Details page, turn on Allow User Scripts. Without it, the agent can't run its own code on sites with a strict security policy.
    4. Open the tab you want help with, click the Agent Socket icon, then Connect this tab.
    5. Copy the link, paste it into your agent and say what you want done.

    You stay in charge of what it can reach and for how long:

    1. One tab per link. The agent reaches the tab you connected and nothing else in the browser. Connect another tab and it gets its own link, timer and limits.
    2. It stops by itself. A session ends 60 minutes after you connect, unless you change or remove the timer. When it runs out, the link dies at once.
    3. Locked to the site you chose. If the tab ends up somewhere else, from a redirect or a link the agent clicked, its calls are refused until you allow that site.
    4. A log of everything it did. Every action, refused ones included, kept on your computer for 7 days. Typed text stays hidden unless you ask for full detail.
    5. Stop means stop. One click ends the session and the link with it; closing the tab does the same. The page also shows an "AI has access to this tab" bar with its own Stop.
    The popup on a connected tab. The site, the actions and the times are an example.

    Add it to your app

    04

    Give your app a “Connect with AI” button. Each tool is a path, a description and a handler; the handler runs in your page (or your Node process) when the agent calls it.

    index.htmlnpm i @agent-socket/sdk
    import { connect } from "https://esm.sh/@agent-socket/sdk@0.2"
    
    let count = 0
    const session = await connect({
      baseUrl: "https://agentsocket.dev",
      appId: "counter",
      agentsMd: "# Counter\nCall /increment to add to it.",
      tools: [{
        path: "/increment",
        description: "Add `by` (default 1). Returns the new count.",
        handler: ({ body }) => {
          count += JSON.parse(body || "{}").by ?? 1
          return { count }
        },
      }],
    })
    const link = await session.mintAgentToken({ label: "chat" })
    // show link.url to the user: that is what they paste into the agent

    The agent reads the link's agents.md, fetches tools.json, then sends POST …/increment with {"by": 2} and gets {"count": 2} back. The same app runs in Node. The limits are generous for this kind of work:

    LimitValue
    One call30 s; longer work replies with a task the agent polls
    Request from the agent1 MiB
    Reply from your appAbout 4 MiB (keep screenshots under about 3 MiB)
    Calls at once100 per session
    Links50 per session, each revocable on its own
    Offline hold24 h, then the session ends

    The full protocol, every limit and the threat model are in docs/protocol.md; the API in sdk/README.md.

    A real session

    05

    Recorded on 2026-10-13 against the live relay: the demo app from “Try it on this page” running in Node, and a script in the agent's seat using nothing but web requests. Halfway through, the app's connection is cut without a goodbye, the way a sleeping laptop looks to the relay. Only the routine status checks are left out, and the link's secret part is hidden; nothing else is edited. The 200 replies are the demo app's own: it simulates Fig 1, so its words describe the switchboard.

    The app
    The app connected and made a link
    Agent
    GET …/agents.md
    Relay
    200The relay's own notes on how to call tools, then the page's: The Agent Socket landing page, with its tools and a suggested first run.
    Agent
    GET …/tools.json
    Relay
    2006 tools: GET /status POST /send_call POST /pull_plug POST /plug_in POST /close_lid POST /open_lid
    Agent
    POST …/send_call {"from": "cloud", "to": "laptop"}
    Page
    200{"from": "cloud", "to": "laptop", "result": "answered: in Fig 1 the call went down its link and the app replied"}
    Agent
    POST …/pull_plug {"link": "app"}
    Page
    200{"link": "app", "now": "pulled"}
    Agent
    POST …/send_call {"from": "script", "to": "app"}
    Page
    200{"from": "script", "to": "app", "result": "turned away: in Fig 1 that link is pulled (Stop); a real relay answers 503 app_offline"}
    Agent
    POST …/plug_in {"link": "app"}
    Page
    200{"link": "app", "now": "plugged in"}
    The app
    The app's connection dropped without a clean close, like a laptop going to sleep. The relay holds the session.
    Agent
    POST …/send_call {"from": "terminal", "to": "app"}
    Relay
    503 · Retry-After 2app_offline: The app is reconnecting (offline for 2 s). Retry in a few seconds. If it stays offline, ask the user to check that the app is open and online; this link keeps working once it reconnects.
    The app
    The app came back and resumed with its secret: same session (same id), same link.
    Agent
    POST …/send_call {"from": "terminal", "to": "app"}
    Page
    200{"from": "terminal", "to": "app", "result": "answered: in Fig 1 the call went down its link and the app replied"}
    You
    The person pressed Stop: the app closed the session.
    Agent
    GET …/status
    Relay
    503app_offline: The app is not connected to this link. If this keeps happening, the link is probably stale: ask the user to reconnect the app (in the Agent Socket extension: open it and copy the current link) and share the new link.

    The script that made this is relay/landing/capture.mjs.

    What it's for

    06
    Work in a signed-in dashboard

    An agent in a cloud session pulls numbers from a billing page that only your browser is logged in to, and never sees your password.

    Extension
    Fill in a long form

    Hand it the tab with the form open and the facts in the chat. It fills field by field; you check before you submit.

    Extension
    Test your own site

    Point an agent at your staging site in a real browser: it clicks through a flow, reads errors and tells you what broke.

    Extension
    Add “Connect with AI” to an app

    Expose the actions your users already have (create, search, export) and let their agent of choice call them.

    SDK
    Several agents, one app

    Give each agent its own link to the same app. agent-socket-channel is a chat room where several AIs talk through one.

    SDK
    An agent that outlives your laptop lid

    Start a long job from a cloud agent, close the lid, open it later: the link is the same and the agent carries on.

    Both

    Watch it

    07

    A script with this page's link, in the agent's seat, drives Fig 1 through the live relay: answered calls, the laptop asleep and the line held, the plug pulled and calls turned away, then plugged back in. Recorded in a headless browser with no cuts, shown at twice the speed. The script is relay/landing/record.mjs.

    Questions

    08
    How is this different from MCP?

    MCP is a protocol an AI client has to support, and the server usually has to be hosted and set up with OAuth. Agent Socket needs nothing from the client but web requests: the link is the whole setup. The tools are the same idea (a name, a description, an input schema), so moving between the two is easy.

    How is this different from Claude in Chrome?

    Claude in Chrome lets Claude act in your browser. Agent Socket gives you a link that any agent can call, including ones that run somewhere else, like a cloud coding session; and the same relay works for your own apps, not only the browser.

    Does it work with ChatGPT or Gemini?

    It works with any agent that can send HTTP requests to a URL, including POST with a JSON body. Chat apps that can only open web pages can read the instructions but can't call the tools.

    Is it safe?

    The link is the key: anyone holding it can call the tools until the session ends, so share it only with the agent you mean to. The extension limits an agent to the one tab you connected and, by default, the site it was on; sessions stop after 60 minutes unless you change that; every action is logged on your computer for 7 days; and Stop ends everything at once. The relay doesn't store calls or replies, apart from results of long-running calls until they're fetched.

    What does the relay keep?

    While a session lasts, its setup: the tool list, the instructions, a hash and an encrypted copy of each link, and results of long-running calls until they're fetched. Ending a session deletes it at once; a session left offline is deleted after 24 hours. Calls and replies are not stored. Details in the privacy policy.

    Can I run my own relay?

    Yes. It's one Cloudflare Worker: npx wrangler deploy from the repo puts it on your account, and the SDK's baseUrl or the extension's Settings point at it. See docs/self-hosting.md.

    What does it cost?

    Nothing. The code is open source under Apache 2.0, and the hosted relay at agentsocket.dev is free to use.

    Install

    09
    The Chrome extension
    1. Download the latest release and unzip it.
    2. chrome://extensions → Developer mode → Load unpacked → pick the folder.
    3. Details → Allow User Scripts.
    4. On any tab: the Agent Socket icon → Connect this tab → copy the link.
    The SDK

    npm i @agent-socket/sdk, or import it from esm.sh/@agent-socket/sdk. Start from examples/minimal.