Meridian.Context 1.0.0

dotnet add package Meridian.Context --version 1.0.0
                    
NuGet\Install-Package Meridian.Context -Version 1.0.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="Meridian.Context" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meridian.Context" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Meridian.Context" />
                    
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 Meridian.Context --version 1.0.0
                    
#r "nuget: Meridian.Context, 1.0.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 Meridian.Context@1.0.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=Meridian.Context&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Meridian.Context&version=1.0.0
                    
Install as a Cake Tool

Meridian.Context

Independent open-source project; not affiliated with or endorsed by Microsoft.

The ambient execution context shared across every Meridian package — a small, dependency-free foundation package most apps won't reference directly (it comes in transitively via Meridian.Hosting).

Part of Meridian — an opinionated .NET 10 AI framework built on the Microsoft Agent Framework, reachable from modern .NET apps directly and from COM-based applications (VB6, Visual FoxPro, Delphi, VBA) through a COM Callable Wrapper.

What it provides

  • MeridianContext — an immutable-by-convention record of a single logical operation (a chat turn, an agent run, a retrieval call): a ConversationId, a CorrelationId for stitching together logs/traces/metrics, optional UserId/TenantId, and an open-ended Properties bag for cross-cutting concerns that don't warrant a first-class field.
  • IMeridianContextAccessor — an AsyncLocal<T>-backed ambient accessor for the current MeridianContext, mirroring ASP.NET Core's IHttpContextAccessor pattern. Deeply nested calls (tools, retrievers, model providers) can read the current context without it being threaded through every method signature, and it flows correctly across async/await.
  • ConversationId — a strongly-typed wrapper around a conversation identifier, so call sites can't accidentally pass an arbitrary string where a conversation id is expected.

Install

dotnet add package Meridian.Context

(Usually unnecessary directly — Meridian.Hosting and every other Meridian package already depend on it.)

Example

using Meridian.Context;

services.AddSingleton<IMeridianContextAccessor, MeridianContextAccessor>();

// Somewhere at the start of a logical operation (a request, a queue message, ...):
contextAccessor.Current = MeridianContext.Create();
contextAccessor.Current.Properties["source"] = "scheduled-job";

// Anywhere deeper in the call chain, without the context being passed as a parameter:
var correlationId = contextAccessor.Current?.CorrelationId;

Full documentation

See the Meridian repository for the complete framework — multi-provider models, hybrid RAG, long-term agent memory, image generation, and the COM bridge for VB6/Visual FoxPro/Delphi/VBA.

License

MIT © Angel Hernandez

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Meridian.Context:

Package Downloads
Meridian.Observability

Tracing (ActivitySource), metrics (Meter) and lightweight response evaluation shared across Meridian.

Meridian.Knowledge

Embeddings, a pluggable semantic store, and retrieval (RAG) built on top of Meridian.Models.

Meridian.Agents

Agent construction, tools, memory and sequential/parallel workflows, built on the Microsoft Agent Framework (MAF).

Meridian.Models

Multi-provider chat, embedding and image model clients (Azure OpenAI, OpenAI, Anthropic, Gemini, Perplexity, Azure AI Inference) built on Microsoft.Extensions.AI, with fallback, retry and pipeline opt-ins.

Meridian.Hosting

The services.AddMeridian(...) front door: wires Models, Knowledge, Agents and Observability into an IServiceCollection with one opinionated, fluent builder.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 140 10/13/2026