bradley

bradley

beamlens - Adaptive Runtime Intelligence for the BEAM

Hi everyone

I’m really excited to announce Beamlens, a library that brings adaptive runtime intelligence to the BEAM.

The Pitch

Claude Code, Tidewave and other tools have been widely successful and useful for many people. Beamlens takes the same exact philosophy as those tools but puts the AI directly in your supervision tree in the form of multiple GenSevers orchestrating agentic loops.

It allows your application to self-diagnose incidents, analyze traffic patterns, and (optionally) optimize its own performance.

Watch the Demo: DEMO VIDEO

Why I built this

I created Beamlens for two main reasons:

  1. Context is lost after the crash: I’ve spent a ton of time debugging production applications. Monitoring tools show you the metrics after the fact, but they rarely capture the full runtime state (ETS tables, process dictionaries, etc.) at the exact moment of the incident.
  2. The BEAM is built for this: The BEAM is uniquely positioned to make Elixir the best language for the AI era. I believe we can have applications that are both fault-tolerant and self-evolving.

How it works

You add Beamlens to your supervision tree. It stays dormant until triggered (by telemetry, an alarm handler, or manually).

Out of the box Beamlens provides skills for tracking BEAM health, ETS tables, garbage collection, logging and more. In addition you can add your own skills by implementing a very simple behaviour module and then declaring the skill in your supervision tree.

# 1. Trigger an investigation when something goes wrong
{:ok, result} = Beamlens.Coordinator.run(%{reason: "memory usage > 90%"})

# 2. Beamlens introspects the runtime and returns semantic insights
# Result: "Worker pool exhausted; processes are not hibernating after large binary handling."

Skills & Extensibility

Out of the box, Beamlens provides skills for tracking BEAM health, ETS tables, garbage collection, and logging.

You can also teach it to understand your specific domain by implementing a simple behaviour.

For example, here is a “Healer” skill that gives the agent permission to remediate issues:

defmodule MyApp.Skills.Healer do
  @behaviour Beamlens.Skill

  # Explicitly allow the operator to kill a process
  # Note: The agent can only do this if you explicitly enable this callback
  @impl Beamlens.Skill
  def callbacks do
    %{
      "kill_process" => fn pid_str ->
        Process.exit(pid(pid_str), :kill)
      end
    }
  end
end

Privacy & Providers

  1. BYO-Provider: Works with OpenAI, AWS Bedrock, Anthropic, and others.
  2. Resiliency: Supports advanced configuration modes like fallback models for redundancy.
  3. Privacy: Your data stays in your infrastructure; you control where the prompts are sent.

Early Access & Feedback

This is v0.2.0. It is an experiment, but I think we can do so much with this pattern.

I am also working on a Web Dashboard (showcased in the video) to visualize these investigations. :backhand_index_pointing_right: Click here to get early access to the always free web dashboard. Screenshot below:

The library is available on GitHub now. I’d love to hear your thoughts on this approach to runtime observability!

https://github.com/beamlens/beamlens

Where Next?

Popular in Announcing Top

seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
Crowdhailer
The latest release of Ace (0.10.0) includes serving content over HTTP/2. I have started writing a webserver to teach my self more about...
New
Crowdhailer
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention. Assuming you have ...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
zorbash
I created Kitto a framework for dashboards inspired by Dashing. The distributed characteristics of Elixir and the low memory footprint...
New
wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
michalmuskala
Another small library today. PersistentEts Hex: persistent_ets | Hex GitHub: GitHub - michalmuskala/persistent_ets · GitHub Ets table ...
New
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement