core stable version 2.1.0 hex 2.1.0 package jido elixir ~> 1.17

Jido

Jido is the Elixir agent framework for building long-running, autonomous, multi-agent systems on OTP and the BEAM.

Stable support. Ongoing maintenance, compatibility work, and careful API evolution.

Add to mix.exs Hex package

Use the published Hex release for the stable runtime. Add companion packages only when your system needs those capabilities directly.

defp deps do
  [
    {:jido, "~> 2.1.0"}
  ]
end
View package metadata source →

WHEN TO USE Jido

Use This When
  • You need long-running, stateful agents that fit naturally into OTP supervision trees.
  • You want deterministic agent logic with explicit side effects and testable command handling.
  • You are building multi-agent workflows on the BEAM and need a stronger contract than raw GenServer callbacks.
Not The Right Fit When
  • You only need a thin wrapper around a single LLM call or request-response helper.
  • You want a batteries-included end-user product UI rather than a runtime framework.
  • You need turnkey multi-node distributed coordination without designing those runtime boundaries yourself.

START HERE

KEY MODULES

Jido.Agent

Defines the core immutable agent contract and cmd/2 lifecycle.

Jido.AgentServer

OTP runtime wrapper for production execution, routing, and supervision.

Jido.Plan

DAG planning primitives for dependency-aware multi-step execution.

Jido.Plugin

Composable extension mechanism for capabilities, hooks, and state.

Jido.Discovery

Persistent catalog for discovering actions, agents, plugins, and sensors at runtime.

Jido.Agent.Directive

Typed effect contracts emitted by cmd/2 and executed by runtimes.

RELATED PACKAGES

AT A GLANCE

Pure functional agent architecture — agents are immutable data structures
Elm/Redux-inspired cmd/2 contract — actions in, updated agent + directives out
Schema-validated state with NimbleOptions or Zoi
Directive-based effect system — side effects described, not performed

FAQ

Do I need jido_ai to use Jido?

No. Jido is the runtime and agent framework. You can build deterministic agents, signals, directives, and workflows without any LLM layer, then add jido_ai later if the system needs model-driven reasoning.

How is Jido different from a GenServer?

GenServer gives you process primitives. Jido adds an agent contract, validated state, explicit directives, signal routing, and a cleaner separation between decision logic and side effects.

Which packages usually come next after jido?

Most stacks start with jido_action and jido_signal as the core runtime companions. From there, jido_ai, jido_memory, jido_browser, and jido_live_dashboard are common additions depending on whether you need reasoning, memory, tools, or observability.

DEEP DIVE

Overview

Jido (自動, Japanese for “automatic”) is the core agent framework for building autonomous, multi-agent systems in Elixir. It provides a pure functional agent architecture inspired by Elm/Redux where agents are immutable data structures updated through a single cmd/2 operation — actions transform state, directives describe side effects, and an OTP-powered runtime executes everything in production. This separation of pure decision logic from effectful execution gives developers deterministic, testable agent behavior with the full power of the BEAM underneath.

As the foundation of the Jido ecosystem, this package formalizes the patterns that raw OTP leaves ad-hoc: standardized signal envelopes replace custom message shapes, reusable actions replace business logic scattered across GenServer callbacks, typed directives replace implicit effects, and built-in parent-child hierarchies replace custom child tracking. The result is a production-grade framework for building single agents, cooperating multi-agent workflows, and autonomous systems that can be reasoned about, tested without processes, and deployed with confidence.

Purpose

Jido is the core package of the Jido ecosystem. It defines the Agent behaviour, the cmd/2 contract, the directive system, execution strategies, the plugin architecture, the OTP runtime (AgentServer), and all supporting infrastructure (persistence, observability, scheduling, discovery). Every other package in the ecosystem — jido_action, jido_signal, jido_ai — extends or builds upon the primitives defined here.

Major Components

Agent (Jido.Agent)

The central abstraction. Agents are immutable structs with schema-validated state, updated exclusively through the cmd/2 function. Accepts actions as modules, {Module, params} tuples, %Instruction{} structs, or lists of any of these. Returns {updated_agent, directives} — the agent is always fully updated and directives are external effect descriptions only. Supports lifecycle hooks (on_before_cmd/2, on_after_cmd/3).

AgentServer (Jido.AgentServer)

GenServer-based OTP runtime that wraps an Agent for production deployment. Owns signal routing, executes directives through a non-blocking internal queue with drain loop, manages parent-child agent hierarchies with lifecycle monitoring, and provides sync (call/3) and async (cast/2) signal processing.

Strategies (Jido.Agent.Strategy)

Pluggable execution strategies that control how cmd/2 processes actions:

  • Direct — Immediate sequential execution (default)
  • FSM — Finite state machine for state-driven workflows with transition guards

Plugins (Jido.Plugin)

Composable capability modules that extend agents with reusable functionality. Each plugin encapsulates actions, schema-validated state, configuration, signal routing rules, lifecycle hooks, optional child processes, and cron schedules.

Directives (Jido.Agent.Directive)

Typed effect descriptions emitted by cmd/2 for the runtime to execute: Emit, Error, Spawn, SpawnAgent, StopChild, Schedule, Stop, Cron/CronCancel.

Sensors (Jido.Sensor)

Pure behaviour modules that transform external events into Jido Signals. Stateless with init/2 and handle_event/2 callbacks.

Thread (Jido.Thread)

Append-only log of interaction entries — the canonical record of “what happened” in a conversation or workflow.

Memory (Jido.Memory)

An agent’s mutable cognitive substrate organized as named spaces (world, tasks, custom).

Persistence (Jido.Persist, Jido.Storage)

Hibernate/thaw lifecycle for agents with thread support and storage adapter behaviour.

Observability (Jido.Observe, Jido.Telemetry)

Unified observability façade wrapping :telemetry events with span-based tracing.

Discovery (Jido.Discovery)

Fast, persistent catalog of Jido components using :persistent_term.