{"id":21062324,"url":"https://github.com/kbeaugrand/semantickernel.connectors.memory.sqlserver","last_synced_at":"2025-05-16T02:31:01.581Z","repository":{"id":188505748,"uuid":"678745573","full_name":"kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer","owner":"kbeaugrand","description":"SQL Server connector for Semantic Kernel plugin and Kernel Memory","archived":false,"fork":false,"pushed_at":"2025-01-06T23:21:17.000Z","size":173,"stargazers_count":51,"open_issues_count":6,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T22:16:31.017Z","etag":null,"topics":["ai","artificial-intelligence","indexing","llm","memory","openai","rag","sdk","semantic-search","sql-server"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbeaugrand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-15T09:19:39.000Z","updated_at":"2025-02-24T21:52:19.000Z","dependencies_parsed_at":"2023-08-15T17:07:19.943Z","dependency_job_id":"d4a1a90a-2e67-46a2-9d98-4df4cbc9dc18","html_url":"https://github.com/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer","commit_stats":null,"previous_names":["kbeaugrand/microsoft.semantickernel.connectors.memory.sqlserver","kbeaugrand/semantickernel.connectors.memory.sqlserver"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbeaugrand%2FSemanticKernel.Connectors.Memory.SqlServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbeaugrand%2FSemanticKernel.Connectors.Memory.SqlServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbeaugrand%2FSemanticKernel.Connectors.Memory.SqlServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbeaugrand%2FSemanticKernel.Connectors.Memory.SqlServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbeaugrand","download_url":"https://codeload.github.com/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254455729,"owners_count":22074044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","indexing","llm","memory","openai","rag","sdk","semantic-search","sql-server"],"created_at":"2024-11-19T17:38:26.261Z","updated_at":"2025-05-16T02:31:01.126Z","avatar_url":"https://github.com/kbeaugrand.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Semantic Kernel \u0026 Kernel Memory - SQL Connector\n\n[![Build \u0026 Test](https://github.com/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer/actions/workflows/build_test.yml/badge.svg)](https://github.com/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer/actions/workflows/build_test.yml)\n[![Create Release](https://github.com/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer/actions/workflows/publish.yml/badge.svg)](https://github.com/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer/actions/workflows/publish.yml)\n[![Version](https://img.shields.io/github/v/release/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer)](https://img.shields.io/github/v/release/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer)\n[![License](https://img.shields.io/github/license/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer)](https://img.shields.io/github/v/release/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer)\n\nThis is a connector for the [Semantic Kernel](https://aka.ms/semantic-kernel).\n\n\u003e This package has been deprecated as it is legacy and is no longer maintained.\n\nIt provides a connection to a SQL database for the Semantic Kernel for the memories.\n\n## About Semantic Kernel\n\n**Semantic Kernel (SK)** is a lightweight SDK enabling integration of AI Large\nLanguage Models (LLMs) with conventional programming languages. The SK\nextensible programming model combines natural language **semantic functions**,\ntraditional code **native functions**, and **embeddings-based memory** unlocking\nnew potential and adding value to applications with AI.\n\nPlease take a look at [Semantic Kernel](https://aka.ms/semantic-kernel) for more information.\n\n## About Kernel Memory\n\n**Kernel Memory** (KM) is a multi-modal **AI Service** specialized in the efficient indexing of datasets through custom continuous data hybrid pipelines, with support for **Retrieval Augmented Generation (RAG)**, synthetic memory, prompt engineering, and custom semantic memory processing.\n\n\n## Semantic Kernel Plugin\n\nTo install this memory store, you need to add the required nuget package to your project:\n\n```dotnetcli\ndotnet add package SemanticKernel.Connectors.Memory.SqlServer\n```\n\n## Usage\n\nTo add your SQL Server memory connector, add the following statements to your kernel initialization code:\n\n```csharp\n        using SemanticKernel.Connectors.Memory.SqlServer;\n            \n        var kernel = Kernel.CreateBuilder()\n                        .Build();\n\n        var sqlMemoryStore = await SqlServerMemoryStore.ConnectAsync(connectionString: \"Server=.;Database=SK;Trusted_Connection=True;\");\n        var semanticTextMemory = new SemanticTextMemory(sqlMemoryStore, kernel.GetRequiredService\u003cITextEmbeddingGenerationService\u003e());\n\n        kernel.ImportPluginFromObject(new TextMemoryPlugin(semanticTextMemory));\n\n```\n\nThe memory store will populate all the needed tables during startup and let you focus on the development of your plugin.\n\n## Kernel Memory Plugin\n\n```bash\ndotnet add package KernelMemory.MemoryStorage.SqlServer\n```\n\n## Usage\n\nTo add your SQL Server memory connector, add the following statements to your kernel memory initialization code:\n\n```csharp\nusing SemanticKernel.Connectors.Memory.SqlServer;\n...\nvar memory = new KernelMemoryBuilder()\n    .WithOpenAIDefaults(Env.Var(\"OPENAI_API_KEY\"))\n    .WithSqlServerMemoryDb(\"YouSqlConnectionString\")\n    .Build\u003cMemoryServerless\u003e();\n```\n\nThen you can use the memory store to import documents and ask questions:\n\n```csharp\n// Import a file\nawait memory.ImportDocumentAsync(\"meeting-transcript.docx\", tags: new() { { \"user\", \"Blake\" } });\n\n// Import multiple files and apply multiple tags\nawait memory.ImportDocumentAsync(new Document(\"file001\")\n    .AddFile(\"business-plan.docx\")\n    .AddFile(\"project-timeline.pdf\")\n    .AddTag(\"user\", \"Blake\")\n    .AddTag(\"collection\", \"business\")\n    .AddTag(\"collection\", \"plans\")\n    .AddTag(\"fiscalYear\", \"2023\"));\n\nvar answer1 = await memory.AskAsync(\"How many people attended the meeting?\");\n\nvar answer2 = await memory.AskAsync(\"what's the project timeline?\", filter: new MemoryFilter().ByTag(\"user\", \"Blake\"));\n```\n\nThe memory store will populate all the needed tables during startup and let you focus on the development of your plugin.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbeaugrand%2Fsemantickernel.connectors.memory.sqlserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbeaugrand%2Fsemantickernel.connectors.memory.sqlserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbeaugrand%2Fsemantickernel.connectors.memory.sqlserver/lists"}