Skip to content

About

AI-powered autonomous business platform with Ray, FastAPI, and Streamlit — marketing automation, content generation, and e-commerce

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Latest commit

 

History

89 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Autonomous Business Platform

The Ultimate AI-Powered Business Automation Suite - Generate complete marketing campaigns, manage products, create content, and automate your entire business workflow with 100+ AI models and integrations.

Python FastAPI Streamlit Ray License

Autonomous Business Platform UI tour: dashboard, product studio, campaign creator and video producer

▶ Live demo · Full walkthrough · Portfolio · Support the project


📑 Table of Contents


🎥 Walkthrough

A 45-second tour of the main workspace: brand templates, product studio, campaign creator, content generator, video producer and the job monitor.

Show walkthrough 45-second walkthrough of the Autonomous Business Platform interface

🎯 What is This?

The Autonomous Business Platform is a production-ready, self-hosted AI business automation suite that combines:

  • 21 specialized tabs + 70 service modules for every aspect of digital business
  • 100+ AI models from Replicate, OpenAI, Anthropic, and more
  • 15+ platform integrations (Printify, Shopify, YouTube, social media)
  • Otto AI - Your hyperintelligent multi-agent assistant
  • Ray-powered parallel processing - 7x faster campaign generation
  • Complete workflow automation - Import from n8n, ComfyUI, and custom formats

This isn't just another AI wrapper - it's a complete business operating system that runs locally or in the cloud.


✨ Core Features

🤖 Otto AI Assistant

Your hyperintelligent multi-agent AI powered by Claude Sonnet 3.5/4:

  • Slash Commands (/image, /video, /music, /pdf, /python, /chain, /help) - 100+ built-in commands
  • Knowledge Base - Remembers your products, brand, campaigns
  • Multi-Agent System - Coordinates specialized AI agents for complex tasks
  • Context-Aware - Understands your entire business context
  • Action Execution - Can directly create campaigns, products, and content

Hidden Power: Type / in any text field to access Otto's slash commands instantly!

📊 Complete Tab Breakdown

🏠 Dashboard

One-click complete campaign generation

  • Generate 6-asset campaigns in parallel (product page, ads, social posts, email, video, mockups)
  • Mass-produce hundreds of product variations
  • Automated brand-consistent styling
  • Performance: 7x faster with Ray parallelization (70s → 10s)

🛍️ Products Tab

Advanced product & mockup management

  • Printify Integration: Full sync, automated mockup generation
  • Shopify Integration: Direct product publishing
  • AI Mockup Generation: Create professional product photos with AI
  • Bulk Operations: Process hundreds of products simultaneously
  • Product Brain: AI remembers product details for campaigns

🎨 Content Generator

Multi-modal AI content creation

  • 100+ AI Models Available:
    • Image: FLUX (schnell/dev/pro), FLUX Kontext, Stable Diffusion, Midjourney-style
    • Video: Kling (v1.6 Pro, v2.5 Turbo), Luma, Minimax, Haiper, Runway
    • Text: Claude 3.5/4, GPT-4, Llama 3, Mixtral
    • Voice: ElevenLabs, Minimax Speech, TTS
    • Music: Minimax Music, Suno
  • Brand Templates: Apply consistent styling automatically
  • Batch Generation: Create variations at scale
  • Format Support: Images, videos, audio, documents

📧 Email Outreach

Automated email campaign system

  • SMTP Integration: Connect any email provider
  • Template Library: Professional templates with merge fields
  • Sequence Builder: Multi-step drip campaigns
  • Personalization: AI-generated custom content per recipient
  • Analytics: Track opens, clicks, conversions

📱 Social Media Automation

Multi-platform posting & scheduling

  • Supported Platforms:
    • YouTube (full upload API)
    • Twitter/X (auto-posting)
    • Pinterest (pin creation)
    • Instagram (via API)
    • LinkedIn (professional posts)
    • TikTok (video uploads)
    • Facebook (page management)
  • Smart Scheduling: AI suggests optimal posting times
  • Cross-Platform: Post to all platforms simultaneously
  • Caption Generation: AI creates platform-specific captions

🎬 Video Generator

Professional video creation with AI

  • 20+ Video Models:
    • Kling v2.5 Turbo Pro (fastest, image-to-video)
    • Kling v1.6 Pro (cinematic quality)
    • Luma AI (photorealistic)
    • Minimax (text-to-video)
    • Haiper (animation style)
    • Custom ComfyUI workflows
  • Features:
    • Product promotional videos
    • Social media ads
    • Brand CTA overlays
    • Music & voice-over
    • Automated editing

🔧 Custom Workflows

Visual workflow builder with imports

  • Import From:
    • n8n: Full JSON workflow import
    • ComfyUI: Node-based AI workflow conversion
    • Zapier: Webhook integration
    • Custom: JSON schema support
  • Workflow Components:
    • Conditional logic
    • API calls
    • AI model execution
    • Data transformation
    • Loop operations
  • Templates: Pre-built workflows for common tasks

�� Browser Use

AI-powered web automation

  • Powered by: Playwright + Claude Computer Use
  • Capabilities:
    • Research & data gathering
    • Form filling & submissions
    • Screenshot & data extraction
    • Multi-page workflows
    • Headless or visible mode

📅 Calendar & Tasks

AI-powered scheduling & planning

  • Smart Planning: Otto generates weekly/monthly plans
  • Task Management: Priority-based todo system
  • Deadline Tracking: Auto-alerts and reminders
  • Integration: Sync with campaigns and products

🗃️ File Library

Smart file management

  • AI Organization: Auto-categorize uploads
  • Search: Semantic search across all files
  • Preview: Built-in viewers for images, videos, PDFs
  • Lazy Loading: Paginated for speed (20 items/page)
  • Bulk Actions: Move, delete, tag multiple files

📈 Analytics Dashboard

Real-time business metrics

  • Shopify: Sales, orders, inventory
  • Printify: Production status, costs
  • YouTube: Views, engagement, revenue
  • Email: Open rates, click-through
  • Campaigns: ROI tracking
  • Performance: Parallel data fetching (3x faster)

🎮 Playground

Interactive AI testing suite

  • Code Playground: Python editor with execution
  • HTML/CSS Playground: Live preview
  • Model Comparison: Test multiple models side-by-side
  • Prompt Library: Save and share prompts
  • Response Analysis: Token usage, speed metrics

💬 Journal & Notes

AI-enhanced note-taking

  • Rich Text Editor: Markdown support
  • AI Integration: Summarize, expand, rewrite notes
  • Attachments: Link files and products
  • Search: Full-text and semantic search
  • Export: PDF, Markdown, plain text

🔍 Contact Finder

AI-powered outreach system

  • Lead Generation: Find contacts for products
  • Outreach Plans: AI generates personalized sequences
  • Template Library: Email and DM templates
  • CRM: Track interactions and responses

📊 Advanced Job Monitor

Real-time job tracking

  • 5 Specialized Views:
    1. Active Jobs (auto-refresh)
    2. All Jobs (filterable history)
    3. Analytics (charts & metrics)
    4. Ray Dashboard (embedded)
    5. Settings (cleanup, export)
  • Resource Tracking: CPU/RAM per job
  • Export: JSON, CSV formats

⚙️ Ray Cluster Manager

Distributed computing control

  • Cluster Status: Node health, resources
  • Job Distribution: Load balancing
  • Resource Profiling: Per-job CPU/RAM allocation
  • Dashboard: Embedded Ray web UI

🎵 Music Platforms Pro

Music distribution & management

  • Platform Support: Spotify, Apple Music, YouTube Music
  • OAuth Integration: Secure authentication
  • Upload: Direct music distribution
  • Analytics: Stream tracking

🔌 Complete Integration List

🤖 AI Models & APIs

Image Generation

  • FLUX.1-schnell (black-forest-labs)
  • FLUX.1-dev (black-forest-labs)
  • FLUX.1-pro (black-forest-labs)
  • FLUX Kontext Pro (context-aware)
  • Stable Diffusion XL
  • Midjourney-style models

Video Generation

  • Kling v2.5 Turbo Pro (kwaivgi)
  • Kling v1.6 Pro (fofr)
  • Luma AI Dream Machine
  • Minimax Video-01
  • Haiper AI
  • Runway Gen-2/Gen-3
  • Custom ComfyUI workflows

Text & Language

  • Claude 3.5/4 Sonnet (Anthropic)
  • GPT-4 Turbo (OpenAI)
  • Llama 3.1/3.2 (Meta)
  • Mixtral 8x7B
  • Gemini Pro (Google)

Voice & Audio

  • ElevenLabs TTS
  • Minimax Speech
  • OpenAI TTS
  • Bark

Music Generation

  • Minimax Music
  • Suno AI

🛍️ E-Commerce Platforms

  • Printify: Full API integration
    • Product sync
    • Mockup generation
    • Order management
    • Blueprint catalog access
  • Shopify: Complete store management
    • Product CRUD
    • Inventory sync
    • Order tracking
    • Collection management
  • Printful: Print-on-demand
  • Gooten: Fulfillment services
  • Etsy: Marketplace integration
  • eBay: Listings & orders
  • Amazon Seller: FBA integration

📱 Social Media Platforms

  • YouTube: Full upload API
    • Video publishing
    • Metadata management
    • Analytics
    • Playlist management
  • Twitter/X: Auto-posting
  • Pinterest: Pin creation & boards
  • Instagram: Content publishing
  • LinkedIn: Professional networking
  • TikTok: Video uploads
  • Facebook: Page management

📧 Email & Communication

  • SMTP: Any email provider
  • Gmail: Google Workspace
  • Outlook: Microsoft 365
  • Custom: Webhook support

🔧 Automation & Workflows

  • n8n: Workflow import
  • ComfyUI: AI workflow conversion
  • Zapier: Webhook triggers
  • Make (Integromat): Scenario import

💾 Storage & Database

  • Local: SQLite (default)
  • PostgreSQL: Production databases
  • File System: Local/NFS storage
  • S3-Compatible: Object storage

🏗️ Architecture

┌─────────────────────────────────────────────────────┐
│           Streamlit Frontend (Port 8501)             │
│  • 21 specialized tabs + lazy loading                 │
│  • Real-time updates via WebSocket                  │
│  • Session state management                         │
└──────────────────────┬──────────────────────────────┘
                       │
┌──────────────────────▼──────────────────────────────┐
│          FastAPI Backend (Port 8601)                 │
│  • REST API endpoints                               │
│  • WebSocket support                                │
│  • Job queue management                             │
│  • Retry logic (3 attempts, exponential backoff)   │
└──────────────────────┬──────────────────────────────┘
                       │
┌──────────────────────▼──────────────────────────────┐
│        Ray Distributed Cluster (Port 8265)           │
│  • Parallel job execution (8 CPUs)                  │
│  • Resource profiling per job type                  │
│  • Auto-scaling workers                             │
│  • Fault tolerance                                  │
└─────────────────────────────────────────────────────┘
         │                    │                    │
    ┌────▼────┐         ┌────▼────┐         ┌────▼────┐
    │  Video  │         │  Image  │         │  Text   │
    │ Worker  │         │ Worker  │         │ Worker  │
    │ 2 CPU   │         │ 1 CPU   │         │ 0.5 CPU │
    │ 4GB RAM │         │ 2GB RAM │         │ 512MB   │
    └─────────┘         └─────────┘         └─────────┘

Performance Optimizations

  • Campaign Generation: 7x faster (70s → 10s) via parallel execution
  • Analytics Fetching: 3x faster concurrent API calls
  • File Loading: Lazy pagination (20 items/page)
  • Resource Profiling: CPU/RAM allocation per job type
  • Automatic Retry: Exponential backoff for network failures

📦 Installation & Setup

Prerequisites

  • Python 3.11+
  • 8GB RAM (16GB recommended)
  • 10GB free disk space
  • macOS, Linux, or Windows (WSL2)

Quick Start

🆕 First time? See QUICKSTART.md for the absolute beginner guide!

Fast Track (5 minutes) - Simple Launch:

# 1. Clone and setup
git clone https://github.com/RhythrosaLabs/autonomous-business-platform.git
cd autonomous-business-platform
python3 -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

# 2. Configure (add your API keys)
cp .env.example .env
nano .env  # Add at minimum: REPLICATE_API_TOKEN and ANTHROPIC_API_KEY

# 3. Launch!
streamlit run autonomous_business_platform.py

Then open: http://localhost:8501 and test your APIs in Settings → 🔌 Test Connections

Note: This simple launch works great for testing! For production with parallel processing (7x faster campaigns), see Advanced Launch below.

Get API Keys (both have free trials):

Optional APIs (add later):

  • Printify - Product mockups
  • Shopify - E-commerce
  • YouTube - Video publishing
  • OpenAI, Pinterest, TikTok, Instagram, LinkedIn, Facebook, Twitter

Advanced Launch (with backend API + Ray):

cd scripts
./start_platform.sh  # Starts all services

What this adds:

  • ✅ FastAPI backend (async job processing)
  • ✅ Ray distributed computing (7x faster campaigns!)
  • ✅ Background job queue
  • ✅ Advanced monitoring

Access:


🐳 Docker Deployment

Using Docker Compose (Recommended)

# Build and start
docker compose up -d

# View logs
docker compose logs -f

# Stop
docker compose down

Services Started:

  • Backend (FastAPI) on port 8601
  • Frontend (Streamlit) on port 8501
  • Ray Dashboard on port 8265

Manual Docker

# Build image
docker build -t abp .

# Run backend
docker run -d -p 8601:8601 -p 8265:8265 \
  --env-file .env abp \
  python -m uvicorn fastapi_backend:app --host 0.0.0.0 --port 8601

# Run frontend
docker run -d -p 8501:8501 --env-file .env abp

🌐 Cloud Deployment

Deploy to Railway

Deploy on Railway

Deploy to Render

  1. Fork this repository
  2. Create Web Service on Render
  3. Build: pip install -r requirements.txt
  4. Start: streamlit run autonomous_business_platform.py --server.port $PORT
  5. Add environment variables

Deploy to Fly.io

curl -L https://fly.io/install.sh | sh
fly launch
fly deploy

🎓 Usage Examples

Generate Complete Campaign

# Via Dashboard Tab
1. Upload product image
2. Click "Generate Complete Campaign"
3. Get 6 assets in 10 seconds:
   - Product page copy
   - Social media posts (3x)
   - Email copy
   - Video ad
   - Mockup variations

Otto Slash Commands

Type / in any text field:

  • /research [topic] - Deep web research
  • /plan [goal] - Create action plan
  • /create [type] - Generate content
  • /analyze [data] - Data analysis
  • /optimize [content] - Improve existing content
  • /export [format] - Export data
  • Plus 15+ more commands!

Import n8n Workflow

# Via Custom Workflows Tab
1. Click "Import Workflow"
2. Select "n8n JSON"
3. Upload workflow.json
4. Auto-converts to ABP format
5. Run immediately or schedule

Batch Product Processing

# Via Products Tab
1. Select multiple products
2. Click "Bulk Actions"
3. Choose: Generate mockups, Create campaigns, Sync to Shopify
4. Ray processes in parallel (10x faster)

🛠️ Development

Project Structure

autonomous-business-platform/
├── autonomous_business_platform.py  # Main Streamlit entry point
├── app/
│   ├── core/               # App factory, DI container, error handling
│   ├── tabs/               # 21 feature tab modules
│   │   ├── abp_dashboard.py
│   │   ├── abp_products.py
│   │   ├── abp_content.py
│   │   ├── abp_video.py
│   │   ├── abp_campaigns.py
│   │   ├── abp_custom_workflows.py
│   │   ├── abp_playground.py
│   │   ├── abp_browser_use.py
│   │   └── ...              # + 13 more tabs
│   ├── services/           # 70+ service modules
│   │   ├── otto_engine.py   # Otto AI brain
│   │   ├── chat_assistant.py
│   │   ├── global_job_queue.py
│   │   ├── printify.py
│   │   ├── shopify_service.py
│   │   └── ...
│   ├── ui/                 # Layout and shared UI
│   └── utils/              # Helpers, validation, caching
├── modules/                # Shared orchestration modules
│   ├── orchestrator.py
│   ├── video_generation.py
│   └── ...
├── brand/                  # Brand templates & generator
├── scripts/
│   └── start_platform.sh   # Multi-service launcher
├── tests/                  # Unit & integration tests
├── requirements.txt
├── Dockerfile
└── docker-compose.yml

Running Tests

pytest tests/

Code Quality

black .           # Format code
mypy .            # Type checking
pylint **/*.py    # Linting

📊 Performance Benchmarks

Operation Without Ray With Ray Speedup
Campaign Generation (6 assets) 70s 10s 7x
Analytics Fetch (3 sources) 15s 5s 3x
Contact Plans (2 plans) 8s 4s 2x
Batch Mockups (50 products) 600s 60s 10x

Resource Usage

  • Video Jobs: 2 CPU, 4GB RAM
  • Image Jobs: 1 CPU, 2GB RAM
  • Text Jobs: 0.5 CPU, 512MB RAM
  • Batch Jobs: 0.5 CPU, 256MB RAM

📁 File Storage Locations

Local Installation:

  • Generated Files: Saved to file_library/ in your project directory
    • Images: file_library/generated_images/
    • Videos: file_library/generated_videos/
    • Audio: file_library/generated_audio/
    • Documents: file_library/documents/
  • Campaign Files: Organized by campaign name in subdirectories
  • Backup Files: .backup extension files stored alongside originals

Streamlit Demo (otto-mate.streamlit.app):

  • Files are stored in temporary memory during your session
  • ⚠️ Important: Files are lost when the session ends or app restarts
  • Download files immediately after generation to save them locally

Streamlit Demo Limitations

The hosted demo at otto-mate.streamlit.app has these limitations:

  • No Persistent File Storage: Files exist only during your active session
    • ⚠️ CRITICAL: Generated files cannot be saved to disk on Streamlit Cloud
    • Files are stored in temporary memory only and will be lost when session ends
    • Always download files immediately after generation
  • Session Timeout: Inactive sessions automatically disconnect after 15-20 minutes
  • Limited Resources: Shared computing resources may result in slower generation
  • No System Access: Cannot access your local files or install dependencies
  • No Environment Variables: Some integrations requiring API keys may not work
  • Cold Starts: First load may take 30-60 seconds while container spins up

Recommendation: For production use with persistent file storage, local API integrations, and optimal performance, install locally by following the Setup section below.

🔒 Security & Privacy

Security Hardening

This platform has been audited and hardened against common security risks:

  • No exec()/eval() on user input — Code playground runs user code in an isolated subprocess with a configurable timeout, not via exec()
  • No shell injection — All subprocess calls use list-based arguments (no shell=True with user data)
  • HTML output sanitization — AI-generated text is escaped before rendering with unsafe_allow_html=True
  • Validated deserialization — Pickle-loaded OAuth tokens are validated to be actual credential objects before use
  • No hardcoded secrets — All API keys are loaded from environment variables, Streamlit secrets, or user input
  • Proper exception handling — Specific exception types caught instead of bare except: in security-critical paths

API Key Safety

Your API keys are completely private and secure:

  1. Session Isolation: Each user gets their own isolated session in Streamlit

    • Your API keys stored in session_state are NOT visible to other users
    • Session data is isolated per-browser, per-tab
    • Keys are never shared between users
  2. Storage Priority (most secure first):

    • User Input → Stored in your browser session only (most private)
    • Streamlit Secrets → Owner-only secrets in Streamlit Cloud dashboard
    • Local .env → Local environment file (never committed to repo)
  3. No Hardcoded Keys:

    • ✅ No API keys are hardcoded in the source code
    • ✅ No keys are committed to the repository
    • ✅ .env files are in .gitignore
  4. Demo vs Local:

    • Demo (otto-mate.streamlit.app): You must enter your own API keys each session
    • Local Installation: Keys saved in .env file on your computer only

File Privacy

  • Streamlit Cloud: Files stored in temporary memory, lost after session ends
  • Local Installation: Files saved to file_library/ directory (in .gitignore)
  • No files are ever committed to the public GitHub repository

🤝 Contributing

We love contributions! Here's how:

  1. Fork the repo
  2. Create branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

Areas needing help:

  • Additional AI model integrations
  • More platform connectors
  • Documentation improvements
  • Bug fixes & performance optimization
  • UI/UX enhancements

📝 License

MIT License - see LICENSE file


🙏 Credits

Built With:

Created By: Dan Sheils (RhythrosaLabs)


📧 Support & Community


⭐ Star this repo if you find it useful!

Made with ❤️ by Dan Sheils

About

AI-powered autonomous business platform with Ray, FastAPI, and Streamlit — marketing automation, content generation, and e-commerce

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages