Skip to content

Latest commit

Β 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Autonomous Business OS Demo

AI-Powered Business Management with RAG, Vision Extraction & Cinematic UI


🎬 Overview

Autonomous Business OS Demo is a fully local, AI-driven business management dashboard. It combines Ollama LLMs, ChromaDB vector search, and LangChain RAG chains into a polished Gradio interface with a cinematic dark theme.

Generate synthetic invoices, bulk-import customer data from images/PDFs via vision models, query your database with natural language, and chat with a floating AI assistant β€” all running 100% on your own hardware.


✨ Features

Module Capability
πŸ‘₯ Customer Management CRUD operations with vector-semantic search via ChromaDB
πŸ“„ Bulk Import Drag-and-drop ZIP, PDF, or images. Auto-extracts customer data using local vision models
πŸ§ͺ Test Data Generator Creates high-variation synthetic invoices (PDF + ZIP) with random Texas-style business data
πŸ” RAG Search Ask natural-language questions about your customers; LangChain RAG generates contextual answers
πŸ’¬ Floating AI Chat Toggleable multimodal chatbot (text + image + PDF) in the bottom-right corner
🎨 Cinematic UI Dark glassmorphism theme with animated starfield background

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         presentation/ (Gradio UI)       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚Customersβ”‚ β”‚Test Dataβ”‚ β”‚  Chat    β”‚   β”‚
β”‚  β”‚  Tab    β”‚ β”‚  Tab    β”‚ β”‚(Floating)β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜   β”‚
β”‚       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚              application/               β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚    β”‚CustomerSvc  β”‚  β”‚  ChatSvc    β”‚     β”‚
β”‚    β”‚(RAG + CRUD) β”‚  β”‚(Streaming)  β”‚     β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚              infrastructure/            β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚    β”‚ChromaDB β”‚  β”‚  OllamaClient   β”‚     β”‚
β”‚    β”‚(Vectors)β”‚  β”‚(LLM + Vision)   β”‚     β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚              config/settings.py         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

Your system needs these OS-level libraries before installing Python packages:

Ubuntu / Debian

sudo apt update
sudo apt install -y libpango1.0-0 libcairo2 poppler-utils

macOS

brew install pango cairo poppler

Windows

1. Clone & Setup

git clone https://github.com/RealRaven/AutonomousBusinessOS-Demo.git
cd AutonomousBusinessOS-Demo

# Create virtual environment
python3 -m venv .venv
# or: python -m venv .venv # Windows

# Activate
source .venv/bin/activate        # Linux/macOS
# or: .venv\Scripts\activate   # Windows

# Install dependencies
pip install -r requirements.txt

2. Configure Environment

cp .env.example .env
# Edit .env with your preferred editor
# or Edit config/settings.py

3. Start Ollama

Ensure Ollama is running locally with your chosen model:

ollama pull qwen3.5:4b
ollama pull mxbai-embed-large
ollama serve

4. Launch

python run.py

Open your browser at http://127.0.0.1:7860


βš™οΈ Configuration

Create a .env file in the project root. All values have sensible defaults.

Variable Default Description
OLLAMA_HOST http://localhost:11434 Ollama API endpoint
OLLAMA_MODEL qwen3.5:4b Main chat / extraction model
OLLAMA_EMBEDDING_MODEL mxbai-embed-large Embedding model for ChromaDB
OLLAMA_TEMPERATURE 0.7 LLM creativity
OLLAMA_MAX_TOKENS 4096 Max response length
CHUNK_SIZE 1000 Text splitter chunk size
CHUNK_OVERLAP 200 Text splitter overlap
APP_TITLE Autonomous Business OS Demo Browser tab title

πŸ“ Project Structure

autonomous-business-os/
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€__init__.py
β”‚   β”œβ”€β”€ settings.py           # Frozen dataclass config with env var support
β”‚   └── .env.example          # Template for local environment variables
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€__init__.py
β”‚   └── models.py             # Customer dataclass with to_text() / to_dict()
β”œβ”€β”€ application/
β”‚   β”œβ”€β”€__init__.py
β”‚   β”œβ”€β”€ customer_service.py   # High-level CRUD + RAG business logic
β”‚   └── chat_service.py       # Streaming chat with image/PDF support 
β”œβ”€β”€ infrastructure/
β”‚   β”œβ”€β”€__init__.py
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”œβ”€β”€__init__.py
β”‚   β”‚   └── chroma_client.py  # Low-level ChromaDB wrapper + LangChain embeddings
β”‚   └── llm/
β”‚       β”œβ”€β”€__init__.py
β”‚       └── ollama_client.py  # Centralized Ollama client (HTTP + LangChain LCEL)
β”œβ”€β”€ presentation/
β”‚   β”œβ”€β”€__init__.py
β”‚   β”œβ”€β”€ ui_manager.py         # Orchestrates tabs + floating chat
β”‚   β”œβ”€β”€ styles.css            # Cinematic dark theme + glassmorphism
β”‚   β”œβ”€β”€ tabs/
β”‚   β”‚   β”œβ”€β”€__init__.py
β”‚   β”‚   β”œβ”€β”€ customers_tab.py  # Customer CRUD, bulk import, AI fill, RAG query
β”‚   β”‚   β”œβ”€β”€ test_data_tab.py  # Synthetic invoice PDF generator
β”‚   β”‚   └── chat_tab.py       # Floating multimodal chat interface
β”‚   └── assets/
β”‚       β”œβ”€β”€__init__.py
β”‚       └── img/
β”‚           └── avatar.png      # AI assistant avatar (add your own)
β”œβ”€β”€__init__.py
β”œβ”€β”€ run.py                    # Main entry point (Gradio Blocks + starfield JS)
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .env.example
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ LICENSE
└── README.md

πŸ–ΌοΈ UI Preview

banner

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ✨ Starfield Background            β”‚  πŸ€– Floating Chat (toggle)     β”‚
β”‚                                     β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  πŸ‘₯ Customers     β”‚   πŸ§ͺ Test       β”‚     β”‚  How can I  β”‚            β”‚
β”‚  ─────────────    β”‚    Data         β”‚     β”‚  help you?  β”‚            β”‚ 
β”‚  [Bulk Upload]    β”‚   [Generate]    β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚  [AI Fill]        β”‚                 β”‚                                β”‚
β”‚  [Table]          β”‚                 β”‚                                β”‚
β”‚  [RAG Query]      β”‚                 β”‚                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Layer Technology
UI Gradio 6.x, Custom CSS (glassmorphism), HTML5 Canvas
LLM Ollama (Qwen, Llama, etc.)
Embeddings OllamaEmbeddings (mxbai-embed-large)
Vector DB ChromaDB (persistent, cosine similarity)
RAG LangChain LCEL ChatPromptTemplate | ChatOllama | StrOutputParser
Vision Base64 image encoding + Ollama vision models
PDF pdf2image (Poppler) + weasyprint (HTML→PDF)
Config Python dataclasses + os.getenv

πŸ“ License

MIT License β€” see LICENSE for details.


πŸ™‹ FAQ

Q: Does this work without internet?
Yes. Once models are pulled via Ollama, everything runs entirely locally.

Q: Can I use a different LLM?
Absolutely. Change OLLAMA_MODEL in your .env to any model with vision capacity supported by Ollama.

Q: Where is my data stored?
Locally in ./dbs/chroma/. Nothing leaves your machine.


πŸ™ Acknowledgments

Built with Gradio, LangChain, ChromaDB, and Ollama β€” all running 100% locally on your hardware.

About

AI-Powered Business Management with RAG, Vision Extraction & Cinematic UI

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages