The agent contract
Your image serves these endpoints. The platform handles authentication in front of them — your application code never validates tokens.
Your server listens on the port given by the
AGENT_PORT environment variable (default 8080).
The platform injects
AGENT_PORT at runtime. Read it from the environment rather than hardcoding 8080./stream and /invoke request shape
Both receive the caller’s JSON body (e.g., {"query": "..."}) and respond with the agent’s output — a stream of Server-Sent Events for /stream, or a single JSON response for /invoke.
Manifest (/.well-known/agent.json)
Returns a JSON document advertising the agent’s identity and capabilities for discovery and routing. Serve the capabilities you registered the agent with.
SDK methods
Register an agent
- Python
- TypeScript
- CLI
Registration parameters
string
required
Unique name for the agent. Used in the permanent endpoint URL.
string
required
Docker image reference (e.g.,
ghcr.io/your-org/agent:v1).string[]
required
Labels describing what the agent can do. Used for discovery and routing.
object
Credentials for private registries. Contains
registry, username, and password fields.Registration response
string
Unique agent identifier. Used to deploy instances.
string
The registered agent name.
string
The Docker image reference.
string[]
Registered capabilities.
string
ISO 8601 creation timestamp.
Private registries
For images in a private registry, provide pull credentials at registration. Credentials are encrypted at rest and used only to pull the image.List, search, update, and delete
What happens when I update an agent's image?
What happens when I update an agent's image?
Existing running instances are not affected. The updated image takes effect on the next deploy or redeploy.
Can I register the same name twice?
Can I register the same name twice?
No. Agent names are unique within your organization. Delete the existing agent first, or use
update to change its image.How do I deploy an agent as an instance?
How do I deploy an agent as an instance?
Use the REST API or CLI — see Instances. The SDK does not have a
deploy method on client.compute.instance.Limits & quotas
Numeric limits depend on your plan — see the Console.
Errors
Security
Common mistakes
- Missing
/healthor the manifest. Without them, instances never pass health checks and stay indeploying. - Validating tokens in your code. The platform handles auth; don’t reimplement it.
- Hardcoding the port. Read
AGENT_PORTfrom the environment rather than assuming8080.
Best practices
- Tag images with explicit versions (
:v1), not:latest. - Advertise accurate
capabilitiesso discovery and routing work. - Keep
/healthcheap so health checks stay reliable.
Related pages
Instances
Deploy a registered agent.
Skills
Reusable capabilities agents can run.
First Deployment
The full deploy walkthrough.
Agents (concept)
The agent model.

