swarmauri.core.agent_apis.IAgentCommands module
- class swarmauri.core.agent_apis.IAgentCommands.IAgentCommands[source]
Bases:
ABC
Interface for the API object that enables a SwarmAgent to host various API routes.
- abstract async abatch(requests)[source]
Handles batched invocation requests asynchronously.
- Parameters:
requests (List[Any]) – A list of incoming request payloads.
- Returns:
A list of responses.
- Return type:
List[Any]
- abstract async ainvoke(request)[source]
Handles invocation requests asynchronously.
- Parameters:
request (Any) – The incoming request payload.
- Returns:
The response payload.
- Return type:
Any
- abstract batch(requests)[source]
Handles batched invocation requests synchronously.
- Parameters:
requests (List[Any]) – A list of incoming request payloads.
- Returns:
A list of responses.
- Return type:
List[Any]
- abstract get_schema_config()[source]
Retrieves the schema configuration for the API.
- Returns:
The schema configuration.
- Return type:
dict