Skip to content

Balaji-R-05/ai-agent-chatbot

Repository files navigation

AI Agent Chatbot

A multi-model conversational AI chatbot built with Streamlit, LangChain, LangGraph, and FastAPI. This project allows users to chat with various LLMs (Groq, Gemini, etc.) and enable advanced tools like Web Search, Wikipedia, and Python REPL.

Chat UI Tavily Search Wikipedia Python REPL Tools List

✨ Features

Feature Description
Multi-Model Support Native support for Groq LLaMA3, Google Gemini, and more.
Advanced Tools Integrated Web Search (Tavily), Wikipedia, and Python REPL.
Smart Orchestration Powered by LangGraph for robust tool-use decision logic.
Optimized Performance History sliding window & recursion limits for cost/speed efficiency.
Customization Easily tailor system prompts and add custom tools in tools.py.

🛠️ Tech Stack

Tool/Library Purpose
Python Core logic and agent framework.
Streamlit Sleek, interactive frontend for the chat interface.
FastAPI High-performance backend API for model orchestration.
LangChain The backbone for LLM integration and chaining.
LangGraph State-of-the-graph logic for complex agentic workflows.
Docker Containerization for easy deployment.

>_ Setup Instructions

1. Clone the Repository

git clone https://github.com/Balaji-R-05/ai-agent-chatbot.git
cd ai-agent-chatbot

2. Configure API Keys

Your .env should look like this:

# API Keys
GROQ_API_KEY=your_groq_key
TAVILY_API_KEY=your_tavily_key         # For Web Search

# Configuration
MAX_HISTORY=10
RECURSION_LIMIT=10                    # Max steps before the agent stops

3. Run with Docker (Recommended)

The easiest way to run the application is using Docker Compose:

docker-compose up --build

This will start both the backend (FastAPI) and the frontend (Streamlit).

4. Local Setup (Alternative)

Environment Setup

python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt

Run the Application

Start both services using the batch script:

.\run.bat

Alternatively, start them separately:

# Terminal 1: Backend
uvicorn main:app --port 8000

# Terminal 2: Frontend
streamlit run client/app.py


Developed by Balaji-R-05

About

A multi-model conversational AI chatbot built with powerful tools like Streamlit, LangChain, LangGraph, and FastAPI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors