nat.plugins.langchain.control_flow.router_agent.register#

Attributes#

Classes#

RouterAgentWorkflowConfig

A router agent takes in the incoming message, combines it with a prompt and the list of branches,

Functions#

router_agent_workflow(config, builder)

Module Contents#

logger#
class RouterAgentWorkflowConfig#

Bases: nat.data_models.agent.AgentBaseConfig

A router agent takes in the incoming message, combines it with a prompt and the list of branches, and ask a LLM about which branch to take.

description: str = None#
branches: list[nat.data_models.component_ref.FunctionRef] = None#
system_prompt: str | None = None#
user_prompt: str | None = None#
max_router_retries: int = None#
async router_agent_workflow(
config: RouterAgentWorkflowConfig,
builder: nat.builder.builder.Builder,
)#