Modules
LangEx — LangGraph for Elixir.
Data structure representing a saved graph execution snapshot.
Lossless JSON-safe encoding for checkpoint payloads.
Behaviour for checkpoint persistence backends.
In-memory LangEx.Checkpointer backend.
PostgreSQL-backed checkpointer using Ecto.
Redis-backed checkpointer using Redix.
Combines a state update with a routing directive.
Returned from node functions to both update state and control flow.
The :resume field is used to resume interrupted graphs.
Layered configuration resolution for LangEx.
Manages context window size by compacting older tool-call rounds.
StateGraph builder.
A compiled, executable graph.
ETS-backed memoization for node results (the cache: node option).
Super-step execution engine inspired by Google's Pregel.
Retry configuration for the retry: node option.
State management with reducer support.
Streaming graph execution.
Pause graph execution and wait for external input.
Behaviour for LLM provider adapters.
Streaming Anthropic Claude adapter with tool use, thinking, and prompt caching.
Helper to create graph nodes that call an LLM.
Google Gemini chat adapter with function calling support.
OpenAI chat completions adapter with tool/function calling support.
Provider registry and model resolver for LLM chat models.
Retry-aware LLM wrapper with backoff, telemetry hooks, and fallback.
Chat message types for LLM interactions.
A message authored by the LLM, optionally carrying tool calls.
A message authored by the human user.
A system prompt message.
The result of a tool call, correlated by tool_call_id.
A structured tool/function call requested by the LLM.
Pre-built state schema with a messages key using the add_messages reducer.
Migrations create and modify the database tables LangEx needs to function.
Structured failure of a graph node.
Raised when a node attempt exceeds its timeout.
Ready-made graph constructors for common agent shapes.
Directs execution to a node with a custom state payload. Used for map-reduce patterns where the number of edges is dynamic.
Long-term key-value memory that outlives a single thread.
In-memory LangEx.Store backend.
PostgreSQL-backed LangEx.Store using Ecto.
Telemetry events emitted by LangEx.
Optional OpenTelemetry bridge for LangEx telemetry spans.
Run-tree correlation for telemetry spans.
Provider-agnostic tool/function definition for LLM tool calling.
Annotates tool results with error recovery guidance for the LLM.
Graph node for executing tool calls from AI messages.
Tool execution request passed to wrap_tool_call interceptors.