Member Junction
    Preparing search index...

    Details of a sub-agent that is included within a parent agent. Sub-agents can either be 'child' agents which have a direct parent-child relationship via ParentID, or 'related' agents which are linked via the AIAgentRelationship table.

    interface SubAgentSpec {
        AgentRelationshipID?: string;
        SubAgent: AgentSpec;
        SubAgentContextPaths?: Record<string, string>;
        SubAgentInputMapping?: Record<string, string>;
        SubAgentOutputMapping?: Record<string, string>;
        Type: "child" | "related";
    }
    Index

    Properties

    AgentRelationshipID?: string

    Only used when type=='related'. This is the ID of the AIAgentRelationship that links the parent and sub-agent.

    SubAgent: AgentSpec
    SubAgentContextPaths?: Record<string, string>

    Used when type =='related', this defines data that does not go to the sub-agents payload but instead goes into a user message that is shared with the sub-agent to add to its context during execution. If a sub-agent needs more info but it is semi-structured or just doesn't fit the sub-agent's payload structure, this is where that info can go.

    SubAgentInputMapping?: Record<string, string>

    Used when type =='related', this defines how data from the parent agent's payload is mapped to the sub-agent's payload

    SubAgentOutputMapping?: Record<string, string>

    Used when type =='related', this defines how data from the sub-agent's payload is mapped back to the parent agent's payload

    Type: "child" | "related"

    When Type == 'child' this means that the sub-agent has a ParentID set to the parent's ID, in comparison when Type=='related' there is no ParentID relationship and instead the relationship is done via the AIAgentRelationship table where the AgentID and SubAgentID are specified. Child sub-agents use the same paylaod structure as the parent and use PayloadDownstreamPaths and PayloadUpstreamPaths to define how data flows between the parent and child. Related agents do not have this relationship and instead use SubAgentInputMapping, SubAgentOutputMapping and SubAgentContextPaths for mapping data from the parent agent payload to the sub-agent for execution and back.