Feature: DakeraMemoryStore — decay-weighted persistent memory backend for SK Memory
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Bắt đầu với python/semantic_kernel/memory/memory_store_base.py và so sánh python/semantic_kernel/memory/volatile_memory_store.py với các connector trong python/semantic_kernel/connectors/memory/. Xác định đầy đủ contract của MemoryStoreBase và cách client Dakera được kỳ vọng sẽ hoạt động. Công việc được xem là hoàn tất khi có một DakeraMemoryStore hoàn chỉnh bao quát các thao tác memory được đề xuất, đồng thời việc tích hợp và khả năng tương thích của nó với interface hiện có đã được xác minh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Semantic Kernel's memory system accepts pluggable IMemoryStore implementations (Python: MemoryStoreBase). This issue proposes a DakeraMemoryStore that brings decay-weighted, cross-session persistence to SK agents without requiring Weaviate, Azure AI Search, or other heavy vector database deployments.
Problem
SK's built-in memory stores (volatile in-process, SQLite) lose all data on restart. Connecting to Azure AI Search or Weaviate adds cost and infrastructure complexity for teams that want persistent agent memory. None of the existing backends implement relevance decay — a stale memory from 3 months ago ranks as high as one from yesterday.
Proposed Solution
A DakeraMemoryStore implementing SK's memory interface:
from semantic_kernel.memory.memory_store_base import MemoryStoreBase
from semantic_kernel.memory.memory_record import MemoryRecord
from dakera import DakeraClient
class DakeraMemoryStore(MemoryStoreBase):
"""Dakera-backed SK memory store with decay-weighted recall.
Setup: docker run -d -p 3300:3300 -e DAKERA_API_KEY=demo ghcr.io/dakera-ai/dakera:latest
"""
def __init__(self, base_url: str = "http://localhost:3300", api_key: str = ""):
self._client = DakeraClient(base_url=base_url, api_key=api_key)
async def get_nearest_matches_async(
self,
collection_name: str,
embedding: ndarray,
limit: int,
min_relevance_score: float = 0.0,
with_embeddings: bool = False,
) -> List[Tuple[MemoryRecord, float]]:
response = await self._client.recall_async(
agent_id=collection_name,
query=embedding.tolist(),
top_k=limit,
)
return [
(self._to_memory_record(m), m.score)
for m in (response.memories if response else [])
if m.score >= min_relevance_score
]
async def upsert_async(self, collection_name: str, record: MemoryRecord) -> str:
return await self._client.store_memory_async(
agent_id=collection_name,
content=record.text,
metadata={"id": record.id, **record.additional_metadata},
)
# ... get_async, remove_async, get_collections_async
Usage with the SK kernel:
import semantic_kernel as sk
kernel = sk.Kernel()
kernel.add_memory_store(DakeraMemoryStore(
base_url="http://localhost:3300",
api_key="demo",
))
# Store and recall work as normal
await kernel.memory.save_information_async("user-profile", id="pref1", text="prefers concise answers")
results = await kernel.memory.search_async("user-profile", "response style", limit=3)
Why Dakera vs Azure AI Search / Weaviate
| Azure AI Search | Weaviate | Dakera | |
|---|---|---|---|
| Decay weighting | ❌ | ❌ | ✅ |
| Self-hosted | ❌ (cloud) | ✅ (complex) | ✅ (1 container) |
| Cost | Per-query billing | Infrastructure | Free self-hosted |
| Session isolation | Manual | Manual | Built-in |
| Setup complexity | High (portal + keys) | Medium | Low (single Docker cmd) |
Key Differentiator: Decay Weighting
Dakera assigns time-based and access-frequency decay weights to each memory. When SK agents search memory, results ranked by recency and access patterns — not just semantic similarity. Stale context from months ago won't pollute current task context.
Setup
docker run -d -p 3300:3300 -e DAKERA_API_KEY=demo ghcr.io/dakera-ai/dakera:latest
pip install dakera
Relevant Files
python/semantic_kernel/memory/memory_store_base.py— abstract interfacepython/semantic_kernel/memory/volatile_memory_store.py— reference implementationpython/semantic_kernel/connectors/memory/— existing third-party connectors
Happy to open a PR with the full implementation across Python and optionally C# (.NET) variants.
- Ngôn ngữ chính
- C#
- Star
- 28.6k
- Fork
- 4.8k
- Merge trung bình
- 12 giờ 20 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/semantic-kernel
-
python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/semantic-kernel#14491 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/semantic-kernel#14490 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Python: [Python] structured_outputs_transform reuses ChatHistory across calls (prompt pollution)Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
microsoft/semantic-kernel#14483 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
.NET python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
microsoft/semantic-kernel#14482 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Python: [Python] as_agent_framework_tool drops parameter defaults (optionals become required)Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/semantic-kernel#14481 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/semantic-kernel
Issue tương tự
-
area-ai untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
dotnet/extensions#7790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
P2 testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area-Infrastructure-coreclr os-ios os-maccatalyst os-tvos untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dotnet/runtime#134766 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
0 - Backlog Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
BrighterCommand/Brighter#4444 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày