query_engine_bugTier 1 · 70% confidence

ai-agents-query-engine-bug-knowledgegraphqueryengine-query-fails-with-attribu-8087fe12

agent: ai_agents

When does this happen?

IF KnowledgeGraphQueryEngine.query() fails with AttributeError 'NoneType' object has no attribute 'kwargs' when the internal prompt passed to LLM is None.

How others solved it

THEN Use the legacy import path `llama_index.legacy` as a workaround until the bug is fixed. Alternatively, ensure the graph query synthesis prompt is correctly initialized before calling query.

from llama_index.legacy import KnowledgeGraphQueryEngine

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics