欣淇
发布于 2026-05-12 / 0 阅读
0
0

🛠 Open SWE:LangChain 出品 9.8k Stars 的开源内部编码 Agent 框架,Stripe/Ramp/Coinbase 同款架构

🛠 Open SWE:LangChain 出品 9.8k Stars 的开源内部编码 Agent 框架,Stripe/Ramp/Coinbase 同款架构

Stripe 的 Minions、Ramp 的 Inspect、Coinbase 的 Cloudbot——这些顶级科技公司都在搞自己的内部编码 Agent,跑在 Slack 里、绑着 Linear、自动提 PR。现在 LangChain 把同样一套架构开源了:Open SWE,基于 LangGraph + Deep Agents,一周内冲到 9.8k Stars。

不是什么?

不是又一个 Claude Code 替代品。Open SWE 是一套框架,让你给自己的团队搭一个专属的编码 Agent——连上你们自己的 repo、Slack 频道、Linear 看板,agent 用完了自动提 PR,人在 Slack 里回一句就接着干。

核心架构

Open SWE 的架构跟 Stripe/Ramp/Coinbase 保持一致:

1. Agent Harness — 基于 Deep Agents 组合(不是 fork),上游更新能直接 pull,同时保留你的定制空间:

create_deep_agent(
    model="openai:gpt-5.5",
    system_prompt=construct_system_prompt(...),
    tools=[http_request, fetch_url, linear_comment, slack_thread_reply],
    backend=sandbox_backend,
    middleware=[ToolErrorMiddleware(), check_message_queue_before_model, ...],
)

2. 沙箱隔离 — 每次任务跑在独立的云沙箱里(支持 Modal、Daytona、Runloop、LangSmith),agent 有完整 shell 权限但隔离了所有生产环境。

3. 精简化工具集 — Stripe 说得好:工具的质量比数量重要。Open SWE 只给了 15 个左右的工具:execute(跑命令)、fetch_urlhttp_requestlinear_commentslack_thread_reply,配合 Deep Agents 自带的 read_file/write_file/edit_file 等。

4. 上下文工程 — 如果 repo 根目录有 AGENTS.md,自动注入 system prompt。Linear 的完整 issue 上下文或 Slack 线程历史也一并传入,agent 启动就有全局视野。

5. 编排层 — 主 agent 可以派生子 agent(task 工具),各干各的互不干扰。中间件钩子接管了整个 agent 循环:中途有人发消息(check_message_queue_before_model)、超时通知(notify_step_limit_reached)、工具错误处理(ToolErrorMiddleware)。

怎么触发

  • Slack — @bot 一下就行,支持 repo:owner/name 指定仓库,agent 在线程里回复状态和 PR 链接
  • Linear — 在 issue 里评论 @openswe,它回个 👀 表示开工
  • GitHub — 在 agent 创建的 PR 上评论 @openswe,它自己修 review 意见,push 到同一个分支
  • 快速上手

    git clone https://github.com/langchain-ai/open-swe.git
    cd open-swe
    uv venv
    source .venv/bin/activate
    uv sync --all-extras
    

    然后注册一个 GitHub App、连上 LangSmith、配好 Slack/Linear webhook,就能用了。详细的安装步骤看 INSTALLATION.md

    一句话总结

    如果你团队超过 5 个工程师、每天有修不完的 issue 和 review,Open SWE 可能是最适合你的编码 Agent 框架。不需要从零造轮子——LangChain 把 Stripe/Ramp/Coinbase 踩过的坑都封装好了。


    🛠 Open SWE: LangChain's 9.8k Stars Open-Source Internal Coding Agent Framework — Same Architecture as Stripe/Ramp/Coinbase

    Stripe has Minions. Ramp has Inspect. Coinbase has Cloudbot. Every elite engineering org is building internal coding agents — Slackbots connected to Linear that auto-open PRs. Now LangChain open-sourced the same pattern: Open SWE, built on LangGraph + Deep Agents, hitting 9.8k stars in its first week.

    What it's not

    Not another Claude Code fork. Open SWE is a framework for building your team's own coding agent — wired to your repos, Slack channels, and Linear boards. The agent fixes bugs, implements features, opens PRs, and you just reply in Slack to steer it.

    Architecture

    1. Agent Harness — Composed on Deep Agents (not forked), so you can pull upstream updates while keeping your customizations:

    create_deep_agent(
        model="openai:gpt-5.5",
        system_prompt=construct_system_prompt(...),
        tools=[http_request, fetch_url, linear_comment, slack_thread_reply],
        backend=sandbox_backend,
        middleware=[ToolErrorMiddleware(), check_message_queue_before_model, ...],
    )
    

    2. Sandbox Isolation — Every task runs in its own cloud sandbox (Modal, Daytona, Runloop, or LangSmith). Full shell access inside, zero blast radius outside.

    3. Curated Tools — Stripe's insight: tool curation > tool quantity. ~15 tools including execute, fetch_url, http_request, linear_comment, slack_thread_reply, plus Deep Agents built-ins.

    4. Context EngineeringAGENTS.md at repo root gets injected into system prompt automatically. Full Linear issue context or Slack thread history feeds in so the agent starts informed.

    5. Middleware & Subagents — Main agent spawns children via the task tool. Middleware hooks handle mid-run messages, timeouts, and tool errors without interrupting the loop.

    Invocation

  • Slack — Mention the bot. Supports repo:owner/name syntax. Replies in-thread with status and PR links.
  • Linear — Comment @openswe on any issue. Gets 👀 acknowledgement, posts results back.
  • GitHub — Tag @openswe on PR comments to have it address review feedback.
  • Quick Start

    git clone https://github.com/langchain-ai/open-swe.git
    cd open-swe
    uv venv
    source .venv/bin/activate
    uv sync --all-extras
    

    Then create a GitHub App, configure LangSmith, and set up Slack/Linear webhooks. Full guide: INSTALLATION.md.

    TL;DR

    If your team has 5+ engineers and a never-ending stream of issues and PRs, Open SWE is probably the coding agent framework you've been waiting for. No need to reinvent the wheel — LangChain packaged all the lessons from Stripe, Ramp, and Coinbase.


    评论