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

danschultzer
In short Plug n’ play OAuth 2.0 provider library. Just set up a resource owner schema with Ecto (your user schema), install the dependen...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19951 141
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
kip
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project. Unicode released CLDR ...
407 13366 120
New
fuelen
Hey folks! Want to present a toolkit for writing command-line user interfaces. It provides a convenient interface for colorizing text...
New
Flo0807
Hello everyone! I am excited to share our heart project Backpex with you. After building several Phoenix applications, we realized that...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 131117 1222
New
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement