MongoDB Atlas Vector Search lets you keep your knowledge base inside MongoDB while enjoying hybrid search and AI-ready workloads.
In this guide you’ll:
Embed and store vectors in Atlas
Setup Galileo
Stream LangGraph traces to Galileo for end-to-end observability
import osfrom galileo.handlers.langchain import GalileoCallback# --- Galileo ---os.environ["GALILEO_API_KEY"] = "<galileo-key>"os.environ["GALILEO_PROJECT"] = "<galileo-project>"os.environ["GALILEO_LOG_STREAM"] = "mongo_rag_demo"# os.environ["GALILEO_CONSOLE_URL"] = "<galileo-console-url>" # You can leave this commented out if you are using app.galileo.aigalileo_handler = GalileoCallback()
Once the callback is created we can add it to the agent.