Eligenic is an experimental, pluggable Agentic framework for Elixir and Phoenix.
Warning
Status: Early Development. This framework is currently a prototype. APIs are subject to change, and it is not yet intended for production use.
- Zero-Boilerplate Introspection: Automatically turn your existing Elixir functions into AI tools using
@docand typespecs. - Pluggable Architecture: Bring your own storage (Ecto, Redis), security policies, and telemetry.
- Neural Orchestration: Prototypal support for PII redaction, tool-level authorization, and systematic evaluations.
- Multi-LLM Support: Unified adapter interface for Gemini, OpenAI, Anthropic, and more.
Eligenic is organized as a clean, standalone library with a reference implementation:
lib/: The core framework source code.test/: Comprehensive test suite for the core library.examples/eligenic_app: A standalone Phoenix application demonstrating proof-of-concept integration.
To run the sample Phoenix application:
-
Install dependencies:
mix deps.get
-
Set up the database: Ensure you have Postgres running, then:
mix ecto.setup
-
Start the Phoenix server:
mix phx.server
Now you can visit localhost:4000 from your browser.
Add eligenic to your mix.exs:
def deps do
[
{:eligenic, "~> 0.1.0"}
]
endEligenic is designed to be a "plug-and-play" library for adding agentic capabilities to any Elixir app.
You can turn any existing module into an AI Skill using the Eligenic.Tool introspection.
defmodule MyApp.Calculator do
@doc "Adds two numbers together"
@spec add(a :: integer(), b :: integer()) :: integer()
def add(a, b), do: a + b
end
# In your agent config:
tools = [
Eligenic.Tool.introspect(MyApp.Calculator, :add) |> elem(1)
]Agents are standard processes. You can start them manually or in a supervisor.
# Manual start
{:ok, pid} = Eligenic.Agent.start_link(tools: tools)
# Send a message
{:ok, response} = Eligenic.call(pid, "Help me add 5 and 10")Eligenic uses behaviors for Memory and Security, allowing you to use your existing infra.
defmodule MyApp.Memory do
@behaviour Eligenic.Memory
def store_event(agent_id, event), do: MyApp.Repo.insert(...)
def get_history(agent_id), do: {:ok, MyApp.Repo.all(...)}
end
# Usage:
# Agent.start_link(memory: MyApp.Memory)defmodule MyApp.Security do
@behaviour Eligenic.Security
def authorize(agent, tool, args), do: if(agent.admin, do: :ok, else: {:error, "Forbidden"})
def redact(content), do: String.replace(content, ~r/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/, "REDACTED")
endToggle providers in your config.exs:
config :eligenic,
llm_adapter: Eligenic.Adapters.VertexAI # or OpenAI, etc.Eligenic is developed by Tecolixa. Contributions are welcome!
Eligenic is released under the Apache License 2.0.