Skip to main content

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

pip install swe-ai-agent

Getting Started

Required environment variables:

# 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

# 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)

# 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)

# 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:

# 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
# 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:

# 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

# 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

Release files for swe-ai-agent 2.1.7

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

Source distribution (sdist)

Source distribution for swe-ai-agent 2.1.7
File Size Uploaded
swe_ai_agent-2.1.7.tar.gz 189.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swe-ai-agent 2.1.7
File Interpreter ABI Platform
swe_ai_agent-2.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 402.7 kB

Release files / swe_ai_agent-2.1.7.tar.gz

Download URL swe_ai_agent-2.1.7.tar.gz
Size 189.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0bcd554b925148b63721150b336affdd1cdec0fa381b1a0ee37b21ce7b124bff
BLAKE2b-256 checksum
How to use checksums
9bae3f280ae4e821526318762f3f7ea5776c1a480613fa9074acd20363790057
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / swe_ai_agent-2.1.7-py3-none-any.whl

Download URL swe_ai_agent-2.1.7-py3-none-any.whl
Size 213.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78027c8d5e05c10162dcf06177864771fc14e86cf891c05bf0b264629eca0d9c
BLAKE2b-256 checksum
How to use checksums
dfee99bde50e2025368a9d66e68b723d8497d506a4467922ea0141d4e789e2ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

2.1.7 This release

2 release files

2.1.6

2 release files

2.1.1

3 release files

2.1.0

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.83

2 release files

1.0.82

2 release files

1.0.81

1 release file

1.0.80

1 release file

1.0.79

2 release files

1.0.78

2 release files

1.0.77

2 release files

1.0.76

2 release files

1.0.75

2 release files

1.0.74

2 release files

1.0.73

2 release files

1.0.72

2 release files

1.0.71

2 release files

1.0.70

2 release files

1.0.69

2 release files

1.0.68

2 release files

1.0.67

2 release files

1.0.66

2 release files

1.0.65

1 release file

1.0.64

1 release file

1.0.63

2 release files

1.0.62

2 release files

1.0.61

2 release files

1.0.60

2 release files

1.0.59

2 release files

1.0.57

2 release files

1.0.56

2 release files

1.0.54

1 release file

1.0.53

1 release file

1.0.52

1 release file

1.0.51

1 release file

1.0.49

2 release files

1.0.48

2 release files

1.0.47

2 release files

1.0.46

2 release files

1.0.45

2 release files

1.0.44

2 release files

1.0.43

2 release files

1.0.42

2 release files

1.0.41

2 release files

1.0.39

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.35

2 release files

1.0.34

2 release files

1.0.33

1 release file

1.0.32

1 release file

1.0.31

1 release file

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

1 release file

1.0.26

2 release files

1.0.25

2 release files

1.0.24

2 release files

1.0.23

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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