langchain.js
    Preparing search index...

    Type Alias CreateSwarmParams<AnnotationRootT, AgentAnnotationRootT>

    type CreateSwarmParams<
        AnnotationRootT extends BaseDynamicToolInput<any> = typeof SwarmState,
        AgentAnnotationRootT extends BaseDynamicToolInput<any> = typeof BaseMessage,
    > = {
        agents: BaseDynamicToolInput<
            AgentAnnotationRootT["State"],
            AgentAnnotationRootT["Update"],
            string,
            AgentAnnotationRootT["spec"],
            AgentAnnotationRootT["spec"],
        >[];
        defaultActiveAgent: string;
        stateSchema?: AnnotationRootT;
    }

    Type Parameters

    Index

    Properties

    agents: BaseDynamicToolInput<
        AgentAnnotationRootT["State"],
        AgentAnnotationRootT["Update"],
        string,
        AgentAnnotationRootT["spec"],
        AgentAnnotationRootT["spec"],
    >[]

    List of agents to add to the swarm

    defaultActiveAgent: string

    Name of the agent to route to by default (if no agents are currently active)

    stateSchema?: AnnotationRootT

    State schema to use for the multi-agent graph