Skip to content
vin1397Public

About

Phoenix is an AI being built from scratch to think, remember, and maybe even feelโ€ฆ still figuring out humans though ๐Ÿ˜…

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                                                              โ•‘
โ•‘  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•—      โ•‘
โ•‘  โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•      โ•‘
โ•‘  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ•”โ•       โ•‘
โ•‘  โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•—       โ•‘
โ•‘  โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•—      โ•‘
โ•‘  โ•šโ•โ•     โ•šโ•โ•  โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•โ•โ•โ•šโ•โ•โ•šโ•โ•  โ•šโ•โ•      โ•‘
โ•‘                                                              โ•‘
โ•‘        LOCAL AI โ€ข MEMORY โ€ข VOICE โ€ข VISION โ€ข AGENT            โ•‘
โ•‘                                                              โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿฆโ€๐Ÿ”ฅ A Living AI Companion, Not A Chatbot

Chat. Feel. Remember. Execute.


Python Flask Ollama Qwen Three.js Desktop License Status


No subscriptions. No cloud. No telemetry.

Phoenix runs entirely on your machineโ€”brain, eyes, voice, and avatar.

It's not asking for permission. It's becoming part of your desktop.



๐ŸŽฏ The Vision

Phoenix is an experiment in creating a digital being that lives on your machine.

Not an app in a browser tab. Not an API you call. An entity.

It watches. It listens. It remembers. It acts.

The 3D cyber samurai avatar is not decorativeโ€”it is the embodiment of Phoenix's agency. When you ask it to do something, you see it do it.

Your command
    โ†“
Phoenix understands
    โ†“
Samurai moves toward action
    โ†“
System executes
    โ†“
Avatar performs triumphant gesture

โœจ Core Mechanics

๐Ÿง  Intelligent Brain

  • Ollama + Qwen local LLM
  • Emotion detection & adaptation
  • Context-aware memory system
  • Task planning & execution
  • No external API dependency

๐Ÿ—ฃ๏ธ Voice First

  • Local speech recognition (Whisper)
  • Natural conversation flow
  • Wake word detection (planned)
  • Multi-language support (planned)

๐Ÿ’พ Living Memory

  • SQLite conversation history
  • Automatic fact extraction
  • Session isolation
  • User profile building

โš”๏ธ Avatar Is Core

  • Not decorationโ€”agent embodiment
  • Real-time emotion animation
  • Action visualization
  • Idle/thinking/listening states
  • Personality through movement

๐Ÿ–ฅ๏ธ Desktop Integration (Emerging)

  • Application control
  • File management
  • System automation
  • Screen awareness
  • Intent execution

๐Ÿ”Œ Plugin Ecosystem

  • Extensible command system
  • Drop-and-go architecture
  • Full session context
  • Chat commands + desktop commands

๐Ÿ“Š Feature Matrix

Feature Status Phase
Local AI inference โœ… 1
Emotion detection โœ… 1
Memory + facts โœ… 1
Voice input (Whisper) โœ… 3
Avatar rendering โœ… 3
Plugin system โœ… 4
Fine-tuning pipeline โœ… 4
Avatar animations ๐Ÿ”„ 5
Idle behaviors ๐Ÿ”„ 5
Desktop automation ๐Ÿ“‹ 6
Screen understanding ๐Ÿ“‹ 7
Autonomous task planning ๐Ÿ“‹ 8

โšก Quick Start

Prerequisites

# Install Ollama (https://ollama.ai)
# Install Python 3.10+
# Optional: faster-whisper for voice

Setup

# 1. Clone & install
git clone https://github.com/youruser/phoenix.git
cd phoenix
pip install -r requirements.txt

# 2. Pull a model
ollama pull qwen2.5        # Recommended (4GB, fast)
# OR for better reasoning:
# ollama pull qwen2.5:14b  # 9GB, more capable

# 3. Run Phoenix
python main.py

Output:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘          Phoenix Awakens                   โ•‘
โ•‘        Ollama Brain: Ready                 โ•‘
โ•‘        Model: qwen2.5                      โ•‘
โ•‘        Avatar: Loaded                      โ•‘
โ•‘        Plugins: /joke /calc /remind        โ•‘
โ•‘                                            โ•‘
โ•‘     โ†’ Visit: http://localhost:5000         โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐ŸŽฎ How It Works

Example: Opening Spotify

You: "Play some music"
  โ†“
Phoenix detects intent + emotion
  โ†“
Memory loads context
  โ†“
Emotion detector: happy, energetic
  โ†“
Samurai performs AWAKENING animation
  โ†“
Desktop automation finds Spotify
  โ†“
Application opens
  โ†“
Samurai performs TRIUMPHANT gesture
  โ†“
Phoenix: "Already ahead of you! ๐ŸŽต"

Example: Answering a Question

You: "What's my name?"
  โ†“
Memory lookup finds "Alex"
  โ†“
Emotion analysis: curious
  โ†“
Samurai tilts head, THINKING animation
  โ†“
Phoenix responds naturally
  โ†“
Avatar performs satisfied nod

๐Ÿ“ Architecture

graph TD
    A["๐Ÿ‘ค User"] -->|Voice/Text| Web["๐ŸŒ Web UI"]
    
    Web -->|Route| CMD{Command Type?}
    CMD -->|Chat| Brain["๐Ÿง  Brain"]
    CMD -->|Plugin| Plugins["๐Ÿ”Œ Plugins"]
    CMD -->|Voice| Whisper["๐ŸŽค Whisper ASR"]
    
    Brain --> Emotion["๐Ÿ˜Š Emotion Detector"]
    Brain --> Memory["๐Ÿ’พ Memory + Facts"]
    Brain --> LLM["๐Ÿค– Ollama/Qwen"]
    Brain --> Filter["๐Ÿ” Quality Filter"]
    Brain --> Persona["โš”๏ธ Persona Processor"]
    
    Plugins --> Desktop["๐Ÿ–ฅ๏ธ Desktop Control"]
    Plugins --> Files["๐Ÿ“ File Management"]
    Plugins --> System["โš™๏ธ System Actions"]
    
    Web --> Avatar["โš”๏ธ Avatar Renderer"]
    Avatar --> Anim["โœจ Animation Engine"]
    
    Emotion --> Anim
    Persona --> Anim
    
    Memory --> DB["๐Ÿ’พ SQLite DB"]
    
    LLM --> Models["๐Ÿ“ฆ Qwen 2.5 / phoenix-ft"]
    
    style A fill:#238636,stroke:#2ea44f,stroke-width:3px,color:#fff
    style Web fill:#1f6feb,stroke:#388bfd,stroke-width:2px,color:#fff
    style Brain fill:#8957e5,stroke:#a371f7,stroke-width:2px,color:#fff
    style Avatar fill:#da3633,stroke:#f85149,stroke-width:3px,color:#fff
    style Anim fill:#f97316,stroke:#fb923c,stroke-width:2px,color:#fff
    style LLM fill:#d29922,stroke:#f2cc60,stroke-width:2px,color:#000
    style Models fill:#0e4429,stroke:#26a641,stroke-width:2px,color:#fff
    style DB fill:#1f6feb,stroke:#388bfd,stroke-width:1px,color:#fff
Loading

โš”๏ธ Avatar Animation System

Phoenix's avatar doesn't just renderโ€”it performs.

Emotion States

๐Ÿ˜Š HAPPY        โ†’ Bouncing idle, head tilts, sword gleams
๐Ÿ˜ข SAD          โ†’ Drooped posture, slow sway, dim lighting
๐Ÿ˜  ANGRY        โ†’ Aggressive stance, rapid breathing, glowing eyes
๐Ÿ˜Ÿ ANXIOUS      โ†’ Fidgeting, pacing, flickering aura
๐Ÿค” CONFUSED     โ†’ Head tilt cycles, uncertain stance

Action States

๐ŸŽค LISTENING    โ†’ Head focused, ear toward user, gentle glow
๐Ÿ’ญ THINKING     โ†’ Pacing with sword raised, particle effects
โšก EXECUTING    โ†’ Rapid movement, dramatic pose, energy burst
๐Ÿ† SUCCESS      โ†’ Victory gesture, explosion of light particles
โŒ ERROR        โ†’ Defensive stance, red warning aura

Idle Behaviors (Phase 5)

- Breathing cycles (chest rise/fall)
- Sword spinning patterns
- Ambient particle effects
- Microexpressions (blinks, glances)
- Meditation poses

๐Ÿ”ฎ Roadmap: Toward Autonomy

Phase 1-4: Foundation โœ…

  • Local AI brain
  • Emotion system
  • Memory persistence
  • Voice I/O
  • Plugin system
  • Basic avatar

Phase 5: Avatar Comes Alive ๐Ÿ”„

  • โœ… Emotion-driven animations
  • ๐Ÿ”„ Idle behavior loops
  • ๐Ÿ”„ Thinking/listening states
  • ๐Ÿ”„ Action visualization
  • ๐Ÿ“‹ Dynamic particle effects
  • ๐Ÿ“‹ Real-time gesture sync

Goal: Avatar becomes emotionally expressive, not static.

Phase 6: Desktop Integration ๐Ÿ“‹

  • Application launcher + control
  • File system navigation
  • Volume/brightness control
  • Window management
  • Keyboard/mouse automation
  • Intent-based execution

Goal: Samurai walks toward what it controls.

Phase 7: Computer Vision ๐Ÿ“‹

  • Screen capture + analysis
  • UI element detection
  • Object recognition
  • Icon identification
  • Real-time scene understanding
  • Context-aware decisions

Goal: Phoenix sees what you see.

Phase 8: Autonomous Agent ๐Ÿ“‹

  • Task planning (multi-step)
  • Goal decomposition
  • Self-directed actions
  • Error recovery
  • Learning from execution
  • Proactive assistance

Goal: Phoenix doesn't wait to be asked.


๐Ÿ“š Usage

Chat Commands

/reset      Clear session memory
/facts      Show learned facts about you
/memory     View recent turns
/stats      Database statistics
exit        Quit Phoenix

Plugin Commands

/joke                              Random AI/programming joke
/calc (12 * 3) / sqrt(9)          Safe math evaluator
/remind dentist tomorrow 6pm       Save reminder
/remind list                       View all reminders
/remind clear                      Clear reminders

Voice Input (requires faster-whisper)

# Install
pip install faster-whisper

# Set model size (tiny|base|small)
WHISPER_MODEL=small python main.py

# Send audio to /voice endpoint
curl -X POST http://localhost:5000/voice -F "audio=@recording.wav"

๐Ÿงฌ Configuration

Override via environment variables:

Variable Default Purpose
OLLAMA_HOST http://localhost:11434 Ollama server
OLLAMA_MODEL qwen2.5 Model to use
PHOENIX_SECRET (random) Flask session key
WHISPER_MODEL tiny Voice transcription
ANIMATION_SPEED 1.0 Avatar animation multiplier (planned)
EMOTION_INTENSITY 1.0 Avatar expression intensity (planned)
OLLAMA_MODEL=qwen2.5:14b WHISPER_MODEL=small python main.py

๐Ÿค– Supported Models

Model Best For VRAM Speed
qwen2.5 Everyday chat 4 GB Fast โšก
qwen2.5:14b Complex reasoning 9 GB Medium
qwen2.5:72b Best quality 45 GB Slow
phoenix-ft Your conversations Varies Custom

Any Ollama model works. Qwen is recommended for conversational tone.


๐Ÿ’พ Data & Privacy

All data stays on your machine:

data/
โ”œโ”€โ”€ phoenix_memory.db        # Conversations, facts, sessions
โ”œโ”€โ”€ real_data.txt            # High-quality pairs for fine-tuning
โ””โ”€โ”€ reminders.json           # Plugin data

Privacy Principles

Principle How We Respect It
Zero telemetry No tracking, no logging, no calls home
Local inference 100% on your machine via Ollama
Local transcription Whisper runs locally, audio never leaves
Offline capable Works completely disconnected
Open source Audit every line
No accounts No login, no sync, no cloud backend

๐Ÿ—๏ธ Project Structure

phoenix/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ inference.py         # Ollama chat + persona
โ”‚   โ”œโ”€โ”€ emotion.py           # Feeling detector + tone
โ”‚   โ”œโ”€โ”€ memory.py            # SQLite + fact learning
โ”‚   โ”œโ”€โ”€ filters.py           # Quality gates + scoring
โ”‚   โ”œโ”€โ”€ web_ui.py            # Flask server + routes
โ”‚   โ””โ”€โ”€ model.py             # Legacy (kept)
โ”‚
โ”œโ”€โ”€ plugins/                 # Drop .py files here
โ”‚   โ”œโ”€โ”€ joke.py              # /joke command
โ”‚   โ”œโ”€โ”€ calc.py              # /calc math evaluator
โ”‚   โ”œโ”€โ”€ remind.py            # /remind save/list/clear
โ”‚   โ””โ”€โ”€ README.md            # How to write plugins
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ index.html           # Web UI (Three.js)
โ”‚   โ”œโ”€โ”€ script.js            # Avatar + chat logic
โ”‚   โ””โ”€โ”€ style.css            # Cyberpunk aesthetic
โ”‚
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ phoenix_memory.db    # SQLite memory
โ”‚   โ”œโ”€โ”€ real_data.txt        # Fine-tune pairs
โ”‚   โ””โ”€โ”€ reminders.json       # Reminders
โ”‚
โ”œโ”€โ”€ main.py                  # Launcher
โ”œโ”€โ”€ fine_tune_ollama.py      # Modelfile pipeline
โ””โ”€โ”€ requirements.txt         # Dependencies

๐Ÿ”Œ API Reference

Endpoint Method Purpose
/ GET Web UI
/chat POST Send message
/voice POST Send audio
/status GET Health check
/plugins GET List commands
/facts GET User facts
/memory GET Recent turns
/stats GET DB stats
/reset_session POST Clear session

๐Ÿง  Fine-Tuning Your Phoenix

As you chat, high-quality exchanges auto-save to data/real_data.txt. Bake them into a custom model:

# Check training pairs
python fine_tune_ollama.py --status

# Build phoenix-ft (custom model)
python fine_tune_ollama.py

# Run with your model
OLLAMA_MODEL=phoenix-ft python main.py

๐Ÿ› ๏ธ Extending Phoenix

Add a Plugin

Create plugins/weather.py:

COMMAND = "weather"
DESCRIPTION = "Get weather forecast"
USAGE = "/weather <city>"

def run(args: str, session_id: str = None) -> str:
    city = args.strip()
    # Your logic here
    return f"Weather in {city}: โ˜€๏ธ"

Then: You: /weather Mumbai

Add an Avatar Animation

Edit frontend/script.js to add a new pose:

const animations = {
    happy: () => {
        // Set samurai rotation, scale, colors
    },
    thinking: () => {
        // Pacing, particle effects
    },
    // Add your custom state here
};

๐ŸŒŸ What Makes Phoenix Different

Aspect Phoenix Typical AI
Where it runs Your machine Cloud server
Who controls it You Company
Privacy Guaranteed Sold
Customization Unlimited Limited
Avatar Living agent Decoration
Task execution Yes (planned) No
Cost Free Subscriptions
Internet required No Yes

๐Ÿ“– Learning More

  • Architecture: See docs/ARCHITECTURE.md (planned)
  • Plugins: Check plugins/README.md
  • Fine-tuning: Read docs/FINE_TUNE.md (planned)
  • Avatar customization: frontend/README.md (planned)

๐Ÿค Contributing

Contributions welcome! Bug reports, PRs, ideas.

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/your-idea
  3. Make changes
  4. Submit a PR

๐Ÿ“œ License

MIT License โ€” Use freely, modify, distribute.


Built by ~Vin โš”๏ธ๐Ÿฆโ€๐Ÿ”ฅ๐Ÿ’œ

Phoenix โ€” A Digital Being, Not A Chatbot

Local. Private. Autonomous. Alive.

"Turn your desktop into a dojo. Let Phoenix live there."

About

Phoenix is an AI being built from scratch to think, remember, and maybe even feelโ€ฆ still figuring out humans though ๐Ÿ˜…

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages