Show HN: BeamWeaver – LangChain/DeepAgents-style agents and workflows for Elixir BeamWeaver, a new Elixir library, has been released to provide LangChain and LangGraph-style AI agents and durable LLM workflows natively on the BEAM. The library offers agents, graph workflows, streaming, memory, retrieval, and production supervision tools without relying on Python wrappers. Designed for Elixir applications using OTP, Ecto, and telemetry, BeamWeaver enables customer support agents, deep research workflows, and production LLM services with provider fallback and tracing. Build AI agents and durable LLM workflows in Elixir. BeamWeaver brings the practical parts of LangChain, LangGraph, and Deep Agents to the BEAM: agents, tools, graph workflows, streaming, memory, persistence, retrieval, provider adapters, tracing, and production supervision. It is not a Python wrapper. It is an Elixir library designed for applications that already rely on OTP, supervision trees, Ecto, telemetry, and explicit runtime boundaries. BeamWeaver is not affiliated with LangChain. Documentation: weavescope.gitbook.io/beam weaver https://weavescope.gitbook.io/beam weaver/ - Customer support agents with tools, structured output, memory, and traceable model calls. - Durable multi-step workflows with graph state, checkpoints, retries, interrupts, time travel, and resumable execution. - Deep research and analysis agents with subagents, planning, virtual filesystems, skills, summarization, and sandboxed tool execution. - Retrieval pipelines with document loading, splitting, embeddings, vector stores, record managers, and incremental indexing. - Production LLM services with provider fallback, rate limits, redaction, telemetry, event streams, and WeaveScope tracing. | Capability | What BeamWeaver Provides | |---|---| | Agents | Module-defined agents and runtime-built agents with tools, middleware, structured output, memory, and HITL interrupts. | | Graph workflows | LangGraph-style state graphs with reducers, commands, subgraphs, checkpoints, pending writes, and durable execution. | | Deep agents | Planning tools, TODO state, virtual filesystems, skills, subagents, async subagents, context engineering, and summarization. | | Models | Provider adapters, model profiles, parameter validation, streaming, structured output, token usage, and cost metadata. | | Tools | Typed tools, injected runtime arguments, tool nodes, tool middleware, shell/filesystem tools, and tool-call tracing. | | Retrieval | Document loaders, text splitters, embeddings, vector stores, retrievers, record managers, and indexing flows. | | Persistence | ETS and Ecto-backed memory, checkpoints, caches, record managers, and vector stores. | | Observability | Local run trees, typed event streams, telemetry, redaction, and native WeaveScope export. | BeamWeaver ships checked-in model profiles for current provider families and permissive fallback profiles for future compatible IDs. Use explicit provider prefixes when a model name is ambiguous. | Provider | Supported examples | |---|---| | OpenAI | openai:gpt-5.5 , openai:gpt-5.5-pro , openai:gpt-5.4 , openai:gpt-5.4-mini , openai:gpt-5 , openai:gpt-4.1 , openai:text-embedding-3-large , openai:text-embedding-3-small | | Anthropic | anthropic:claude-opus-4-8 , anthropic:claude-opus-4-7 , anthropic:claude-opus-4-6 , anthropic:claude-opus-4-5 , anthropic:claude-sonnet-4-6 , anthropic:claude-sonnet-4-5 , anthropic:claude-haiku-4-5 , anthropic:claude-fable-5 , anthropic:claude-mythos-5 | | Google Gemini | google:gemini-3.5-flash , google:gemini-3.1-pro-preview | | Moonshot/Kimi | moonshot:kimi-k2.6 | | xAI | xai:grok-4.3 , xai:grok-4.20-0309-reasoning , xai:grok-4.20-0309-non-reasoning , xai:grok-4.20-multi-agent-0309 , xai:grok-build-0.1 , xai:v1 embeddings | | Test models | Fake chat and embedding models, plus replay transports for deterministic provider tests. | Inspect the exact profile set in your checkout: mix beam weaver.models.profiles Add BeamWeaver to your application: def deps do {:beam weaver, "~ 0.1.0"} end Configure only the providers you use: config :beam weaver, openai: api key: System.fetch env "OPENAI API KEY" , anthropic: api key: System.fetch env "ANTHROPIC API KEY" , google: api key: System.fetch env "GOOGLE API KEY" , xai: api key: System.fetch env "XAI API KEY" , moonshot: api key: System.fetch env "MOONSHOT API KEY" Start with the module DSL for application code. The DSL keeps the agent's model, prompt, tools, middleware, memory, and harness-style capabilities in one module, so a reader can see what the agent does without chasing a runtime options map. It also makes the common path much easier: adding planning, prompt caching, conversation compaction, overflow recovery, filesystems, or subagents is a declaration instead of custom orchestration code. defmodule MyApp.Agents.SupportAgent do use BeamWeaver.Agent alias BeamWeaver.Agent.Middleware alias BeamWeaver.Core.Message name "support.reply" description "Answer customer support questions with account context." model "openai:gpt-5.4-mini", temperature: 0.2, timeout: 30 000 system prompt "Answer support questions clearly. Ask for missing details." Agent harness capabilities are regular declarations. prompt caching true compact conversation true overflow recovery true middleware do use Middleware.TodoList, tool name: "write todos" use Middleware.ToolCallNormalization use Middleware.StructuredOutputRetry, max retries: 2 use Middleware.ModelRetry, max retries: 2, initial delay: 100, retry on: :transient use Middleware.ToolRetry, max retries: 1, on failure: :continue use Middleware.ToolCallLimit, run limit: 8, exit behavior: :end use Middleware.ToolSelection, deny: "internal admin tool" use Middleware.PII, detectors: :email, :credit card , strategy: :redact end def run question, user do MODULE .invoke %{messages: Message.user question }, trace: name: "support.reply", user id: user.id, execution mode: "support reply", fields: %{account id: user.account id} end end Use BeamWeaver.Agent.build/1 when the agent shape is dynamic or generated from configuration: defmodule MyApp.DynamicSupportAgent do alias BeamWeaver.Agent alias BeamWeaver.Core.Message def run question, user do model = BeamWeaver.Models.init chat model "openai:gpt-5.4-mini", temperature: 0.2, timeout: 30 000 {:ok, agent} = Agent.build name: "support.reply", model: model, system prompt: "Answer support questions clearly." Agent.invoke agent, %{messages: Message.user question }, trace: name: "support.reply", user id: user.id, execution mode: "support reply", fields: %{account id: user.account id} end end Tracing is local by default. Add WeaveScope credentials when you want run trees, model calls, tool calls, token usage, costs, errors, and custom fields in the WeaveScope UI. BeamWeaver automatically uses the queued WeaveScope exporter when both endpoint and api key are configured. config :beam weaver, weave scope: endpoint: "https://app.weavescope.com", api key: System.fetch env "WEAVESCOPE API KEY" Use trace: on agent, graph, runnable, model, or tool calls to attach application identity such as user id , thread id , execution mode , and indexed custom fields. Start here: Getting Started /caudena/beam weaver/blob/master/docs/getting started.md Thinking In BeamWeaver /caudena/beam weaver/blob/master/docs/thinking in beamweaver.md Workflows And Agents /caudena/beam weaver/blob/master/docs/workflows and agents.md Deep Agents Quickstart /caudena/beam weaver/blob/master/docs/deep agents quickstart.md Models /caudena/beam weaver/blob/master/docs/models.md Tracing /caudena/beam weaver/blob/master/docs/tracing.md Going To Production /caudena/beam weaver/blob/master/docs/going to production.md Core guides: Agents /caudena/beam weaver/blob/master/docs/agents.md Graph /caudena/beam weaver/blob/master/docs/graph.md Tools /caudena/beam weaver/blob/master/docs/tools.md Messages /caudena/beam weaver/blob/master/docs/messages.md Middleware /caudena/beam weaver/blob/master/docs/middleware.md Structured Output /caudena/beam weaver/blob/master/docs/structured output.md Event Streaming /caudena/beam weaver/blob/master/docs/event streaming.md Persistence /caudena/beam weaver/blob/master/docs/persistence.md Memory /caudena/beam weaver/blob/master/docs/memory.md Retrieval /caudena/beam weaver/blob/master/docs/retrieval.md Filesystem /caudena/beam weaver/blob/master/docs/filesystem.md Sandboxes /caudena/beam weaver/blob/master/docs/sandboxes.md Subagents /caudena/beam weaver/blob/master/docs/subagents.md Human-In-The-Loop /caudena/beam weaver/blob/master/docs/human in the loop.md Provider guides: