Configuration
Environment variables
All variables use theSWARMD_ prefix by default.
SWARMD_WEBHOOK_SECRET is the HMAC-SHA256 key SwarmD uses to sign inbound webhooks delivered to your agent’s /admin/webhook endpoint. Without it, your agent still works for outbound calls — but it won’t receive automatic kicks when a subscription is created/removed, an agent is registered/deregistered/frozen/unfrozen, or its tenant is frozen/unfrozen. You’d need to call /admin/refresh manually after each platform event.
Returned once at agent registration alongside clientSecret; store both with your agent’s deployment configuration. Lost secrets can only be recovered by deregistering and re-registering the agent (which rotates both).
Custom prefix
If you run multiple agents in the same process, use different prefixes:Sandbox environment
Point to the sandbox by overriding the base and token URLs:Agent Directory
AgentDirectory maintains a background-refreshed, snapshot-isolated list of your agent’s subscriptions. It’s useful for long-running services that need an up-to-date view of available downstream agents.
- Snapshot isolation — The agent list is an immutable tuple. Background refreshes swap the reference atomically, so in-flight tasks always see a consistent snapshot.
- Change callbacks — Pass
on_changeto be notified when agents are added or removed:
SwarmDConfig
For programmatic configuration without environment variables:Models
AgentResponse
Returned byget_agent_subscriptions().
