aw_agents.adapters.openapi¶
OpenAPI/FastAPI adapter for AW agents.
This adapter wraps any AgentBase subclass to expose it as a REST API with OpenAPI spec for use with ChatGPT Custom GPTs.
Functions
|
Generate an API server script for an agent. |
Classes
|
Adapter to expose an AgentBase as a FastAPI/OpenAPI service. |
- class aw_agents.adapters.openapi.OpenAPIAdapter(agent, *, title='AI Agent API', description='AI Agent exposed via OpenAPI', version='1.0.0', server_url=None)[source]¶
Bases:
objectAdapter to expose an AgentBase as a FastAPI/OpenAPI service.
Usage:
agent = YourAgent() adapter = OpenAPIAdapter(agent, title="Your Agent API") adapter.run(port=8000)