StemCode 1.1.25
dotnet add package StemCode --version 1.1.25
NuGet\Install-Package StemCode -Version 1.1.25
<PackageReference Include="StemCode" Version="1.1.25" />
<PackageVersion Include="StemCode" Version="1.1.25" />
<PackageReference Include="StemCode" />
paket add StemCode --version 1.1.25
#r "nuget: StemCode, 1.1.25"
#:package StemCode@1.1.25
#addin nuget:?package=StemCode&version=1.1.25
#tool nuget:?package=StemCode&version=1.1.25
StemCode
StemCode provides the core libraries and application services behind StemCode, a local AI coding agent built for repository-aware development workflows.
- Repository: https://github.com/rizwan3d/StemCode
- Documentation: https://github.com/rizwan3d/StemCode/blob/master/docs/documentation.md
- Releases: https://github.com/rizwan3d/StemCode/releases/latest
If you want the end-user command-line experience, install the stemcode CLI from the release installers:
- macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/rizwan3d/StemCode/master/scripts/install.sh | bash - Windows PowerShell:
irm https://raw.githubusercontent.com/rizwan3d/StemCode/master/scripts/install.ps1 | iex
See the releases page for all download options.
Embed the SDK
The StemCode.Sdk namespace lets you drive the coding agent from your own
application (an app builder, a server, a bot, automation) without implementing
the interactive console UI. Configure a provider and model with the fluent
builder, then run turns and subscribe to progress events. Provider credentials
are held in memory only — embedding the SDK never touches the machine-wide
StemCode configuration.
using StemCode.Sdk;
await using StemCodeClient client = StemCodeClient.CreateBuilder()
.UseAnthropic(apiKey, "claude-opus-4-8") // or UseOpenAi / UseOllama / UseOpenAiCompatible / ...
.UseBuildTool() // full coding-agent tool bundle
.WithWorkspace("/path/to/repo")
.AutoApproveTools() // for trusted / sandboxed automation
.Build();
// Surface progress in your UI (final answer is still returned from RunTurnAsync).
client.AssistantMessageChunkReceived += (_, e) => Console.Write(e.Text);
client.ToolCallsStarted += (_, e) => Console.WriteLine($"Running {e.ToolCalls.Count} tool(s)...");
client.StatusMessage += (_, e) => Console.WriteLine($"[{e.Severity}] {e.Message}");
await client.InitializeAsync();
ConversationTurnResult result = await client.RunTurnAsync("Build a TODO app");
Console.WriteLine(result.ResponseText);
SDK clients are tool-free by default. Omitting UseBuildTool() selects the
neutral sdk profile: it has no tools, coding-agent instructions, workspace
context, MCP tools, or custom tools. WithoutTools() and WithoutProfile()
make that choice explicit and can reset a previously selected profile.
SDK clients start with no configured base system prompt. WithSystemPrompt(...)
and WithExactSystemPrompt(...) send the supplied prompt without StemCode
identity/profile/workspace composition. Opt into StemCode's coding-agent prompt
with UseStemCodeSystemPrompt():
await using StemCodeClient client = StemCodeClient.CreateBuilder()
.UseAnthropic(apiKey, "claude-opus-4-8")
.WithoutTools()
.WithExactSystemPrompt("You are a clinical note generator.")
.WithThinkingEnabled(false)
.WithReasoningEffort(ReasoningEffort.None)
.UseInMemoryStorage()
.Build();
await using StemCodeClient stemCodePromptClient = StemCodeClient.CreateBuilder()
.UseAnthropic(apiKey, "claude-opus-4-8")
.UseStemCodeSystemPrompt()
.Build();
Use UseProfile(new AgentProfile { ... }) for a programmatic profile. The
builder also exposes ConfigureRequest(...) for final request transforms and
OnRequestPrepared(...) for safe prompt-free diagnostics (provider, endpoint,
model, tool count, reasoning effort, and thinking mode). For sensitive or
ephemeral workloads, use UseInMemoryStorage(), or the narrower
DisableConversationPersistence() and DisableEventLogging() switches.
SDK observability is opt-in. Configure logging with the standard
Microsoft.Extensions.Logging builder, enable tracing with
WithOpenTelemetryTracing(), and export spans by subscribing to
StemCodeObservability.ActivitySourceName from your OpenTelemetry setup.
Built-in anonymous product telemetry is disabled for SDK clients unless you
call EnableProductTelemetry().
using Microsoft.Extensions.Logging;
using StemCode.Sdk;
await using StemCodeClient client = StemCodeClient.CreateBuilder()
.UseAnthropic(apiKey, "claude-opus-4-8")
.WithLogging(logging => logging.AddConsole())
.WithOpenTelemetryTracing()
.Build();
// In your OpenTelemetry tracer provider:
// builder.AddSource(StemCodeObservability.ActivitySourceName);
using StemCode.Sdk;
await using StemCodeClient client = StemCodeClient.CreateBuilder()
.UseAnthropic(apiKey, "claude-opus-4-8")
.Build();
client.AssistantMessageChunkReceived += (_, e) => Console.Write(e.Text);
await client.InitializeAsync();
ConversationTurnResult result = await client.RunTurnAsync("Explain dependency injection in C#.");
Console.WriteLine(result.ResponseText);
Build a simple conversation loop by initializing once, then calling
RunTurnAsync for each user message. Reusing the same client keeps the session
history alive between turns.
using StemCode.Sdk;
await using StemCodeClient client = StemCodeClient.CreateBuilder()
.UseAnthropic(apiKey, "claude-opus-4-8")
.UseBuildTool()
.WithWorkspace("/path/to/repo")
.Build();
client.AssistantMessageChunkReceived += (_, e) => Console.Write(e.Text);
client.ToolCallsStarted += (_, e) => Console.WriteLine($"Running {e.ToolCalls.Count} tool(s)...");
await client.InitializeAsync();
while (true)
{
Console.Write("> ");
string? prompt = Console.ReadLine();
if (string.IsNullOrWhiteSpace(prompt) ||
prompt.Equals("exit", StringComparison.OrdinalIgnoreCase))
{
break;
}
Console.WriteLine();
await client.RunTurnAsync(prompt);
Console.WriteLine();
}
Extend it with your own tools and services:
StemCodeClient client = StemCodeClient.CreateBuilder()
.UseAnthropic(apiKey)
.UseBuildTool() // alternative to Semantic Kernel-style tool orchestration
.AddTool(new MyDeployTool()) // custom ITool the agent can call
.AddMcpServer(new BackendMcpServerConfiguration("docs") { Url = "https://..." })
.ConfigureServices(services => { /* override or add any DI service */ })
.Build();
The CLI and desktop apps continue to use the same core through their existing entry points; the SDK is an additive layer on top.
| Product | Versions 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. |
-
net10.0
- DiffPlex (>= 1.9.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.Hosting (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.ML.OnnxRuntime (>= 1.30.0)
- System.Security.Cryptography.ProtectedData (>= 10.0.0)
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.1.25 | 59 | 12/1/2026 |
| 1.1.24 | 113 | 11/24/2026 |
| 1.1.23 | 142 | 9/23/2026 |
| 1.1.22 | 127 | 9/23/2026 |
| 1.1.21 | 119 | 9/23/2026 |
| 1.1.20 | 119 | 9/23/2026 |
| 1.1.19 | 112 | 9/23/2026 |
| 1.1.18 | 113 | 9/18/2026 |
| 1.1.17 | 109 | 9/18/2026 |
| 1.1.16 | 110 | 9/17/2026 |
| 1.1.15 | 129 | 8/27/2026 |
| 1.1.14 | 133 | 8/27/2026 |
| 1.1.13 | 131 | 8/22/2026 |
| 1.1.12 | 174 | 8/16/2026 |
| 1.1.11 | 137 | 8/15/2026 |
| 1.1.10 | 132 | 8/15/2026 |
| 1.1.9 | 133 | 8/14/2026 |