Agent Gateway 4 min read

Discovery & Documentation Surfaces

Everything an agent needs to learn what abTestBot can do — without scraping HTML.

abTestBot ships its docs and schemas through every channel an agent might already speak: MCP resources, the A2A Agent Card, OpenAPI 3.1, and standalone text files. Pick the one that fits your client.


TL;DR — which surface for which agent

You're using… Use this
MCP client (Claude Desktop, Cursor, Continue, n8n MCP) resources/list + resources/read (in-app docs panel)
MCP client and want to ask runtime questions tools/callget_docs / search_knowledge
A2A client The Agent Card's documentationUrl + skills[].examples
Code-gen / SDK (Postman, Insomnia, openapi-typescript, etc.) https://api.abtestbot.com/openapi.json
One-shot LLM ingestion (Claude.ai project, Cursor @docs) https://abtestbot.com/llms-full.txt
Plain HTTP, no spec parser GET https://api.abtestbot.com/v1 (route index)

MCP

`tools/list`

Returns the full tool catalogue with names, descriptions, and JSON schemas.

`resources/list` + `resources/read`

Returns every public doc as a docs:// URI. MCP clients render these in their docs panel and the model can pull them into context on demand.

{
  "jsonrpc": "2.0", "id": 1, "method": "resources/list"
}

Response includes:

URI What it is
docs://api/quickstart REST API quickstart
docs://api/endpoints All 17 REST endpoints
docs://api/errors Errors, rate limits, pagination
docs://agent-gateway/quickstart MCP + A2A connect guide
docs://agent-gateway/tools Full tool reference with examples
docs://agent-gateway/credits Per-call credit pricing
docs://agent-gateway/oauth OAuth 2.1 setup
docs://agent-gateway/portability Self-hosting the gateway package
docs://continuous-loops Always-on optimization mechanics + FAQ

Read one:

{
  "jsonrpc": "2.0", "id": 2, "method": "resources/read",
  "params": { "uri": "docs://agent-gateway/tools" }
}

The initialize response advertises capabilities.resources = { subscribe: false, listChanged: false }, so clients enable the docs panel automatically.

`tools/call get_docs`

Imperative version of resources/* for clients that don't render the docs panel, or for use mid-conversation. 0 credits.

{ "name": "get_docs", "arguments": {} }                              // TOC
{ "name": "get_docs", "arguments": { "slug": "agent-gateway/tools" } } // body

`tools/call search_knowledge`

Searches the in-repo CRO knowledge base (the same evidence the generate_ideas LLM consumes). Returns matched entries with their original sources — peer-reviewed studies, industry reports, vendor case studies — so an agent can quote findings rather than invent them.

{
  "name": "search_knowledge",
  "arguments": { "query": "button color contrast", "limit": 3 }
}

Returns:

{
  "results": [
    {
      "id": "cta-button-color-contrast",
      "title": "CTA Button Color: Contrast Beats Color Psychology",
      "category": "color",
      "confidence": "high",
      "summary": "There is NO universally best CTA button color…",
      "sources": [
        { "name": "CXL Institute — Which CTA Button Color Converts Best?", "url": "https://cxl.com/…", "year": 2020, "type": "industry_study" }
      ],
      "relevance_score": 22
    }
  ],
  "matched": 1,
  "total_in_kb": 47
}

1 credit per call. Categories: typography, color, layout, forms, social-proof, navigation, imagery, copy, pricing, trust-signals, mobile, accessibility, performance.


A2A

`/.well-known/agent.json`

The Agent Card now carries:

  • documentationUrl: https://abtestbot.com/docs
  • iconUrl: https://abtestbot.com/ab-test-bot-automate-icon.png
  • provider: { organization: 'abTestBot', url: 'https://abtestbot.com' }
  • skills[].examples — canonical request payloads for every tool, serialised as ready-to-send A2A messages

The same get_docs and search_knowledge skills appear in the card with their examples.


REST

`GET /openapi.json` (also `GET /.well-known/openapi`)

Full OpenAPI 3.1 spec. Unauthenticated. Cached 5 min.

npx openapi-typescript https://api.abtestbot.com/openapi.json -o api.d.ts
curl https://api.abtestbot.com/openapi.json | jq '.paths | keys'

`GET /v1`

Slim route index — name, version, route list, OpenAPI URL. Unauthenticated. For agents that don't grok OpenAPI.

{
  "name": "abTestBot REST API",
  "openapi_url": "https://api.abtestbot.com/openapi.json",
  "docs_url": "https://abtestbot.com/docs",
  "routes": [
    { "method": "GET", "pattern": "/v1/sites", "summary": "List sites", "tag": "sites", "auth": true },]
}

`GET /v1/docs` / `GET /v1/docs/:slug+`

Same docs as MCP resources/*, served as JSON. Slugs may contain / (e.g. agent-gateway/tools). Free (no credits).

`POST /v1/knowledge/search`

Same as MCP search_knowledge. Body { query, category?, limit? }. Enterprise-only (the rest of the REST API is too).


Static text indexes

`/llms.txt`

llmstxt.org-style link index — short, points an LLM at every doc URL.

`/llms-full.txt`

Concatenated body of every public doc plus the SplitKit runtime API and the machine-readable schema URLs. Single fetch, ingest the whole picture. Use this in Claude Desktop's "Add docs to project" or Cursor's @docs.

`/robots.txt`

Advertises both above:

Sitemap:       https://abtestbot.com/sitemap.xml
LLMs-Txt:      https://abtestbot.com/llms.txt
LLMs-Full-Txt: https://abtestbot.com/llms-full.txt

Putting it together

A new agent connecting for the first time should:

  1. Hit GET /.well-known/agent.json (A2A) or tools/list + resources/list (MCP) to discover the surface.
  2. Read docs://agent-gateway/tools (or call get_docs({slug: 'agent-gateway/tools'})) to learn the full tool catalogue with examples.
  3. When making CRO recommendations, call search_knowledge with the user's pain point so the response cites real research instead of plausible-sounding guesses.

A non-LLM client (Postman, code-gen) should:

  1. Fetch https://api.abtestbot.com/openapi.json.
  2. Generate types / a collection. Done.