Skip to main content

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
  1. You scaffold an agent with ad init. The CLI generates a complete project with TypeScript, wrangler config, and SDK imports.
  2. You write your agent logic. Use createChatAgent(), defineTool(), useGateway() — structured APIs that handle billing, telemetry, and gateway routing automatically.
  3. You deploy with ad deploy. The CLI bundles your TypeScript with esbuild into a single ESM module and uploads it to the platform.
  4. The platform scans and publishes. Automated security audits run, and once they pass, your agent goes live on the marketplace.
  5. Buyers deploy your agent. They pick a hosting plan, configure secrets, and your agent runs on Cloudflare's global edge network.
  6. 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 persistence
  • createAgent() — General-purpose agent for scheduled tasks, HTTP handlers, stateful logic
  • defineTool() — Typed tool factory with Zod validation and telemetry
  • useGateway() — LLM gateway integration (billing, routing, metering)
  • useSecrets() — Typed access to deployment secrets
  • createHandler() — 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-sdk for structured development. Raw workers still work but the SDK is the recommended path.
  • Cloudflare Agents SDK under the hood. Your agents extend Agent and AIChatAgent from 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/cli installed (npm install -g @agentdeploy/cli)

Ready? Head to the Quick Start.