swe-ai-agent


Nameswe-ai-agent JSON
Version 2.1.7 PyPI version JSON
download
home_pagehttps://github.com/sweagent/swe-agent
SummaryHeadless Agentic IDE with reasoning mode and in built Browser
upload_time2025-08-15 06:19:01
maintainerNone
docs_urlNone
authorSWE Agent Team
requires_python>=3.8
licenseMIT
keywords ai agent code software-engineering reinforcement-learning o1-reasoning iterative-improvement langraph claude anthropic openrouter multi-provider gpt-4o llama ai-models ide headless automation development programming-assistant
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SWE Agent - AI Coding Assistant with Built-in Browser

An AI Coding Agent that helps you write, analyze, and improve code in any programming language. Features its own integrated web browser powered by Julia Browser for complete web interaction capabilities.

## Why Use SWE Agent?

**Save time writing code** - Tell it what you want to build, and it writes the code for you. No more staring at blank files or wrestling with syntax.

**Fix bugs faster** - It reads your code, finds problems, and suggests fixes. Like having an experienced developer review your work instantly.

**Analyze website designs** - Upload screenshots and get detailed component breakdowns, color palettes, and layout structures for accurate recreation.

**Learn while you code** - Watch how it solves problems step by step. You'll pick up new techniques and best practices naturally.

**Work in any language** - Python, JavaScript, Go, Rust, C++ - it understands them all. Switch between projects without missing a beat.

**Stay secure** - Automatically scans your code for security issues before you deploy. Catch vulnerabilities early.

**Browse the web** - Built-in browser can navigate websites, click buttons, fill forms, and extract data automatically.

**Deploy to production** - Create HTML/CSS/JS applications and deploy them to Netlify with a single command for instant live websites.

**Advanced Reasoning Mode** - Iterative code improvement with quality targets (8.0/10.0), confidence thresholds (0.85), and reward-based learning over multiple attempts.

## Installation

```bash
pip install swe-ai-agent
```

## Getting Started

Required environment variables:
```bash
# Required: Choose one AI provider
export ANTHROPIC_API_KEY="your-anthropic-api-key-here"
# OR
export OPENROUTER_API_KEY="your-openrouter-api-key-here"

# Optional: For web deployment (only needed if deploying to Netlify)
export NETLIFY_ACCESS_TOKEN="your-netlify-token-here"
```

## Usage Options

```bash
# Chat with your AI coding partner
swe-agent --pair

# Run one-time tasks
swe-agent --task "create a todo app with React"

# Work interactively on multiple tasks
swe-agent --interactive

# Use the modern terminal interface
swe-agent --warp

# Enable advanced features with external services
swe-agent --enable-mcp --interactive

# Advanced Reasoning mode with iterative improvement
swe-agent --reasoning --task "create a web scraper" --no-shell-approval
```

## Multi-Provider AI Support ✨

SWE Agent now supports multiple AI providers for maximum flexibility:

### Anthropic (Claude)
```bash
# Use Anthropic Claude (default)
swe-agent --provider anthropic --task "build a calculator"

# Specify Claude model
swe-agent --provider anthropic --model claude-sonnet-4-20250514 --interactive
```

### OpenRouter (Access 50+ Models)
```bash
# Use OpenRouter with Claude
swe-agent --provider openrouter --task "build a website"

# Use OpenRouter with GPT-4o
swe-agent --provider openrouter --model "openai/gpt-4o" --interactive

# Use OpenRouter with Llama
swe-agent --provider openrouter --model "meta-llama/llama-3.1-405b" --pair

# All popular models supported
swe-agent --provider openrouter --model "anthropic/claude-sonnet-4" --warp
```

### OpenRouter Benefits:

🌐 Access to 50+ AI models from different providers  
💰 Cost-effective pricing across multiple model options  
🔄 Easy model switching without changing code  
🚀 Same performance and features across all models  
📊 Transparent pricing and usage tracking  

## New: Web App Deployment ✨

Create and deploy HTML/CSS/JS applications directly to Netlify:

```bash
# Create a web application
swe-agent --task "create a portfolio website with HTML and CSS"

# Create AND deploy to Netlify (requires NETLIFY_ACCESS_TOKEN)
swe-agent --task "create a todo app and deploy it to Netlify"
```

### Deployment Features:

🌐 Instant live URLs with SSL certificates  
🚀 One-command deployment from creation to production  
📱 Mobile-responsive applications by default  
🔒 Secure hosting on Netlify's global CDN  
🛠️ Smart deployment detection - only deploys when you ask  

## Advanced Reasoning Mode

The Reasoning Mode implements genuine iterative improvement with:

- **Quality Target**: 8.0/10.0 code quality score
- **Confidence Target**: 0.85 confidence threshold
- **Max Iterations**: 8 improvement attempts
- **Real-Time UI**: Live progress with reward scores and confidence levels
- **Adaptive Learning**: Each iteration learns from previous attempts

```bash
# Enable reasoning mode
swe-agent --reasoning --task "optimize this algorithm"
```

This activates iterative code refinement through multiple attempts, quality assessment, and adaptive improvement until quality targets are met.

## Visual Diff Display

See exactly what changes SWE Agent makes to your code with beautiful diff visualization:

```bash
# Enable visual diffs (default: enabled)
swe-agent --task "refactor my code" --show-diffs

# Debug mode for detailed operation logs
swe-agent --task "fix the bug" --debug-mode
```

### Visual Features:

🟢 Green borders for file creation  
🔵 Blue borders for file edits  
🟡 Yellow borders for content replacement  
🔴 Red borders for file rewrites  
👁️ Vision analysis for website screenshot recreation  
Line-by-line diffs with syntax highlighting  
Before/after comparisons for all file operations  

## What It Can Do

### Write Code for You
- Build complete applications from a simple description
- Generate functions and classes that actually work
- Create tests for your existing code
- Write documentation that makes sense

### Deploy Web Applications
- Create modern HTML/CSS/JS applications instantly
- Deploy to Netlify with professional live URLs
- Smart deployment detection (only deploys when explicitly requested)
- Mobile-responsive designs with modern web standards

### Improve Existing Code
- Find and fix bugs before they cause problems
- Refactor messy code into clean, readable functions
- Add features to existing projects without breaking things
- Optimize performance bottlenecks

### Keep You Secure
- Scan for vulnerabilities in real-time
- Suggest security fixes with clear explanations
- Check dependencies for known issues
- Follow security best practices automatically

### Speed Up Your Workflow
- Search through large codebases instantly
- Navigate complex projects with ease
- Track changes and see what was modified
- Integrate with git seamlessly

### Built-in Web Browser
- Navigate websites and click buttons automatically
- Fill forms and submit data programmatically
- Extract information from web pages
- Test web applications interactively
- Powered by Julia Browser with 13 browser tools

## How It Works

You have four ways to work with SWE Agent:

1. **Pair Programming (--pair)** - Like having a coding buddy next to you. Chat naturally about what you want to build, and watch as it writes code, explains decisions, and helps you learn.

2. **Quick Tasks (--task)** - Perfect for one-off jobs. "Create a REST API for user management" or "Add authentication to my app" - just describe what you need.

3. **Interactive Sessions (--interactive)** - Work on multiple tasks in one session. Great for exploring ideas, iterating on features, and building complex projects step by step.

4. **Terminal Interface (--warp)** - A modern coding environment that feels like using advanced developer tools. See your project status, git changes, and AI suggestions all in one place.

## Advanced Features

### MCP Integration (--enable-mcp)
Enable Model Context Protocol for enhanced capabilities:

- Advanced security scanning with Semgrep integration
- AI-powered documentation search with DeepWiki
- Extended tool ecosystem for specialized tasks
- Real-time vulnerability detection and remediation

### Reasoning Mode (--reasoning)
- Iterative code improvement with quality targets
- Confidence-driven decision making
- Multi-dimensional reward system
- Real-time progress tracking
- Adaptive learning and strategy adjustment

## Real Benefits

**For Beginners**: Learn by watching an expert work. See how real applications are built, from planning to deployment.

**For Experienced Developers**: Focus on architecture and business logic while the AI handles boilerplate, documentation, and testing.

**For Teams**: Maintain consistent code quality and catch issues before they reach production.

**For Everyone**: Spend less time debugging and more time building features that matter.

## Languages Supported

Works with any programming language - Python, JavaScript, TypeScript, Go, Rust, C++, Java, C#, PHP, Ruby, and more. It adapts to your project's style and conventions automatically.

## Safety Features

- **Secure by default** - Scans every change for security issues
- **Ask before running** - Requests permission for potentially dangerous operations
- **Complete audit trail** - Logs everything for transparency
- **Sandboxed execution** - Runs code safely without affecting your system

## Getting Help

```bash
# See all options
swe-agent --help

# Check if everything is working
swe-agent --status
```

Start with `swe-agent --pair` for the best experience. It's like having a senior developer helping you code.

## License

MIT License

---

**Stop fighting with code. Start building what you actually want to create.**

Built with ❤️ by Harish Santhanalakshmi Ganesan and his Coding AI agents

**Browser Integration**: Powered by Julia Browser - 43 total tools (30 coding + 13 browser)

**Thanks and Credits**: Terminal interfaces inspired by Aider and Warp

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sweagent/swe-agent",
    "name": "swe-ai-agent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Harish Santhanalakshmi Ganesan <harishsg99@gmail.com>",
    "keywords": "ai, agent, code, software-engineering, reinforcement-learning, o1-reasoning, iterative-improvement, langraph, claude, anthropic, openrouter, multi-provider, gpt-4o, llama, ai-models, ide, headless, automation, development, programming-assistant",
    "author": "SWE Agent Team",
    "author_email": "Harish Santhanalakshmi Ganesan <harishsg99@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9b/ae/3f280ae4e821526318762f3f7ea5776c1a480613fa9074acd20363790057/swe_ai_agent-2.1.7.tar.gz",
    "platform": null,
    "description": "# SWE Agent - AI Coding Assistant with Built-in Browser\n\nAn AI Coding Agent that helps you write, analyze, and improve code in any programming language. Features its own integrated web browser powered by Julia Browser for complete web interaction capabilities.\n\n## Why Use SWE Agent?\n\n**Save time writing code** - Tell it what you want to build, and it writes the code for you. No more staring at blank files or wrestling with syntax.\n\n**Fix bugs faster** - It reads your code, finds problems, and suggests fixes. Like having an experienced developer review your work instantly.\n\n**Analyze website designs** - Upload screenshots and get detailed component breakdowns, color palettes, and layout structures for accurate recreation.\n\n**Learn while you code** - Watch how it solves problems step by step. You'll pick up new techniques and best practices naturally.\n\n**Work in any language** - Python, JavaScript, Go, Rust, C++ - it understands them all. Switch between projects without missing a beat.\n\n**Stay secure** - Automatically scans your code for security issues before you deploy. Catch vulnerabilities early.\n\n**Browse the web** - Built-in browser can navigate websites, click buttons, fill forms, and extract data automatically.\n\n**Deploy to production** - Create HTML/CSS/JS applications and deploy them to Netlify with a single command for instant live websites.\n\n**Advanced Reasoning Mode** - Iterative code improvement with quality targets (8.0/10.0), confidence thresholds (0.85), and reward-based learning over multiple attempts.\n\n## Installation\n\n```bash\npip install swe-ai-agent\n```\n\n## Getting Started\n\nRequired environment variables:\n```bash\n# Required: Choose one AI provider\nexport ANTHROPIC_API_KEY=\"your-anthropic-api-key-here\"\n# OR\nexport OPENROUTER_API_KEY=\"your-openrouter-api-key-here\"\n\n# Optional: For web deployment (only needed if deploying to Netlify)\nexport NETLIFY_ACCESS_TOKEN=\"your-netlify-token-here\"\n```\n\n## Usage Options\n\n```bash\n# Chat with your AI coding partner\nswe-agent --pair\n\n# Run one-time tasks\nswe-agent --task \"create a todo app with React\"\n\n# Work interactively on multiple tasks\nswe-agent --interactive\n\n# Use the modern terminal interface\nswe-agent --warp\n\n# Enable advanced features with external services\nswe-agent --enable-mcp --interactive\n\n# Advanced Reasoning mode with iterative improvement\nswe-agent --reasoning --task \"create a web scraper\" --no-shell-approval\n```\n\n## Multi-Provider AI Support \u2728\n\nSWE Agent now supports multiple AI providers for maximum flexibility:\n\n### Anthropic (Claude)\n```bash\n# Use Anthropic Claude (default)\nswe-agent --provider anthropic --task \"build a calculator\"\n\n# Specify Claude model\nswe-agent --provider anthropic --model claude-sonnet-4-20250514 --interactive\n```\n\n### OpenRouter (Access 50+ Models)\n```bash\n# Use OpenRouter with Claude\nswe-agent --provider openrouter --task \"build a website\"\n\n# Use OpenRouter with GPT-4o\nswe-agent --provider openrouter --model \"openai/gpt-4o\" --interactive\n\n# Use OpenRouter with Llama\nswe-agent --provider openrouter --model \"meta-llama/llama-3.1-405b\" --pair\n\n# All popular models supported\nswe-agent --provider openrouter --model \"anthropic/claude-sonnet-4\" --warp\n```\n\n### OpenRouter Benefits:\n\n\ud83c\udf10 Access to 50+ AI models from different providers  \n\ud83d\udcb0 Cost-effective pricing across multiple model options  \n\ud83d\udd04 Easy model switching without changing code  \n\ud83d\ude80 Same performance and features across all models  \n\ud83d\udcca Transparent pricing and usage tracking  \n\n## New: Web App Deployment \u2728\n\nCreate and deploy HTML/CSS/JS applications directly to Netlify:\n\n```bash\n# Create a web application\nswe-agent --task \"create a portfolio website with HTML and CSS\"\n\n# Create AND deploy to Netlify (requires NETLIFY_ACCESS_TOKEN)\nswe-agent --task \"create a todo app and deploy it to Netlify\"\n```\n\n### Deployment Features:\n\n\ud83c\udf10 Instant live URLs with SSL certificates  \n\ud83d\ude80 One-command deployment from creation to production  \n\ud83d\udcf1 Mobile-responsive applications by default  \n\ud83d\udd12 Secure hosting on Netlify's global CDN  \n\ud83d\udee0\ufe0f Smart deployment detection - only deploys when you ask  \n\n## Advanced Reasoning Mode\n\nThe Reasoning Mode implements genuine iterative improvement with:\n\n- **Quality Target**: 8.0/10.0 code quality score\n- **Confidence Target**: 0.85 confidence threshold\n- **Max Iterations**: 8 improvement attempts\n- **Real-Time UI**: Live progress with reward scores and confidence levels\n- **Adaptive Learning**: Each iteration learns from previous attempts\n\n```bash\n# Enable reasoning mode\nswe-agent --reasoning --task \"optimize this algorithm\"\n```\n\nThis activates iterative code refinement through multiple attempts, quality assessment, and adaptive improvement until quality targets are met.\n\n## Visual Diff Display\n\nSee exactly what changes SWE Agent makes to your code with beautiful diff visualization:\n\n```bash\n# Enable visual diffs (default: enabled)\nswe-agent --task \"refactor my code\" --show-diffs\n\n# Debug mode for detailed operation logs\nswe-agent --task \"fix the bug\" --debug-mode\n```\n\n### Visual Features:\n\n\ud83d\udfe2 Green borders for file creation  \n\ud83d\udd35 Blue borders for file edits  \n\ud83d\udfe1 Yellow borders for content replacement  \n\ud83d\udd34 Red borders for file rewrites  \n\ud83d\udc41\ufe0f Vision analysis for website screenshot recreation  \nLine-by-line diffs with syntax highlighting  \nBefore/after comparisons for all file operations  \n\n## What It Can Do\n\n### Write Code for You\n- Build complete applications from a simple description\n- Generate functions and classes that actually work\n- Create tests for your existing code\n- Write documentation that makes sense\n\n### Deploy Web Applications\n- Create modern HTML/CSS/JS applications instantly\n- Deploy to Netlify with professional live URLs\n- Smart deployment detection (only deploys when explicitly requested)\n- Mobile-responsive designs with modern web standards\n\n### Improve Existing Code\n- Find and fix bugs before they cause problems\n- Refactor messy code into clean, readable functions\n- Add features to existing projects without breaking things\n- Optimize performance bottlenecks\n\n### Keep You Secure\n- Scan for vulnerabilities in real-time\n- Suggest security fixes with clear explanations\n- Check dependencies for known issues\n- Follow security best practices automatically\n\n### Speed Up Your Workflow\n- Search through large codebases instantly\n- Navigate complex projects with ease\n- Track changes and see what was modified\n- Integrate with git seamlessly\n\n### Built-in Web Browser\n- Navigate websites and click buttons automatically\n- Fill forms and submit data programmatically\n- Extract information from web pages\n- Test web applications interactively\n- Powered by Julia Browser with 13 browser tools\n\n## How It Works\n\nYou have four ways to work with SWE Agent:\n\n1. **Pair Programming (--pair)** - Like having a coding buddy next to you. Chat naturally about what you want to build, and watch as it writes code, explains decisions, and helps you learn.\n\n2. **Quick Tasks (--task)** - Perfect for one-off jobs. \"Create a REST API for user management\" or \"Add authentication to my app\" - just describe what you need.\n\n3. **Interactive Sessions (--interactive)** - Work on multiple tasks in one session. Great for exploring ideas, iterating on features, and building complex projects step by step.\n\n4. **Terminal Interface (--warp)** - A modern coding environment that feels like using advanced developer tools. See your project status, git changes, and AI suggestions all in one place.\n\n## Advanced Features\n\n### MCP Integration (--enable-mcp)\nEnable Model Context Protocol for enhanced capabilities:\n\n- Advanced security scanning with Semgrep integration\n- AI-powered documentation search with DeepWiki\n- Extended tool ecosystem for specialized tasks\n- Real-time vulnerability detection and remediation\n\n### Reasoning Mode (--reasoning)\n- Iterative code improvement with quality targets\n- Confidence-driven decision making\n- Multi-dimensional reward system\n- Real-time progress tracking\n- Adaptive learning and strategy adjustment\n\n## Real Benefits\n\n**For Beginners**: Learn by watching an expert work. See how real applications are built, from planning to deployment.\n\n**For Experienced Developers**: Focus on architecture and business logic while the AI handles boilerplate, documentation, and testing.\n\n**For Teams**: Maintain consistent code quality and catch issues before they reach production.\n\n**For Everyone**: Spend less time debugging and more time building features that matter.\n\n## Languages Supported\n\nWorks with any programming language - Python, JavaScript, TypeScript, Go, Rust, C++, Java, C#, PHP, Ruby, and more. It adapts to your project's style and conventions automatically.\n\n## Safety Features\n\n- **Secure by default** - Scans every change for security issues\n- **Ask before running** - Requests permission for potentially dangerous operations\n- **Complete audit trail** - Logs everything for transparency\n- **Sandboxed execution** - Runs code safely without affecting your system\n\n## Getting Help\n\n```bash\n# See all options\nswe-agent --help\n\n# Check if everything is working\nswe-agent --status\n```\n\nStart with `swe-agent --pair` for the best experience. It's like having a senior developer helping you code.\n\n## License\n\nMIT License\n\n---\n\n**Stop fighting with code. Start building what you actually want to create.**\n\nBuilt with \u2764\ufe0f by Harish Santhanalakshmi Ganesan and his Coding AI agents\n\n**Browser Integration**: Powered by Julia Browser - 43 total tools (30 coding + 13 browser)\n\n**Thanks and Credits**: Terminal interfaces inspired by Aider and Warp\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Headless Agentic IDE with reasoning mode and in built Browser",
    "version": "2.1.7",
    "project_urls": {
        "Bug Tracker": "https://github.com/sweagent/swe-agent/issues",
        "Documentation": "https://docs.sweagent.dev",
        "Homepage": "https://sweagent.dev",
        "Repository": "https://github.com/sweagent/swe-agent"
    },
    "split_keywords": [
        "ai",
        " agent",
        " code",
        " software-engineering",
        " reinforcement-learning",
        " o1-reasoning",
        " iterative-improvement",
        " langraph",
        " claude",
        " anthropic",
        " openrouter",
        " multi-provider",
        " gpt-4o",
        " llama",
        " ai-models",
        " ide",
        " headless",
        " automation",
        " development",
        " programming-assistant"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dfee99bde50e2025368a9d66e68b723d8497d506a4467922ea0141d4e789e2ed",
                "md5": "30107e4f3813086c2a707fb289058299",
                "sha256": "78027c8d5e05c10162dcf06177864771fc14e86cf891c05bf0b264629eca0d9c"
            },
            "downloads": -1,
            "filename": "swe_ai_agent-2.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30107e4f3813086c2a707fb289058299",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 213177,
            "upload_time": "2025-08-15T06:19:00",
            "upload_time_iso_8601": "2025-08-15T06:19:00.458883Z",
            "url": "https://files.pythonhosted.org/packages/df/ee/99bde50e2025368a9d66e68b723d8497d506a4467922ea0141d4e789e2ed/swe_ai_agent-2.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9bae3f280ae4e821526318762f3f7ea5776c1a480613fa9074acd20363790057",
                "md5": "5c4e25b2fac97cf04007008b5b7ed396",
                "sha256": "0bcd554b925148b63721150b336affdd1cdec0fa381b1a0ee37b21ce7b124bff"
            },
            "downloads": -1,
            "filename": "swe_ai_agent-2.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "5c4e25b2fac97cf04007008b5b7ed396",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 189537,
            "upload_time": "2025-08-15T06:19:01",
            "upload_time_iso_8601": "2025-08-15T06:19:01.881901Z",
            "url": "https://files.pythonhosted.org/packages/9b/ae/3f280ae4e821526318762f3f7ea5776c1a480613fa9074acd20363790057/swe_ai_agent-2.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-15 06:19:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sweagent",
    "github_project": "swe-agent",
    "github_not_found": true,
    "lcname": "swe-ai-agent"
}
        
Elapsed time: 1.15391s