Build a RAG chat agent
New to Akka? Start here: Use the Build your first agent guide to get a simple agentic service running locally and interact with it. |
This tutorial walks through building a Retrieval-Augmented Generation (RAG) chat agent. We start with a simple agent that streams responses from a large language model (LLM), and add retrieval functionality in separate parts of the tutorial. By the end, we will have an agent that uses the latest Akka documentation as its knowledge base, accessible through a web UI.
-
Creating the agent — A streaming Agent that answers questions using an LLM and session memory.
-
Knowledge indexing with a workflow — A Workflow that indexes local documentation into a vector database.
-
Executing RAG queries — A helper class that performs RAG queries by combining vector search with the LLM.
-
Adding UI endpoints — Endpoints that expose a UI, support multiple sessions, and allow users to query the system.