This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
C# SDK for the LangSmith LLM observability and evaluation platform (by LangChain), auto-generated from the LangSmith OpenAPI specification using AutoSDK. Published as a NuGet package under the tryAGI organization.
# Build the solution
dotnet build LangSmith.slnx
# Build for release (also produces NuGet package)
dotnet build LangSmith.slnx -c Release
# Run integration tests (requires LANGSMITH_API_KEY and OPENAI_API_KEY env vars)
dotnet test src/tests/LangSmith.IntegrationTests/LangSmith.IntegrationTests.csproj
# Regenerate SDK from OpenAPI spec
cd src/libs/LangSmith && ./generate.shThe SDK code in Generated/ is auto-generated — do not manually edit files in src/libs/LangSmith/Generated/.
src/libs/LangSmith/openapi.json— the LangSmith OpenAPI spec snapshot fetched fromhttps://api.smith.langchain.com/openapi.jsonsrc/libs/LangSmith/generate.sh— orchestrates: download spec → run AutoSDK CLI → output toGenerated/- CI auto-updates the spec every 3 hours and creates PRs if changes are detected
This file is not auto-generated and can be edited manually:
src/libs/LangSmith/SpecialJsonSerializerContext.cs— Custom JSON serializer context for combining LangSmith and OpenAI serialization
| Project | Purpose |
|---|---|
src/libs/LangSmith/ |
Main SDK library (LangSmithClient) |
src/tests/LangSmith.IntegrationTests/ |
Integration tests against real LangSmith API |
Tests in src/tests/LangSmith.IntegrationTests/Examples are the single source of truth for both test coverage and documentation:
- Each file has a JSDoc header (
order,title,slug) consumed byautosdk docs sync . - Comments prefixed with
////become prose paragraphs in generated docs - CI workflow (
.github/workflows/mkdocs.yml) auto-generatesdocs/examples/and populatesEXAMPLES:START/ENDmarkers in README.md, docs/index.md, and mkdocs.yml - Config:
autosdk.docs.jsonpoints tosrc/tests/LangSmith.IntegrationTests/Examples
- Target:
net10.0(single target) - Language: C# 13 preview with nullable reference types
- Signing: Strong-named assemblies via
src/key.snk - Versioning: Semantic versioning from git tags (
vprefix) via MinVer - Analysis: All .NET analyzers enabled, AOT/trimming compatibility enforced
- Testing: MSTest + AwesomeAssertions
- Uses shared workflows from
HavenDV/workflowsrepo - Dependabot updates NuGet packages weekly (auto-merged)
- Documentation deployed to GitHub Pages via MkDocs Material