Add persistent memory to Google Agent Development Kit agents.
Google ADK Integration
CortexDB integrates with the Google Agent Development Kit (ADK) to provide persistent memory for agents built with Google's framework.
Installation
pip install cortexdb[google-adk]
Setup
from google.adk import Agent
from cortexdb.integrations.google_adk import CortexMemoryTool
memory_tool = CortexMemoryTool(
api_key="your-cortex-api-key",
tenant_id="my-app",
)
agent = Agent(
model="gemini-2.0-flash",
tools=[memory_tool],
instruction="You are an assistant with long-term memory. Use the memory tool to store and recall information across conversations.",
)
response = agent.generate_content("What did we discuss yesterday about the API redesign?")
Available Tools
The CortexMemoryTool exposes the following functions to the agent:
| Function | Description |
|---|---|
| remember | Store information in CortexDB |
| recall | Retrieve relevant memories |
| forget | Remove specific memories |
Configuration
| Parameter | Default | Description |
|---|---|---|
| api_key | $CORTEX_API_KEY | CortexDB API key |
| tenant_id | Required | Tenant identifier |
| namespace | None | Memory namespace |
| top_k | 10 | Results per recall |