strands-dakera
strands-dakera gives agents persistent memory that survives across sessions, backed by a self-hosted Dakera server. Unlike a fixed-TTL store, Dakera ranks recalled memories by importance × recency × semantic relevance, so the most contextually useful memories surface first.
It offers two integration points against the same server:
DakeraMemoryStore— aMemoryStorethat plugs into the agent loop via aMemoryManager(Strands ≥ 1.45), with automatic memory injection and extraction.dakera_memory— a tool the model calls explicitly for full CRUD (store/retrieve/get/update/delete).
Installation
Section titled “Installation”pip install "strands-dakera>=0.2.0" # DakeraMemoryStore requires >=0.2.0 (Strands >=1.45)Run a Dakera server locally (once):
git clone https://github.com/dakera-ai/dakera-deploy && cd dakera-deploy && docker compose up -dMemory store
Section titled “Memory store”Wire Dakera into the agent loop with a MemoryManager. The manager searches the store to recall context (injected into the prompt automatically) and, when writable, writes new memories — either directly or by extracting facts from the conversation every few turns.
from strands import Agentfrom strands.memory import MemoryManagerfrom strands_dakera import DakeraMemoryStore
store = DakeraMemoryStore(agent_id="alex", writable=True, extraction=True)agent = Agent(memory_manager=MemoryManager(stores=[store]))
# Recall and writes happen automatically — no explicit tool call required.agent("Remember that I prefer dark-mode dashboards and async standups.")agent("How do I like to work?") # recalls the stored preferencesDakeraMemoryStore implements search (decay-weighted recall) and add (a client-side write sink), so enabling extraction uses the manager’s client-side ModelExtractor. Common arguments: agent_id (required), name, writable, extraction, max_search_results, importance, memory_type, and base_url / api_key.
Prefer an explicitly model-invoked tool? Register dakera_memory instead (or alongside the store):
from strands import Agentfrom strands_dakera import dakera_memory
agent = Agent(tools=[dakera_memory])
# Store a memory with an importance weightagent.tool.dakera_memory( action="store", agent_id="alex", content="Alex prefers dark-mode dashboards and async standups.", importance=0.8, metadata={"category": "preferences"},)
# Decay-weighted semantic recallagent.tool.dakera_memory( action="retrieve", agent_id="alex", query="how does alex like to work?", top_k=5,)Key Features
Section titled “Key Features”- Decay-weighted recall: results ranked by a decay-aware importance signal, not just vector distance
- Importance-typed storage:
importance(0.0–1.0) andmemory_type(episodic / semantic / procedural / working) - Two integration points: a
MemoryStorefor the agent loop and a full-CRUD tool, sharing one server - Self-hosted: runs against your own Dakera server — no cloud key required
- Safe by default: mutative tool actions prompt for confirmation unless
BYPASS_TOOL_CONSENT=true
Configuration
Section titled “Configuration”DAKERA_BASE_URL=http://localhost:3000 # Dakera server URL (default)DAKERA_API_KEY=dk-your-key # Optional API key