Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python OpenAI FastAPI License Versions

A personal AI assistant built in Python β€” evolved through 6 major versions from a basic voice assistant to a full production-grade multi-agent AI platform.


🧠 What is JARVIS?

JARVIS (Just A Rather Very Intelligent System) is a personal AI assistant inspired by Tony Stark's iconic AI companion. Built entirely in Python, this project documents the complete evolution of an AI assistant β€” from its first "Hello, how can I help you?" to a production-ready multi-agent platform capable of autonomous task planning and execution.

Each version is a complete, standalone project that introduces new concepts, patterns, and capabilities.


πŸš€ Version History

Version Name Key Capability
v1 Basic Voice Assistant Voice I/O, Wikipedia, browser control
v2 Smart AI Assistant GPT-powered brain, wake word detection
v3 Real JARVIS β€” Agent Architecture Modular tools, memory, AI-driven tool selection
v4 Autonomous AI Agent Multi-step task planning & execution
v5 Multi-Agent AI System Manager β†’ Planner / Research / Executor / Critic
v6 Production AI Platform FastAPI backend, SQLite memory, browser dashboard
v7 Intelligent AI Platform OpenAI function calling, streaming (SSE), web UI, persistent memory

πŸ“¦ Version Details

v1 β€” Basic Voice Assistant

"The foundation" β€” Voice in, voice out.

JARVIS begins as a simple voice assistant that listens to spoken commands and responds with text-to-speech output. No AI, no cloud β€” just Python doing what Python does best.

Capabilities:

  • πŸŽ™οΈ Voice input via microphone
  • πŸ”Š Text-to-speech responses (pyttsx3)
  • ⏰ Time & date queries
  • πŸ“– Wikipedia lookups
  • 🌐 Browser control (open websites)
cd "VERSION 1 BASIC VOICE ASSISTANT"
python jarvis_final.py

v2 β€” Smart AI Assistant

"Give JARVIS a real brain" β€” GPT enters the chat.

OpenAI's GPT is integrated as the fallback brain. Anything JARVIS doesn't know how to handle natively is sent to GPT for an intelligent response. Wake word detection means JARVIS is always listening.

New in v2:

  • πŸ€– OpenAI GPT-4o-mini integration
  • πŸ—£οΈ Wake word activation
  • ❓ Unknown commands answered by GPT
  • πŸ’¬ Conversational context
cd "VERSION 2 SMART AI ASSISTANT (JARVIS UPGRADE)"
python jarvis_v2.py

v3 β€” Real JARVIS β€” Agent Architecture

"Stop hard-coding everything" β€” Tools, engine, memory.

A complete architectural rewrite. JARVIS now has a modular tool system where each capability is a separate tool, an AI engine decides which tool to use, and a memory system remembers what was said.

Architecture:

jarvis_v3.py (main loop)
    β”œβ”€β”€ engine.py     ← AI decides which tool to call
    β”œβ”€β”€ tools.py      ← all capabilities registered as tools
    β”œβ”€β”€ memory.py     ← conversation history
    └── detection.py  ← wake word system

New in v3:

  • πŸ”§ Modular tool registry
  • 🧠 AI-driven tool selection engine
  • πŸ’Ύ Persistent memory system
  • πŸ” Web research capability
  • πŸ›‘οΈ Wake word system (dedicated module)
cd "VERSION 3 REAL JARVIS SYSTEM"
python "MAIN JARVIS LOOP/jarvis_v3.py"

v4 β€” Autonomous AI Agent

"Don't just answer β€” act." β€” Multi-step task planning.

JARVIS can now plan and execute multi-step tasks autonomously. Given a complex goal, it breaks it down into steps, executes them in sequence, and reports results.

New in v4:

  • πŸ“‹ Task planning (goal β†’ steps)
  • ⚑ Sequential step execution
  • πŸ”„ Autonomous retry & error handling
  • πŸ“Š Execution logging
cd "VERSION 4  AUTONOMOUS AI AGENT SYSTEM"
python tools.py

v5 β€” Multi-Agent AI System

"One agent isn't enough." β€” JARVIS becomes an organization.

Inspired by real AI research teams, v5 introduces a full multi-agent pipeline. A Manager agent receives the user request and delegates to specialized sub-agents, all reviewed by a Critic agent before the final response is delivered.

Agent Pipeline:

User Request
    ↓
Manager Agent      ← decides which agents are needed
    ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Planner  β”‚  Research  β”‚  Executor  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    ↓
Critic Agent       ← reviews & improves output
    ↓
Memory Store       ← saves everything
    ↓
Final Response

New in v5:

  • 🏒 Multi-agent orchestration
  • πŸ”¬ Dedicated Research agent
  • 🎯 Dedicated Executor agent
  • βœ… Critic agent for quality control
  • πŸ—‚οΈ Shared memory across agents
cd "VERSION 5 MULTI-AGENT AI SYSTEM (JARVIS ORGANIZATION)"
python orchestrator.py

v6 β€” Production AI Platform

"Ship it." β€” JARVIS goes to production.

The final form: a fully productionized AI platform with a REST API backend, SQLite-backed persistent memory, a browser-based dashboard, and a decoupled voice client. Everything runs as separate services.

Architecture:

Voice / Chat UI (browser dashboard)
        ↓
  FastAPI Gateway  (port 8000)
        ↓
  AI Brain (GPT-4o-mini)
        ↓
  β”Œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”
Tools  DB    Web

New in v6:

  • 🌐 FastAPI REST backend
  • πŸ“š SQLite persistent memory
  • πŸ–₯️ Browser dashboard (HTML/JS frontend)
  • πŸ”Œ Decoupled voice client
  • πŸ“‘ Full REST API with interactive docs
  • πŸ› οΈ Tool registry via API
# Terminal 1 β€” start the backend
run_backend.bat

# Terminal 2 β€” voice client
run_client.bat

# Or open the browser dashboard
run_frontend.bat

API available at: http://localhost:8000 Interactive docs at: http://localhost:8000/docs


v7 β€” Intelligent AI Platform

"The brain rewires itself" β€” the assistant decides when to use tools.

The next-generation platform. JARVIS now uses OpenAI function calling to choose tools on its own, streams responses token-by-token over Server-Sent Events, keeps a rolling conversation context in SQLite, and serves a built-in web UI. The full project lives in the VERSION 7 INTELLIGENT AI PLATFORM (JARVIS NEXT-GEN)/ folder.

New in v7:

  • 🧠 OpenAI function calling (model-driven tool selection)
  • ⚑ Streaming responses via Server-Sent Events (SSE)
  • πŸ—‚οΈ Persistent memory with rolling conversation context
  • πŸ–₯️ Built-in web UI served at /ui
  • πŸ› οΈ Expanded tools: Google, Wikipedia, weather, reminders, screenshots, open files/apps, time
  • πŸ” No bundled keys β€” bring your own in a local .env
# cd into "VERSION 7  INTELLIGENT AI PLATFORM (JARVIS NEXT-GEN)", then:
install.bat                 # install dependencies
copy .env.example .env      # then add your own OPENAI key
run_backend.bat             # start the server

Web UI at: http://localhost:8000/ui β€” or run run_client.bat for the voice/text client.


πŸ—‚οΈ Project Structure

JARVIS/
β”œβ”€β”€ VERSION 1  BASIC VOICE ASSISTANT/
β”‚   β”œβ”€β”€ jarvis.py
β”‚   β”œβ”€β”€ jarvis_final.py
β”‚   └── run_jarvis.bat
β”œβ”€β”€ VERSION 2 SMART AI ASSISTANT (JARVIS UPGRADE)/
β”‚   β”œβ”€β”€ jarvis_v2.py
β”‚   └── VERSION 3 REAL JARVIS SYSTEM (AI AGENT ARCHITECTURE)/   ← v3 lives inside v2
β”‚       β”œβ”€β”€ AI BRAIN (TOOL DECISION ENGINE)/engine.py
β”‚       β”œβ”€β”€ MAIN JARVIS LOOP (FULL SYSTEM)/jarvis_v3.py        ← v3 entry point
β”‚       β”œβ”€β”€ MEMORY SYSTEM (NEW)/memory.py
β”‚       β”œβ”€β”€ TOOL SYSTEM (REAL POWER CORE)/tools.py
β”‚       └── WAKE WORD SYSTEM (IMPROVED VERSION)/detection.py
β”œβ”€β”€ VERSION 4  AUTONOMOUS AI AGENT SYSTEM/
β”‚   β”œβ”€β”€ tools.py            ← entry point (run this)
β”‚   β”œβ”€β”€ planner.py
β”‚   β”œβ”€β”€ memory.py
β”‚   └── toolsystem.py
β”œβ”€β”€ VERSION 5  MULTI-AGENT AI SYSTEM (JARVIS ORGANIZATION)/
β”‚   β”œβ”€β”€ orchestrator.py     ← main entry point
β”‚   β”œβ”€β”€ manager.py
β”‚   β”œβ”€β”€ planner.py
β”‚   β”œβ”€β”€ research.py
β”‚   β”œβ”€β”€ executor.py
β”‚   β”œβ”€β”€ critic.py
β”‚   └── memory.py
β”œβ”€β”€ VERSION 6  PRODUCTION AI SYSTEM (JARVIS PLATFORM)/
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   β”œβ”€β”€ main.py         ← FastAPI server
β”‚   β”‚   β”œβ”€β”€ tools.py        ← tool registry
β”‚   β”‚   └── memory.py       ← SQLite database
β”‚   β”œβ”€β”€ client/client.py    ← voice client
β”‚   β”œβ”€β”€ frontend/index.html ← browser dashboard
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ run_backend.bat
β”‚   β”œβ”€β”€ run_client.bat
β”‚   └── run_frontend.bat
β”œβ”€β”€ VERSION 7  INTELLIGENT AI PLATFORM (JARVIS NEXT-GEN)/
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   β”œβ”€β”€ main.py         ← FastAPI server (function calling, SSE)
β”‚   β”‚   β”œβ”€β”€ tools.py        ← tool registry + schemas
β”‚   β”‚   └── memory.py       ← SQLite memory + rolling context
β”‚   β”œβ”€β”€ client/client.py    ← voice/text client
β”‚   β”œβ”€β”€ frontend/index.html ← web UI (served at /ui)
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ install.bat
β”‚   β”œβ”€β”€ install_voice.bat
β”‚   β”œβ”€β”€ run_backend.bat
β”‚   └── run_client.bat
β”œβ”€β”€ jarvis_showcase.html    ← visual showcase page
β”œβ”€β”€ AGENTS.md
└── README.md

βš™οΈ Setup & Installation

Prerequisites

  • Python 3.10+
  • A microphone (for voice versions)
  • An OpenAI API key (optional β€” all versions include local fallback)

Install Dependencies

pip install openai fastapi uvicorn speechrecognition pyttsx3 wikipedia requests beautifulsoup4 pyautogui

Set Your OpenAI API Key

# Windows (permanent)
setx OPENAI_API_KEY "sk-your-key-here"

# Linux / macOS
export OPENAI_API_KEY="sk-your-key-here"

Note: All versions work without an API key using local fallback logic. You only need a key to unlock full AI responses.


πŸ› οΈ Tech Stack

Technology Purpose
Python 3.10+ Core language
OpenAI GPT-4o-mini AI brain & reasoning
FastAPI + Uvicorn Production API server (v6)
SQLite Persistent memory (v6)
SpeechRecognition Voice input
pyttsx3 Text-to-speech output
Wikipedia API Knowledge lookups
BeautifulSoup4 Web research & scraping
PyAutoGUI Desktop automation

πŸ—ΊοΈ Evolution Roadmap

v1  ──►  Voice I/O + basic commands
v2  ──►  GPT brain + wake word
v3  ──►  Agent architecture + tool system
v4  ──►  Autonomous planning + execution
v5  ──►  Multi-agent organization
v6  ──►  Production platform + REST API
v7  ──►  Intelligent platform: function calling + streaming + web UI

πŸ‘€ Author

Avijit Saha Apu β€” @191Avi

Building JARVIS, one version at a time.


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages