Skip to main content

🚀 LeetAgent - AI-Powered LeetCode Automation

Automate your LeetCode daily challenges with AI-generated solutions in one command.

LeetAgent is an intelligent automation tool that fetches, solves, and submits LeetCode problems using Google Gemini AI. Perfect for maintaining your coding streak, practicing different approaches, and learning from AI-generated solutions with detailed explanations.

Features: AI-powered solution generation • Browser automation with Selenium • Multi-language support (Python, C#, Java, JavaScript) • Telegram notifications • Interactive CLI with Rich UI • Robust retry logic • Session management

🎯 Quick Start

# Install
pip install leetagent

# Auto-configure PATH (adds Scripts to PATH)
python -m leetagent-setup

# Configure credentials
python -m leetagent config

# Solve today's daily challenge
python -m leetagent solve

# Login to LeetCode (one-time setup)
python -m leetagent login

After PATH setup, use directly: leetagent config, leetagent solve

📦 What You Get

  • One-command automation - leetagent solve handles everything
  • AI-powered solutions - Google Gemini generates optimized code
  • 5 submission strategies - Multiple fallback methods for reliability
  • Smart notifications - Success/failure alerts via Telegram
  • Beautiful CLI - Rich terminal UI with progress indicators
  • Session persistence - Login once, use forever

🔑 Requirements

📖 Documentation

Full documentation: github.com/satyamyadav/leetagent

🎨 Usage Examples

# Solve specific problem
leetagent solve https://leetcode.com/problems/two-sum/

# Use different language
leetagent solve --language python

# Interactive mode with menu
leetagent --interactive

# View configuration
leetagent config-show

# Check status
leetagent status

🏗️ Architecture

Modular design with clean separation:

  • Core modules: Scraper, AI generator, formatter, notifier
  • Browser automation: Selenium with 5 submission strategies
  • AI agents: Decision agent for approach analysis
  • CLI: Interactive Typer-based interface

🤝 Contributing

Contributions welcome! Visit GitHub repository for:

  • Source code
  • Issue reporting
  • Feature requests
  • Development guide

📄 License

MIT License - see LICENSE for details.

🙏 Credits

Built with: Google Gemini AI • Selenium WebDriver • Rich UI • Typer CLI


⭐ Star on GitHub if you find this useful!

Metadata

Release files for leetagent 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leetagent 1.0.6
File Size Uploaded Provenance
leetagent-1.0.6.tar.gz 60.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for leetagent 1.0.6
File Interpreter ABI Platform
leetagent-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 119.6 kB

Release files / leetagent-1.0.6.tar.gz

Download URL leetagent-1.0.6.tar.gz
Size 60.9 kB
Tags Source
SHA-256 checksum
How to use checksums
26b799991c1b978fc35f1a72d3550b9c71d5313303bf18bf199ecdcbdc5f6eee
BLAKE2b-256 checksum
How to use checksums
5567a862887788c7a8a0731d9f64561def7eda36eac855217f9d9a8216fa6cbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / leetagent-1.0.6-py3-none-any.whl

Download URL leetagent-1.0.6-py3-none-any.whl
Size 58.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3de1ea91c78ea12dfbf450a3c4e50efa601a50a4bde7ff4c06ea681ac6f203a
BLAKE2b-256 checksum
How to use checksums
8df6375908d67caa8b1a51cf7d9a608553e59b5a4c425ce9ea3575f97bd76d6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for leetagent 1.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page