Skip to content

SuecoAlto/SearchEngineAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”Ž AI-Powered Search & Chat Agent

This project implements an AI-powered search and chat agent using LangChain, LangGraph, and Tavily Search API. The agent can retrieve real-time search results and engage in interactive conversations with users, providing a seamless and dynamic experience.


๐Ÿš€ Features

  • ๐Ÿ” Search Engine Integration: Uses Tavily API to fetch real-time web search results.
  • ๐Ÿ’ฌ Conversational AI: Chat with an LLM-powered agent that remembers the conversation.
  • โณ Streaming Responses: Real-time token streaming for a more engaging chat experience.
  • ๐Ÿง  Memory Handling: Retains conversation history for contextual understanding.
  • ๐Ÿ“Š LangSmith Tracing: Debugging and tracing using LangSmith (optional).
  • ๐Ÿ”ง Tool Integration: Extensible architecture for adding more tools.

๐Ÿ› ๏ธ Installation & Setup

1๏ธโƒฃ Clone the Repository

git clone https://github.com/your-username/your-repository.git
cd your-repository

2๏ธโƒฃ Install Dependencies

pip install -r requirements.txt

3๏ธโƒฃ Set Up Environment Variables

Create a .env file and add your API keys:

LANGSMITH_TRACING=true  # Set to false if debugging is not needed
LANGSMITH_API_KEY=your-langsmith-api-key
TAVILY_API_KEY=your-tavily-api-key
OPENAI_API_KEY=your-openai-api-key

4๏ธโƒฃ Run the Chatbot

python SearchEngineAgent.py

โšก Usage

	1.	Start the script and enter your search query.
	2.	The agent fetches search results and returns real-time data.
	3.	Engage in a conversation with the LLM-powered assistant.
	4.	Chat history is stored, and you can ask about previous searches.
	5.	Type "exit" to terminate the session.

๐Ÿ“‚ Project Structure

๐Ÿ“‚ project-folder
โ”‚-- SearchEngineAgent.py  # Main script
โ”‚-- .env                  # Environment variables (ignored in Git)
โ”‚-- requirements.txt       # Python dependencies
โ”‚-- README.md              # This file

๐Ÿ› ๏ธ Built With

  • LangChain - Framework for building LLM applications.
  • LangGraph - Agent execution framework.
  • Tavily Search - Real-time search API.
  • OpenAI API - LLM-powered chat agent.
  • Python - Main programming language.

๐Ÿ”ฎ Future Improvements

  • Enhanced Search Capabilities (support for multiple sources).
  • Integration with More LLMs (GPT-4, Claude, etc.).
  • Custom User Profiles & Memory Handling.
  • Web-Based Frontend Interface.

About

LangChainAgent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages