AGENTS / GITHUB / AgetsLangGraph
githubinferredactive

AgetsLangGraph

provenance:github:YehuditSabag/AgetsLangGraph
WHAT THIS AGENT DOES

AgetsLangGraph is an AI assistant that can automatically research information online and gather data from websites. It helps businesses and individuals quickly find answers to complex questions or collect specific information without needing to manually search and sift through results. This is useful for anyone needing to do market research, track industry trends, or gather data for reports – saving them time and effort.

View Source ↗First seen 5mo agoNot yet hireable
README
# LangGraph Intelligent Web Research Agent

An autonomous AI agent built with LangGraph that performs intelligent web research and data retrieval through a multi-step reasoning system.

## Overview

This project demonstrates a graph-based AI agent capable of autonomous decision-making and tool usage. The agent operates through interconnected functional nodes that enable sophisticated web research workflows.

## Features

- **Intelligent Web Search**: Conducts contextual Google searches using SerpAPI to discover relevant resources
- **Dynamic Data Retrieval**: Fetches and processes live content from discovered URLs via HTTP GET requests
- **Multi-Step Reasoning**: Implements a state graph architecture for complex decision-making
- **Tool Integration**: Seamlessly switches between search and fetch operations based on query requirements
- **Interactive Interface**: Command-line interface for natural conversation with the agent

## Architecture

The agent uses LangGraph's StateGraph to orchestrate three main nodes:

1. **LLM Node**: Processes user queries and decides which tools to use
2. **Tools Node**: Executes selected tools (web search or URL fetching)
3. **LLM Explain Node**: Synthesizes results into human-readable responses

## Prerequisites

- Python 3.8+
- OpenAI API key
- SerpAPI key

## Installation

1. Clone the repository:
```bash
git clone https://github.com/yourusername/langgraph-agent.git
cd langgraph-agent
```

2. Install required packages:
```bash
pip install langgraph langchain langchain-openai langchain-community google-search-results requests python-dotenv
```

3. Create a `.env` file in the project root:
```env
OPENAI_API_KEY=your_openai_api_key_here
SERPAPI_API_KEY=your_serpapi_key_here
```

## Usage

Run the agent:
```bash
python agent.py
```

The agent will prompt you to enter queries. Examples:
- "Search for weather APIs"
- "Find information about machine learning trends"
- "Get data from https://api.example.com/data"

Type your query and press Enter. The agent will autonomously decide whether to search the web or fetch URL content based on your request.

## Project Structure

```
langgraph-agent/
├── agent.py          # Main agent implementation
├── .env              # Environment variables (not tracked in git)
├── .gitignore        # Git ignore file
└── README.md         # This file
```

## How It Works

1. User enters a query through the command-line interface
2. The LLM analyzes the query and selects appropriate tools
3. Tools execute (web search or URL fetch)
4. Results are processed and synthesized by the LLM
5. Final response is presented to the user
6. Conversation context is maintained for follow-up queries

## Tools Available

- **search_tool2**: Performs Google searches using SerpAPI to find relevant information
- **fetch_url_content**: Sends HTTP GET requests to retrieve content from URLs

## Security Note

Never commit your `.env` file or expose API keys in your code. This project uses environment variables to keep credentials secure.

## Technologies Used

- **LangGraph**: Graph-based agent orchestration
- **LangChain**: LLM integration and tool management
- **OpenAI GPT-3.5**: Language model for reasoning and response generation
- **SerpAPI**: Web search capabilities
- **Python Requests**: HTTP client for data retrieval

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Acknowledgments

Built as a demonstration of autonomous agent capabilities using LangGraph's state management and tool integration features.

PUBLIC HISTORY

First discoveredMar 21, 2026

IDENTITY

inferred

Identity inferred from code signals. No PROVENANCE.yml found.

Is this yours? Claim it →

METADATA

platformgithub
first seenNov 3, 2025
last updatedNov 3, 2025
last crawled26 days ago
version

README BADGE

Add to your README:

![Provenance](https://getprovenance.dev/api/badge?id=provenance:github:YehuditSabag/AgetsLangGraph)