Skip to content
forked from agentjido/jido_ai

Jido Actions and Skills for interacting with LLMs

License

Notifications You must be signed in to change notification settings

Nickcom4/jido_ai

 
 

Repository files navigation

Jido.AI

AI integration layer for the Jido ecosystem - LLM orchestration and reasoning strategies for building intelligent agents in Elixir.

Overview

Jido.AI provides a comprehensive toolkit for building intelligent agents with LLMs. It implements proven reasoning strategies for tool use, multi-step reasoning, and complex planning - all designed to get better results from language models.

# Quick example: `Jido.AI.Agent` with tool use
defmodule MyApp.Agent do
  use Jido.AI.Agent,
    name: "my_agent",
    tools: [MyApp.Actions.Calculator, MyApp.Actions.Search],
    model: :fast
end

{:ok, pid} = Jido.AgentServer.start(agent: MyApp.Agent)
{:ok, response} = MyApp.Agent.ask_sync(pid, "What is 15 * 23?")

Installation

def deps do
  [
    {:jido, "~> 2.0"},
    {:jido_ai, "~> 2.0.0-beta"}
  ]
end

Configure model aliases and LLM provider credentials (see Configuration Reference):

# config/config.exs
config :jido_ai,
  model_aliases: %{
    fast: "anthropic:claude-haiku-4-5",
    capable: "anthropic:claude-sonnet-4-20250514"
  }

config :req_llm,
  anthropic_api_key: System.get_env("ANTHROPIC_API_KEY"),
  openai_api_key: System.get_env("OPENAI_API_KEY")

Reasoning Strategies

Strategies are agent patterns that determine how an LLM approaches a problem. They are the foundation of building intelligent agents with Jido.AI.

Strategy Pattern Best For
Chain-of-Draft Minimal intermediate drafts Low-latency multi-step reasoning
ReAct Reason-Act loop Tool-using agents
Chain-of-Thought Sequential reasoning Multi-step problems
Algorithm-of-Thoughts Single-query algorithmic search Structured exploration with explicit finalization
Tree-of-Thoughts Explore multiple paths Complex planning
Graph-of-Thoughts Networked reasoning Interconnected concepts
TRM Recursive self-supervision Iterative refinement
Adaptive Strategy selection Variable problem types

When to use which strategy:

  • Chain-of-Draft - For concise reasoning with lower token/latency overhead
  • ReAct - When your agent needs to use tools or APIs
  • Chain-of-Thought - For multi-step reasoning and math problems
  • Algorithm-of-Thoughts - For one-pass exploration with explicit answer: finalization
  • Tree-of-Thoughts - When exploring multiple solution paths is beneficial
  • Graph-of-Thoughts - For problems with interconnected concepts
  • TRM - For iterative improvement loops
  • Adaptive - When you need dynamic strategy selection based on the problem
# `Jido.AI.Agent` with tools
defmodule MyApp.Agent do
  use Jido.AI.Agent,
    name: "my_agent",
    tools: [MyApp.Actions.Calculator, MyApp.Actions.Search],
    model: :fast
end

# Chain-of-Thought agent for step-by-step reasoning
defmodule MyApp.Reasoner do
  use Jido.AI.CoTAgent,
    name: "reasoner",
    model: :fast
end

{:ok, pid} = Jido.AgentServer.start(agent: MyApp.Reasoner)
{:ok, result} = MyApp.Reasoner.think_sync(pid, "Solve: 3 cats catch 3 mice in 3 minutes...")

Documentation

Build With Jido.AI

Extend Jido.AI

Reference

Examples

ReAct Production Defaults

Use these references as the production baseline for ReAct:

Quick Decision Guide

Not sure which technique to use? Start here:

Building an agent?
├─ Need to use tools/APIs?
│  └─ Use ReAct Strategy
├─ Need concise multi-step reasoning?
│  └─ Use Chain-of-Draft
├─ Need one-pass algorithmic search output?
│  └─ Use Algorithm-of-Thoughts
├─ Multi-step reasoning?
│  └─ Use Chain-of-Thought
└─ Complex planning?
   └─ Use Tree-of-Thoughts

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

Apache-2.0 - See LICENSE.md for details.


Jido.AI Homepage | GitHub | Discord

About

Jido Actions and Skills for interacting with LLMs

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%