# BeamWeaver

An Elixir-native library bringing the practical parts of LangChain, LangGraph and Deep Agents to the BEAM virtual machine, so agents, tools and graph workflows run as native Erlang/OTP processes instead of a separate Python service.

BeamWeaver implements agents, tools, graph workflows, sub-agents, memory, persistence, retrieval, structured output, streaming and tracing as Elixir modules built around OTP supervision, explicit provider adapters, tagged errors and telemetry. It is not a wrapper around a Python library; it is designed for applications that already rely on OTP supervision trees, Ecto and telemetry, and it supports built-in provider adapters as well as custom clients, transports, models, tools, filesystems and stores.

An agent DSL covers common model and tool loops, while dropping down to graph workflows supports deterministic branching, fan-out, interrupts and time travel for more complex flows. Production features include checkpoints, memory, caches, record managers and vector stores backed by ETS and Ecto adapters, and local traces with typed event streams, token and cost metadata and redaction can be exported to a companion tracing service called WeaveScope.

Example uses described include customer support agents, durable multi-step workflows that survive restarts, deep research agents with sub-agents and sandboxed tool execution, and retrieval pipelines with incremental indexing. It is written in Elixir under the Apache-2.0 license and is not affiliated with LangChain.

Website: https://docs.weavescope.com/beamweaver
