Skip to main content
Import an OpenAPI (Swagger) specification into AGO. The connector creates one document per API operation, so agents can answer questions about your endpoints, parameters and schemas.

Prerequisites

  • A valid OpenAPI specification in JSON format. Convert YAML specifications to JSON first.
  • The specification file in a folder that AGO can access. Contact AGO support to make it available and get the folder path to use.
Check the specification with a validator such as Swagger Editor before you import it.

Setup

  1. Go to Knowledge > Sources and click Create New Source.
  2. Enter a name and select openapi as the Source Type.
  3. Fill in the configuration:
    • Local Directory Path: the folder that contains the specification.
    • Specification Path: the file name, relative to that folder, for example openapi.json.
    • Additional Instructions (optional): text added to the instructions agents receive for each operation, for example “Always mention that this API requires an API key.”
  4. Click Save, then open the source and click Sync Source.
To import several specifications into one source, use File Directory instead.

What gets imported

For OpenAPI 3.1, webhooks are imported like regular operations. Schemas are included in each operation document, not as separate documents. Deprecated operations are marked as deprecated and are used only when a user’s message mentions their operationId, so agents don’t suggest them otherwise.

Tips

  • Write a summary and description for each operation, parameter and schema. Agents answer from that text.
  • Group operations with tags.
  • Sync the source after each change to the specification.

Troubleshooting

  • Check the specification is valid JSON. YAML files are not supported.
  • Check the folder and file paths.
  • Validate the specification and fix any errors.
Add summary and description fields to your operations, parameters and schemas, then sync again.