Member Junction
    Preparing search index...

    Represents a runtime modification to an agent's available sub-agents.

    The direct counterpart of ActionChange, for sub-agents instead of actions. Lets callers dynamically add or remove which sub-agents an agent can delegate to at runtime, without modifying the agent's database configuration (AIAgent.ParentID / MJ: AI Agent Relationships). Useful for multi-tenant scenarios, security restrictions, and testing — mirroring action overrides.

    Scope/propagation semantics are identical to ActionChange:

    • 'global': applies to all agents in the hierarchy (propagated as-is to sub-agents)
    • 'root': applies only to the root agent (not propagated)
    • 'all-subagents': applies to all sub-agents but not the root (propagated as 'global')
    • 'specific': applies only to agents listed in agentIds
    // Make an extra specialist sub-agent available to the whole hierarchy for this run
    const change: SubAgentChange = {
    scope: 'global',
    mode: 'add',
    subAgentIds: ['fraud-specialist-agent-id']
    };

    // Remove a sub-agent from a specific agent only
    const restrict: SubAgentChange = {
    scope: 'specific',
    mode: 'remove',
    subAgentIds: ['risky-sub-agent-id'],
    agentIds: ['triage-agent-id']
    };

    2.132.0

    interface SubAgentChange {
        agentIds?: string[];
        mode: ActionChangeMode;
        scope: ActionChangeScope;
        subAgentIds: string[];
    }
    Index

    Properties

    agentIds?: string[]

    Array of Agent IDs that this change applies to. Required when scope is 'specific', ignored otherwise.

    Mode — 'add' to make sub-agents available, 'remove' to take them away.

    Scope — which agents this change applies to (see ActionChangeScope).

    subAgentIds: string[]

    Array of sub-agent (AIAgent) entity IDs to add or remove from the agent's available set. These must be valid Agent IDs from the AI Agents table.