Applied AI / LLM
Agentic Graph RAG
PythonFastAPIFalkorDBLangChainStreamlitSSE
An end-to-end agentic GraphRAG stack: ingest almost any file into a FalkorDB knowledge graph, then ask questions in natural language. A tool-calling agent inspects the live graph schema, plans and executes read-only Cypher, self-corrects on errors, and streams its full reasoning trace — grounding every answer in the graph.
Architecture
Two frontends, one backend
The same backend powers two different interfaces, each built for a different audience:
- GraphRAG Studio (Streamlit) is the all-in-one working tool. You upload your files and it turns them into a connected map of the facts and relationships inside them; you can explore that map visually and ask questions about it in plain English. Streamlit lets all of this live in a single app with no custom web development, so the full feature set is usable from one place.
- Agent Console (React) is a polished, purpose-built interface that makes the agent's process easy to follow. As it answers a question, every step it takes — deciding what to look up, searching the knowledge map, and writing the final answer — appears live as a workflow you can watch unfold, next to the answer itself. Its job is to show clearly how the agent reasons, and to prove the backend can power a fully custom app, not just the quick Streamlit one.
Highlights
- Model-agnostic: every LLM call goes through one provider layer, switchable between OpenAI, Anthropic, Ollama, or any OpenAI-compatible endpoint with two environment variables — and swappable at runtime from the UI.
- Modern agent loop: native tool calling with conversation-state accumulation, a structured-JSON fallback for local models, read-only Cypher validation, error self-correction, and capped retries.
- Memory that scales: recent turns replay verbatim; older turns fold into a rolling LLM-generated summary so long chats keep context without unbounded prompts.
- Ingest any shape: tabular files become a typed entity graph via inferred schema; documents are chunked with LLM-extracted entities and relationships.
- Streaming API: the FastAPI backend streams agent events (thoughts, tool calls, Cypher, answers, graph payloads) over SSE to a Streamlit UI with live traces and an interactive graph view.