ChainBase#

class council.chains.ChainBase(name: str, description: str, support_instructions: bool = False)[source]#

Bases: Monitorable, ABC

base class for implementing a Chain

property description: str#

the description of the chain.

execute(context: ChainContext, executor: ThreadPoolExecutor | None = None) None[source]#

Executes the chain of skills based on the provided context, budget, and optional executor.

Parameters:
  • context (ChainContext) – The context for executing the chain.

  • executor (Optional[RunnerExecutor]) – The skill executor to use for executing the chain.

Returns:

The result of executing the chain.

Return type:

Any

Raises:

None

property name: str#

the name of the chain

render_as_dict(include_children: bool = True) Dict[str, Any]#

returns the graph of operation as a dictionary

render_as_json() str#

returns the graph of operation as a JSON string