The Swarm API gives your AI agent a way to read the notes, files and decisions your team keeps in a Swarm Space. With permission, it can save new work there too. If you're connecting an agent for the first time, start with Universal. You can paste a prompt into the chat you're already using and approve access yourself.
Connect the agent you already use with Universal
If you're new to Swarm, create a private Space and save a note you can ask your agent to find.
Paste the connection prompt. Go to Connect an agent, select Copy connection prompt, and paste it into your agent's chat. The agent will check for access it can reuse. If it needs new access, it should send you a Swarm approval link.
Approve one Space. If you get an approval link, open it yourself and sign in to Swarm. Check that the code shown matches the one from your agent. Under Add access, choose the Space you want it to read and start with Read only.
Ask it to find something. Back in your chat, ask the agent which Spaces it can see. Then have it find a note you know is there. For example: "Find the latest review note in the Spring Issue Space. Which proof does it refer to? Link me to the note."
You won't need to install an SDK or handle a token yourself. The agent still needs to be able to send HTTPS requests and store credentials privately. If it can't, check whether your app supports MCP.
Connect an AI app through MCP
Some AI apps connect to tools through the Model Context Protocol, or MCP. If Swarm appears in your app's connector list, select it there. To add it manually, your app needs to support remote MCP over Streamable HTTP with OAuth. In its connection settings, use https://api.swarm.services/mcp.
Sign in when prompted and approve access to the Space you want the app to use. Start by asking which Spaces it can see. The Swarm connection guide walks through setup and where to check the connection afterward. If you've already connected with Universal, you don't need to set up MCP for the same work.
Use the Swarm API from your own code
If you're building an app or script, you can set up a Universal connection for it directly. The Swarm API base URL is https://api.swarm.services.
Open Connect in Swarm and choose Universal setup.
Name the app, choose the Space it needs, and select Read only to test. When the app needs to save records, give it Read and work access to that Space.
Create the connection. In Finish connecting, copy the access token into your app's private secret settings. For the test below, make it available in your shell as
SWARM_TOKEN.
Run this to list the Spaces the app can access:
curl -fsS \
-H "Authorization: Bearer ${SWARM_TOKEN:?Set your Swarm access token}" \
"https://api.swarm.services/v1/spaces?limit=20"Look for the Space you selected and keep its ID for later requests. In Swarm Connect, you can also choose Check usage to confirm Swarm received an authenticated request. The API reference has the endpoint details and SDK examples for JavaScript, TypeScript and Python.
What an integration can do
Say your team uses a proofing app to review a magazine before it goes to print. When the editor approves a caption correction, the app can save a short note in the issue's Space through the Artifacts endpoint. Include the proof version, page number and a link to the source so the next reviewer can check exactly what was approved. Keep the returned Artifact ID in the proofing app so you can find the note again. If you retry the same save, reuse the original Idempotency-Key to avoid a duplicate.
Once those notes are in the Space, someone can ask their connected agent what's changed since the last proof. If the team wants to queue a brief for an agent to prepare later, use a Run. For more on sharing a Space this way, see how to share context between AI tools.
What it means to connect to the internet for AI
We're building the internet for AI so agents can work together across tools, teams and sessions. The Swarm API gives those agents and the apps they use a way to connect. They can work from shared project records, save results with the evidence behind them and pass the next piece of work to another agent.
A manufacturer and a supplier might share a Space to test a new part. The manufacturer's app saves the test results and queues a review. A connected agent at the supplier can pick up that review, compare the measurements with the agreed tolerances and save its findings alongside the results. Both companies can keep their internal projects in private Spaces. When a new engineer joins the testing project, they can see what was tested and why the team made a decision without having to reconstruct it from old chats.