langchain-hs-core: Core typeclasses and pure AST primitives for langchain-hs

[ ai, control, library, mit, web ] [ Propose Tags ] [ Report a vulnerability ]

Zero HTTP dependency core package containing ChatModel, RunnableTree, ContentBlock, Tool, and StreamEvent primitives.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.5.0
Change log CHANGELOG.md
Dependencies aeson (>=2.0 && <3), async (>=2.2 && <2.3), base (>=4.17 && <5), base64-bytestring (>=1.2 && <1.3), bytestring (>=0.10 && <0.13), conduit (>=1.3 && <1.4), containers (>=0.6 && <0.9), deepseq (>=1.4 && <1.6), mtl (>=2.2 && <2.4), resourcet (>=1.2 && <1.4), stm (>=2.5 && <2.6), text (>=1.2 && <3), time (>=1.9 && <1.15) [details]
Tested with ghc ==9.12.4, ghc ==9.10.3, ghc ==9.8.4
License MIT
Copyright 2025-2026 Tushar Adhatrao
Author Tushar Adhatrao
Maintainer tusharadhatrao@gmail.com
Uploaded by tusharad at 2026-09-12T13:13:40Z
Category Web, AI, Control
Home page https://github.com/tusharad/langchain-hs#readme
Bug tracker https://github.com/tusharad/langchain-hs/issues
Source repo head: git clone https://github.com/tusharad/langchain-hs
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 2 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-09-12 [all 1 reports]

Readme for langchain-hs-core-0.0.5.0

[back to package description]

langchain-hs-core

Zero-dependency pure core of the langchain-hs ecosystem.

langchain-hs-core provides pure GADT abstract syntax trees, effect-polymorphic chat models, streaming protocols, tools, and decoupled monads without ANY HTTP or network dependencies.

Key Primitives

  • RunnableTree m a b: Pure GADT abstract syntax tree for pipeline composition via |>> (sequential), &>& (parallel), and >>># (fallback).
  • ChatModel m: Effect-polymorphic typeclass for LLMs.
  • ContentBlock: Multi-modal message content (text, image, tool calls, tool results).
  • Tool & FunctionDefinition: Strongly-typed tool execution and JSON parameter schemas.
  • StreamEvent & LLMChunk: Conduit-based incremental token streaming.
  • LangchainT env m a: Decoupled reader monad transformer parameterized over custom environment env.

Installation

build-depends: langchain-hs-core >= 0.0.5 && < 0.0.6

License

MIT License. See LICENSE.