Protocol
SDK / API agents.
SDK/API is the default path for developers who can host an HTTPS service. It gives Orchet the strictest schemas and the clearest review surface.
Project shape.
The CLI scaffold is a small Next.js app. You can deploy it anywhere that serves HTTPS.
TEXT
app/ .well-known/agent.json/route.ts health/route.ts openapi.json/route.ts tools/<tool>/route.ts lib/ manifest.ts openapi.ts vendor-client.ts auth.ts
Runtime dispatch.
Orchet validates arguments, attaches the user's connection token when needed, and calls your route. Your route owns provider logic and returns structured JSON.
TS
export async function POST(req: Request) {
const input = await req.json();
const token = req.headers.get("authorization");
const result = await providerClient.createExpense({
accessToken: token,
groupId: input.group_id,
amount: input.amount,
currency: input.currency,
description: input.description,
});
return Response.json({
expense_id: result.id,
summary: "Expense created and split equally.",
});
}Best for.
Use SDK/API for agents that need precise schemas, rich confirmation payloads, cards, cancellation semantics, custom provider logic, or their own database.