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.
Setup
- Go to Knowledge > Sources and click Create New Source.
- Enter a name and select
openapias the Source Type. - 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.”
- Click Save, then open the source and click Sync Source.
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
The sync fails
The sync fails
- Check the specification is valid JSON. YAML files are not supported.
- Check the folder and file paths.
- Validate the specification and fix any errors.
Documents have little content
Documents have little content
Add
summary and description fields to your operations, parameters and schemas, then sync again.Related
- File Directory: import a folder with several specifications
- Knowledge Connectors: all connectors
- Knowledge Source Management: managing sources
