LlamaIndex integration
llamaindex-dakera (0.3.0) adds a Dakera-backed memory store (DakeraMemoryStore) and a LlamaIndex vector store (DakeraIndexStore) to LlamaIndex pipelines. The server computes embeddings, so no local GPU or embedding API is needed. This page is for Python developers building retrieval or agent pipelines with LlamaIndex.
Quick start
pip install llamaindex-dakera
Requires Python ≥ 3.10, dakera>=0.13.1 (installed automatically) and a running Dakera server. Works with Dakera server v0.12.0 and v0.11.108.
from llama_index_dakera import DakeraMemoryStore, DakeraIndexStore
# Semantic memory
store = DakeraMemoryStore(
api_url="http://localhost:3000",
api_key="dk-mykey",
agent_id="my-agent",
)
# Vector index for RAG
index = DakeraIndexStore(
api_url="http://localhost:3000",
api_key="dk-mykey",
namespace="my-docs",
)
Features
- DakeraMemoryStore — semantic memory with importance scoring and decay
- DakeraIndexStore — vector index compatible with LlamaIndex's
VectorStoreQuery - DakeraSessionManager — session lifecycle tracking
- DakeraKnowledgeGraph — entity-relationship graph operations
- DakeraEntityExtractor — automatic entity extraction
- DakeraNamespaceManager — multi-tenant namespace isolation
Examples
Agent memory
from llama_index_dakera import DakeraMemoryStore
store = DakeraMemoryStore(
api_url="http://localhost:3000",
api_key="dk-mykey",
agent_id="llamaindex-demo",
recall_k=3,
default_importance=0.8,
)
store.put("The user prefers Python over JavaScript.")
store.put("Project deadline is next Friday.", memory_type="episodic", importance=0.9)
store.put("The codebase uses FastAPI with SQLAlchemy.", memory_type="semantic")
memories = store.get("programming language preferences")
for m in memories:
print(f" [{m['score']:.3f}] {m['content']}")
RAG pipeline with VectorStoreQuery
from llama_index.core.schema import TextNode
from llama_index.core.vector_stores.types import VectorStoreQuery
from llama_index_dakera import DakeraIndexStore
store = DakeraIndexStore(
api_url="http://localhost:3000",
api_key="dk-mykey",
namespace="rag-demo",
)
nodes = [
TextNode(text="Dakera provides persistent memory for AI agents.", metadata={"topic": "overview"}),
TextNode(text="Vector search uses cosine similarity over embeddings.", metadata={"topic": "search"}),
TextNode(text="Server-side embedding removes the need for local GPUs.", metadata={"topic": "architecture"}),
]
ids = store.add(nodes)
query = VectorStoreQuery(query_str="How does Dakera handle embeddings?", similarity_top_k=2)
result = store.query(query)
for node, score in zip(result.nodes, result.similarities):
print(f" [{score:.3f}] {node.text}")
API reference
DakeraMemoryStore options
| Parameter | Type | Default | Description |
|---|---|---|---|
api_url | str | — | Dakera server URL |
api_key | str | "" | API key |
agent_id | str | — | Agent identifier |
recall_k | int | 5 | Results per recall query |
min_importance | float | 0.0 | Minimum importance of returned memories |
default_ | float | 0.7 | Default importance for stored memories |
DakeraIndexStore options
| Parameter | Type | Default | Description |
|---|---|---|---|
api_url | str | — | Dakera server URL |
api_key | str | "" | API key |
namespace | str | — | Vector namespace |
Configuration
The package does not read environment variables. To keep the URL and key out of source code, read them yourself:
import os
from llama_index_dakera import DakeraMemoryStore
store = DakeraMemoryStore(
api_url=os.environ["DAKERA_API_URL"],
api_key=os.environ.get("DAKERA_API_KEY", ""),
agent_id="my-agent",
)
Links
LlamaIndex + Dakera in production
Dakera as the memory and vector store of your LlamaIndex pipelines, self-hosted on your own infrastructure.