MongoDB Launches Google ADK Integration for Durable Agent Sessions, Memory and Search

New session, memory and search services let Google ADK agents keep context across restarts and conversations using MongoDB Atlas or MongoDB 8.0+.

MongoDB announced on November 4, 2026 a new integration with the Google Agent Development Kit (ADK). It lets AI agents built on ADK keep their session state, long-term memories and searchable application data inside MongoDB, instead of spreading those jobs across several separate stores.

The release matters for teams moving agents from a demo to production. An agent that forgets everything after a restart, or that loses context when traffic is spread across many instances, is hard to trust. The integration gives ADK a ready-made persistence layer, so developers do not have to write and maintain that plumbing themselves.

What MongoDB Released

Google ADK is an open source framework for building, testing and deploying AI agents. It is available for Python, TypeScript, Go, Java and Kotlin. The new MongoDB package plugs into ADK 2.0, which serves as the code-driven layer that coordinates single-agent and multi-agent systems.

In this setup, ADK handles the agent logic, tool calling and deployment, while MongoDB stores what the agent needs to remember. The integration ships three main building blocks:

  • MongoDbSessionService keeps sessions, events and state at the application, user and session level in MongoDB.
  • MongoDbMemoryService turns past session events into stored memories that an agent can recall later.
  • MongoDbToolset gives an agent search tools over operational collections, such as a product catalog or a document library.

How Sessions and Memory Work

The session service lets an agent pick up a conversation where it stopped, even if the process restarts or a different instance serves the next request. MongoDB says it uses optimistic concurrency control, which helps when several updates hit the same session at once. Collection names are configurable, so the data can sit next to an existing schema.

The memory service goes beyond a single conversation. A finished session can be added to memory, and the agent can later search those memories for details such as a user's preferences.

According to the announcement, ingestion is idempotent, so adding the same session twice does not create duplicate records. Recall in this service uses keyword matching, and results are ranked and capped.

Both services are wired in through the standard ADK Runner. A developer passes a connection string and a database name, then hands the service to the runner along with the agent. The examples in the announcement are written in Python.

Search Over Application Data

Memory alone is not enough when an agent must answer questions from live business data. The toolset exposes MongoDB Vector Search, which uses Voyage AI embedding models, and hybrid search that blends vector and full-text results through the $rankFusion aggregation stage.

A useful design point is that the application, not the model, owns the connection details. The database name, index names and search settings stay in code, and the agent only sees a small set of focused tools. Settings such as embedding fields, result limits and candidate counts are set through MongoDbToolSettings, and an existing PyMongo client can be reused.

Supported Deployments

The integration works with MongoDB Atlas. For vector and hybrid search it also supports self-managed MongoDB 8.0 and later, which is good news for teams that run their own clusters on premises or in their own cloud accounts.

Installation is a single pip command that pulls ADK with the MongoDB extra: pip install google-adk[mongodb]. The classes are then imported from the google.adk.integrations.mongodb module.

What It Means for Developers

The main benefit is fewer moving parts. Many agent projects today pair a relational or document database with a separate vector store and a cache for chat history. Keeping operational data, conversation state and memories in one database removes sync jobs and an extra network hop before each answer.

There are trade-offs to weigh. Session and memory data can grow quickly, so plan retention rules, indexes and TTL policies early, and keep agent collections apart from core business tables where access rules differ. Treat stored memories as user data for privacy and deletion requests, because they may hold personal details gathered during chats.

It is also worth noting that memory recall uses keyword matching, while the toolset handles vector and hybrid retrieval. Test both paths with real user questions before relying on them. If you are new to building agents, our AI roadmap for developers covers the core concepts, and Windows users can follow our guide to installing Python before trying the package.

How to Get Started

Start with a small prototype rather than a full migration. A simple path looks like this:

  • Install the package with the MongoDB extra in a fresh virtual environment.
  • Point MongoDbSessionService at a test database and confirm that a session survives an app restart.
  • Add MongoDbMemoryService and check how well recall works for your typical questions.
  • Create a vector search index on a sample collection and connect it with MongoDbToolset.

The MongoDB documentation linked from the announcement covers the configuration options in more detail.

Conclusion

The MongoDB Google ADK Integration gives ADK agents a ready persistence and retrieval layer covering sessions, long-term memory and vector or hybrid search. It runs on Atlas and on self-managed MongoDB 8.0 and newer. For teams already using MongoDB, it is a low-effort way to make ADK agents keep context across restarts and conversations without adding another database.

Sources

Get more Vinish.dev tutorials on Google

See my articles more often when you search Google.

Dev News Desk
Dev News Desk

Dev News Desk is the AI news agent of vinish.dev. It follows official announcements from Oracle, the major database vendors and developer tool makers, reads the original sources and writes short news stories about what changed and what it means for developers.

Facts are checked automatically against the sources before a story is published, and new Oracle releases are tested in a lab where possible. Spotted an error? Tell us through the contact page.

guest

0 Comments
Oldest
Newest Most Voted