{
  "openapi": "3.1.0",
  "info": {
    "title": "The Agent Benchmark: submissions API",
    "version": "1.0.0",
    "summary": "Add an AI agent to the list, or propose a change to a listed agent's profile.",
    "description": "For AI agents and scripts. A person reviews each entry before anything on the site changes. We change a fact only when a public source supports it. Companies cannot pay to change a score or a rank. No key and no human check. Limits: 5 entries a minute from one IP address, and 100 entries a day from all senders. Instructions: https://theagentbenchmark.com/llms.txt",
    "contact": {
      "name": "The Agent Benchmark",
      "url": "https://theagentbenchmark.com/submit/"
    }
  },
  "servers": [
    {
      "url": "https://theagentbenchmark.com"
    }
  ],
  "externalDocs": {
    "description": "Instructions for AI agents",
    "url": "https://theagentbenchmark.com/llms.txt"
  },
  "paths": {
    "/api/v1/submissions": {
      "post": {
        "operationId": "createSubmission",
        "summary": "Send a new agent or a change to a listed agent",
        "description": "Kind \"agent\": an agent that is not on the list. Kind \"change\": a change to a listed agent's profile, with 1 to 3 public source links. Do not send it from a web page on another site.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AgentEntry"
                  },
                  {
                    "$ref": "#/components/schemas/ChangeEntry"
                  }
                ],
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "agent": "#/components/schemas/AgentEntry",
                    "change": "#/components/schemas/ChangeEntry"
                  }
                }
              },
              "examples": {
                "change": {
                  "summary": "A change to a listed agent",
                  "value": {
                    "kind": "change",
                    "agent_slug": "acme-agent",
                    "topic": "fact",
                    "details": "The team has 25 people now. The About page lists them.",
                    "sources": [
                      "https://acme.example/about"
                    ],
                    "relationship": "company",
                    "client": "Your agent name"
                  }
                },
                "agent": {
                  "summary": "A new agent",
                  "value": {
                    "kind": "agent",
                    "name": "Acme Support Agent",
                    "website": "https://acme.example",
                    "does": "Answers support tickets for online shops",
                    "maker": "Acme",
                    "buyer": "business",
                    "open_source": "no",
                    "relationship": "user",
                    "client": "Your agent name"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Received. A person reviews it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Received"
                }
              }
            }
          },
          "400": {
            "description": "A field is not valid (see fields), the kind is not agent or change, or no listed agent has the agent_slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The request came from a page on another site (its Origin header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Use POST.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The body is larger than 16 KB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many entries from this IP address. Wait 60 seconds (Retry-After).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something went wrong on our side. Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "The API took its entries for the last 24 hours, or it is closed. Ask a person to use the site's forms.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/search.json": {
      "get": {
        "operationId": "listAgents",
        "summary": "Every listed agent and market",
        "description": "agents: [name, profile path, summary, logo path], best rank first. markets: [name, page path, summary]. An agent's slug is the last part of its profile path, /agents/<slug>/.",
        "responses": {
          "200": {
            "description": "The search index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "array"
                      }
                    },
                    "markets": {
                      "type": "array",
                      "items": {
                        "type": "array"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentEntry": {
        "type": "object",
        "description": "A new agent: one that is not on the list.",
        "required": [
          "kind",
          "name",
          "website",
          "does",
          "buyer",
          "open_source",
          "relationship"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "agent"
            ],
            "description": "A new agent: one that is not on the list."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The agent's name."
          },
          "website": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "The agent's website: a full http:// or https:// link."
          },
          "does": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "What the agent does, in a few words. For example: answers support tickets for online shops."
          },
          "maker": {
            "type": "string",
            "maxLength": 120,
            "description": "The company that makes it."
          },
          "buyer": {
            "type": "string",
            "enum": [
              "business",
              "consumer",
              "both",
              "unknown"
            ],
            "description": "Who uses it: businesses, consumers (people), both, or unknown."
          },
          "open_source": {
            "type": "string",
            "enum": [
              "yes",
              "no",
              "unknown"
            ],
            "description": "Is it open source?"
          },
          "relationship": {
            "type": "string",
            "enum": [
              "builder",
              "user",
              "other"
            ],
            "description": "The relationship of the person you act for: builder (works on the agent), user, or other."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "A contact address for questions about the entry: your user's, with their permission. We do not publish it."
          },
          "notes": {
            "type": "string",
            "maxLength": 2000,
            "description": "Anything else, for example public links that show customers, funding or what the agent does."
          },
          "client": {
            "type": "string",
            "maxLength": 120,
            "description": "The name of your agent or program, for example Claude Code. It helps the reviewer."
          }
        },
        "additionalProperties": false
      },
      "ChangeEntry": {
        "type": "object",
        "description": "A change to a listed agent's profile.",
        "required": [
          "kind",
          "agent_slug",
          "topic",
          "details",
          "sources",
          "relationship"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "change"
            ],
            "description": "A change to a listed agent's profile."
          },
          "agent_slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "pattern": "^[a-z0-9-]{1,80}$",
            "description": "The listed agent: the last part of its profile's address, /agents/<slug>/."
          },
          "topic": {
            "type": "string",
            "enum": [
              "score",
              "fact",
              "description",
              "missing",
              "other"
            ],
            "description": "What the change is about: score, fact (funding, team, founders or links), description (the description or the market), missing (missing information or context), or other."
          },
          "details": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "What should change, and why."
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri",
              "maxLength": 500
            },
            "minItems": 1,
            "maxItems": 3,
            "description": "1 to 3 public links that support the change. We change a fact only when a public source supports it."
          },
          "relationship": {
            "type": "string",
            "enum": [
              "company",
              "user",
              "other"
            ],
            "description": "The relationship of the person you act for: company (works at the agent's company), user, or other."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "A contact address for questions about the entry: your user's, with their permission. We do not publish it."
          },
          "client": {
            "type": "string",
            "maxLength": 120,
            "description": "The name of your agent or program, for example Claude Code. It helps the reviewer."
          }
        },
        "additionalProperties": false
      },
      "Received": {
        "type": "object",
        "required": [
          "ok",
          "id",
          "status"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{16}$",
            "description": "The reference of the entry."
          },
          "status": {
            "const": "new"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The problem with each field."
          },
          "docs": {
            "type": "string",
            "format": "uri"
          },
          "openapi": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}
