Show HN: Erlangchain – A tiny Erlang client for LLMs
I made a small Erlang library for calling OpenAI and Anthropic from Erlang without third-party dependencies. Includes a simple chat API, basic tool-use support, multimodal message support, and some JSON utils. Try it out!
What Happened
A developer has released Erlangchain, a minimal Erlang library that provides direct HTTP client access to OpenAI and Anthropic APIs without any third-party dependencies. The library offers a simple chat interface, basic tool-use functionality, multimodal message support, and built-in JSON utilities. By stripping away abstraction layers common in larger SDKs, it aims to give Erlang developers a lightweight, dependency-free path to integrate large language models into their applications.
Why It Matters
Erlang is not typically associated with AI or machine learning workflows. The language powers critical infrastructure in telecommunications, messaging systems, and distributed databases—domains where fault tolerance, concurrency, and low latency are paramount. Erlangchain’s emergence signals a growing trend: the integration of LLM capabilities into systems that were historically isolated from AI pipelines.
The decision to avoid third-party dependencies is noteworthy. Most LLM SDKs (like Python’s openai or JavaScript’s langchain) rely on extensive dependency trees. For Erlang’s ecosystem—where OTP (Open Telecom Platform) already provides robust HTTP client and JSON handling—this minimalism aligns with the language’s philosophy of building reliable, self-contained systems. It also reduces attack surface and version conflicts in production environments.
For AI practitioners, this library opens the door to embedding LLM calls directly into Erlang/Elixir systems without bridging through Python or Node.js sidecars. Consider use cases like real-time moderation in chat servers, dynamic routing in telecom switches, or natural language interfaces for database queries—all running natively in the BEAM virtual machine.
Implications for AI Practitioners
First, Erlangchain demonstrates that LLM integration is becoming language-agnostic. The barrier to entry is no longer about Python proficiency but about understanding HTTP APIs and JSON parsing—capabilities nearly every modern language possesses. This democratization means AI features can be added to legacy or specialized systems without rewriting them.
Second, the library’s tool-use support is particularly relevant for Erlang’s actor model. Tool calling—where an LLM requests execution of a function—maps naturally to Erlang’s process-based architecture. Each tool invocation could spawn a supervised process, with error handling built into OTP’s supervision trees. This is a more robust pattern than typical Python implementations that rely on retry logic or external orchestration.
Third, the lack of third-party dependencies means this library is suitable for environments with strict compliance or air-gap requirements. Financial trading systems, military communications, or industrial control systems that run Erlang can now experiment with LLM integration without introducing untrusted code.
However, practitioners should note the trade-offs. Without higher-level abstractions (retry logic, streaming, token management, or prompt templating), developers must implement these themselves. The library is best suited for teams already comfortable with Erlang’s idioms and willing to build their own orchestration layer.
Key Takeaways
- Erlangchain provides a dependency-free, minimal LLM client for Erlang, enabling AI integration in systems traditionally outside the AI ecosystem.
- The library aligns with Erlang’s philosophy of reliability and minimalism, reducing attack surface and dependency conflicts.
- Tool-use support maps naturally to Erlang’s actor model, offering a robust pattern for LLM-driven function execution.
- Practitioners gain the ability to embed LLM calls directly into high-concurrency, fault-tolerant systems without bridging through other languages.