PhoenixAI Store

Hex.pmCIDocs

Persistence, memory management, guardrails, cost tracking, and an audit event log for PhoenixAI conversations.

Features

Installation

Add phoenix_ai_store to your list of dependencies in mix.exs:

def deps do
  [
    {:phoenix_ai_store, "~> 0.1.0"}
  ]
end

Quick Start

# Add to your supervision tree
children = [
  {PhoenixAI.Store, name: :my_store, adapter: PhoenixAI.Store.Adapters.ETS}
]

# Create a conversation
{:ok, conv} = PhoenixAI.Store.save_conversation(
  %PhoenixAI.Store.Conversation{title: "My Chat"},
  store: :my_store
)

# Run the full pipeline
{:ok, response} = PhoenixAI.Store.converse(
  conv.id,
  "Hello!",
  provider: :openai,
  model: "gpt-4o",
  api_key: System.get_env("OPENAI_API_KEY"),
  store: :my_store
)

Documentation

License

MIT — see LICENSE for details.