Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 OrgBrain — Company Knowledge OS

A premium, agentic Company Knowledge OS powered by Gemini 3.5 Flash, FAISS Vector Search, and FastAPI / Streamlit.

OrgBrain is an AI-native operational platform designed to ingest unstructured company resources (like policy documents and Slack history), extract executable operational rules, index them semantically for RAG (Retrieval-Augmented Generation), and handle policy updates with human-in-the-loop validation.


🚀 Key Features

  • ⚡ Automated Rule Extraction: Analyzes raw Slack logs and policy docs to derive structured, actionable rules.
  • 🔍 Semantic Search (FAISS + Gemini): Powered by gemini-embedding-2 for rich, high-dimensionality vector embeddings and FAISS for fast similarity search.
  • 🤖 Smart Support Agent: Compares baseline Gemini responses against the RAG-enabled OrgBrain skills store to demonstrate context-aware query resolution.
  • 🔄 Policy Change Monitoring: Simulates real-time modifications in operational policy (e.g., refunds) and tasks agents with drafting corresponding rule updates.
  • 🛡️ Human-in-the-loop Governance: Interactive approval workflow allowing administrators to review, approve, or reject proposed rule changes before they enter production.

🏗️ Architecture Workflow

graph TD
    A[Unstructured Data: Policy Docs & Slack Logs] -->|Ingestion Agent| B[Structuring Agent]
    B -->|Generates JSON Rules| C[(SQLite DB)]
    B -->|Computes Embeddings| D[(FAISS Vector Index)]
    
    E[Customer Support Query] -->|Support Agent| F[Semantic Query Lookup]
    F -->|Retrieve Rules| D
    F -->|RAG Processing| G[Gemini 3.5 Flash]
    G -->|Contextual Answer| H[User Dashboard]
    
    I[Policy Change Update] -->|Update Agent| J[Draft Rule Changes]
    J -->|Pending Verification| K[Manager Dashboard]
    K -->|Approve/Reject| C
Loading

🛠️ Tech Stack

  • LLM & Embeddings: Google Gemini API (gemini-2.5-flash or gemini-embedding-2)
  • Vector Engine: FAISS-CPU (Facebook AI Similarity Search)
  • Database: SQLite3 (relational rules & log tracking)
  • Backend API: FastAPI + Uvicorn
  • Frontend Interface: Streamlit (responsive, glassmorphism-themed dark mode)
  • Python Stack: Pydantic, Python-Dotenv, NumPy, HTTPX

🏃 Getting Started

📋 Prerequisites

  • Python 3.10+
  • A Gemini API Key from Google AI Studio.

⚙️ Installation

  1. Clone the repository and navigate to the project directory:

    cd OrgBrain
  2. Create a virtual environment and activate it:

    python -m venv venv
    # On Windows (PowerShell):
    .\venv\Scripts\Activate.ps1
    # On Unix/macOS:
    source venv/bin/activate
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Configure your environment variables. Create a .env file in the orgbrain subdirectory:

    GEMINI_API_KEY=your_gemini_api_key_here
    MODEL_ID=gemini-3.5-flash

🎮 Running the Demo

For convenience, ready-to-run startup scripts are provided at the root of the project.

🪟 Windows (PowerShell)

Execute the PowerShell startup script to launch both the FastAPI backend and Streamlit dashboard concurrently:

.\run_demo.ps1

🐧 Linux / macOS (Shell)

Make the script executable and run it:

chmod +x run_demo.sh
./run_demo.sh

📡 API Endpoints

Once the backend is active, you can access the interactive Swagger documentation at http://localhost:8000/docs.

Method Endpoint Description
GET /health Verify API health and connection status.
POST /ingest Scan resources and rebuild SQLite/FAISS databases.
POST /ask Resolve support query using standard LLM vs OrgBrain RAG.
GET /skills Fetch all active operational rules.
GET /updates List all pending policy updates.
POST /updates/approve Approve and apply a pending update to active rules.
POST /simulate-change Simulate a real-time policy update and trigger drafting agents.

👥 Authors & Contribution

Built with 💜 using advanced agentic workflows powered by Google DeepMind Antigravity.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages