DEV Community

Cover image for Moving Beyond Chatbots: Architecting a Sovereign AI Ecosystem with Java 25 & NATS
Eber Cruz
Eber Cruz

Posted on

Moving Beyond Chatbots: Architecting a Sovereign AI Ecosystem with Java 25 & NATS

The Problem: The Erosion of Technological Sovereignty

As engineers, we've fallen into a trap of convenience. We are building on "quicksand": closed APIs, black boxes, and total cloud dependency. Every time we send a prompt, we give away context and lose sovereignty.

I decided I didn't want an "assistant" to tell me jokes. I wanted a command infrastructure. Thus, Fararoni was born, an ecosystem designed to treat AI as what it should be: executable infrastructure, not just a chat interface.


1. The Centurion Vision: Command Architecture

In Fararoni, we move away from the "copilot" model to adopt the Centurion Vision.

  • The Human is the Architect: Defines the strategy, limits, and mission objective.
  • The AI is the Centurion: Orchestrates and executes.

To achieve this, the architecture cannot be linear. We need an infrastructure that supports failures, latency, and real-time context switching.


2. The Tech Stack: Why Java 25 and NATS?

Java 25 and the Power of Virtual Threads

Many ask: Why not Python? The answer is simple: concurrency and robustness.
By using Java 25, we leverage virtual threads (Project Loom) to handle hundreds of agents and processes in the "Swarm" lightly. With GraalVM support, we achieve native binaries that boot in milliseconds, ideal for a CLI that must feel instantaneous.

NATS: The Nervous System

We don't use an internal REST API for module communication. We use NATS as an event bus. This allows us to:

  • Total decoupling: The "Sidecars" (WhatsApp, Telegram, Terminal) don't know who processes the order; they only listen to the bus.
  • Resilience: If a local model goes down, the message stays on the bus until a worker is ready.

3. Tactical Innovation: DAGs and Hot-Swapping

Traceability via DAGs (Directed Acyclic Graphs)

AI is often a black box. In Fararoni, every AI decision is mapped in a DAG. This allows the human architect to audit the flow:

  1. Where did this information come from?
  2. Which model made the decision?
  3. What was the cost and latency?

If it's not auditable, it's not professional.

Model Hot-Swap: The Bridge Between Local and Cloud

One of the biggest challenges was the Hot-Swap.

  • For low-sensitivity tasks or pre-processing, we use a local 1.5B parameter model.
  • If the task scales in complexity, the system does a "Hot-Swap" to Claude 3.5 or GPT-4 without losing the mission state.

You maintain control over what data leaves your infrastructure and what doesn't.


4. Digital Heritage and Open Source

I have released the communication core and plugins under the Apache 2.0 license. I'm not looking to create another captive platform; I want to help other engineers in Latin America and the world build their own Digital Heritage.

Sovereignty isn't just a pretty word; it's having the binaries, the data bus, and the models under your own command.


Conclusion: The Swarm is Growing

Fararoni is already real. The installers are available, and the terminal is already orchestrating missions.
It is not a finished product, it's a living ecosystem.

What do you think about using NATS for LLM orchestration compared to traditional queue-based architectures like RabbitMQ or Kafka? I'll read you in the comments.

Explore the code and documentation at: fararoni.dev


*Tags: #OpenSource #Java25 #GraalVM #Java #ProjectLoom #CloudNativeJava #SelfHosted #NATS #SoftwareArchitecture #SovereignAI #SoftwareArchitecture #Fararoni #AI #TechSovereignty #Ollama #DeepSeek #Qwen #LocalLLM #AIInfrastructure

Top comments (3)

Collapse
 
c_nguynnh_56de361f0 profile image
Đức Nguyễn Đình

Quick personal review of AhaChat after trying it
I recently tried AhaChat to set up a chatbot for a small Facebook page I manage, so I thought I’d share my experience.
I don’t have any coding background, so ease of use was important for me. The drag-and-drop interface was pretty straightforward, and creating simple automated reply flows wasn’t too complicated. I mainly used it to handle repetitive questions like pricing, shipping fees, and business hours, which saved me a decent amount of time.
I also tested a basic flow to collect customer info (name + phone number). It worked fine, and everything is set up with simple “if–then” logic rather than actual coding.
It’s not an advanced AI that understands everything automatically — it’s more of a rule-based chatbot where you design the conversation flow yourself. But for basic automation and reducing manual replies, it does the job.
Overall thoughts:
Good for small businesses or beginners
Easy to set up
No technical skills required
I’m not affiliated with them — just sharing in case someone is looking into chatbot tools for simple automation.
Curious if anyone else here has tried it or similar platforms — what was your experience?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.