MeshWeaver.AI.ClaudeCode 3.0.0-preview1

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

MeshWeaver.AI.ClaudeCode

Integrates the Claude Code CLI (Claude Agent SDK) as an AI backend for MeshWeaver's agent framework, bridging it to the Microsoft.Extensions.AI IChatClient interface.

Features

  • Implements IChatClient using the Claude Code CLI subprocess via ClaudeAgentSdk
  • Streaming and non-streaming response modes with automatic text and tool-use extraction
  • Configurable model selection (sonnet, opus, haiku), max turns, system prompt, and session timeout
  • Automatic CLI path discovery with configurable CliDirectory
  • Registers as an IChatClientFactory for the MeshWeaver agent framework

Usage

services.AddClaudeCode(config =>
{
    config.Models = ["sonnet", "opus"];
    config.CliDirectory = @"%APPDATA%\npm";
    config.MaxTurns = 10;
    config.SessionTimeoutMs = 120000;
});

Requires Claude Code CLI >= 2.0.0 installed via npm install -g @anthropic-ai/claude-code.

Dependencies

  • MeshWeaver.AI -- agent framework and IChatClientFactory base class
  • MeshWeaver.Messaging.Hub -- message hub integration
  • ClaudeAgentSdk -- .NET bindings for the Claude Code CLI
  • Microsoft.Extensions.AI -- IChatClient abstraction
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.

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
3.0.0-preview1 91 4/16/2026