ControllerBase#
- class council.controllers.ControllerBase(chains: Sequence[ChainBase], parallelism: bool = False)[source]#
Bases:
Monitorable
,ABC
Abstract base class for an agent controller.
- __init__(chains: Sequence[ChainBase], parallelism: bool = False) None [source]#
- Parameters:
chains (List[Chain]) – The list of chains available for execution.
parallelism (bool) – If true, Build a plan that will be executed in parallel
- execute(context: AgentContext) List[ExecutionUnit] [source]#
Generates an execution plan for the agent based on the provided context, chains, and budget.
- Parameters:
context (AgentContext) – The context for generating the execution plan.
- Returns:
A list of execution units representing the execution plan.
- Return type:
List[ExecutionUnit]
- Raises:
None –
- 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