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

type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New
kip
Following on from my CLDR lbraries I started work on Unicode transforms. But like everything related to CLDR there is a lot of yak-shavin...
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
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews