LangChain .NET: a 2024 NuGet release on a 2026 branch
C# implementation of LangChain. We try to be as close to the original as possible in terms of abstractions, but are open to new entities.
At a glance
- What is it?
- A C# port of LangChain, maintained largely by one person who asks for help, published as per-integration NuGet packages, with the code in its own documentation wiki covered by a test. The abstraction mapping is the interesting part. So is the two-year gap between the newest published package and the last commit.
- Who is it for?
- LangChain .NET is a real port with a real maintenance story, and the maintainer is unusually candid about needing more hands, which is either a strength or a risk depending on what you need. Two practical checks come first.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly C#, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- tryAGI/LangChain1,080 ★ · +6
| Repository | 2026-09-10 | 2026-11-15 |
|---|---|---|
| tryAGI/LangChain | 1.1k | 1.1k |
6 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The newest published package is from June 2024
Three releases are visible. v0.13.0 on 2024-03-06, v0.14.0 on 2024-05-03, and v0.15.0 on 2024-06-27.
The default branch was pushed on 2026-10-02.
So the newest package a C# developer can pull from NuGet predates the most recent commit by more than two years. That gap decides how you should read everything else in the repository: the wiki is built from documentation held in the repository, the examples compile against the current source, and the test projects run against the current source, none of which a package consumer receives.
The project is plainly still being worked on, and there is no nightly or prerelease channel named to bridge the difference. A consumer choosing between a fresh commit build and the published package is choosing between current behaviour and stability, with nothing in the documentation that says which one the maintainer would pick for production.
The documentation's code is covered by a test
The getting-started guide is a wiki, and the README adds a safety net that is unusual to see: if the wiki contains outdated code, look at the tests for it, at src/Meta/test/WikiTests.cs.
The implication is that the wiki's samples are not prose that rots. They are compiled and run, so a snippet that stops working fails a build rather than misleading a reader quietly. There is a second layer in the same spirit, since the README examples are run by src/tests/LangChain.IntegrationTests/ReadmeTests.cs, and a further set of sample projects under examples/.
That matters more here than in most projects because the abstraction mapping is a translation exercise. The goal is to be as close to the original as possible in terms of abstractions while staying open to new entities, which means every documented snippet is a claim that a Python-shaped concept has a faithful C# equivalent.
So the wiki is not a secondary artefact for this project. It is the interface, and the tests are how it stays honest.
The example prices its own run, and the snippet stops mid-declaration
The one code block in the README is a costed example, opening with two comments:
// Price to run from zero(create embeddings and request to LLM): 0,015$
// Price to re-run if database is exists: 0,0004$
// Dependencies: LangChain, LangChain.Databases.Sqlite, LangChain.DocumentLoaders.Pdf
// Initialize models
var provider = new OpenAiProvider(
Environment.GetEnvironmentVariable("OPENAI_API_KEY") ??
throw new InconclusiveException("OPENAI_API_KEY is not set"));
var llm = new OpenAiLatestFastChatModel(provider);
var embeddingModel = new TextEmbeddingV3SmallModel(provider);The prices use a comma for the decimal separator, and the ratio between the two is the point: about 1.5 cents to embed a document and call the model once, against four ten-thousandths of a cent to query an existing index.
Then the snippet ends. The next line begins a using declaration for a vector database and is not finished, so the construction of the store, the document loading from a PDF and the retrieval chain are all implied rather than shown. The three-package dependency line tells you which parts you would add: the core, a SQLite database package and a PDF document loader.
The model construction is also where a reader should look twice, because the two type names are aliases rather than versions.
Models are selected by alias, not by name and version
The chat model in the example is constructed as OpenAiLatestFastChatModel, and the embedding model as TextEmbeddingV3SmallModel.
Neither carries a date or a version in its name. The first asks for whatever the provider currently calls its latest fast chat model, and the second names a specific embedding model family. So the same code compiled today and in six months may call a different model behind the first alias, at a different price, with a different context window.
For a project whose stated aim is to stay close to the original abstractions, that is a deliberate trade rather than an oversight. The Python original has the same property, and matching it is the point. It does mean the cost figures in the example comments are also a snapshot: they describe one run against one model configuration.
The rest of the provider surface is broad rather than narrow, and the README is explicit that the project aims for the widest practical choice of implementations and is open to third-party libraries where appropriate.
A first-person maintenance promise next to a stale bot
The README carries a maintainer note written in the first person, which is unusual in a library README and unusually informative.
It says the author is unlikely to make serious progress alone and that the goal is to unite the efforts of C# developers to create a C# version of LangChain while keeping control of quality. It says any pull request is likely to be accepted within 24 hours, with the qualifier that of course it depends but the attempt will be made. It asks for developers to join the core team, promises to sponsor them where possible and to share any money received, and notes a fast response on Discord.
What a reader takes from that is a project with one accountable person, a stated throughput target, and money redistributed to contributors rather than retained. The 24-hour figure is a promise about review latency, not about release cadence, and the release dates tell a different story.
Against it sits a small file: the repository root contains sweep.yaml, the configuration for GitHub's automated stale-issue bot. A repository that plans to answer every pull request within a day is also one that has asked a bot to flag old issues.
MIT for the code, CC BY for borrowed documentation, and the organisation may differ
The legal section is precise about more than the licence.
The project itself is MIT, and the README states that the licence is not planned to change in any foreseeable future for this project, while adding that projects based on this within the organization may have different licences. So MIT is a statement about this repository, not about everything the maintainer publishes.
Documentation is a separate case. Some documentation is based on documentation from the dotnet/docs repository under the CC BY 4.0 licence, with the code examples changed into examples for using this project. Attribution-based reuse of documentation into an MIT repository is normal, but it means a reader tracing a passage may find the original wording under a different licence and different terms.
Three artefacts, then: MIT for the code, CC BY 4.0 for adapted documentation, and an unnamed set of licences for the rest of the organisation. Anyone redistributing a documentation bundle rather than the package should read both.
The project also credits JetBrains support through its open source support programme.
Semantic Kernel is used where possible, and not replaced
The positioning against the other .NET framework is stated in a single paragraph and is unusually conciliatory.
Semantic Kernel is described as useful, and as something the project uses wherever possible, with the two limitations given as coverage, since it does not cover every scenario, and ecosystem, since it is closely tied to the Microsoft ecosystem. The response is a stated aim rather than a differentiator: to offer the broadest practical choice of implementations, and to be open to using third-party libraries where appropriate.
That is a coherent position for a port, since a C# developer who already has Semantic Kernel for part of a system needs the other part to interoperate rather than to replace it.
The examples show the same breadth as separate projects rather than one integrated sample: AspNet, Azure, HuggingFace, Llmman, LocalRAG, Memory, OpenAI, Prompts, SequentialChain, and two serve variants, one of which backs the featured chat project, a Blazor application built on LangChain.Serve that works with local or paid models.
Editorial conclusion
LangChain .NET is a real port with a real maintenance story, and the maintainer is unusually candid about needing more hands, which is either a strength or a risk depending on what you need. Two practical checks come first. Confirm which package version you are actually referencing, because the newest release predates two years of commits, and read the documentation in the repository rather than only the wiki if the versions do not line up. The per-integration package split is the part most likely to surprise you when a dependency list turns out to be longer than expected.
Frequently asked questions
What is tryAGI's LangChain for .NET?
A C# implementation of LangChain that aims to stay as close to the original in its abstractions while staying open to new entities. It ships as separate NuGet packages, with the sample depending on LangChain, LangChain.Databases.Sqlite and LangChain.DocumentLoaders.Pdf.
How current is the published tryAGI LangChain .NET package?
The newest published release is v0.15.0 on 2024-06-27, after v0.14.0 in May 2024 and v0.13.0 in March 2024, while the default branch was pushed on 2026-10-02. The documentation wiki is built from the repository, so it can describe behaviour the published package does not yet have.
How does tryAGI's LangChain relate to Semantic Kernel?
The README says Semantic Kernel is useful and is used wherever possible, but that it does not cover every scenario and is closely tied to the Microsoft ecosystem. The stated aim is the broadest practical choice of implementations, open to using third-party libraries where appropriate.
What does the tryAGI LangChain example cost to run?
The sample comments price it directly: about 0.015 dollars to run from zero, creating embeddings and requesting the model, and about 0.0004 dollars to re-run once the database already exists.
How is the tryAGI LangChain documentation kept accurate?
The wiki is the getting-started guide, and the README points to src/Meta/test/WikiTests.cs when the wiki code looks outdated, because the wiki samples are covered by a test. The README's own examples are run by src/tests/LangChain.IntegrationTests/ReadmeTests.cs, alongside eleven sample projects.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/tryagi-langchain)Star history chart for your README
[](https://hysenlabs.com/projects/tryagi-langchain)Was this useful?