> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gorules.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAPI document for the loaded release

> Returns an OpenAPI 3 document describing the evaluable rules of the release loaded by the Agent, with input and output schemas inferred from the documents. The same document is served by BRMS for each source (main, branch, commit, release, environment). Available since Agent 1.28.0. A token is only required when the loaded release ships evaluation tokens: if none are scoped to the deployed target, requests are served without authentication; if at least one is, a matching `X-Access-Token` is required.



## OpenAPI

````yaml /openapi/agent.json get /api/rules/{project}
openapi: 3.1.0
info:
  title: GoRules Agent API
  description: >-
    High-performance rule evaluation service. The Agent loads decision models
    from releases and executes them with minimal latency.
  contact:
    name: GoRules
    email: hi@gorules.io
  version: 1.28.0
servers:
  - url: https://agent.acme.com
    description: Your Agent deployment URL
security:
  - AccessToken: []
tags:
  - name: Rules
    description: >-
      Rules API - evaluation and OpenAPI discovery, matching the BRMS Rules API
      surface
  - name: Evaluation
    description: >-
      Legacy evaluation endpoints - still fully supported; new integrations
      should use the Rules API
  - name: Projects
    description: Project information
  - name: System
    description: Health and version endpoints
paths:
  /api/rules/{project}:
    get:
      tags:
        - Rules
      summary: OpenAPI document for the loaded release
      description: >-
        Returns an OpenAPI 3 document describing the evaluable rules of the
        release loaded by the Agent, with input and output schemas inferred from
        the documents. The same document is served by BRMS for each source
        (main, branch, commit, release, environment). Available since Agent
        1.28.0. A token is only required when the loaded release ships
        evaluation tokens: if none are scoped to the deployed target, requests
        are served without authentication; if at least one is, a matching
        `X-Access-Token` is required.
      operationId: rulesOpenApi
      parameters:
        - name: project
          in: path
          description: Project slug or ID
          required: true
          schema:
            type: string
          example: acme-lending
        - name: download
          in: query
          description: When true, adds a Content-Disposition attachment header
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: OpenAPI 3 document describing the deployed release's evaluable rules
        '401':
          description: Unauthorized - invalid or missing access token
        '404':
          description: Project not found
      security:
        - AccessToken: []
        - {}
components:
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: X-Access-Token
      description: Evaluation token from project settings

````