langchain-hs-core

Core typeclasses and pure AST primitives for langchain-hs

https://github.com/tusharad/langchain-hs#readme

Stackage Nightly 2026-09-18:0.0.5.0
Latest on Hackage:0.0.5.0

See all snapshots langchain-hs-core appears in

MIT licensed by Tushar Adhatrao
Maintained by [email protected]
This version can be pinned in stack with:langchain-hs-core-0.0.5.0@sha256:6cd442ffcc9d4de27fd3d39e12b0fabaffb8b5c15d5506ff016c3e3e39af9aeb,3047

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.

Changes

Changelog for langchain-hs-core

All notable changes to this package will be documented in this file.

0.0.5.0 - 2026-09-10

  • Initial standalone Hackage release of langchain-hs-core.
  • Zero-dependency pure core architecture.
  • First-class RunnableTree GADT AST with sequential (|>>), parallel (&>&), and fallback (>>>#) operators.
  • ChatModel effect-polymorphic interface.
  • Multi-modal ContentBlock and message structures.
  • Conduit-based StreamEvent and streaming protocol.
  • Decoupled LangchainT env m a transformer.
  • Typed Tool and FunctionDefinition.