hap.models.graphΒΆ
AttributesΒΆ
ClassesΒΆ
Module ContentsΒΆ
- class hap.models.graph.HAPGraph(/, **data: Any)ΒΆ
Bases:
pydantic.BaseModel
HAP graph with agent orchestration capabilities.
- Parameters:
data (Any)
- add_agent_node(node_id: str, agent: haive.agents.base.agent.Agent, next_nodes: List[str] = None) HAPNode ΒΆ
Add an agent as a node to the graph.
- add_entrypoint_node(node_id: str, entrypoint: str, next_nodes: List[str] = None) HAPNode ΒΆ
Add a node by entrypoint string.
- async execute(initial_context: Dict[str, Any]) hap.models.context.HAPContext ΒΆ
Execute the entire graph.
- Parameters:
initial_context (Dict[str, Any])
- Return type:
- class hap.models.graph.HAPNode(/, **data: Any)ΒΆ
Bases:
pydantic.BaseModel
HAP node that can contain an agent.
- Parameters:
data (Any)
- async execute(context: HAPContext) HAPContext ΒΆ
Execute this nodeβs agent.
- Parameters:
context (HAPContext)
- Return type:
- load_agent() haive.agents.base.agent.Agent ΒΆ
Load agent from entrypoint if not already loaded.
- Return type:
haive.agents.base.agent.Agent
- hap.models.graph.AgentGraphΒΆ
- hap.models.graph.AgentNodeΒΆ