Advanced AI Infrastructure SDK for Agentic Applications
Project description
Phoenix AI
Advanced AI Infrastructure SDK for Autonomous Agents, Chatbots, and Production Backend Services.
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.exampleto.envand configure your API keys (e.g.,OPENAI_API_KEY). For full system deployment (including Redis setup), use the provided./install.shorinstall.batscripts.
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
- Main Framework Guide (Arabic Version)
- Data Pipelines & RAG (Arabic Version)
- Model Training & Finetuning (Arabic Version)
Autonomous Agents
Integrations & Extensions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phx_ashborn-0.3.4.tar.gz.
File metadata
- Download URL: phx_ashborn-0.3.4.tar.gz
- Upload date:
- Size: 153.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16d434b37ac869ba5abf16d410934c7acfbb173fcf0e3a7d7375fa446f59d2f3
|
|
| MD5 |
ec3f5c1085fd59147754397b6f84fb72
|
|
| BLAKE2b-256 |
8b1935debd3ec20ab54214b970333a04fa155edf20b6d93b0d1a69af769f6487
|
Provenance
The following attestation bundles were made for phx_ashborn-0.3.4.tar.gz:
Publisher:
pypi-publish.yml on blackeagle686/phoenix-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phx_ashborn-0.3.4.tar.gz -
Subject digest:
16d434b37ac869ba5abf16d410934c7acfbb173fcf0e3a7d7375fa446f59d2f3 - Sigstore transparency entry: 1764586453
- Sigstore integration time:
-
Permalink:
blackeagle686/phoenix-ai@f0e57b983d456ae5d1ef627c2cfbf036e6075e51 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/blackeagle686
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f0e57b983d456ae5d1ef627c2cfbf036e6075e51 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file phx_ashborn-0.3.4-py3-none-any.whl.
File metadata
- Download URL: phx_ashborn-0.3.4-py3-none-any.whl
- Upload date:
- Size: 212.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9574564348d09824e2907909a4d772127127f41b7b1b1ca4f197e65372c916de
|
|
| MD5 |
117d38b9ab0430188065520f2f784e5f
|
|
| BLAKE2b-256 |
76cc179edc7653e6294124a5c0859d39cce888b39b875575d5f4ec2961ab3e8d
|
Provenance
The following attestation bundles were made for phx_ashborn-0.3.4-py3-none-any.whl:
Publisher:
pypi-publish.yml on blackeagle686/phoenix-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phx_ashborn-0.3.4-py3-none-any.whl -
Subject digest:
9574564348d09824e2907909a4d772127127f41b7b1b1ca4f197e65372c916de - Sigstore transparency entry: 1764587657
- Sigstore integration time:
-
Permalink:
blackeagle686/phoenix-ai@f0e57b983d456ae5d1ef627c2cfbf036e6075e51 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/blackeagle686
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f0e57b983d456ae5d1ef627c2cfbf036e6075e51 -
Trigger Event:
workflow_dispatch
-
Statement type: