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

# OpenAPI Integration

> Generate knowledge documentation from OpenAPI specifications

Import API documentation automatically from OpenAPI (Swagger) specification files. AGO parses your API spec and generates structured documentation for your AI agents.

## Overview

The OpenAPI connector:

* Parses OpenAPI 2.0 (Swagger) and OpenAPI 3.x specifications
* Auto-generates one document per API endpoint
* Includes endpoint details (method, path, parameters, request/response schemas)
* Creates an overview document with API metadata

## Prerequisites

* OpenAPI specification file (JSON or YAML format)
* Valid OpenAPI 2.0 or 3.x syntax

## Setup

<Steps>
  <Step title="Prepare Your Spec File">
    Ensure your OpenAPI specification is valid:

    * Use a validator like [Swagger Editor](https://editor.swagger.io/)
    * Fix any validation errors before import
  </Step>

  <Step title="Create Knowledge Source">
    1. Navigate to **Knowledge** → **Sources**
    2. Click **Create Source**
    3. Select **OpenAPI** as the source type
    4. Provide the path to your specification file (JSON or YAML)
    5. Save the source
  </Step>

  <Step title="Sync Content">
    1. Click **Sync** to import the documentation
    2. Review generated documents in the source tree
  </Step>
</Steps>

## Generated Content

The connector creates documentation for:

| Content Type  | Description                                                                     |
| ------------- | ------------------------------------------------------------------------------- |
| **Endpoints** | One document per API endpoint with method, path, parameters, and schema details |
| **Overview**  | API metadata (title, version, description)                                      |

<Note>
  Schemas and models are included within each endpoint document rather than as separate documents. Deprecated endpoints are automatically flagged.
</Note>

## Best Practices

* Keep your OpenAPI spec up to date
* Use descriptive summaries and descriptions in your spec
* Organize endpoints with tags for better categorization
* Re-sync after API changes

## Troubleshooting

<AccordionGroup>
  <Accordion title="Invalid Specification">
    **Symptom:** Sync fails with validation errors.

    **Solution:** Validate your spec file with an OpenAPI validator and fix any issues.
  </Accordion>

  <Accordion title="Missing Descriptions">
    **Symptom:** Generated docs have minimal content.

    **Solution:** Add `description` fields to your OpenAPI spec for endpoints, parameters, and schemas.

    ***
  </Accordion>
</AccordionGroup>

## Related Documentation

* [Knowledge Connectors](./knowledge-connectors) - All available connectors
* [Knowledge Source Management](../features/knowledge-source-management) - Managing sources
