Back to documentation
Preparing search index...
The search index is not available
API Reference
API Reference
langgraph-swarm
createSwarm
Function createSwarm
create
Swarm
<
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.
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
API Reference
Loading...
Create a multi-agent swarm.