Back to documentation
  • Preparing search index...
  • The search index is not available
API Reference
  • API Reference
  • langgraph-swarm
  • createSwarm

Function createSwarm

  • createSwarm<AnnotationRootT>(__namedParameters): StateGraph<AnnotationRootT["spec"], AnnotationRootT["State"], AnnotationRootT["Update"], string, AnnotationRootT["spec"], AnnotationRootT["spec"], StateDefinition>
  • Create a multi-agent swarm.

    Type Parameters

    • AnnotationRootT extends AnnotationRoot<any, AnnotationRootT> = AnnotationRoot<{
          activeAgent: {
              Root: (<S>(sd) => AnnotationRoot<S>);
              (): LastValue<string>;
              (annotation): BinaryOperatorAggregate<string, string>;
          };
          messages: BinaryOperatorAggregate<BaseMessage[], Messages>;
      }>

    Parameters

    • __namedParameters: CreateSwarmParams<AnnotationRootT, AnnotationRoot<{
          messages: BinaryOperatorAggregate<BaseMessage[], Messages>;
      }>>

    Returns StateGraph<AnnotationRootT["spec"], AnnotationRootT["State"], AnnotationRootT["Update"], string, AnnotationRootT["spec"], AnnotationRootT["spec"], StateDefinition>

    A multi-agent swarm StateGraph.

    • Defined in libs/langgraph-swarm/dist/swarm.d.ts:45

Settings

Member Visibility

Theme

API Reference
  • Loading...

Generated using TypeDoc