swarmauri.core.swarms.ISwarmChainCRUD module

class swarmauri.core.swarms.ISwarmChainCRUD.ISwarmChainCRUD[source]

Bases: ABC

Interface to provide CRUD operations for ICallableChain within swarms.

abstract create_chain(chain_id, chain_definition)[source]

Creates a callable chain with the provided definition.

Parameters: - chain_id (str): A unique identifier for the callable chain. - chain_definition (Dict[str, Any]): The definition of the callable chain including steps and their configurations.

Return type:

None

abstract delete_chain(chain_id)[source]

Removes a callable chain from the swarm.

Parameters: - chain_id (str): The unique identifier of the callable chain to be removed.

Return type:

None

abstract list_chains()[source]

Lists all callable chains currently managed by the swarm.

Returns: - List[Dict[str, Any]]: A list of callable chain definitions.

Return type:

List[Dict[str, Any]]

abstract read_chain(chain_id)[source]

Retrieves the definition of a callable chain by its identifier.

Parameters: - chain_id (str): The unique identifier of the callable chain to be retrieved.

Returns: - Dict[str, Any]: The definition of the callable chain.

Return type:

Dict[str, Any]

abstract update_chain(chain_id, new_definition)[source]

Updates an existing callable chain with a new definition.

Parameters: - chain_id (str): The unique identifier of the callable chain to be updated. - new_definition (Dict[str, Any]): The new definition of the callable chain including updated steps and configurations.

Return type:

None