Skip to main content

Deploying Agents

From the dashboard​

  1. Browse the marketplace and find an agent you want
  2. Purchase the template (one-time payment via Stripe)
  3. Go to Dashboard > Deployments > Deploy New
  4. Select your purchased template
  5. Choose your LLM provider and model
  6. 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]:

  1. The health check shows which secrets are missing
  2. Click Configure next to each missing secret
  3. Paste your API key
  4. The platform binds it to your worker via Cloudflare's Secrets API
  5. The agent status changes from provisioning to active

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:

PlanEdge agentsCore agents
Sandbox10
Starter31
Pro102
Business305

When you hit the limit, deploying a new agent fails with EDGE_AGENT_LIMIT_REACHED. Delete an existing deployment or upgrade your plan.