What if you could build an AI assistant with access to your own data in under 40 lines of Java? That’s now possible with my contribution to the just-released Spring AI 2.0.0 M2 - Amazon Bedrock Knowledge Base support. It’s a fully managed RAG (Retrieval-Augmented Generation) service that handles document ingestion, embeddings, and vector storage for you - and now you can use it with Spring AI! RAG lets AI models answer questions using your own documents instead of relying solely on their training data.
In this post, I’ll show you how to build a working AI agent with RAG in minutes using JBang - no Maven project setup required. You’ll have an AI assistant answering questions from your company documents with minimal code.














