Skip to content

Repository files navigation

πŸš€ AI Workflow Automation & Multi-Agent Research Platform

A lightweight, high-performance platform for constructing automated AI workflows and generating comprehensive research reports using a multi-agent orchestration pipeline.


✨ Overview

This platform combines:

  • πŸ€– Multi-Agent Research System
  • ⚑ Workflow Automation Engine
  • πŸ“š Local RAG (Retrieval-Augmented Generation)
  • πŸ” Semantic Search
  • πŸ” Authentication & Authorization
  • πŸ“ File Upload & Knowledge Management
  • πŸ“Š Real-Time Execution Tracking

The project is designed to run with minimal setup while providing enterprise-style workflow orchestration capabilities.


πŸ—οΈ Tech Stack

Backend

  • FastAPI
  • SQLAlchemy ORM
  • SQLite / PostgreSQL
  • Google Gemini AI
  • JWT Authentication
  • Server-Sent Events (SSE)

Frontend

  • React SPA
  • Tailwind CSS v4
  • Zero-build architecture
  • Browser-side JSX transpilation via Service Worker

AI & Search

  • Multi-Agent Pipeline
  • RAG Architecture
  • Vector Similarity Search
  • Embedding Generation

πŸ“‚ Project Structure

ai-orchestrator/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ database.py
β”‚   β”œβ”€β”€ auth.py
β”‚   β”œβ”€β”€ agents.py
β”‚   β”œβ”€β”€ vector_store.py
β”‚   β”œβ”€β”€ workflow_engine.py
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── routes/
β”‚       β”œβ”€β”€ auth.py
β”‚       β”œβ”€β”€ agents.py
β”‚       β”œβ”€β”€ workflows.py
β”‚       β”œβ”€β”€ search.py
β”‚       └── files.py
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ sw.js
β”‚   β”œβ”€β”€ app.js
β”‚   └── components/
β”‚       β”œβ”€β”€ auth/
β”‚       β”œβ”€β”€ workflow/
β”‚       β”œβ”€β”€ research/
β”‚       β”œβ”€β”€ search/
β”‚       └── files/
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .env.example
└── README.md

βš™οΈ Environment Configuration

1. Clone Repository

git clone https://github.com/<your-username>/ai-orchestrator.git
cd ai-orchestrator

2. Configure Environment Variables

Copy the environment template:

cp .env.example backend/.env

Open backend/.env and add:

GEMINI_API_KEY=your_api_key_here

Get Gemini API Key

Visit:

https://aistudio.google.com/

Generate a new API key and paste it into the .env file.


Optional: Use PostgreSQL / Supabase

Instead of SQLite:

DATABASE_URL=postgresql://postgres:<password>@<host>.supabase.co:5432/postgres

SUPABASE_URL=https://<project-ref>.supabase.co

SUPABASE_SERVICE_ROLE_KEY=<service-role-key>

Enable PGVector

Run inside Supabase SQL Editor:

CREATE EXTENSION IF NOT EXISTS vector;

πŸ”’ Security Notes

Never commit:

.env
database credentials
API keys
service role keys
SQLite database files

The provided .gitignore already excludes these files.


πŸ–₯️ Backend Setup

Navigate to backend:

cd backend

Create Virtual Environment

Windows

python -m venv venv

venv\Scripts\activate

Linux / macOS

python -m venv venv

source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

Run Server

python main.py

Backend runs at:

http://localhost:8000

The SQLite database will be created automatically.


🎨 Frontend Setup

Because the frontend uses a Service Worker for browser-side JSX compilation, it must be served through an HTTP server.


Option A (Recommended)

Run backend:

python main.py

Open:

http://localhost:8000

FastAPI automatically serves frontend assets.


Option B (Standalone Frontend)

cd frontend

python -m http.server 3000

Open:

http://localhost:3000

Ensure backend is running on port 8000.


πŸ€– Multi-Agent Research Pipeline

The Research module uses a chain of specialized AI agents:

1. Planner Agent

Creates structured research sections.

2. Research Agent

Collects information and notes.

3. Critic Agent

Reviews findings for:

  • Bias
  • Logic gaps
  • Missing information

4. Writer Agent

Generates the final report.

5. Citation Agent

Adds references and bibliography.


Real-Time Streaming

Progress is streamed using:

Server-Sent Events (SSE)

Users can watch research progress live.


βš™οΈ Workflow Automation Engine

Build custom DAG workflows using:

  • Triggers
  • LLM Nodes
  • Delay Nodes
  • API Request Nodes
  • Conditional Logic

Variable Binding

{{node_id.output}}

Outputs can be passed between nodes dynamically.


πŸ“š Local RAG (Retrieval-Augmented Generation)

Upload your documents through the Files Manager.

The system will:

  1. Chunk documents
  2. Generate embeddings
  3. Store vectors
  4. Enable semantic retrieval

Supported use cases:

  • Knowledge bases
  • Internal documentation
  • Research archives
  • Company policies

πŸ” Semantic Search

Search across uploaded knowledge using vector similarity.

Features:

  • Context-aware retrieval
  • Similarity ranking
  • Fast local lookup
  • AI-enhanced responses

πŸ” Authentication

Supports:

  • JWT Authentication
  • Password Hashing (bcrypt)
  • Protected API Routes
  • Session Management

πŸ“ˆ Future Enhancements

Planned features:

  • Role-Based Access Control (RBAC)
  • WebSockets
  • Redis Caching
  • Celery Workers
  • Agent Marketplace
  • Kubernetes Deployment
  • LangGraph Integration
  • OpenTelemetry Observability
  • Multi-Tenant Architecture

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
git checkout -b feature/new-feature
  1. Commit changes
git commit -m "Add new feature"
  1. Push
git push origin feature/new-feature
  1. Open a Pull Request

πŸ“œ License

MIT License

Feel free to use, modify, and distribute.


⭐ Support

If you found this project useful:

⭐ Star the repository

🍴 Fork the project

πŸ› οΈ Contribute improvements

πŸ“’ Share it with others

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages