An intelligent web research assistant that combines web crawling, search functionality, and AI-powered analysis using Anthropic's Claude API.
- Web crawling with intelligent content extraction
- Brave Search integration for finding relevant web pages
- AI-powered analysis using Claude 3
- Automatic query analysis and search decision making
- Conversation history tracking
- Token usage monitoring and cost calculation
- Python 3.11 or higher
- API keys for:
- Anthropic Claude API
- Brave Search API
- Clone the repository:
git clone https://github.com/ghsaboias/alpha-agent.git
cd alpha-agent
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root with your API keys:
CLAUDE_API_KEY=your_claude_api_key
BRAVE_API_KEY=your_brave_api_key
Run a query using the command line interface:
python claude_api.py "your research query here"
The response will be saved to claude_response.txt
and also printed to the console.
web_analyzer.py
: Handles web crawling and content analysisclaude_api.py
: Manages interactions with Claude API and orchestrates the research processconfig.py
: Contains configuration settings and environment variables
You can modify various settings in config.py
:
- Model selection (Claude 3 Haiku/Sonnet)
- Token limits
- Cost calculations
- Search result limits
- Logging levels
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
[Add your chosen license here]
- Anthropic for the Claude API
- Brave Search for the search API
- crawl4ai for web crawling functionality