orka.nodes.base_node module

class orka.nodes.base_node.BaseNode(node_id, prompt, queue, **kwargs)[source]

Bases: ABC

Abstract base class for all agent nodes in the OrKa orchestrator. Defines the common interface and properties for agent nodes.

__init__(node_id, prompt, queue, **kwargs)[source]

Initialize the base node with the given parameters.

Parameters:
  • node_id (str) – Unique identifier for the node.

  • prompt (str) – Prompt or instruction for the node.

  • queue (list) – Queue of agents or nodes to be processed.

  • **kwargs – Additional parameters for the node.

async initialize() None[source]

Initialize the node and its resources.

abstractmethod async run(input_data)[source]

Abstract method to run the logical node.

Parameters:

input_data – Input data for the node to process.

Raises:

NotImplementedError – If the method is not implemented by a subclass.

__repr__()[source]

Return a string representation of the node.

Returns:

String representation of the node.

Return type:

str