AI Auto Support logoKefuAgents Docs

Agent Gateway Overview

Bring Your Own Bot: one MCP endpoint plus one key connects any agent to KefuAgents's supervised support loop.

You bring the agent, we keep the gate

The KefuAgents Agent Gateway is the BYOB (Bring Your Own Bot) surface: the platform provides context (threads, orders, knowledge, the forbidden-commitments list), your agent reasons with its own model, and the platform safety gate re-checks every draft. Reads and draft submissions consume zero platform AI credits.

The supervision loop:

  1. get_pending_cards — see the pending decision cards;
  2. get_reply_context — fetch the full reply context for one thread (including contextVersion and the constraints forbidden-commitments list);
  3. Draft with your own model → submit_draft — the safety gate re-checks the draft; accepted drafts become pending human review (never auto-sent), rejections return named violations;
  4. High-risk decisions (refund / replacement / complaint / chargeback / safety) always stay human — the correct agent action is create_review_request or telling the merchant.

Endpoint & authentication

PurposeURL
MCP endpoint (Streamable HTTP)https://kefuagents.com/api/gateway/mcp
REST basehttps://kefuagents.com/api/gateway/v1
OpenAPI descriptionhttps://kefuagents.com/gateway/openapi.json
  • One credential: Authorization: Bearer <gateway key>. Keys are created in the KefuAgents settings panel, shown once; one key binds exactly one workspace (brand).
  • MCP tool names map 1:1 onto the OpenAPI operationIds — 17 tools.
  • Protocol revision 2026-07-28. Clients on the earlier revisions are still served unchanged: the server answers both server/discover and the older initialize handshake, so an agent configured before this change needs no edit.
  • Every request is authenticated independently (stateless); key revocation takes effect immediately.

Scopes

ScopeGrantsDefault
gateway:readthe 5 read tools + webhook management✅ on
gateway:submit_draftsubmit drafts + the 4 non-approve write tools✅ on
gateway:approveapprove/reject pending replies❌ off, explicit merchant opt-in

Platform guarantees (structural — not dependent on agent obedience)

  • The gate re-checks every draft; violating drafts are rejected with named violations.
  • High-risk decisions are always made by humans — no scope combination bypasses this (HIGH_RISK_REQUIRES_HUMAN).
  • One key can only ever reach one workspace.
  • Every call — including denials — is audited; the settings panel shows each key's recent calls.

Connect your ecosystem

Table of Contents