iflytek/astron-agent · error · CustomException

KNOWLEDGE_NODE_EXECUTION_ERROR

KNOWLEDGE_NODE_EXECUTION_ERROR

Error message

Knowledge base URL is not set

What it means

KnowledgeNode.execute raises when the configured knowledge base URL is blank — the node cannot build the retrieval endpoint. This is a configuration guard at node execution time, meaning the workflow's knowledge node settings (or environment) lack the service URL.

Solutions

  1. Set the knowledge base URL in workflow/environment configuration
  2. Verify the knowledge service deployment and its exposed URL
  3. Fail the node fast with a clear config-error message
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/workflow/engine/nodes/knowledge/knowledge_node.py:313 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/5a4bc57fe284c050. Report an issue: GitHub.

Appendix: source

Thrown at core/workflow/engine/nodes/knowledge/knowledge_node.py:313

                should_use, token_usage = await self._should_use_knowledge(
                    query, span, variable_pool
                )
                if not should_use:
                    outputs = {self.output_identifier[0]: []}
                    return self._create_node_result(
                        status=status,
                        inputs=inputs,
                        outputs=outputs,
                        token_usage=token_usage,
                    )

            # Get repository and document IDs
            repo_and_doc_ids = self._get_repo_and_doc_ids()

            # Get knowledge base URL from environment variables
            knowledge_base_url = os.getenv("KNOWLEDGE_BASE_URL")
            if not knowledge_base_url:
                raise CustomException(
                    err_code=CodeEnum.KNOWLEDGE_NODE_EXECUTION_ERROR,
                    err_msg="Knowledge base URL is not set",
                    cause_error="Knowledge base URL is not set",
                )
            knowledge_recall_url = f"{knowledge_base_url}/knowledge/v1/chunk/query"
            flow_id: str = variable_pool.system_params.get(ParamKey.FlowId)
            knowledge_config = KnowledgeConfig(
                top_n=self.topN,
                rag_type=self.ragType,
                repo_id=repo_and_doc_ids.repo_ids,
                url=knowledge_recall_url,
                query=str(query),
                flow_id=flow_id,
                doc_ids=repo_and_doc_ids.doc_ids,
                dataset_ids=repo_and_doc_ids.dataset_ids,
                threshold=self.score,
                history=history,
            )

View on GitHub (pinned to 5e758547a8)