SmooAI.SmoothOperator.Server.Postgres 1.36.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SmooAI.SmoothOperator.Server.Postgres --version 1.36.0
                    
NuGet\Install-Package SmooAI.SmoothOperator.Server.Postgres -Version 1.36.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SmooAI.SmoothOperator.Server.Postgres" Version="1.36.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SmooAI.SmoothOperator.Server.Postgres" Version="1.36.0" />
                    
Directory.Packages.props
<PackageReference Include="SmooAI.SmoothOperator.Server.Postgres" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SmooAI.SmoothOperator.Server.Postgres --version 1.36.0
                    
#r "nuget: SmooAI.SmoothOperator.Server.Postgres, 1.36.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SmooAI.SmoothOperator.Server.Postgres@1.36.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SmooAI.SmoothOperator.Server.Postgres&version=1.36.0
                    
Install as a Cake Addin
#tool nuget:?package=SmooAI.SmoothOperator.Server.Postgres&version=1.36.0
                    
Install as a Cake Tool

<p align="center"> <a href="https://smoo.ai"><img src="https://raw.githubusercontent.com/SmooAI/smooth-operator/main/.github/banner-dotnet.png" alt="SmooAI.SmoothOperator.Server.Postgres — durable Postgres storage for the smooth-operator server." width="100%" /></a> </p>

<p align="center"> <a href="https://smoo.ai"><img src="https://img.shields.io/badge/Smoo_AI-platform-00A6A6?style=for-the-badge&labelColor=020618" alt="Smoo AI"></a> <a href="https://github.com/SmooAI/smooth-operator/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-F49F0A?style=for-the-badge&labelColor=020618" alt="license"></a> <a href="https://lom.smoo.ai"><img src="https://img.shields.io/badge/hosted-lom.smoo.ai-FF6B6C?style=for-the-badge&labelColor=020618" alt="lom.smoo.ai"></a> <a href="https://www.nuget.org/packages/SmooAI.SmoothOperator.Server.Postgres"><img src="https://img.shields.io/nuget/v/SmooAI.SmoothOperator.Server.Postgres?style=for-the-badge&labelColor=020618&color=00A6A6" alt="NuGet"></a> <a href="https://dotnet.microsoft.com"><img src="https://img.shields.io/badge/.NET-8.0-00A6A6?style=for-the-badge&labelColor=020618" alt=".NET 8.0"></a> </p>

<p align="center"> <b><code>SmooAI.SmoothOperator.Server.Postgres</code></b> — durable, Postgres-backed storage for <a href="https://www.nuget.org/packages/SmooAI.SmoothOperator.Server"><code>SmooAI.SmoothOperator.Server</code></a>.<br/>Sessions, conversation history, checkpoints, and ACL-scoped pgvector knowledge that <b>survive a restart</b>. </p>


What is this?

SmooAI.SmoothOperator.Server ships with in-memory stores — perfect for tests, gone on restart. This package makes them durable. It provides Postgres implementations of the server's storage seams, so a real deployment keeps its sessions, message history, and retrieval index in a database instead of process memory.

It's the C# analog of the Rust adapters/postgres OLTP + pgvector surface.


Install

dotnet add package SmooAI.SmoothOperator.Server.Postgres

Targets net8.0. Pulls in Npgsql and Pgvector (the Pgvector.Npgsql type mapping for the knowledge adapter). Requires a Postgres with the pgvector extension for PostgresAclKnowledgeStore.


What ships in this package

Type Implements Purpose
PostgresSessionStore ISessionStore Sessions + conversation history that survive a restart.
PostgresAclKnowledgeStore IAclKnowledge ACL-scoped RAG over pgvector — grounding filtered by access context.
PostgresCheckpointStore ICheckpointStore Durable agent checkpoints (resume mid-turn).
PostgresKnowledgeBase IKnowledgeBase Postgres-backed knowledge base.

Each is created by an async factory (they open + verify the connection and ensure schema) and registered against the interface the server resolves.


Quickstart — make the server durable

Register the Postgres stores against the interfaces SmooAI.SmoothOperator.Server resolves, and the .AspNetCore host picks them up instead of the in-memory defaults:

using SmooAI.SmoothOperator.Server;
using SmooAI.SmoothOperator.Server.AspNetCore;
using SmooAI.SmoothOperator.Server.Postgres;

var pg = builder.Configuration.GetConnectionString("SmoothOperator")!;

// Durable sessions + conversation history.
builder.Services.AddSingleton<ISessionStore>(
    _ => PostgresSessionStore.CreateAsync(pg).GetAwaiter().GetResult());

// ACL-scoped pgvector RAG (needs an IEmbedder).
builder.Services.AddSingleton<IAclKnowledge>(sp =>
    PostgresAclKnowledgeStore.CreateAsync(pg, sp.GetRequiredService<IEmbedder>())
        .GetAwaiter().GetResult());

builder.Services.AddSmoothOperatorServer();          // resolves the durable stores above

Prefer async initialization at host startup over the GetAwaiter().GetResult() shorthand shown here — e.g. build the stores in an IHostedService / await-ing startup path and register the resolved instances.


One protocol, one .NET family — each package is published on NuGet and references the others:

Package Role
SmooAI.SmoothOperator.Core The agent engineSmoothAgent, tools, checkpoints.
SmooAI.SmoothOperator.Server The agent server loop — sessions, streaming turns, dispatch, HITL.
SmooAI.SmoothOperator.Server.AspNetCore The ASP.NET Core WebSocket host.
SmooAI.SmoothOperator.Server.Postgres This package — durable Postgres stores.
SmooAI.SmoothOperator The native .NET client (with an IChatClient facade).

🧩 Part of Smoo AI

Built and open-sourced by Smoo AI — the AI-powered business platform with AI built into every product.

📄 License

MIT © 2026 Smoo AI. See LICENSE.


<p align="center"> Built by <a href="https://smoo.ai"><strong>Smoo AI</strong></a> — AI built into every product. </p>

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.36.7 44 7/20/2026
1.36.6 46 7/20/2026
1.36.2 39 7/20/2026
1.36.1 36 7/20/2026
1.36.0 43 7/20/2026
1.35.0 40 7/20/2026
1.34.0 42 7/20/2026
1.33.0 48 7/20/2026
1.32.1 51 7/20/2026
1.32.0 47 7/19/2026
1.30.0 48 7/18/2026
1.28.0 44 7/18/2026
1.27.2 43 7/18/2026
1.27.0 49 7/18/2026
1.26.0 50 7/18/2026