aw_agents.base¶
Base classes and protocols for AW agents.
This module provides the foundation for building AI agents that can be deployed to multiple chatbot platforms (Claude, ChatGPT, etc.).
Functions
|
Helper to create JSON schema for tool parameters. |
Classes
Base class for all AW agents. |
|
|
Standard result format for tool execution. |
- class aw_agents.base.AgentBase[source]¶
Bases:
ABCBase class for all AW agents.
Agents should inherit from this and implement the core methods. Adapters (MCP, OpenAPI) will wrap these agents for deployment.
- class aw_agents.base.ToolExecutionResult(success, data=None, message=None, warnings=None, metadata=None)[source]¶
Bases:
objectStandard result format for tool execution.
- classmethod error_result(message, data=None, **kwargs)[source]¶
Create an error result.
- Return type:
- aw_agents.base.create_json_schema(properties, required=None, **kwargs)[source]¶
Helper to create JSON schema for tool parameters.
>>> schema = create_json_schema( ... properties={ ... 'url': {'type': 'string', 'description': 'URL to process'}, ... 'context': {'type': 'string', 'description': 'Context info'} ... }, ... required=['url'] ... ) >>> schema['type'] 'object' >>> 'url' in schema['required'] True