Overview
Open SWE is the open-source version of the internal coding agents built at Stripe, Ramp, and Coinbase. Built on LangGraph and Deep Agents, it provides the architecture those companies built internally: cloud sandboxes, Slack and Linear invocation, subagent orchestration, and automatic PR creation — ready to customize for your own codebase and workflows.
| Attribute | Value |
|---|---|
| Language / Stack | Python (75%) + TypeScript (25%) |
| GitHub | github.com/langchain-ai/open-swe |
| License | MIT |
| Built On | LangGraph + Deep Agents |
| Maturity | Production patterns |
Architecture
Open SWE makes six core architectural decisions that define the state of the art for internal coding agents:
1. Agent Harness
Rather than forking an existing agent, Open SWE composes on the Deep Agents framework. This gives you an upgrade path (pull in upstream improvements) while letting you customize orchestration, tools, and middleware.
2. Sandbox
Every task runs in its own isolated cloud sandbox — a remote Linux environment with full shell access. The repo is cloned in, the agent gets full permissions, and the blast radius is fully contained. Supports Modal, Daytona, Runloop, LangSmith, and custom providers.
3. Tools
Stripe's key insight: tool curation matters more than tool quantity. Open SWE follows this with ~15 focused tools: execute, fetch_url, http_request, linear_comment, slack_thread_reply, plus Deep Agents' built-in file operations and task spawning.
4. Context
Two sources: AGENTS.md (repo-level conventions) and source context (full Linear issue or Slack thread history). The agent starts with rich context rather than discovering everything through tool calls.
5. Orchestration
Subagents: The task tool spawns child agents for parallel subtasks. Middleware: Deterministic hooks run around the agent loop for message injection, error handling, and circuit breaking.
6. Invocation
Slack (mention in thread), Linear (comment @openswe), and GitHub (tag in PR comments). Each invocation creates a deterministic thread ID for follow-up routing.
Comparison to Production Systems
| Decision | Open SWE | Stripe | Ramp | Coinbase |
|---|---|---|---|---|
| Harness | Composed (Deep Agents) | Forked (Goose) | Composed (OpenCode) | Built from scratch |
| Sandbox | Pluggable (Modal/Daytona/Runloop) | AWS EC2 devboxes | Modal containers | In-house |
| Tools | ~15 curated | ~500 curated | OpenCode SDK | MCPs + Skills |
| Context | AGENTS.md + issue/thread | Rule files | OpenCode built-in | Linear-first + MCPs |
| Orchestration | Subagents + middleware | Blueprints | Sessions | Three modes |
| Invocation | Slack/Linear/GitHub | Slack + buttons | Slack + web | Slack-native |
Relevance to xCoder
Open SWE is our primary reference architecture. We are not forking it (it's Python) but we are porting its patterns to TypeScript:
- LangGraph TS — Already used in
packages/flow-engine/; same state machine concepts. - Middleware hooks — Ported to TypeScript with xCoder-specific additions (PhaseGate, PolicyGate).
- Pluggable sandbox — Our container providers (Local/Docker/E2B) mirror Open SWE's sandbox abstraction.
- AGENTS.md — First-class support, extended for monorepos with multiple AGENTS.md files.
- Subagents — Planned for xCoder M2.0 via LangGraph subgraphs.
xCoder's advantage