zhenfeng-zhu

zhenfeng-zhu

Hi everyone,

I’ve been building NexAgent, an AI agent system designed for long-running, real-world use, and I thought it might be interesting to share here because the project is deeply shaped by Elixir/OTP.

Most agent projects I see are optimized for one-shot tasks: run a prompt, call a few tools, return a result, exit.

NexAgent is aimed at a different problem:

  • keep an agent online
  • put it inside chat apps people already use
  • give it persistent sessions and memory
  • let it run background jobs
  • make it capable of improving over time

In practice, the project currently focuses on two core ideas:

  • Self-evolution
  • Elixir/OTP as the runtime foundation

Why Elixir/OTP

For a short-lived agent script, the runtime is often secondary.

For an agent that is supposed to stay online, manage multiple chat surfaces, isolate failures, run scheduled tasks, and eventually support hot updates, OTP starts to matter a lot more.

That’s the main reason I chose Elixir.

NexAgent uses OTP concepts as product-level building blocks rather than just implementation details:

  • supervision trees for long-lived services
  • process isolation between components
  • GenServer-based managers for sessions, tools, cron, and channel connections
  • fault recovery for message handling and background work
  • a path toward hot code evolution and rollback

What NexAgent does today

Right now, the project includes:

  • chat app integration via a gateway layer
  • long-running sessions scoped by channel:chat_id
  • persistent memory and history
  • built-in tools for file access, shell, web, messaging, memory search, scheduling, and more
  • a skill system for reusable capabilities
  • cron jobs and subagents for background work
  • reflective/evolutionary tooling for source-level self-improvement

Supported chat channels in code today include:

  • Telegram
  • Feishu

The part I find most interesting

The project’s real goal is not “wrap one more model API”.

It is to explore what an agent system looks like when you take these questions seriously:

  • How should memory work beyond a single context window?
  • How should sessions be isolated across chat channels?
  • How should background work be scheduled and supervised?
  • How should an agent evolve beyond prompt edits?
  • What does source-level self-modification look like in a runtime that already supports hot code loading and supervision?

That combination is what made Elixir feel unusually well-suited for this kind of system.

Current status

This is still an early-stage project, but the architecture is already oriented around:

  • Gateway
  • InboundWorker
  • Runner
  • SessionManager
  • Memory / Memory.Index
  • Tool.Registry
  • Cron
  • Subagent
  • Evolution
  • Surgeon

The broader direction is to build an agent that is not just configurable, but persistent, operational, and evolvable.

If this overlaps with your interests in OTP systems, long-running AI services, or agent architecture, I’d be very interested in feedback.

Especially on questions like:

  • whether Elixir feels like the right long-term runtime for this category
  • how far hot upgrades should be pushed in an agent system
  • where OTP gives the biggest advantage over more conventional agent stacks

Thanks for reading.

Repository:

https://github.com/gofenix/nex-agent

Showing Posts 1 to 1

zhenfeng-zhu

zhenfeng-zhu OP

Been working a lot on nex-agent recently.

Over the past few weeks I’ve basically gotten the Feishu and Telegram integrations working smoothly, and the core parts like messaging, memory organization, and persona are all usable now.

What I’ve been thinking about lately is this: how should self-evolution in an agent actually be done without turning into pure self-indulgence?

So I wanted to ask people here. From an actual usage perspective, what capabilities would you want nex-agent to add next?

— All posts loaded —

Where Next? Top

Trending in Announcing Top

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
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
pferriby
Introductory paragraph I’ll be looking for a keen junior or someone that has a couple of years experience in the real world (so you’ve be...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews