A retry mechanism repeats a failed operation under explicit conditions. In a graph-querying QA pipeline, it preserves failure information in shared state and routes execution back to query generation. section 15.1.4 section 15.1.5
Failed query recovery
A generated Cypher query raises a Neo4j ClientError. The execution agent records the exception and query in information, sets results_error, and increments retries. The routing function sends the state back to text-to-Cypher for another attempt until three runs have occurred.
Listing 15.5 Pipeline agent’s state
class AgentState(TypedDict):
question: str
output_type: str
output_type_reason: str
schema: str
query: str
query_reasoning: str
query_message: str
results_error: list
summary: str
summary_reason: str
summary_analysis: bool
information: str
retries: int
Inspect the shared AgentState fields that carry retry counts, errors, and recovery context between pipeline agents. section 15.1.4




















