Deploying Agents
From the dashboard
- Browse the marketplace and find an agent you want
- Purchase the template (one-time payment via Stripe)
- Go to Dashboard > Deployments > Deploy New
- Select your purchased template
- Choose your LLM provider and model
- Click Deploy
The platform:
- Creates a Cloudflare Worker on the global edge network
- Injects deployment metadata (model, region, plan)
- Returns a worker URL
Configuring secrets
After deployment, your agent needs API keys. Go to Dashboard > Edge Agents > [Your Deployment]:
- The health check shows which secrets are missing
- Click Configure next to each missing secret
- Paste your API key
- The platform binds it to your worker via Cloudflare's Secrets API
- The agent status changes from
provisioningtoactive
Secrets are:
- Encrypted at rest by Cloudflare
- Scoped to your deployment — other users can't access them
- Never visible to the template seller
Using the SDK
Install the SDK:
npm install @agentdeploy/sdk
Deploy and interact:
import { AgentDeploy } from '@agentdeploy/sdk';
const client = new AgentDeploy({
apiKey: process.env.AGENTDEPLOY_API_KEY!,
});
// Deploy an agent
const deployment = await client.deploy({
templateId: 42,
llmProvider: 'openrouter',
model: 'openai/gpt-4o-mini',
secrets: {
LLM_API_KEY: process.env.LLM_API_KEY!,
},
});
console.log(`Agent live at: ${deployment.url}`);
// Chat with the agent
const response = await deployment.chat({
messages: [
{ role: 'user', content: 'Hello, what can you do?' },
],
});
console.log(response.choices[0].message.content);
// Stream responses
for await (const chunk of deployment.stream({
messages: [{ role: 'user', content: 'Write a haiku' }],
})) {
process.stdout.write(chunk);
}
Checking deployment health
const health = await deployment.health();
if (health.provisioned) {
console.log('All secrets configured, agent is active');
} else {
console.log('Missing secrets:', health.secrets.missing);
}
Edge agent limits
Your plan determines how many edge agents you can run simultaneously:
| Plan | Edge agents | Core agents |
|---|---|---|
| Sandbox | 1 | 0 |
| Starter | 3 | 1 |
| Pro | 10 | 2 |
| Business | 30 | 5 |
When you hit the limit, deploying a new agent fails with EDGE_AGENT_LIMIT_REACHED. Delete an existing deployment or upgrade your plan.