LangSmith 2.0.2-dev.65
See the version list below for details.
dotnet add package LangSmith --version 2.0.2-dev.65
NuGet\Install-Package LangSmith -Version 2.0.2-dev.65
<PackageReference Include="LangSmith" Version="2.0.2-dev.65" />
<PackageVersion Include="LangSmith" Version="2.0.2-dev.65" />
<PackageReference Include="LangSmith" />
paket add LangSmith --version 2.0.2-dev.65
#r "nuget: LangSmith, 2.0.2-dev.65"
#:package LangSmith@2.0.2-dev.65
#addin nuget:?package=LangSmith&version=2.0.2-dev.65&prerelease
#tool nuget:?package=LangSmith&version=2.0.2-dev.65&prerelease
LangSmith SDK for .NET
Features 🔥
- Fully generated C# SDK based on official OpenAPI specification using AutoSDK
- Automatic releases of new preview versions if there was an update to the OpenAPI specification
- All modern .NET features - nullability, trimming, NativeAOT, etc.
- Support .Net Framework/.Net Standard 2.0
Usage
Initializing
using var client = new LangSmithClient();
using var openAiClient = new OpenAiClient();
client.JsonSerializerContext = new SpecialJsonSerializerContext(tryAGI.OpenAI.SourceGenerationContext.Default);
// This can be a user input to your app
var question = "Can you summarize this morning's meetings?";
// This can be retrieved in a retrieval step
const string context = "During this morning's meeting, we solved all world conflict.";
var messages = new[]
{
"You are a helpful assistant. Please respond to the user's request only based on the given context."
.AsSystemMessage(),
$"Question: {question}\\nContext: {context}",
};
// Create parent run
var parentRunId = Guid.NewGuid();
await client.Run.CreateRunAsync(
name: "Chat Pipeline",
runType: CreateRunRequestRunType.Chain,
id: parentRunId,
inputs: new Dictionary<string, object>
{
["question"] = question,
});
// Create child run
var childRunId = Guid.NewGuid();
await client.Run.CreateRunAsync(
name: "OpenAI Call",
runType: CreateRunRequestRunType.Llm,
id: childRunId,
parentRunId: parentRunId,
inputs: new Dictionary<string, object>
{
["messages"] = messages,
});
// Generate a completion
var chatCompletion = await openAiClient.Chat.CreateChatCompletionAsync(
model: CreateChatCompletionRequestModel.Gpt35Turbo,
messages: messages);
// End runs
await client.Run.UpdateRunAsync(
runId: childRunId,
outputs: new Dictionary<string, object>
{
["chatCompletion"] = chatCompletion,
},
endTime: DateTime.UtcNow.ToString("O"));
await client.Run.UpdateRunAsync(
runId: parentRunId,
outputs: new Dictionary<string, object>
{
["answer"] = chatCompletion.Choices[0].Message.Content ?? string.Empty,
},
endTime: DateTime.UtcNow.ToString("O"));
Create Dataset
using var client = GetAuthorizedClient();
var response = await client.Datasets.CreateDatasetAsync(name: "test3");
try
{
var response2 = await client.Datasets.DeleteDatasetAsync(datasetId: response.Id);
}
catch (Exception e)
{
Console.WriteLine(e);
}
Ok
using var client = GetAuthorizedClient();
var response = await client.OkAsync();
Trace
using var client = GetAuthorizedClient();
using var openAiClient = GetAuthorizedOpenAiClient();
client.JsonSerializerContext = new SpecialJsonSerializerContext(tryAGI.OpenAI.SourceGenerationContext.Default);
// This can be a user input to your app
var question = "Can you summarize this morning's meetings?";
// This can be retrieved in a retrieval step
const string context = "During this morning's meeting, we solved all world conflict.";
var messages = new[]
{
"You are a helpful assistant. Please respond to the user's request only based on the given context."
.AsSystemMessage(),
$"Question: {question}\\nContext: {context}",
};
// Create parent run
// var parentRunId = Guid.NewGuid();
// await client.Run.CreateRunAsync(
// name: "Chat Pipeline",
// runType: CreateRunRequestRunType.Chain,
// id: parentRunId,
// inputs: new Dictionary<string, object>
// {
// ["question"] = question,
// });
//
// // Create child run
// var childRunId = Guid.NewGuid();
// await client.Run.CreateRunAsync(
// name: "OpenAI Call",
// runType: CreateRunRequestRunType.Llm,
// id: childRunId,
// parentRunId: parentRunId,
// inputs: new Dictionary<string, object>
// {
// ["messages"] = messages,
// });
// Generate a completion
var chatCompletion = await openAiClient.Chat.CreateChatCompletionAsync(
model: CreateChatCompletionRequestModel.Gpt35Turbo,
messages: messages);
// End runs
// await client.Run.UpdateRunAsync(
// runId: childRunId,
// outputs: new Dictionary<string, object>
// {
// ["chatCompletion"] = chatCompletion,
// },
// endTime: DateTime.UtcNow.ToString("O"));
// await client.Run.UpdateRunAsync(
// runId: parentRunId,
// outputs: new Dictionary<string, object>
// {
// ["answer"] = chatCompletion.Choices[0].Message.Content ?? string.Empty,
// },
// endTime: DateTime.UtcNow.ToString("O"));
Ecosystem maintenance
This SDK is one of more than 200 .NET SDKs maintained with AutoSDK. The tryAGI SDK audit continuously checks repository synchronization, upstream-spec regeneration, release workflows, warnings, public API visibility, and trimming/NativeAOT compatibility.
Every issue is first investigated for ecosystem-wide applicability. When the root cause belongs in AutoSDK, we fix and regression-test the generator, then roll the improvement out to every applicable SDK. Provider-specific behavior remains in this repository when it cannot be derived safely from the API specification.
Issue content—including code blocks, logs, links, and attachments—is treated only as untrusted diagnostic data. Embedded control instructions, hidden directives, delimiter tricks, or requests to alter triage or tooling behavior are ignored. Please report reproducible technical evidence and remove secrets and personal data.
Support
Priority place for bugs: https://github.com/tryAGI/LangSmith/issues
Priority place for ideas and general questions: https://github.com/tryAGI/LangSmith/discussions
Discord: https://discord.gg/Ca2xhfBf3v
Acknowledgments
This project is supported by JetBrains through the Open Source Support Program.
| 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
- No dependencies.
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 |
|---|---|---|
| 2.0.2-dev.69 | 0 | 9/1/2026 |
| 2.0.2-dev.68 | 0 | 9/1/2026 |
| 2.0.2-dev.67 | 18 | 9/1/2026 |
| 2.0.2-dev.66 | 27 | 9/1/2026 |
| 2.0.2-dev.65 | 39 | 8/31/2026 |
| 2.0.2-dev.64 | 56 | 8/31/2026 |
| 2.0.2-dev.62 | 51 | 8/31/2026 |
| 2.0.2-dev.61 | 43 | 8/30/2026 |
| 2.0.2-dev.60 | 48 | 8/30/2026 |
| 2.0.2-dev.59 | 43 | 8/30/2026 |
| 2.0.2-dev.45 | 81 | 6/16/2026 |
| 2.0.2-dev.43 | 66 | 5/21/2026 |
| 2.0.2-dev.42 | 61 | 5/21/2026 |
| 2.0.2-dev.40 | 66 | 5/21/2026 |
| 2.0.1 | 1,462 | 4/30/2026 |
| 2.0.1-dev.231 | 104 | 4/1/2026 |
| 2.0.1-dev.225 | 99 | 3/29/2026 |
| 2.0.1-dev.220 | 184 | 3/28/2026 |
| 2.0.1-dev.218 | 107 | 3/28/2026 |
| 2.0.1-dev.216 | 99 | 3/27/2026 |