mikehostetler

mikehostetler

Jido - A SDK for Building Autonomous Agent Systems

I’m excited to announce Jido, a framework providing foundational primitives for building autonomous agent systems in Elixir. While developing agent-based architectures, I found existing tools lacked the right abstractions for building truly autonomous systems that could evolve and adapt at runtime.

Core Architecture

Jido’s architecture is built around four core primitives that map directly to key patterns in autonomous systems:

Actions provide a composable unit of work with rich metadata, enabling agents to introspect capabilities and combine them in novel ways at runtime. Unlike traditional functions, Actions include schemas and metadata that support dynamic reasoning and composition.

Workflows extend beyond traditional sequential chains to support dynamic composition patterns. Building on Elixir’s strengths, workflows can be constructed to handle conditional paths, error recovery, and compensation seamlessly.

Agents maintain schema-validated state while planning and executing workflows. Through directives, agents can modify their own capabilities at runtime - such as enqueueing additional instructions to perform.

Sensors operate as independent processes, providing real-time environmental awareness through standardized signals. The exist to support Agents by monitoring external events.

SDK & Extension

Jido is designed as an SDK for building agent-based systems. The core framework provides the runtime primitives, while the companion jido_ai package offers integrations with LLM providers like Anthropic’s Claude through the instructor_ex package. Teams building with Jido can easily integrate any LLM into Jido via a custom Action.

Current Status

Version 1.0.0 provides production-ready implementations of all core primitives. Work is underway on enhanced Agent Server and Supervisor capabilities for 1.1. We’re actively using Jido in production and welcome feedback from teams building autonomous systems.

Resources

https://github.com/agentjido/jido

We look forward to seeing what the Elixir community builds with Jido!

Thanks!

Most Liked

mikehostetler

mikehostetler

Great question - This whole space is evolving quickly and has been a fantastic mental challenge to shed my old habits of how these apps get built - so this is my current perspective.

The “use an LLM assistant to execute a tool” trend of late benefits one party - LLM API providers. I’ve read over a LOT of repo’s, and have played with a lot of toys.

That’s why this foundational repo has ZERO LLM or AI code in it. At this foundational layer, LLM tool calling as a first class citizen didn’t feel right.

Don’t get me wrong, I wrote this to integrate with LLM’s - but the Elixir way is to build with pure data structures and minimal dependencies on OTP. That’s the purpose of this package.

As a sneak peek - here’s a Jido Action which implements a call to Anthropic Claude using instructor_ex to fetch a “Chat Completion” - aka agent chatting: https://github.com/agentjido/jido_ai/blob/main/lib/jido_ai/anthropic.ex#L6

Agents as GenServers is implemented and tested. I’m not entirely happy with the API yet so I didn’t include it in this official release. They each spin up a DynamicSupervisor and can manage delegating tasks to other agents, starting and stopping Signals and doing all sorts of other cool things.

I see a future where we each have thousands of Agents working for us constantly - like a swarm of ants. No other framework or platform comes close to making this happen - so I started from first principles with Elixir.

Enjoy!

EDIT: There will be many examples coming soon to demonstrate the scope of what Agents with Jido are capable of.

11
Post #6
mikehostetler

mikehostetler

Correct - the foundational library can be used without LLM’s. During planning, I felt it was important to simplify down to the base data structures and interaction patterns - get those correct - and then build LLM interaction patterns on top of that.

You can see an initial implementation of a Jido.Action that calls an LLM in the jido_ai package here: https://github.com/agentjido/jido_ai/blob/main/lib/examples/politician.ex

This example uses instructor_ex - but langchain or any other Elixir AI package could easily be integrated for an LLM response.

Yes, exactly - or even Broadway. This problem space of data transformation pipelines has a lot of solutions.

Each solution has it’s strengths. I love and have used each of these tools many times.

Jido won’t be the best at raw throughput as it does not use GenStage - like Broadway or Flow. Jido does not assume a database, if you need a database backed Job Processing system, you should use Oban.

Jido is aimed at the space where a particular agent (or queue?) is built to facilitate a wide variety of output - because a LLM is typically involved. Low throughput, high variety.

Where the Agent space gets crazy-weird is when you let the LLM pick the next action. It’s not random … but it’s not idempotent either. Jido agents natively support a list of “allowed” actions (Agents — Jido v2.3.2) for this reason - it provides a small level of control over this use case.

I purpose built Directives to help provide some control over these advanced use cases.

This space evolves weekly - and I’m constantly learning and evolving my thinking here as well.

mikehostetler

mikehostetler

The primitives share similarities with Oban - but the use-cases are different.

Agent techniques like “Chain of Thought” (Chain-of-Thought Prompting | Prompt Engineering Guide<!-- -->) string together several actions with an LLM’s response deciding which next-action to choose. This simulates human reasoning leading to higher-quality outputs.

Jido was tailored towards these use cases. But, as I explained above, as I worked through my own prompting pipelines, I got annoyed with LLM’s being slow an flaky. When I set out to build Jido, I wanted to ensure the building blocks didn’t make assumptions about LLM’s being involved, but also supported classical AI planning algorithms - a currently neglected sector of artificial intelligence research.

Think about video game NPC’s - the AI used to power them are most often things like Behavior trees or Zipper trees.

Elixir has a solid base of these algorithms available as Hex packages now and there was even a talk at ElixirConf about them in 2018

A lot of the latest AI research focus has gone towards LLM’s lately, but I find algorithms like behavior trees to be more practical in the real-world because they are more reliable in several ways.

Really appreciate the questions here- I’m adding clarifications to the README along the way to hopefully answer some of these questions for others in the future.

Where Next?

Popular in Announcing Top

wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
sasajuric
I’d like to announce a small library called boundaries. This is an experimental project which explores the idea of enforcing boundaries ...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: GitHub - tmbb/phoenix_ws: Websockets implemented over Phoenix Ch...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
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
cjen07
parameterized pipe in elixir: |n&gt; edit: negative index in |n&gt; and mixed usage with |&gt; are supported example: use ParamPipe ...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New
zoltanszogyenyi
Hey everyone :waving_hand: Excited to join this forum - I am one of the founders and current project maintainers of a popular and open-s...
New

Other popular topics Top

chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
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
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43622 214
New
Lily
In templates/appointment/index.html.eex: &lt;%= for appointment &lt;- @appointments do %&gt; &lt;tr&gt; &lt;td&gt;&lt;%= appoi...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New

We're in Beta

About us Mission Statement