Skip to content

A smart, tool-using research assistant powered by LangChain and OpenAI/Anthropic LLMs. It can search the web, extract information from Wikipedia, and save structured research summaries to a text file.

Mobashshirhasan/PythonAIAgentFromScratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Research Assistant Agent

A smart, tool-using research assistant powered by LangChain and OpenAI/Anthropic LLMs. It can search the web, extract information from Wikipedia, and save structured research summaries to a text file.

๐Ÿš€ Features

  • ๐Ÿงพ Accepts a user query and returns a structured response with:
    • Topic
    • Summary
    • Sources
    • Tools used
  • ๐ŸŒ Uses DuckDuckGo for web search
  • ๐Ÿ“š Queries Wikipedia for relevant info
  • ๐Ÿ’พ Saves output to research_output.txt

๐Ÿ› ๏ธ Tech Stack

๐Ÿ“ฆ Installation

  1. Clone the repository
    git clone https://github.com/your-username/research-assistant-agent.git
    cd research-assistant-agent
    
  2. Create a virtual environment
    python -m venv venv
    source venv/bin/activate   # On Windows: venv\Scripts\activate
    
  3. Install dependencies
     pip install -r requirements.txt
    
  4. Set up .env file
    OPENAI_API_KEY=your_openai_api_key
    ANTHROPIC_API_KEY=your_anthropic_api_key (optional)
    

๐Ÿงช Run the App

  python main.py

๐Ÿ“ File Structure

  • main.py # Entry script
  • tools.py # Web, Wikipedia, and file-saving tools
  • requirements.txt # Dependencies
  • research_output.txt # Saved outputs
  • .env # API keys

About

A smart, tool-using research assistant powered by LangChain and OpenAI/Anthropic LLMs. It can search the web, extract information from Wikipedia, and save structured research summaries to a text file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages