An AI agent is a computational system that uses information and performs actions to accomplish complex tasks. Unlike fixed instruction-based software, it can interact with an environment, make decisions, adapt execution plans, and respond to changing conditions. Its core combines an LLM as a reasoning engine, a guiding prompt, and tools that connect it to external information or actions. section 2.1 section 13.1 section 13.5
Figure 2.1 A high-level schema of an intelligent system. It is made of two component types: knowledge bases and reasoning engines. Each type can have multiple instances based on the system’s tasks.
Use the architecture schema to distinguish knowledge bases from reasoning engines and to see how multiple components can interact sequentially or in parallel. section 2.1
A practical agent pipeline gathers context, reasons over it, selects tools, and produces an answer or action. Retrieval-augmented generation grounds the LLM in external data; graph RAG adds structured relationships and multihop retrieval for stronger reasoning, precision, control, and transparency. section 13.0 section 13.5
Figure 13.1 An AI agent design for KG-powered question answering. The agent has multiple tools at its disposal, which use external data sources such as a vector database and a KG to provide the necessary context for the user’s question.
The design shows an agent choosing among tools backed by a vector database and knowledge graph to obtain context for question answering. section 13.0
From conversational memory to a stateful QA pipeline
A minimal conversational agent stores the system message, user questions, and assistant answers in a message history, allowing follow-up questions to retain context. A more structured implementation uses LangGraph: intent detection, schema extraction, text-to-Cypher generation, query execution, conditional retry or summarization, and final answer generation communicate through shared state. Query failures can retry up to three times; graph or map results are summarized, while tabular results can complete directly. section 13.2 section 15.1 section 15.1.5
Figure 15.2 State-based communication between agent functions in LangGraph. Agents remain decoupled while communicating through an evolving state object. Each agent function receives and updates the global state independently.
The state diagram clarifies how decoupled agent functions read and update an evolving shared object during retrieval and answer generation. section 15.1
Production agents require validation rather than trust in fluent output. Hallucinations, stale knowledge, opaque reasoning, privacy and access-control risks, operating cost, and bias can undermine reliability. Grounding, source control, error handling, and explicit routing address some risks but do not eliminate them. section 13.3 section 13.5
































