Featured · September 23, 2026 · 7 min

Building an Agentic System in .NET, Part 3 — Durable Memory with Postgres and pgvector

Give your .NET agent a long-term memory it can actually recall: model MemoryItem in EF Core, generate embeddings with Microsoft.Extensions.AI, store them in Postgres with pgvector, and build an HNSW cosine index with a ranked recall query that blends similarity, recency, and importance.

Read article