IndexThinking.SDK 0.16.0

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

IndexThinking

Working Memory Manager for Reasoning-capable LLMs

NuGet .NET

What It Does

IndexThinking handles the repetitive-but-hard parts of LLM integration:

  • Truncation Recovery - Auto-continue when responses hit token limits
  • Reasoning Extraction - Unified API for provider-specific thinking formats
  • Context Tracking - Session-aware conversation with sliding window
  • Token Management - Budget tracking and complexity estimation
  • Content Recovery - Repair truncated JSON/code blocks

Scope

IndexThinking manages a single LLM turn, not multi-step workflows.

IndexThinking Agent Orchestrators
Single turn optimization Multi-step coordination
Building block Workflow controller
Used BY orchestrators Uses IndexThinking

Quick Start

dotnet add package IndexThinking
// Register services
services.AddIndexThinkingAgents();
services.AddIndexThinkingContext();

// Wrap any IChatClient
var client = new ChatClientBuilder(innerClient)
    .UseIndexThinking()
    .Build(serviceProvider);

// Use normally
var response = await client.GetResponseAsync(messages);

// Access metadata
var thinking = response.GetThinkingContent();
var metrics = response.GetTurnMetrics();

Session-Aware Chat

// Context is automatically tracked and injected
var response = await client.ChatAsync("session-123", "Do that again");

Streaming with Thinking Orchestration

Streaming uses a Collect-and-Yield pattern: chunks are yielded to the caller immediately while buffered internally. After the stream completes, the buffered response is processed through the full orchestration pipeline (reasoning parsing, budget tracking, context tracking).

await foreach (var update in client.GetStreamingResponseAsync(messages))
{
    // Real-time chunks arrive here
    Console.Write(update.Text);

    // The final update contains orchestration metadata
    if (update.AdditionalProperties?.ContainsKey(ThinkingChatClient.TurnResultKey) == true)
    {
        var result = update.AdditionalProperties[ThinkingChatClient.TurnResultKey] as TurnResult;
        Console.WriteLine($"\nTokens: {result?.Metrics.TotalTokens}");
    }
}

Supported Providers

Provider Reasoning Format Truncation Handling Requires Activation
OpenAI reasoning field length, content_filter No (automatic)
Anthropic thinking blocks max_tokens, refusal No (automatic)
Google Gemini thoughtSignature MAX_TOKENS, SAFETY No (automatic)
DeepSeek/Qwen <think> tags OpenAI-compatible Yes (EnableReasoning)
vLLM/GPUStack Configurable tags length Yes (EnableReasoning)

Enabling Reasoning for DeepSeek/vLLM/Qwen

Some providers require explicit reasoning activation:

var options = new ThinkingChatClientOptions
{
    EnableReasoning = true  // Adds include_reasoning: true to requests
};

var client = new ChatClientBuilder(innerClient)
    .UseIndexThinking(options)
    .Build(serviceProvider);

Documentation

License

MIT License - See LICENSE for details.

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
0.16.0 84 2/6/2026
0.15.0 87 1/20/2026
0.14.1 87 1/15/2026