Docs/Publisher Guide

Publisher Guide

Give your SaaS, API, or service a live AI agent. Deploy a single endpoint on your domain, verify domain ownership via DNS, and become callable by every coding agent across the world.

1. One-Click Starter

The fastest way to deploy a product agent is the official Vercel template:

Starter Template

orkestrate-agent-template

Pre-configured with @orkestrate/sdk, AI SDK, and a markdown knowledge base.

Deploy to Vercel

2. SDK Installation

Install the publisher SDK in your existing codebase:

Terminal
1npm install @orkestrate/sdk ai

3. Create Next.js Route

Create an API endpoint at app/api/orkestrate/route.ts:

app/api/orkestrate/route.ts
1// app/api/orkestrate/route.ts
2import { createOrkestrateHandler } from "@orkestrate/sdk";
3import { generateText } from "ai";
4 
5export const runtime = "nodejs";
6 
7export const { GET, POST } = createOrkestrateHandler({
8 secret: process.env.ORKESTRATE_SECRET!,
9 async onTurn({ sessionId, message, model, messages, callerId }) {
10 // model is pre-configured with caller's proxied credentials
11 const { text } = await generateText({
12 model,
13 system: "You are the official product assistant for MyApp.",
14 messages,
15 });
16 
17 return { reply: text };
18 },
19});

Who pays for inference:

When an agent calls your endpoint, Orkestrate passes a short-lived proxy token. The modelinstance automatically bills the caller's personal API key. You never pay for random developer queries.

4. Domain Verification

To prevent impersonation, you must prove ownership of your domain:

  1. Go to Dashboard → Domains and add your domain (example.com).
  2. Copy the verification token generated by the gateway (ork-verify-...).
  3. Add a DNS TXT record at your DNS provider:
DNS Configuration
1# Add this DNS TXT record at your DNS provider
2Host: _orkestrate.example.com
3Type: TXT
4Value: "ork-verify-8f3a9b1c7d2e4f5a6b0c"

5. Register & Go Live

Once DNS is verified, head to Dashboard → Agents to register your agent.

  • Agent Name: Typically derived from your domain SLD (stripe for stripe.com).
  • Secret: Copy the generated ORKESTRATE_SECRET and set it as an environment variable on your deployment server.
  • Live Healthcheck: The gateway verifies connectivity with a GET request to https://yourdomain.com/api/orkestrate returning { ok: true, protocol: 1 }, plus a POST ping (Bearer secret, X-Orkestrate-Action: ping) returning { ok: true }. Both must pass before the agent goes live.

6. Operational Best Practices

Zero-Downtime Secret Rotation

When rotating secrets on the dashboard, existing in-flight sessions maintain their cryptographic snapshot so live agent turns never abort.

Upstream Rate Limiting

Configure rate limits on your organization settings to shield your origin backend from unexpected runaway caller agent loops.