Skip to main content

Advanced AI Infrastructure SDK for Agentic Applications

Project description

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 + 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]"

[!NOTE] If you're running locally, copy the .env.example to .env and configure your API keys (e.g., OPENAI_API_KEY). For full system deployment (including Redis setup), use the provided ./install.sh or install.bat scripts.


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())

[!TIP] Phoenix Agents feature Intelligent Auto-Routing. By default (mode="auto"), the agent analyzes your prompt to decide whether to give a blazing-fast direct answer or spin up its heavy planning loop for complex operations!

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. RAG Pipeline (Retrieval-Augmented Generation)

The RAGPipeline handles document extraction, intelligent chunking, and vector storage (ChromaDB/Qdrant) across PDFs, Code files, SQL, APIs, and GitHub repos.

import asyncio
from phoenix import init_phoenix, startup_phoenix, get_rag_pipeline

async def rag_demo():
    # Initialize the core framework services
    init_phoenix()
    await startup_phoenix()
    
    rag = get_rag_pipeline()

    # 1. Ingest local directories (supports .pdf, .docx, .py, .go, etc.)
    await rag.ingest("./my_project")

    # 2. Ingest remote web pages
    await rag.ingest_url("https://example.com/api-docs")
    
    # 3. Clone and index a GitHub repository on the fly
    await rag.ingest_github("https://github.com/blackeagle686/phoenix-ai.git")

    # 4. Query the knowledge base (Automatic Source Citations included!)
    answer = await rag.query("How do I extend the caching layer?")
    print(answer)

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.

[!WARNING] High-resource models may cause system crashes on CPU-only devices. The SDK prioritizes stability and will pause to prompt for user confirmation in the terminal before booting large local providers.


Comprehensive Documentation

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

Core Architecture

Autonomous Agents

Integrations & Extensions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phx_ashborn-0.3.2.tar.gz (139.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phx_ashborn-0.3.2-py3-none-any.whl (200.0 kB view details)

Uploaded Python 3

File details

Details for the file phx_ashborn-0.3.2.tar.gz.

File metadata

  • Download URL: phx_ashborn-0.3.2.tar.gz
  • Upload date:
  • Size: 139.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for phx_ashborn-0.3.2.tar.gz
Algorithm Hash digest
SHA256 431dd6cf8b3d2fdd90d7a0ab3a465a54611a1431061bf45a42e393c7f7094aa6
MD5 4946298a68dd69e41a060d30ea0a1b4d
BLAKE2b-256 820e66c9b25078f7f7bd08bdc281e8633d3037047260091118d3ad6a72f1a230

See more details on using hashes here.

Provenance

The following attestation bundles were made for phx_ashborn-0.3.2.tar.gz:

Publisher: pypi-publish.yml on blackeagle686/phoenix-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phx_ashborn-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: phx_ashborn-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 200.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for phx_ashborn-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 40a24b99b22fad3b6b5b8facdb27cc3e4291f7c0a1f7819856cc0fbb4fda91b3
MD5 0d2f252067ffd38e5a0e53b849f847cd
BLAKE2b-256 70a94f2b9984cf48972bb730d87b74de5851ef20890864bd9a437d5837b9bdac

See more details on using hashes here.

Provenance

The following attestation bundles were made for phx_ashborn-0.3.2-py3-none-any.whl:

Publisher: pypi-publish.yml on blackeagle686/phoenix-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page