Skip to main content

Phoenix AI

Phoenix AI Logo

Advanced AI Infrastructure SDK for Autonomous Agents, Chatbots, and Production Backend Services.

Python 3.10+ License: MIT Frameworks AI SDK


Whether you are building with FastAPI, Django, or a custom event-driven service, Phoenix AI eliminates repetitive backend setup and provides a highly-optimized orchestration layer for large language models, computer vision, and physical hardware.

Why Phoenix AI?

  • Autonomous Agents: Single-line creation of thinking, planning, and executing AI agents.
  • High-Level ChatBot: Turnkey conversational AI with native RAG, Vision, and Memory.
  • "Everything as a Service": A unified Dependency Injection container handles Vector DBs, Redis caching, and LLMs seamlessly.
  • Fail-Loud & Recover: Auto-fallbacks from Local (Ollama/Transformers) to Cloud (OpenAI) to prevent system crashes.
  • Native PyTorch & 4-bit Quantization: Run local models directly on your GPU without external servers, automatically optimized for low-VRAM machines.
  • Sensorium (Embodied AI): Plug your AI directly into the physical world via IoT, MQTT, and Arduino plugins.

📦 Installation

Choose the installation tier that matches your project needs:

# Core Backend Framework
# Download Size: ~5.2 MB (Verified)
# Installed Size on Disk: ~15 MB
pip install phx-ashborn

# Core + ChatBot & Conversation Memory
# Download Size: ~35 MB (Estimated)
# Installed Size on Disk: ~90 MB
pip install "phx-ashborn[chatbot]"

# Core + Advanced RAG Frameworks (Qdrant, ChromaDB, Web/API Ingestion)
# Download Size: ~45 MB
# Installed Size on Disk: ~110 MB
pip install "phx-ashborn[rag]"

# Core + Autonomous Agents & Planners
# Download Size: ~107 MB (Verified)
# Installed Size on Disk: ~200 MB
pip install "phx-ashborn[agent]"

# Full Suite (Everything including Local AI Inference)
# ⚠️ Download Size: ~2.2 GB - 2.5 GB (Estimated)
# ⚠️ Installed Size on Disk: ~5.5 GB - 6.0 GB
pip install "phx-ashborn[full]"

Quickstarts & Core Features

1. Autonomous Agents

The Phoenix Agent is a high-speed cognitive engine capable of understanding complex problems, scanning codebases, planning multi-step solutions, and executing parallel tools.

import asyncio
from phoenix import Agent

async def agent_demo():
    # Initialize a high-speed Agent with default tools and memory
    agent = Agent()
    
    # Or inject custom tools instantly!
    from phoenix.framework.agent import tool
    
    @tool(name="custom_math", description="Calculates squares. Input: 'number' (int)")
    def math_tool(number: int):
        return f"The square is {number ** 2}"
        
    agent.register_tool(math_tool)
    
    # Run a complex engineering task
    # The agent will: Think -> Analyze -> Plan -> Execute Tools -> Reflect
    result = await agent.run(
        "Find the redundant code in the memory module and optimize it.", 
        mode="plan"
    )
    
    print(f"Agent Execution Report: {result}")

asyncio.run(agent_demo())

2. Multi-Modal ChatBot

Need a powerful conversational interface without the complexity of building agent loops? The ChatBot builder abstracts away RAG, Vision (VLM), and Session Memory into a fluent API.

from phoenix import ChatBot
import asyncio

async def chatbot_demo():
    # Build a complete AI ChatBot in one line
    bot = (ChatBot(local=False, vlm=True)
           .with_rag(["./docs", "./src"])       # Ingest folders automatically
           .with_memory()                       # Enable conversation history
           .with_security(mode="strict")        # Prompt-injection protection
           .with_system_prompt("You are a helpful Python expert.")
           .build())

    # Multi-modal interaction out of the box
    response = await bot.chat(
        prompt="Explain this architecture diagram.", 
        image_path="architecture.png"
    )
    print(response)

asyncio.run(chatbot_demo())

3. Advanced RAG Frameworks

The new object-oriented RAG framework provides scalable RAG, CAG (Cache-Augmented Generation), AgenticRAG, and MultiModalRAG systems out of the box with unified multi-source ingestion.

import asyncio
from phoenix.framework.rag import RAG, AgenticRAG

async def rag_demo():
    # Initialize standard RAG (ChromaDB is default)
    rag = RAG()

    # Unified Multi-Source Ingestion
    await rag.ingest_multi([
        {"type": "folder", "path": "./my_project"},
        {"type": "github", "repo_url": "https://github.com/blackeagle686/phoenix-ai.git"},
        {"type": "url", "url": "https://example.com/api-docs"},
        {"type": "sql", "connection_string": "sqlite:///data.db", "table": "docs"}
    ])

    # Query with automatic context compression and MMR reranking
    answer = await rag.query("How do I extend the caching layer?")
    print(answer)
    
    # Or upgrade to AgenticRAG to let the AI verify its own answers and rewrite poor queries!
    # agentic = AgenticRAG(max_retries=3, verify_answer=True)

asyncio.run(rag_demo())

🏗️ Advanced Architecture

Multi-Agent Orchestration

Define dynamic teams of specialized agents (e.g., Coder, Reviewer, Security Expert) and coordinate them through parallel broadcasting or sequenced pipelines.

from phoenix.framework import MultiAgentManager, MultiAgentConfig, AgentConfig

config = MultiAgentConfig(
    team_name="Engineering Task Force",
    agents=[
        AgentConfig(name="Giyu_Coder", profile="profiles/coder.json"),
        AgentConfig(name="Shinobu_Reviewer", profile="profiles/reviewer.json")
    ]
)

manager = MultiAgentManager(config)
report = await manager.run_pipeline(
    prompt="Implement a thread-safe cache system",
    agent_sequence=["Giyu_Coder", "Shinobu_Reviewer"]
)

🦾 Sensorium (Hardware SDK)

Connect your Phoenix Agents to the physical world using an async, zero-latency plugin architecture. Build Smart Home routines, Robotics controllers, or Drone surveillance systems!

from phoenix.framework.sensorium.core.manager import DeviceManager
from phoenix.framework.sensorium.plugins.mock_plugin import MockSensorPlugin
from phoenix.framework.agent import tool

manager = DeviceManager()
await manager.add_device("living_room_temp", MockSensorPlugin())

@tool(name="get_temperature", description="Reads current room temp.")
async def read_temp():
    return await manager.get_device("living_room_temp").read()

⚠️ Local Inference Requirements

If you run Phoenix using Local LLMs/VLMs (via Ollama or native Transformers), ensure your machine meets the following specifications to prevent system instability:

  • RAM: 8GB Minimum (16GB+ recommended).
  • GPU: 4GB+ VRAM required for Vision/VLM models (utilizing built-in 4-bit quantization).
  • Disk Space: 10GB+ free space for model weights.

Comprehensive Documentation

Ready to dive deeper? Explore our dedicated guides to master the Phoenix ecosystem:

Core Architecture

Data & Retrieval

Autonomous Agents

Integrations & Extensions


⚡ BrainMemory Core (Rust Backend)

Brain Memory Core

Phoenix AI ships with an ultra-fast, lock-free memory engine written entirely in Rust, accessible seamlessly from Python. It features a custom-built, embedded Hierarchical Navigable Small World (HNSW) Vector Database for sub-millisecond multi-modal context retrieval.

Performance Benchmarks

Methodology

All benchmarks were executed using cargo bench in release mode. Each benchmark was warmed up before measurement and repeated multiple times by Criterion to reduce statistical noise. Reported values are the benchmark mean.

Hardware Specifications & Parameters:

  • CPU: Intel Core i5-1135G7
  • RAM: 12 GB
  • OS: Ubuntu 24.04 (Linux)
  • Rust Version: Stable (1.80+)
  • Embedding Size: 384 dimensions
  • HNSW Configurations: M = 16, ef_construction = 100, ef_search = 50

Results

  • Neural Bus (Event Ingestion): ~4.39 ms per event spike.
    • What we benchmarked: Pushing a memory spike through a lock-free crossbeam channel and actively inserting a 384-dimensional embedding directly into the HNSW graph collection.
  • Fractal Compressor: ~2.46 ms per 1,000 events.
    • What we benchmarked: Scanning an array of 1,000 artificially aged memory events, calculating their Exponential Time-Decay coefficients (halflife factor = 0.5), and applying hierarchical compression to prevent memory bloat.
  • Retrieval Pipeline Overhead: ~1.01 µs (microseconds).
    • What we benchmarked: Utilizing a tokio async runtime to safely acquire read-locks on the memory core, querying 3 distinct vector collections simultaneously, and compiling the result. (Note: This 1.01 µs metric specifically captures the pipeline's async lock acquisition and traversal overhead on empty/cold collections, proving zero systemic bottleneck before the raw HNSW traversal phase).
    • The Output (WorkingMemory): A synthesis of (Top Semantic Events + Recent Episodic Sequences + Relevant Knowledge Nodes) passed directly to the LLM.

Metadata

Release files for phx-ashborn 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phx-ashborn 1.4.1
File Size Uploaded Provenance Actions
phx_ashborn-1.4.1.tar.gz 224.0 kB With provenance Details for phx_ashborn-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for phx-ashborn 1.4.1
File Interpreter ABI Platform Actions
phx_ashborn-1.4.1-py3-none-any.whl Python 3 none any Details for phx_ashborn-1.4.1-py3-none-any.whl

Total release size: 511.4 kB

Release files / phx_ashborn-1.4.1.tar.gz

Download URL phx_ashborn-1.4.1.tar.gz
Size 224.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3704b729b635231b769004897e053f6f7a7ac59152acfab1f5b98925f6741531
BLAKE2b-256 checksum
How to use checksums
334bf9fe4feda0078d242060bd949a9a89ba92a6f594e0bf167b45b0e86f7722
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / phx_ashborn-1.4.1-py3-none-any.whl

Download URL phx_ashborn-1.4.1-py3-none-any.whl
Size 287.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dac14b69fd0dc2235dfc0513b1bbd6861e663f0306d7658eb959b273b1ed45f
BLAKE2b-256 checksum
How to use checksums
8bea8716b0ff26706ea3c573b95d789f993eae2663b5d417af2f49185624fde0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for phx-ashborn 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for phx_ashborn-1.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page