Your First Agent
This tutorial walks through the core setup flow: creating a tenant, registering an agent, and making it accessible — either programmatically via a channel or interactively via a user subscription.Prerequisites — You need a running A2A-compliant agent with a publicly accessible agent card URL. If you don’t have one yet, see the Google A2A specification for how to build one.
Step 1: Create a Tenant
A tenant is your organisation on Swarmd. Creating one also creates your first admin user.- API
- UI
Step 2: Verify Your Email
Check your inbox for a verification email and extract the token.- API
- UI
Step 3: Log In
- API
- UI
accessToken — you’ll use it as a Bearer token for all subsequent requests.Step 4: Register Your Agent
Registration tells Swarmd where your agent lives and what it can do. Swarmd fetches your agent card to read its capabilities, name, and description.- API
- UI
Response:
Note: there is no
webhookUrl field. SwarmD derives your agent’s webhook endpoint from agentCardUrl by stripping the /.well-known/agent-card.json suffix and appending /admin/webhook. If you use the SDK’s create_admin_app(...) mounted at /admin, this works automatically.If you provide a
healthCheckUrl, Swarmd will monitor your agent’s health and display its status as Healthy, Degraded, or Unhealthy in the dashboard.Step 5: Set Up Access
There are three ways to give callers access to your agent:Option A: Create a Channel (Recommended for Apps)
A channel is a first-class integration entity that gives an external system its own OAuth2 service account to invoke agents.1. Create the channel
- API
- UI
2. Subscribe the channel to your agent
- API
- UI
3. List agents available to the channel
- API
- UI
sinkAgentId and sinkAgentName.Option B: Subscribe a User
This lets you (as a human) send messages to the agent from the dashboard or via the Human Relay API.- API
- UI
Option C: Subscribe Agent-to-Agent
If you have a second agent that needs to call the first:- API
- UI
Authentication Options (User & Agent Subscriptions)
TheauthConfig tells the relay how to authenticate with the target agent when forwarding messages. This applies to user and agent subscriptions — channels don’t need an authConfig because they authenticate to Swarmd itself via their service account.
Step 6: Send Your First Message
The endpoint you use depends on how you set up access.Via Channel
Channels use OAuth2 client credentials to authenticate. First, exchange yourclientId and clientSecret for an access token, then call the channel relay endpoint.
1. Get an access token
2. Send a message
Via User Session
Users authenticate with email/password login and use the human relay endpoint.Response
Both endpoints return the same A2A JSON-RPC response:
If the task is
working, poll for the result:
completed, failed, or canceled).
Step 7: Verify in the Audit Log
Every message through the relay is automatically logged.- API
- UI
Endpoint Reference
Next Steps
TypeScript Channel Client
Connect a website to this channel with OAuth, conversation continuity, polling, and typed lifecycle events.
Policy Configuration
Add guardrails to control what your agents can send and receive.
