Class swarmauri_core.agent_apis.IAgentCommands.IAgentCommands
swarmauri_core.agent_apis.IAgentCommands.IAgentCommands
Bases: ABC
Interface for the API object that enables a SwarmAgent to host various API routes.
invoke
abstractmethod
invoke(request)
Handles invocation requests synchronously.
PARAMETER | DESCRIPTION |
---|---|
request
|
The incoming request payload.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
The response payload.
TYPE:
|
Source code in swarmauri_core/agent_apis/IAgentCommands.py
10 11 12 13 14 15 16 17 18 19 20 21 |
|
ainvoke
abstractmethod
async
ainvoke(request)
Handles invocation requests asynchronously.
PARAMETER | DESCRIPTION |
---|---|
request
|
The incoming request payload.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
The response payload.
TYPE:
|
Source code in swarmauri_core/agent_apis/IAgentCommands.py
23 24 25 26 27 28 29 30 31 32 33 34 |
|
batch
abstractmethod
batch(requests)
Handles batched invocation requests synchronously.
PARAMETER | DESCRIPTION |
---|---|
requests
|
A list of incoming request payloads.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[Any]
|
List[Any]: A list of responses. |
Source code in swarmauri_core/agent_apis/IAgentCommands.py
36 37 38 39 40 41 42 43 44 45 46 47 |
|
abatch
abstractmethod
async
abatch(requests)
Handles batched invocation requests asynchronously.
PARAMETER | DESCRIPTION |
---|---|
requests
|
A list of incoming request payloads.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[Any]
|
List[Any]: A list of responses. |
Source code in swarmauri_core/agent_apis/IAgentCommands.py
49 50 51 52 53 54 55 56 57 58 59 60 |
|
stream
abstractmethod
stream(request)
Handles streaming requests.
PARAMETER | DESCRIPTION |
---|---|
request
|
The incoming request payload.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
A streaming response.
TYPE:
|
Source code in swarmauri_core/agent_apis/IAgentCommands.py
62 63 64 65 66 67 68 69 70 71 72 73 |
|
get_schema_config
abstractmethod
get_schema_config()
Retrieves the schema configuration for the API.
RETURNS | DESCRIPTION |
---|---|
dict
|
The schema configuration.
TYPE:
|
Source code in swarmauri_core/agent_apis/IAgentCommands.py
75 76 77 78 79 80 81 82 83 |
|