Skip to content

k0msenapati/agent-hub

Repository files navigation

🤖 Agent Hub

Note

Agent Hub is an AI collaboration platform designed to transform your data into intelligent AI agents. With Agent Hub, you can unlock powerful insights and automate tasks effortlessly by creating tailored AI agents, building comprehensive knowledge bases, and managing your data files seamlessly.

🎬 Project Showcase

Demo Video Blog Post
YouTube Blog

🌟 Features

Agent Hub features intro:

  • AI Agents – Create and manage AI agents tailored to your specific needs for intelligent responses.
  • Knowledge Bases – Build comprehensive knowledge bases from your data for efficient querying and insights.
  • File Management – Upload and organize your files to integrate seamlessly with AI processes.

💻 Installation

Follow these steps to set up and run Agent Hub:

  1. Setup MindsDB and Ollama with Docker (docker-compose.yml is provided):

    docker-compose up -d
  2. Install nomic-embed-text in Ollama container:

    docker exec ollama ollama pull nomic-embed-text
  3. Create KB Summarizer Model and Connect Pgvector in MindsDB container (visit MindsDB GUI at http://localhost:47334):

    -- Create a MindsDB engine for Groq
    CREATE ML_ENGINE groq_engine
    FROM groq
    USING
          groq_api_key = "groq_api_key_here";  # Replace with your actual Groq API key
    
    -- Create a MindsDB model for summarizing knowledge base content
    CREATE MODEL kb_summarizer
    PREDICT summary
    USING
       engine = 'groq_engine',
       model_name = 'gemma2-9b-it',
       prompt_template = 'Summarize the following knowledge base content concisely and highlight key insights:\n\n{{kb_content}}\n\nSummary:';
    
    -- Create a MindsDB connection to the PostgreSQL database with pgvector
    CREATE DATABASE pvec
    WITH
       ENGINE = 'pgvector',
       PARAMETERS = {
       "host": "pgvector",
       "port": 5432,
       "database": "ai",
       "user": "ai",
       "password": "ai",
       "distance": "cosine"
       };
  4. Clone the Repository:

    git clone https://github.com/k0msenapati/agent-hub.git
  5. Navigate to the Project Directory:

    cd agent-hub
  6. Create a Virtual Environment:

    uv venv
  7. Activate the Virtual Environment:

    source .venv/bin/activate  # On Windows, use .venv\Scripts\activate
  8. Install Dependencies:

    uv add python-dotenv flask flask-sqlalchemy flask-migrate flask-bcrypt flask-login mindsdb_sdk
  9. Initialize Database:

    flask db init
  10. Migrate Database:

    flask db migrate
  11. Upgrade Database:

    flask db upgrade
  12. Run the Application:

    uv run run.py

Environment Configuration

To configure API keys for Agent Hub, create an .env file in the project directory with the following variables:

API_KEY=your_google_api_key
GROQ_API_KEY=your_groq_api_key

These keys are used for accessing various LLM APIs. If not provided in the .env file, you can also enter them directly in the UI when configuring AI agents or evaluation settings.


👤 Author

K Om Senapati

📄 License

Agent Hub is licensed under the Unlicense License. See the LICENSE file for more details.


🌟 If you find this project helpful, please give it a star on GitHub! 🌟

About

Agent Hub is an AI collaboration platform designed to transform your data into intelligent AI agents.

Topics

Resources

License

Stars

Watchers

Forks