Standard.Agents.Data.Knowledge.MsSql
0.1.0
dotnet add package Standard.Agents.Data.Knowledge.MsSql --version 0.1.0
NuGet\Install-Package Standard.Agents.Data.Knowledge.MsSql -Version 0.1.0
<PackageReference Include="Standard.Agents.Data.Knowledge.MsSql" Version="0.1.0" />
<PackageVersion Include="Standard.Agents.Data.Knowledge.MsSql" Version="0.1.0" />
<PackageReference Include="Standard.Agents.Data.Knowledge.MsSql" />
paket add Standard.Agents.Data.Knowledge.MsSql --version 0.1.0
#r "nuget: Standard.Agents.Data.Knowledge.MsSql, 0.1.0"
#:package Standard.Agents.Data.Knowledge.MsSql@0.1.0
#addin nuget:?package=Standard.Agents.Data.Knowledge.MsSql&version=0.1.0
#tool nuget:?package=Standard.Agents.Data.Knowledge.MsSql&version=0.1.0

Standard.Agents.Data.Knowledge.MsSql
A SQL Server knowledge source for The Standard AI Agent Framework.
Part of The Standard for Agents. In
Agent = Orchestration(Data, Decision, Direction), this package extends the Data nature — it moves knowledge from local files into a SQL Server table with full-text search. It is an optional adapter: it plugs into the coreStandard.Agentspackage through the sameIKnowledgeBrokerseam, so nothing else about your agent changes.
The core Standard.Agents package ships file-based knowledge and is deliberately
dependency-free. This package brings
Microsoft.Data.SqlClient so you can ground an agent on a SQL
Server table instead — with tokenized full-text search (FREETEXT) rather than the file
default's substring match.
Install
dotnet add package Standard.Agents # the core framework
dotnet add package Standard.Agents.Data.Knowledge.MsSql # this knowledge source
Use
using Standard.Agents;
using Standard.Agents.Data.Knowledge.MsSql;
var agent = new StandardAgent(apiUrl, apiKey, "LLooMA2.0")
.UseKnowledgeMsSql("Server=localhost;Database=agent;Trusted_Connection=True;Encrypt=False;");
string answer = await agent.ProcessPromptAsync("What is our refund window?");
One line — everything else (skills, tools, guardians, memory, streaming) is the core, unchanged.
Each turn the agent calls SelectKnowledgeAsync with the prompt; this broker runs a full-text
query and returns the top matches, seeded into the agent's observations.
Options
.UseKnowledgeMsSql(
connectionString,
table: "KnowledgeDocuments", // optionally schema-qualified, e.g. "kb.Documents"
contentColumn: "Content", // the text column searched and returned
maxResults: 3) // documents injected per turn
Or construct the broker directly and pass it to the core's .UseKnowledge(...):
.UseKnowledge(new MsSqlKnowledgeBroker(connectionString, table: "kb.Documents"))
The table
This broker reads an existing table — populating it is your ETL, kept out of the agent.
FREETEXT requires a full-text index on the content column:
CREATE TABLE KnowledgeDocuments (
Id bigint IDENTITY(1,1) PRIMARY KEY,
Content nvarchar(max) NOT NULL
);
-- full-text search prerequisites (once per database / table)
CREATE FULLTEXT CATALOG AgentKnowledgeCatalog;
CREATE FULLTEXT INDEX ON KnowledgeDocuments (Content)
KEY INDEX PK__KnowledgeDocuments -- your PK's index name
ON AgentKnowledgeCatalog;
The query the broker runs is, in effect:
SELECT TOP (@maxResults) Content FROM KnowledgeDocuments
WHERE FREETEXT(Content, @prompt);
FREETEXT matches on meaning — stemming and stop-words included — so "refund window" finds
"windows for refunds." The prompt is always a bound parameter; the table and column names are your
configuration, resolved once at construction. (Results are the full-text matches capped at
maxResults; ranked ordering is a later enhancement.)
Where this fits
| Core framework | Standard.Agents · repo |
| This package | the Data nature — knowledge, backed by SQL Server full-text search |
| Sibling | Standard.Agents.Data.Knowledge.Postgres |
| Getting started | The core how-to |
License
Licensed under the The Standard Software License (TSSL) v1.1 — the same license as
Standard.Agents. Microsoft.Data.SqlClient is MIT-licensed
and consumed as a NuGet dependency.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Data.SqlClient (>= 5.2.2)
- Standard.Agents (>= 0.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 82 | 7/18/2026 |