OpenSWE: Build Your Own Claude Code for Free With LangChain's New Framework
Head of AI Research

How to deploy a free, open-source software engineering agent using LangGraph and the architecture trusted by Stripe, Ramp, and Coinbase
⚡ Key Takeaways
- OpenSWE is completely free and open-source — built on LangGraph and based on production systems from Stripe, Ramp, and Coinbase
- The architecture is fully pluggable — swap any LLM, trigger system, or sandbox provider without rewriting code
- You get full transparency and control — modify it, sell products built on it, and integrate with your existing tools (Slack, Linear, GitHub)
- Setup takes less than an hour — configure webhooks, pick your triggers and sandbox, customize your agent, and deploy
What is OpenSWE (and why it matters)
For years, the only way to get an AI-powered software engineering agent was to use proprietary tools like Claude Code or Cursor. You get locked into their UI, their pricing model, their LLM choices, and their infrastructure.
OpenSWE changes that. It's a completely free, open-source framework for building your own autonomous software engineering agent. Think of it as the blueprints for Claude Code — the actual architecture that companies like Stripe have been using internally for months.
Here's what makes it different: We can deploy it on our own infrastructure, integrate it with our existing tools (Slack, GitHub, Linear), use any LLM we want (Claude, GPT-4, open-source models), and customize every layer without hitting API limits or fighting against someone else's product roadmap.
Core Philosophy
"Isolate first, give full permissions inside the boundary." The agent runs in a sandboxed environment with complete file system and shell access — but that boundary keeps it isolated from the rest of your system.
Who's already using this architecture
OpenSWE is based on production systems that have been tested at scale. The architecture comes directly from how companies like Stripe, Ramp, and Coinbase built their internal coding agents.
Stripe
Uses this pattern to automate codebase changes across their infrastructure. Agents trigger from internal systems, modify code, and push changes back to repositories.

Ramp
Integrated this into their developer workflow. When tasks come in through Linear, the agent reads requirements, writes code, runs tests, and opens pull requests — all without human intervention for routine tasks.
Coinbase
Uses the same architecture for their automated code review system. The agent reads code changes, suggests improvements, and can implement fixes.
The fact that we can now run the exact same architecture ourselves — for free, on our own terms — is a meaningful shift.
How the architecture works
Before we get to setup, let's understand what we're actually deploying. The OpenSWE architecture has five distinct layers, and understanding them makes configuration and customization much easier.
Layer 1: Trigger Services (3 built-in options)
Something has to tell the agent to start working. OpenSWE comes with three trigger integrations ready to go:
- Slack — Message a channel, the agent wakes up and gets to work
- Linear — Create an issue, the agent reads the requirements and implements
- GitHub — Open an issue or create a discussion, trigger the agent directly
Layer 2: FastAPI Webhooks
When a trigger fires, it sends data to a simple FastAPI webhook handler. This is the glue that translates "user said X" into "agent should do Y." You deploy this once, point your integrations at it, and it just works.
Layer 3: LangGraph Agent
This is the brain. LangGraph is LangChain's framework for building agents with explicit state management and graph-based execution. The agent reads what the user asked for, makes a plan, executes the plan, and reports back.
What makes LangGraph better than earlier frameworks is that it handles the complexity of agent loops cleanly. The agent can reason, fail, recover, and keep going without getting stuck.
Layer 4: Sandbox Execution (5 providers supported)
Here's where the code actually runs. OpenSWE supports multiple sandbox providers, and you pick one that fits your use case:
- Daytona — Lightweight, fast, great for quick tasks
- Modal — Serverless, scales automatically, good for heavy workloads
- Docker — Run everything locally
- Dockerless VM — Faster startup than Docker
- Custom provider — Implement your own sandbox if needed
The sandbox is isolated. The agent gets a clean environment, can execute shell commands, read/write files, and run any tests. When it's done, the sandbox is torn down. Nothing leaks out.
Layer 5: Git Integration
Once the agent makes changes, they need to go somewhere. OpenSWE handles pushing code back to your repository, opening pull requests, and updating the original task. You control what "done" means — the agent can auto-merge if tests pass, create a PR for human review, or just commit and push.
Step-by-step: Setting up OpenSWE
Now let's actually deploy this. The setup is straightforward, but there are a few pieces to wire together.
Prerequisites
- A GitHub account with owner/admin access to at least one repository
- A LangChain account (free) for observability and tracing
- A Slack workspace (optional) if you want to trigger via Slack
- Python 3.10+ installed locally
- A way to deploy (Modal, Daytona, or Docker on a server)
Clone the OpenSWE repository
Start by getting the code:
git clone https://github.com/langchain-ai/openswe.git
cd openswe
pip install -r requirements.txt
Repository: github.com/langchain-ai/openswe
Create a GitHub App for authentication
The agent needs permission to push code and read your repositories. Create a GitHub App by going to Settings → Developer settings → GitHub Apps, clicking "New GitHub App", and filling in:
- App name: "OpenSWE Agent" (or whatever you want)
- Homepage URL: Your deployment URL (or localhost:8000 for testing)
- Webhook URL: Your FastAPI endpoint (e.g., https://yourserver.com/webhooks/github)
- Repository permissions: Contents (read+write), Pull requests (read+write), Issues (read+write)
- Organization permissions: Members (read)
Generate a private key and save it as .github_private_key.pem. Note your App ID and Client ID.
Set up LangSmith for observability
LangSmith lets you see exactly what your agent is doing. Create a free account at smith.langchain.com, generate an API key, and configure:
export LANGCHAIN_API_KEY="your-key"
export LANGCHAIN_PROJECT="openswe"
export LANGCHAIN_TRACING_V2=true
Configure your environment variables
Create a .env file in your project root with all the required API keys and configuration:
# LLM Configuration (use any model you want)
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-... # If using Claude
# GitHub Integration
GITHUB_APP_ID=12345
GITHUB_PRIVATE_KEY=$(cat .github_private_key.pem)
GITHUB_CLIENT_ID=your-client-id
# LangSmith (optional but recommended)
LANGCHAIN_API_KEY=your-langsmith-key
LANGCHAIN_PROJECT=openswe
# Sandbox Configuration
SANDBOX_PROVIDER=daytona # or modal, docker, etc
DAYTONA_API_KEY=your-daytona-key # if using Daytona
MODAL_TOKEN_ID=your-modal-id # if using Modal
# Slack (optional)
SLACK_BOT_TOKEN=xoxb-...
SLACK_SIGNING_SECRET=your-secret
Customize the agent configuration
Edit config/agent.yaml to define what your agent can do:
agent:
name: "OpenSWE Agent"
model: "claude-3-5-sonnet" # Use any LLM
temperature: 0.7
max_iterations: 10
tools:
enabled:
- execute # Run shell commands
- read_file # Read file contents
- write_file # Create/overwrite files
- edit_file # Make precise edits
- search_files # Find files with grep
- git_commit # Stage and commit changes
- git_push # Push to remote
- run_tests # Execute test suites
- list_files # Directory listing
- get_file_tree # Show project structure
- subprocess # Low-level command execution
- web_search # Search the internet
- api_call # Make HTTP requests
- db_query # Query databases
- slack_message # Send Slack notifications
sandbox:
provider: "daytona"
timeout: 600 # 10 minutes max per task
memory_limit: 4GB
Deploy to your chosen sandbox provider
Option A: Using Modal (recommended for most teams)
modal deploy openswe/main.py
Option B: Using Docker locally
docker build -t openswe .
docker run -p 8000:8000 --env-file .env openswe
Option C: Using Daytona
daytona deploy openswe/
daytona start
Install the GitHub App and test
Once deployed, go back to your GitHub App settings and install it on your test repository. Create a test issue to trigger the agent:
Title: "Fix the typo in README.md"
Body: "There's a typo on line 42. It says 'teh' instead of 'the'."
The agent should pick it up, create a branch, make the fix, and open a pull request.
Key features and the 15 curated tools
OpenSWE ships with 15 tools that the agent can use. These are carefully selected and tested — they're the tools that matter for real software engineering work.
Code Manipulation (4 tools)
- Read file — Get the contents of any file in the repository. The agent uses this constantly to understand context before making changes.
- Write file — Create new files from scratch. Great for generating boilerplate, tests, configuration, etc.
- Edit file — Make surgical, line-specific changes without overwriting the whole file. This is more reliable than rewriting.
- Execute command — Run arbitrary shell commands: compilers, linters, formatters, build tools, whatever.
Version Control (2 tools)
- Git commit — Stage changes and commit with a meaningful message.
- Git push — Push branches and open pull requests automatically.
Project Navigation (3 tools)
- List files — Get a directory listing.
- Get file tree — Visualize the entire project structure at once.
- Search files — Find files matching a pattern (like grep).
External Services (4 tools)
- Web search — Look up documentation, Stack Overflow, etc. when needed.
- API calls — Make HTTP requests to external services.
- Database queries — Connect to databases and run queries.
- Slack messages — Send notifications to your team.
Advanced Execution (2 tools)
- Subprocess execution — Lower-level command execution with more control.
- Run tests — Execute your test suite and parse results.
This toolkit is remarkably similar to what Claude Code offers, but you control it entirely. You can remove tools the agent shouldn't have, add new ones specific to your workflow, or replace any of them with custom implementations.

OpenSWE is completely free and open-source. No per-user fees.
OpenSWE vs Claude Code vs Cursor
Now that we understand what OpenSWE is, let's see how it stacks up against the alternatives:
When to build your own vs use Claude Code
OpenSWE is powerful, but it's not always the right choice. Let's be honest about when each tool makes sense:
👍 Use Claude Code if...
- You're a solo developer who just wants an AI assistant in your editor
- You need something working in 2 minutes, not 30
- You don't want to manage infrastructure or deployments
- Your workflow is mostly "write code, see results immediately"
- You trust Anthropic and don't need to inspect or modify the internals
👍 Build with OpenSWE if...
- You have a team and want to automate work across multiple developers
- You want to integrate AI coding into your existing CI/CD pipeline
- You need to use a specific LLM (GPT-4, open-source models, etc.)
- You want to trigger agents from Slack, GitHub issues, or your own tools
- You need full audit logs and observability (LangSmith tracing is built-in)
- You want to customize the agent's behavior without waiting for Anthropic to add features
- You need to ensure code never leaves your infrastructure (self-hosted option)
- You're building a product that uses AI coding as a feature
⚠ Real talk: Complexity vs Flexibility
OpenSWE is more complex. You're managing infrastructure, environment variables, LLM API keys, and deployments. Claude Code is simpler — you just use it.
The trade-off is real: more control comes with more responsibility. Make sure the extra flexibility is worth the extra work for your use case.
Frequently asked questions
Q: Can I use OpenSWE with open-source models like Llama?
Absolutely. The agent is model-agnostic. As long as you have a compatible API endpoint or local model server, you can point OpenSWE at it. However, open-source models are generally less capable than Claude or GPT-4. For complex tasks, Claude or GPT-4 will give you better results. The choice is yours though — nothing stops you from experimenting.
Q: What happens if the agent makes a mistake and breaks my code?
The agent runs in an isolated sandbox. It can't directly modify your production repository — it pushes changes as pull requests or branches that humans can review. You stay in control. Plus, every action is logged in LangSmith, so you can see exactly what happened and rollback if needed. Git history is your safety net.
Q: Can I use OpenSWE without LangSmith?
Yes. LangSmith is optional and makes debugging easier, but OpenSWE works without it. You'll just have less visibility into what the agent is doing. We recommend enabling it for at least testing and development.
Q: What sandbox provider should I choose?
Start with Daytona if you're just testing. It's lightweight and free. Move to Modal if you need more power or scalability. Docker is good if you're comfortable with containerization. The choice mostly depends on what you already use and your infrastructure preferences.
Q: How much does OpenSWE cost to run?
The framework itself is free and open-source. Your costs come from:
- LLM API calls — Using Claude, GPT-4, or other models costs money per token
- Compute — Running sandboxes (Modal, Daytona, Docker) has costs
- Observability — LangSmith free tier covers most teams, paid plans for scale
Total costs depend on usage, but teams run it for $50-500/month depending on volume and model choice.
Q: Can I modify OpenSWE and sell a product with it?
Yes. It's open-source, and you can modify it, build products with it, and sell them. Check the license (typically MIT or Apache 2.0) for specific terms, but the intent is that you have full freedom. Many teams are already doing this — building agency tools, automation platforms, and internal tools on top of OpenSWE.
Q: How does OpenSWE handle security and code privacy?
Security depends on your deployment:
- Self-hosted: All code stays in your infrastructure. The agent never sends code to external services (unless you explicitly configure it to).
- LLM calls: When the agent sends code to Claude or GPT-4, you're subject to their privacy policies. This is the same as any LLM tool.
- LangSmith: Traces are stored on LangChain's servers, so review what data you're comfortable tracing.
You control the trade-off between observability and privacy. Self-hosted with local models = maximum privacy. Using Claude + LangSmith = maximum visibility.
Getting started: Your next steps
We've covered what OpenSWE is, how it works, and how to deploy it. The next step is to try it yourself. Clone the repo, follow the setup steps above, and deploy a test agent.
The best part? Because it's open-source, you can learn from the source code, understand exactly how it works, and modify it to fit your specific needs. That's something you can't do with Claude Code or Cursor.
If you get stuck, the community is active, and the documentation keeps improving. Start small — maybe just GitHub integration — and expand from there.
Ready to deploy?
The OpenSWE framework is completely free and open-source. Clone the repository, follow the setup guide above, and start building your own software engineering agent.
View OpenSWE on GitHub →Stay updated on AI tools
New frameworks like OpenSWE are emerging all the time. PopularAiTools.ai covers the latest developments in AI tooling, from frameworks like this to new models and platforms. Follow us for deep dives on tools that matter for developers and AI engineers.
Recommended AI Tools
Grammarly
Updated March 2026 · 12 min read · By PopularAiTools.ai
View Review →Google Imagen
Updated March 2026 · 11 min read · By PopularAiTools.ai
View Review →CapCut
Updated March 2026 · 12 min read · By PopularAiTools.ai
View Review →Picsart
Updated March 2026 · 11 min read · By PopularAiTools.ai
View Review →