AI agent that autonomously completes complex tasks using web browsing, code execution, real-time data APIs, and self-evaluation - Built with LangGraph
View in AI Portfolio Dashboard | Direct Access
Part of Nihal's AI Portfolio - Unified dashboard featuring 5 cutting-edge AI services
🤖 Autonomous Execution - Agent works independently with self-correction loops
🌐 Real-Time Data - Live stock prices, crypto, forex rates, weather
🔍 Web Search - Google search integration for current information
💻 Code Execution - Safe Python environment for calculations
📁 File Management - Read, write, copy, move, and delete files
📊 Workflow Transparency - See every step and tool usage in real-time
🎨 Modern Dashboard - Clean, professional UI with live progress updates
- Python 3.11+
- OpenAI API key
- (Optional) Serper API for Google Search
- (Optional) Alpha Vantage API for financial data
- (Optional) OpenWeatherMap API for weather
# Clone repository
git clone https://github.com/nihal-5/autonomous-task-assistant.git
cd autonomous-task-assistant
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Add your API keys to .envWeb Dashboard:
python app.pyVisit https://unharmable-threadlike-ruth.ngrok-free.dev:8000
CLI:
python assistant.py "Calculate 100 factorial and save to result.txt"| API | Purpose | Free Tier |
|---|---|---|
| OpenAI | GPT-4o-mini for intelligence | Pay-as-you-go |
| Serper | Google Search | 2,500 searches/month |
| Alpha Vantage | Stocks, Crypto, Forex | 25 requests/day |
| OpenWeatherMap | Weather data | 1,000 calls/day |
Get your API keys:
- OpenAI: https://platform.openai.com/api-keys
- Serper: https://serper.dev
- Alpha Vantage: https://www.alphavantage.co/support/#api-key
- OpenWeatherMap: https://openweathermap.org/api
# Financial Analysis
"Get Apple and Tesla stock prices, then calculate which is a better buy with $10,000"
# Multi-Data Query
"What's the weather in Tokyo and the current Bitcoin price?"
# Currency Conversion
"Convert 5000 USD to EUR and INR using today's rates"
# Research & Calculation
"Find Python's latest version and calculate how many days since release"
# File Operations
"Calculate the first 50 prime numbers and save to primes.txt"Built with LangGraph using a worker-evaluator pattern:
┌─────────────┐
│ User │
└──────┬──────┘
│
▼
┌─────────────┐ ┌──────────────┐
│ Worker │────▶│ Tools │
│ (GPT-4o) │◀────│ Execution │
└──────┬──────┘ └──────────────┘
│
▼
┌─────────────┐
│ Evaluator │──── Success? ──▶ Complete
│ (GPT-4o) │ │
└──────┬──────┘ │
│ │
└──── Needs Work ────▶ Loop Back
search_web- Google search for real-time infoget_stock_price- Real-time stock prices (AAPL, TSLA, etc.)get_crypto_price- Cryptocurrency prices (BTC, ETH, etc.)get_forex_rate- Currency exchange ratesget_weather- Weather for any citywikipedia- Encyclopedic knowledgeexecute_python_code- Python calculationspython_repl- Interactive Python- File tools - read, write, copy, move, delete
- LangGraph - Agent workflow orchestration
- OpenAI GPT-4o-mini - Language model
- FastAPI - Web backend with SSE streaming
- Playwright - Browser automation (optional)
- Python 3.11+ - Runtime
Edit .env file:
# Required
OPENAI_API_KEY=your_key_here
# Optional (but recommended)
SERPER_API_KEY=your_key_here
ALPHA_VANTAGE_API_KEY=your_key_here
OPENWEATHER_API_KEY=your_key_here
# Settings
MODEL=gpt-4o-mini
TEMPERATURE=0.7
MAX_TURNS=30- 15 iteration limit - Prevents infinite loops
- Sandboxed Python - 10 second timeout on code execution
- Smart reasoning - Plans before acting, knows when to stop
- Graceful fallbacks - Provides estimates when data unavailable
MIT - See LICENSE file
Special thanks to all who contribute to this project!nse
Built by nihal-5
Note: This agent requires API keys to unlock full functionality. Without them, it falls back to basic tools (Python execution and file operations).