Skip to content

ShamshadAhmedShorthillsAI/langgraph_poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Research Agent with LangGraph

This repository contains a research agent built using LangGraph, which combines the power of Claude (via Anthropic) and Tavily search to provide intelligent research capabilities.

Features

  • Interactive chat interface
  • Integration with Claude 3.5 Sonnet
  • Real-time web search using Tavily
  • Stateful conversation management using LangGraph

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Virtual environment (recommended)

Setup

  1. Clone the repository:
git clone <repository-url>
cd langraph_poc
  1. Create and activate a virtual environment:
python -m venv lang_env
source lang_env/bin/activate  # On Windows, use: lang_env\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables: Create a .env file in the root directory with the following content:
ANTHROPIC_API_KEY=your_anthropic_api_key
TAVILY_API_KEY=your_tavily_api_key

You can obtain these API keys from:

Usage

  1. Make sure your virtual environment is activated
  2. Run the research agent:
python research_agent.py
  1. Interact with the agent by typing your questions. The agent will:

    • Process your input
    • Use Claude for understanding and response generation
    • Perform web searches when needed
    • Provide comprehensive answers
  2. To exit the conversation, type:

    • quit
    • exit
    • q

Project Structure

  • research_agent.py: Main application file containing the LangGraph implementation
  • .env: Environment variables configuration
  • requirements.txt: Python dependencies

Dependencies

The project uses several key libraries:

  • langchain: For LLM integration
  • langgraph: For building stateful applications
  • anthropic: For Claude API access
  • tavily-python: For web search capabilities
  • python-dotenv: For environment variable management

Troubleshooting

If you encounter issues with API keys:

  1. Verify that your .env file is properly formatted
  2. Ensure the API keys are correctly set in your environment
  3. Check that you have sufficient API credits/quota

License

[Add your license information here]

Contributing

[Add contribution guidelines here]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages