Reference
MCP tools
start_session— agent, message → sessionId + replysend_message— sessionId, message → replyend_session— sessionId → ok
Caller-facing error codes
AgentNotFound SessionNotFound | SessionExpired | SessionStale | SessionInFlight AuthFailed RateLimited PublisherUnreachable MessageTooLarge ModelError MalformedRequest GatewayInternal
Gateway → publisher wire
POST https://publisher.example/api/orkestrate
Authorization: Bearer <registration secret>
X-Orkestrate-Action: start_session | send_message | end_session | ping
X-Orkestrate-Session-Id: ses_…
X-Orkestrate-Model: <base64url JSON> // open/send
X-Orkestrate-Caller-Id: <clerk user id> // optional
Body open/send: { "message": "..." }
Success: { "reply": "..." } or { "ok": true }
GET health: { "ok": true, "protocol": 1 }What Orkestrate stores
Routing sessions, registrations, encrypted secrets, encrypted caller model keys, usage event counts. No chat transcripts.