open-swe AGENTS.md

Repository instructions for Open SWE, an open-source framework that lets coding agents work from services such as Slack, Linear, and GitHub in isolated cloud workspaces.

In plain words
What is it for?
Use them when developing, testing, linting, type-checking, or running Open SWE and its agent, reviewer, and review-style analysis workflows.
Why use it?
They explain the project structure, development commands, tests, and separate code-review processes before changes are made.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/langchain-ai/open-swe/agents-md
Clone the repo
git clone --depth 1 https://github.com/langchain-ai/open-swe

Made for: Codex, OpenCode.

Per session 3,814 This file is loaded in full into every session.
When invoked 3,814 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03814 $0.03814
Opus 5 $0.01907 $0.01907
Sonnet 5 $0.00763 $0.00763
Haiku 4.5 $0.00381 $0.00381

Measured yesterday against content hash a449f22e3660, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

open-swe AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This file provides guidance to Coding Agents when working with code in this repository.

Project

Open SWE is an open-source coding-agent framework built on LangGraph + Deep Agents (deepagents.create_deep_agent). It runs as a LangGraph app: each thread spawns its own isolated cloud sandbox, and the agent is invoked from Slack, Linear, or GitHub (PR comments, plus auto-review on opened / ready-for-review).

A separate reviewer graph runs read-only code reviews on PRs, and a review-style analyzer graph learns per-repo review style from historical PRs.

Commands

Dependencies are managed with uv. Tests use pytest (asyncio_mode = "auto"). Lint/format is ruff (line-length 100, target py311). Type checking is basedpyright (typeCheckingMode = "standard"). requires-python = ">=3.11"; langgraph.json pins the runtime to 3.12.

make install            # uv sync --extra dev (pytest, ruff, …)
make dev                # uv run langgraph dev — serves all three graphs + the FastAPI app from langgraph.json
make run                # uvicorn agent.webapp:app --reload --port 8000 (FastAPI only, no LangGraph runtime)
make test               # uv run pytest -vvv tests/
make test TEST_FILE=tests/github/test_open_pull_request.py    # single test file
uv run pytest -vvv tests/github/test_open_pull_request.py::test_name  # single test
make lint               # ruff check + ruff format --diff
make format             # ruff format + ruff check --fix
make typecheck          # basedpyright agent tests

langgraph.json declares three graph entrypoints and the FastAPI app, all served together by langgraph dev:

Graph Entrypoint Purpose
agent agent.server:get_agent Main coding agent (Slack/Linear/GitHub-triggered).
reviewer agent.reviewer:get_reviewer_agent Read-only PR reviewer. Findings model + publish_review.
analyzer agent.analyzer:get_analyzer Learns per-repo reviewer style from historical PRs and this reviewer's own finding outcomes.
scheduler agent.scheduler:get_scheduler Fans deterministic cron tasks into scheduled agent runs, reconciliation, and /baby-sit PR checks.

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 148 lines · 3,814 tokens per session scan A a449f22e3660

Subscribe to this mod's changes

open-swe AGENTS.md is an instructions file published in the GitHub repository langchain-ai/open-swe (10,633 stars, last pushed 2d ago), licensed MIT. It adds 3,814 tokens to every session, about $0.0191 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories