agents.rag.agentic_router.agent_chain

Agentic RAG Router using ChainAgent.

Simplified version using the new ChainAgent approach.

Classes

RAGStrategy

Available RAG strategies.

StrategyDecision

Strategy selection result.

Functions

create_agentic_rag_router_chain(documents[, ...])

Create an agentic RAG router using ChainAgent.

create_agentic_router_multi_agent(documents[, llm_config])

Create as a multi-agent system.

create_simple_rag_router_chain(documents[, llm_config])

Ultra-simple RAG router with just basic routing.

get_agentic_router_chain_io_schema()

Get I/O schema for the chain version.

Module Contents

class agents.rag.agentic_router.agent_chain.RAGStrategy

Bases: str, enum.Enum

Available RAG strategies.

Initialize self. See help(type(self)) for accurate signature.

class agents.rag.agentic_router.agent_chain.StrategyDecision(/, **data)

Bases: pydantic.BaseModel

Strategy selection result.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

agents.rag.agentic_router.agent_chain.create_agentic_rag_router_chain(documents, llm_config=None, name='Agentic RAG Router')

Create an agentic RAG router using ChainAgent.

Super simple compared to the old implementation!

Parameters:
  • documents (list[langchain_core.documents.Document])

  • llm_config (haive.core.models.llm.base.LLMConfig | None)

  • name (str)

Return type:

haive.agents.chain.ChainAgent

agents.rag.agentic_router.agent_chain.create_agentic_router_multi_agent(documents, llm_config=None)

Create as a multi-agent system.

Parameters:
  • documents (list[langchain_core.documents.Document])

  • llm_config (haive.core.models.llm.base.LLMConfig | None)

Return type:

haive.agents.chain.multi_integration.ChainMultiAgent

agents.rag.agentic_router.agent_chain.create_simple_rag_router_chain(documents, llm_config=None)

Ultra-simple RAG router with just basic routing.

Parameters:
  • documents (list[langchain_core.documents.Document])

  • llm_config (haive.core.models.llm.base.LLMConfig | None)

Return type:

haive.agents.chain.ChainAgent

agents.rag.agentic_router.agent_chain.get_agentic_router_chain_io_schema()

Get I/O schema for the chain version.

Return type:

dict[str, list[str]]