Skip to content

Semantic kernel memory connector#69 - #256

Open
tikhandesanket wants to merge 6 commits into
codeforstartups:developmentfrom
tikhandesanket:semantic_kernel_memory_connector#69
Open

tikhandesanket wants to merge 6 commits into
codeforstartups:developmentfrom
tikhandesanket:semantic_kernel_memory_connector#69

Conversation

@tikhandesanket

Copy link
Copy Markdown
Collaborator

Description

Adds a Semantic Kernel VectorStore adapter backed by Dynavec, allowing Semantic Kernel applications to use Dynavec for vector storage, retrieval, filtering, and namespaces.

Related issue

Fixes #69

Changes

  • Added DynavecStore and DynavecCollection Semantic Kernel VectorStore integration.
  • Added support for upsert, get, delete, vector search, metadata filtering, and namespace-based collections.
  • Added optional semantic-kernel>=1.44 dependency and included it in the all extra.
  • Added unit tests covering CRUD operations, vector search, metadata filters, collection creation, and collection listing.
  • Added a runnable Semantic Kernel vector store example.

Testing

  • Tests pass locally
  • Ruff checks pass
  • Documentation updated, if applicable

Test results

  • Semantic Kernel tests: 8 passed
  • Ruff: Passed
  • git diff --cached --check: Passed
  • Pre-commit hooks: Passed

Checklist

  • My changes are focused and relevant to this pull request.
  • I have added or updated tests where appropriate.
  • I have reviewed my changes for unrelated modifications.
  • I have updated documentation where necessary.

@Kaap10

Kaap10 commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

LGTM!

@codeforstartups codeforstartups left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice Semantic Kernel connector, @tikhandesanket — DynavecCollection / DynavecStore with a clean example. One blocker before merge, and it is not visible on this branch: strict mypy landed on development via #207, and it is now a required CI job. This PR predates it, so the typecheck job never ran here — but I merged current development in locally and ran it, and it fails. Two things to fix:

1. Add semantic-kernel to the typecheck extra in pyproject.toml (alongside langchain-core / llama-index-core / haystack-ai), or CI mypy cannot resolve the import at all.

2. Make src/dynavec/integrations/semantic_kernel.py strict-mypy clean — 14 errors right now. Grouped:

Mechanical:

  • data = {...} dicts inferred as dict[str, str] then assigned vectors/None → annotate data: dict[str, Any] = {} (lines ~210/216/218).
  • _inner_get missing return type + param annotations (line 71).
  • DynavecCollection used without type args (line 298) → DynavecCollection[Any, Any] (or the real key/model params).
  • _get_score_from_result returns Any where float | None is declared (159) → cast.

Need your SK-API knowledge (v1.44):

  • _serialize_dicts_to_store_models / _deserialize_store_models_to_dicts violate the base signatures (Liskov, lines 162/199) — match SK’s exact Sequence[...] / TModel signatures.
  • VectorStoreCollection.__init__ definition / collection_name argument types (53/54) and _inner_upsert returning list[str] vs Sequence[TKey] (69).
  • filter= passed to Dynavec.search is SK’s union type (129/137) — narrow/cast to the dict dynavec expects.

Run make run-ci locally after uv pip install -e ".[dev,ingest,typecheck,semantic-kernel]" to reproduce. If a couple of the override mismatches are genuinely irreconcilable between SK’s generics and dynavec’s Document, a targeted # type: ignore[override] on just those two methods is acceptable — but let’s keep it to those.

I did not merge because it would turn development’s required mypy job red. Ping me once it’s green and I’ll merge right away. Thanks! 🙌

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Semantic Kernel memory connector

3 participants