Skip to content

Peen-SWE

Compact, workshop-forged terminal agent built to shape and refine code with zero black-box bloat.

License: MIT Python 3.10+ MCP Ready SWE-bench Verified GitHub Repo


What is Peen-SWE?

Peen-SWE is a minimal, transparent software engineering agent for the terminal. Built on a clean 100-line Python core, it executes shell commands directly via stateless execution and connects to external developer tools using the Model Context Protocol (MCP).

No bloated abstractions, no opaque prompt graphs, and no fragile shell sessions.

# Install with MCP support
pip install "peen[mcp]"

# Or run directly without installation
uvx peen

# Launch the interactive terminal agent
peen

Key Capabilities

  • Direct Bash Execution: Runs shell commands cleanly via independent subprocess.run calls—no state corruption or stuck terminal sessions.
  • Model Context Protocol (MCP): Mount external tools (Git, issue trackers, database clients, linters) using standard stdio MCP servers via --mcp-config.
  • Linear, Inspectable History: Prompt history is an append-only sequence of user inputs, agent bash actions, MCP tool calls, and command outputs.
  • Three Interactive Modes:
  • confirm (/c): Inspect and approve every proposed action.
  • yolo (/y): Unattended autonomous execution.
  • human (/u): Step in and run commands manually at any point.
  • Broad Model Support: Cloud APIs (Anthropic, OpenAI, OpenRouter, Portkey) and local LLMs (Ollama, vLLM, LM Studio) without code changes.
  • Pluggable Sandboxes: Run locally or isolate execution inside Docker, Podman, Bubblewrap, or Singularity.

Upstream Lineage & Attribution

Peen-SWE is forked and overhauled from peen (Princeton NLP / SWE-bench team). We extend the minimal core with full Model Context Protocol (MCP) integration, enhanced CLI workflows (peen), dedicated local model profiles, and an overhaul of tooling and documentation.

Core Workflows

Mode Entrypoint Description
Interactive Terminal peen Interactive REPL with confirmation, YOLO, and human takeover.
Benchmarking swebench Run batch evaluations on SWE-bench and ProgramBench.
Trajectory Browser inspector Web-based visual viewer for inspectable session step logs.
Python Library python_bindings Embed the agent in three lines of Python code.

Quick Navigation