An intelligent research assistant built with LangChain that helps gather and structure information on any topic using various tools including search and Wikipedia.
- Interactive research assistant
- Structured output using Pydantic models
- Multiple tool integration (Search, Wikipedia, Save)
- Clean and maintainable code structure
- Clone the repository:
git clone <your-repo-url>
cd PythonAIAgentFromScratch- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your API keys:
OPENAI_API_KEY=your_openai_api_key
Run the main script:
python main.pyEnter your research query when prompted, and the agent will gather and structure information for you.
main.py: Main application entry pointtools.py: Custom tools for the agentrequirements.txt: Project dependencies.env: Environment variables (not included in repo)
MIT License