Skip to content

Decision

Sub classes

Name Children Inherits
RouteDecision
llmling_agent.delegation.router
Forward message without waiting for response.
    AwaitResponseDecision
    llmling_agent.delegation.router
    Forward message and wait for response.
      EndDecision
      llmling_agent.delegation.router
      End the conversation.

        Base classes

        Name Children Inherits
        BaseModel
        pydantic.main
        Usage docs: https://docs.pydantic.dev/2.10/concepts/models/

        ⋔ Inheritance diagram

        graph TD
          94350422920384["router.Decision"]
          94350366564672["main.BaseModel"]
          140709601677504["builtins.object"]
          94350366564672 --> 94350422920384
          140709601677504 --> 94350366564672

        🛈 DocStrings

        Bases: BaseModel

        Base class for all routing decisions.

        Source code in src/llmling_agent/delegation/router.py
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        class Decision(BaseModel):
            """Base class for all routing decisions."""
        
            type: str = Field(init=False)
            """Discriminator field for decision types."""
        
            reason: str
            """Reason for this routing decision."""
        
            model_config = ConfigDict(use_attribute_docstrings=True)
        
            async def execute(
                self,
                message: ChatMessage[Any],
                source_agent: AnyAgent[Any, Any],
                pool: AgentPool,
            ):
                """Execute this routing decision."""
                raise NotImplementedError
        

        reason instance-attribute

        reason: str
        

        Reason for this routing decision.

        type class-attribute instance-attribute

        type: str = Field(init=False)
        

        Discriminator field for decision types.

        execute async

        execute(message: ChatMessage[Any], source_agent: AnyAgent[Any, Any], pool: AgentPool)
        

        Execute this routing decision.

        Source code in src/llmling_agent/delegation/router.py
        34
        35
        36
        37
        38
        39
        40
        41
        async def execute(
            self,
            message: ChatMessage[Any],
            source_agent: AnyAgent[Any, Any],
            pool: AgentPool,
        ):
            """Execute this routing decision."""
            raise NotImplementedError
        

        Show source on GitHub