Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature: DakeraMemoryStore — decay-weighted persistent memory backend for SK Memory

Đang mở
#14,130 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
docker, python
Lĩnh vực
ai, backend

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 interface
  • python/semantic_kernel/memory/volatile_memory_store.py — reference implementation
  • python/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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/semantic-kernel

Tất cả issue của microsoft/semantic-kernel

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.