{"record":{"id":"2444c25e60298019","repo":"n8n-io/n8n","slug":"assistant-handler-not-configured","errorCode":null,"errorMessage":"Assistant handler not configured","messagePattern":"Assistant handler not configured","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-workflow-builder.ee/src/multi-agent-workflow-subgraphs.ts","lineNumber":435,"sourceCode":"\t\t\t\t'discovery_subgraph',\n\t\t\t\tcreateSubgraphNodeHandler(\n\t\t\t\t\t'discovery',\n\t\t\t\t\tcreateCompiledSubgraphExecutor(\n\t\t\t\t\t\tdiscoverySubgraph,\n\t\t\t\t\t\tcompiledDiscovery,\n\t\t\t\t\t\tMAX_DISCOVERY_ITERATIONS,\n\t\t\t\t\t),\n\t\t\t\t\tlogger,\n\t\t\t\t),\n\t\t\t)\n\t\t\t// Add Assistant Subgraph Node (routes to SDK for help/debug queries)\n\t\t\t.addNode(\n\t\t\t\t'assistant_subgraph',\n\t\t\t\tcreateSubgraphNodeHandler(\n\t\t\t\t\t'assistant',\n\t\t\t\t\tasync (state, nodeConfig) => {\n\t\t\t\t\t\tif (!assistantHandler) {\n\t\t\t\t\t\t\tthrow new Error('Assistant handler not configured');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst query = extractUserRequest(state.messages);\n\t\t\t\t\t\tconst userId = (nodeConfig?.configurable?.userId as string) ?? 'unknown';\n\n\t\t\t\t\t\tconst streamWriter = getWriter(nodeConfig);\n\n\t\t\t\t\t\tlet chunksDispatched = 0;\n\t\t\t\t\t\tconst writer = (chunk: StreamChunk) => {\n\t\t\t\t\t\t\tif (streamWriter) {\n\t\t\t\t\t\t\t\tchunksDispatched++;\n\t\t\t\t\t\t\t\tstreamWriter(chunk);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tconst abortController = new AbortController();\n\t\t\t\t\t\tconst timeoutId = setTimeout(() => abortController.abort(), ASSISTANT_SDK_TIMEOUT_MS);\n","sourceCodeStart":417,"sourceCodeEnd":453,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-workflow-builder.ee/src/multi-agent-workflow-subgraphs.ts#L417-L453","documentation":"The assistant subgraph node in the multi-agent workflow graph was invoked, but no assistantHandler was supplied when the graph was built. The handler is the only route from this node to the SDK session for help/debug queries, so the node is a stub: the throw is a wiring precondition, not a runtime failure of the assistant itself.","triggerScenarios":"Thrown at packages/@n8n/ai-workflow-builder.ee/src/multi-agent-workflow-subgraphs.ts:435 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an assistantHandler when calling createMultiAgentWorkflowWithSubgraphs","Route the conversation away from the assistant_subgraph node when no handler is available","Default the graph builder to a no-op handler that returns a 'not configured' message instead of throwing"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}