Introduction
AgentDeploy is a marketplace and orchestration platform for AI agents. Sellers build agents using the @agentdeploy/edge-sdk (a wrapper around the Cloudflare Agents SDK), deploy them with the @agentdeploy/cli, publish them to the marketplace, and earn revenue when buyers deploy them.
How it works
ad init → build agent with SDK → ad deploy → security scan → marketplace
- You scaffold an agent with
ad init. The CLI generates a complete project with TypeScript, wrangler config, and SDK imports. - You write your agent logic. Use
createChatAgent(),defineTool(),useGateway()— structured APIs that handle billing, telemetry, and gateway routing automatically. - You deploy with
ad deploy. The CLI bundles your TypeScript with esbuild into a single ESM module and uploads it to the platform. - The platform scans and publishes. Automated security audits run, and once they pass, your agent goes live on the marketplace.
- Buyers deploy your agent. They pick a hosting plan, configure secrets, and your agent runs on Cloudflare's global edge network.
- You get paid. Revenue share flows automatically — template sales (70%), hosting subscriptions (25%), token overage markup (10%).
The @agentdeploy/edge-sdk
The SDK wraps the Cloudflare Agents SDK (agents + @cloudflare/ai-chat) with AgentDeploy platform integrations:
createChatAgent()— Chat agent with streaming responses, tool calling, message persistencecreateAgent()— General-purpose agent for scheduled tasks, HTTP handlers, stateful logicdefineTool()— Typed tool factory with Zod validation and telemetryuseGateway()— LLM gateway integration (billing, routing, metering)useSecrets()— Typed access to deployment secretscreateHandler()— Worker entry point with agent routing, health checks
import { createChatAgent, defineTool, createHandler } from "@agentdeploy/edge-sdk";
const checkInventory = defineTool({
description: "Check product inventory",
inputSchema: z.object({ sku: z.string() }),
execute: async ({ sku }) => {
return { sku, inStock: true, quantity: 42 };
},
});
export const SupportAgent = createChatAgent({
name: "support",
systemPrompt: "You are a helpful assistant.",
tools: { checkInventory },
});
export default createHandler(SupportAgent);
Key principles
- SDK-first. Use
@agentdeploy/edge-sdkfor structured development. Raw workers still work but the SDK is the recommended path. - Cloudflare Agents SDK under the hood. Your agents extend
AgentandAIChatAgentfrom the official Cloudflare Agents SDK — giving you Durable Objects, SQLite storage, WebSocket connections, and scheduling. - Billing is automatic. All LLM calls route through the AgentDeploy gateway via
useGateway(). Token metering, overage protection, and revshare happen without any code. - GitHub is optional. Deploy directly with
ad deploy, or connect a GitHub repo for automated scanning. Both paths are supported.
What you need to get started
- Node.js 18+ installed
- An AgentDeploy seller account
- The
@agentdeploy/cliinstalled (npm install -g @agentdeploy/cli)
Ready? Head to the Quick Start.