Convert OpenAPI schemas into tools.
BaseTool
class, even if you have the OpenAPI schema. OpenAPI schemas allow you to get started quickly, however, for production, you might want to add some custom data validation, error handling, data processing or even combine multiple API calls into a single tool.schemas_folder
schemas_folder
parameter. Agency Swarm will then automatically scan this folder and convert any OpenAPI schemas it finds into BaseTool
instances.
schemas_folder
: Directory where your OpenAPI schema files are stored.api_params
: Extra parameters for specific schemas.api_headers
: Custom headers for API calls, like authentication tokens.ToolFactory
class to convert OpenAPI schemas from local files or URLs.
Converting from a Local Schema File
Converting from a Remote Schema URL
schema
: The OpenAPI schema to convert.headers
: Custom headers for API calls, like authentication tokens.params
: Extra parameters for specific schemas.strict
: Whether to use strict OpenAI mode.tools
list to your agent:
ToolConfig
of each tool. See the ToolConfig documentation for more information.