Add a router to the currently active agent to the StateGraph.
addActiveAgentRouter<
AnnotationRootT extends AnnotationRoot<any> = any
>(
builder: StateGraph<AnnotationRootT["spec"], AnnotationRootT["State"], AnnotationRootT["Update"], any, AnnotationRootT["spec"], AnnotationRootT["spec"]>,
routeTo: __type
): StateGraph<AnnotationRootT["spec"], AnnotationRootT["State"], AnnotationRootT["Update"], any, AnnotationRootT["spec"], AnnotationRootT["spec"]>| Name | Type | Description |
|---|---|---|
builder* | StateGraph<AnnotationRootT["spec"], AnnotationRootT["State"], AnnotationRootT["Update"], any, AnnotationRootT["spec"], AnnotationRootT["spec"]> | The graph builder (StateGraph) to add the router to. |
routeTo* | __type | A list of agent (node) names to route to. |