Skip to content

About

AI-powered personal copilot with LLMs, AI agents, web search, PDF RAG, CrewAI, Ollama and OpenRouter

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– AI Copilot Assistant

An AI-powered personal copilot designed to bring conversational AI, intelligent agents, web search, document understanding and multiple AI workflows into a single web application.


๐Ÿš€ Features

  • ๐Ÿ’ฌ AI Chat Assistant โ€“ Ask questions and receive AI-generated responses.
  • ๐Ÿ”Ž Web Search โ€“ Search the web for relevant information using DuckDuckGo.
  • ๐Ÿ•’ Current Time Tool โ€“ Provides the current date and time through an AI tool.
  • ๐Ÿ“„ PDF Upload & Summarization โ€“ Upload PDF documents and work with their content.
  • ๐Ÿง  PDF Reader / RAG Mode โ€“ Retrieve relevant information from uploaded documents.
  • ๐Ÿค– Autonomous Agent Mode โ€“ Allows the AI agent to select appropriate tools for a task.
  • ๐Ÿ‘ฅ CrewAI Research Crew โ€“ Uses multiple AI agents for research-oriented workflows.
  • โ˜๏ธ Cloud LLM Support โ€“ Supports cloud-based LLM access through OpenRouter.
  • ๐Ÿ’ป Local LLM Support โ€“ Supports local language models through Ollama.
  • ๐ŸŽ›๏ธ Multiple Brain Modes โ€“ Different AI modes for different types of tasks.

๐Ÿ—๏ธ Project Architecture

AI-Copilot-Assistant/
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ agent.py
โ”‚   โ”œโ”€โ”€ crew.py
โ”‚   โ”œโ”€โ”€ engine.py
โ”‚   โ”œโ”€โ”€ llm_config.py
โ”‚   โ””โ”€โ”€ main.py
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ firebase.js
โ”‚   โ”‚   โ”œโ”€โ”€ index.css
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ package-lock.json
โ”‚   โ”œโ”€โ”€ postcss.config.js
โ”‚   โ”œโ”€โ”€ tailwind.config.js
โ”‚   โ””โ”€โ”€ vite.config.js
โ”‚
โ”œโ”€โ”€ Docs/
โ”‚   โ””โ”€โ”€ crewAIDocs.txt
โ”‚
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ GUIDE.md
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ agent-demo.png
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ setup.sh
โ””โ”€โ”€ visualize_db.py

๐Ÿ› ๏ธ Tech Stack

Backend

  • Python
  • FastAPI
  • LangChain
  • LangChain Community
  • CrewAI

AI / LLM

  • Ollama
  • Gemma
  • OpenRouter
  • LangChain Agents

Tools & Retrieval

  • DuckDuckGo Search
  • PDF Processing
  • Retrieval-Augmented Generation (RAG)
  • Chroma Vector Database

Frontend

  • React.js
  • JavaScript
  • HTML
  • CSS
  • Vite
  • Node.js
  • Firebase

๐Ÿง  AI Capabilities

PDF Reader / RAG

The application can process uploaded PDF documents and retrieve relevant information to answer questions based on their content.

Upload PDF
     โ†“
Process Document
     โ†“
Create Embeddings
     โ†“
Store in Vector Database
     โ†“
Retrieve Relevant Content
     โ†“
Generate AI Response

Autonomous Agent

The Autonomous Agent can select and use available tools based on the user's query.

User Query
    โ†“
AI Agent
    โ†“
Select Appropriate Tool
    โ”œโ”€โ”€ Web Search
    โ””โ”€โ”€ Current Time
    โ†“
Generate Response

Research Crew

The Research Crew uses multiple AI agents to perform research-oriented tasks and combine their outputs into a final response.


๐Ÿค– Local & Cloud LLM Support

The application supports both local and cloud-based language models.

Local LLM

Ollama can be used to run supported models locally.

Application
     โ†“
LangChain
     โ†“
Ollama
     โ†“
Local Gemma Model

Cloud LLM

OpenRouter provides access to cloud-based models through an OpenAI-compatible API.

Application
     โ†“
LangChain / OpenAI-compatible API
     โ†“
OpenRouter
     โ†“
Selected LLM

โš™๏ธ Installation

1. Clone the Repository

git clone https://github.com/anmolshr56/AI-Copilot-Assistant.git
cd AI-Copilot-Assistant

2. Create a Python Virtual Environment

Windows:

python -m venv venv
venv\Scripts\activate

3. Install Python Dependencies

pip install -r requirements.txt

4. Install Frontend Dependencies

cd frontend
npm install
cd ..

๐Ÿ” Environment Variables

Create a .env file in the project root.

Example:

OPENROUTER_API_KEY=your_openrouter_api_key

Never upload your real API key or other secrets to GitHub.

The .env file should remain ignored by Git.


๐Ÿฆ™ Ollama Setup

For local LLM support, install Ollama and download the required model.

Example:

ollama pull gemma2:2b

Make sure Ollama is running before using local model functionality.


โ–ถ๏ธ Running the Application

Start the Backend

From the project root:

python -m backend.main

Start the Frontend

Open another terminal:

cd frontend
npm run dev

Open the local URL shown by the frontend development server.


๐Ÿ”„ How It Works

                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ”‚       User        โ”‚
                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
                          โ–ผ
                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ”‚   AI Copilot UI   โ”‚
                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
                          โ–ผ
                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ”‚    Backend API    โ”‚
                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚             โ”‚             โ”‚
            โ–ผ             โ–ผ             โ–ผ
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚ Ollama  โ”‚   โ”‚OpenRouterโ”‚   โ”‚  Agents  โ”‚
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
                                         โ”‚
                             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                             โ”‚                       โ”‚
                             โ–ผ                       โ–ผ
                        Web Search              PDF / RAG

๐ŸŽฏ Key Learning Areas

This project demonstrates practical implementation of:

  • LLM-powered application development
  • LangChain workflows
  • AI agent architecture
  • Tool calling
  • Web search integration
  • Retrieval-Augmented Generation (RAG)
  • PDF document processing
  • Local LLM deployment with Ollama
  • Cloud LLM integration using OpenRouter
  • Multi-agent workflows using CrewAI
  • Backend and frontend integration

๐Ÿ”ฎ Future Improvements

  • ๐Ÿ” User authentication
  • ๐Ÿ’พ Persistent chat history
  • ๐ŸŽ™๏ธ Voice input and output
  • ๐Ÿ“š Support for additional document formats
  • โšก Streaming AI responses
  • ๐Ÿงฉ More specialized AI agents
  • ๐ŸŒ Production deployment
  • ๐Ÿ“Š Usage analytics

๐Ÿ‘จโ€๐Ÿ’ป Author

Anmol Sharma

B.Tech CSE Student

GitHub: https://github.com/anmolshr56


๐Ÿ“ธ Project Demo

Autonomous AI Agent with Web Search

The AI Copilot can operate in autonomous agent mode and perform web searches to retrieve up-to-date information.

AI Copilot Autonomous Agent Demo

About

AI-powered personal copilot with LLMs, AI agents, web search, PDF RAG, CrewAI, Ollama and OpenRouter

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages