Skip to content

agentjido/jido_ai

Repository files navigation

Jido AI

Intelligent Agent Framework for Elixir

Jido AI is a comprehensive framework for building sophisticated AI agents and workflows in Elixir. It extends the Jido framework with powerful LLM capabilities, advanced reasoning techniques, and stateful conversation management.

Features

  • Multi-Provider Support: Access 57+ LLM providers through ReqLLM (OpenAI, Anthropic, Google, Mistral, and more)
  • Advanced Reasoning: Chain-of-Thought, ReAct, Tree-of-Thoughts, Self-Consistency, GEPA
  • Structured Prompts: Template-based prompts with EEx and Liquid support
  • Tool Integration: Function calling with automatic schema conversion
  • Conversation Management: Stateful multi-turn conversations with ETS storage
  • Context Window Management: Automatic token counting and truncation strategies

Installation

Add jido_ai to your mix.exs dependencies:

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

Quick Start

alias Jido.AI.{Model, Prompt}
alias Jido.AI.Actions.ReqLlm.ChatCompletion

# Create a model
{:ok, model} = Model.from({:anthropic, [model: "claude-3-5-sonnet"]})

# Create a prompt
prompt = Prompt.new(:user, "What is the capital of France?")

# Get a response
{:ok, result} = ChatCompletion.run(%{model: model, prompt: prompt}, %{})
IO.puts(result.content)

Documentation

User Guides

Learn how to use Jido AI in your applications:

Guide Description
Getting Started Installation, configuration, and first steps
Models Working with LLM models and providers
Prompts Creating and templating prompts
Configuration API keys and settings management
Chat Completion Basic and advanced chat completions
Conversations Multi-turn stateful conversations

Runners (Advanced Reasoning)

Implement sophisticated reasoning strategies:

Runner Description Accuracy Gain
Overview Introduction to runners -
Chain of Thought Step-by-step reasoning +8-15%
ReAct Reasoning with tool use +27%
Self-Consistency Multiple paths with voting +17.9%
Tree of Thoughts Tree search exploration +74%
GEPA Evolutionary prompt optimization +10-19%

Developer Guides

Understand the internals for extending Jido AI:

Guide Description
Architecture System architecture and components
Model System Model creation, registry, and discovery
Prompt System Prompt structs, templating, versioning
Actions System Jido Actions and tool integration
Runners System Runner implementations and patterns
Data Flow Request lifecycle and data transformations

Supported Providers

Jido AI supports 57+ providers through ReqLLM:

Provider Example Models
Anthropic Claude 3.5 Sonnet, Claude 3 Opus
OpenAI GPT-4o, GPT-4 Turbo
Google Gemini 1.5 Pro, Gemini 1.5 Flash
Mistral Mistral Large, Mixtral 8x7B
Groq Llama 3.1 70B
Cohere Command R+
Local Ollama, LM Studio

See the Models Guide for complete provider documentation.

Configuration

Set API keys via environment variables:

export ANTHROPIC_API_KEY="sk-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="..."

Or configure in your application:

config :jido_ai, :keyring, %{
  anthropic_api_key: "sk-...",
  openai_api_key: "sk-..."
}

See the Configuration Guide for details.

API Documentation

Full API documentation is available at HexDocs.

Generate documentation locally:

mix docs
open doc/index.html

Resources

License

MIT License - see LICENSE for details.

About

Jido Actions and Skills for interacting with LLMs

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published