nat.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(/, **data: Any)#

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.

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.

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,
)#