Skip to content

Jido Actions and Skills for interacting with LLMs

License

Notifications You must be signed in to change notification settings

agentjido/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: ReAct agent with tool use
defmodule MyApp.Agent do
  use Jido.AI.ReActAgent,
    name: "my_agent",
    tools: [MyApp.Actions.Calculator, MyApp.Actions.Search],
    model: :fast
end

{:ok, agent} = MyApp.Agent.start_link()
{:ok, response} = MyApp.Agent.chat(agent, "What is 15 * 23?")

Installation

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

Configure your LLM provider (see Configuration Guide):

# config/config.exs
config :jido_ai, :models,
  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 Guide
ReAct Reason-Act loop Tool-using agents Guide
Chain-of-Thought Sequential reasoning Multi-step problems Guide
Tree-of-Thoughts Explore multiple paths Complex planning Guide
Graph-of-Thoughts Networked reasoning Interconnected concepts Guide
Adaptive Strategy selection Variable problem types Guide

When to use which strategy:

  • ReAct - When your agent needs to use tools or APIs
  • Chain-of-Thought - For multi-step reasoning and math problems
  • Tree-of-Thoughts - When exploring multiple solution paths is beneficial
  • Graph-of-Thoughts - For problems with interconnected concepts
  • Adaptive - When you need dynamic strategy selection based on the problem
# ReAct agent with tools
defmodule MyApp.Agent do
  use Jido.AI.ReActAgent,
    name: "my_agent",
    tools: [MyApp.Actions.Calculator, MyApp.Actions.Search],
    model: :fast
end

# Chain-of-Thought for step-by-step reasoning
{:ok, result} = Jido.AI.Strategies.ChainOfThought.run(
  "If 3 cats catch 3 mice in 3 minutes, how many cats are needed to catch 100 mice in 100 minutes?",
  model: :fast
)

Documentation

User Guides

Developer Guides

Examples

See the examples/ directory for runnable code:

Quick Decision Guide

Not sure which technique to use? Start here:

Building an agent?
├─ Need to use tools/APIs?
│  └─ Use ReAct Strategy
├─ 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 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