LangChain  by tryAGI

C# SDK for building LLM applications

Created 2 years ago
905 stars

Top 40.2% on SourcePulse

GitHubView on GitHub
Project Summary

LangChain.NET is a C# implementation of the LangChain framework, designed for building LLM-powered applications with composability. It targets .NET developers seeking a C# native solution for orchestrating LLM interactions, data retrieval, and agentic workflows, aiming to provide a flexible alternative to existing frameworks.

How It Works

The project mirrors LangChain's core abstractions, including LLMs, document loaders, text splitters, vector stores, and chains. It emphasizes flexibility by allowing integration with various third-party libraries and services, rather than being tied to a single ecosystem. This approach enables developers to choose the best components for their specific needs, from different LLM providers to various vector database implementations.

Quick Start & Requirements

  • Install: dotnet add package LangChain.Core (and specific packages like LangChain.Providers.OpenAI, LangChain.Databases.Sqlite, LangChain.DocumentLoaders.Pdf).
  • Prerequisites: .NET 6 or later, OpenAI API key (for the example).
  • Demo: https://tryagi.github.io/LangChain/

Highlighted Details

  • Provides a C# native implementation of LangChain's core components.
  • Supports building complex LLM workflows using a chainable, composable API.
  • Includes examples for integrating with OpenAI, SQLite, and PDF document loading.
  • Offers cost estimates for LLM usage within the code examples.

Maintenance & Community

The project is actively seeking contributors and core team members, with a stated goal of accepting pull requests within 24 hours. Support and discussions are available via GitHub Issues and Discussions, and a Discord server is provided.

Licensing & Compatibility

Licensed under the MIT license, allowing for commercial use and integration into closed-source projects.

Limitations & Caveats

The project is community-driven and relies on contributions for development progress. While aiming for parity with the original LangChain, some abstractions may differ or be under active development. The README notes that the Semantic Kernel is used where possible, but also highlights perceived limitations of that framework.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
17
Issues (30d)
0
Star History
20 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Vasek Mlejnsky Vasek Mlejnsky(Cofounder of E2B).

super-rag by superagent-ai

0%
384
RAG pipeline for AI apps
Created 1 year ago
Updated 1 year ago
Feedback? Help us improve.