What Programming Languages Are Used in Open-SWE? A Complete Technical Breakdown
Open-SWE is primarily a Python project, with all executable agent logic, utilities, and tests implemented in Python, while supporting infrastructure uses Dockerfile, YAML, JSON, Makefile, and Markdown.
The langchain-ai/open-swe repository is an open-source software engineering agent framework designed to automate coding tasks. Understanding the programming languages used in Open-SWE is essential for contributors who want to extend its capabilities or integrate it into existing development workflows.
Primary Programming Language: Python
Python is the sole programming language used for executable logic in Open-SWE. The codebase follows modern Python patterns, utilizing type hints and async/await syntax throughout the agent implementation, utility modules, and test suite.
Core Agent Implementation
The entry point for the agent web service resides in agent/webapp.py, which creates a FastAPI application using the create_app() function. This module wires together middleware, tools, and routes to expose the agent capabilities as a web service.
# File: agent/webapp.py
from fastapi import FastAPI
from agent.server import create_app
app: FastAPI = create_app()
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
Utility Modules and Tool Integrations
Helper functions for external service integrations are organized under agent/utils/. For example, agent/utils/slack.py provides the post_message() async function for Slack notifications, while agent/tools/github_comment.py implements the github_comment() tool that agents invoke to respond to GitHub issues.
# File: agent/utils/slack.py
from .auth import get_slack_token
async def post_message(channel: str, text: str) -> bool:
token = await get_slack_token()
# The actual HTTP call is performed by the Slack client library.
return await slack_client.chat_postMessage(token=token, channel=channel, text=text)
# File: agent/tools/github_comment.py
from ..utils.github import comment_on_issue
async def github_comment(issue_id: str, comment: str) -> None:
await comment_on_issue(issue_id, comment)
Testing Framework
The tests/ directory contains a comprehensive pytest suite covering Slack integrations, GitHub tools, sandbox utilities, and multimodal processing. All test files use the .py extension and import from the main agent package, ensuring consistent Python usage across the entire test surface.
Supporting Configuration and Infrastructure Languages
While Python handles all executable logic, Open-SWE employs several domain-specific languages and formats for deployment, automation, and configuration.
Containerization with Dockerfile
The repository includes a Dockerfile that defines the container image for reproducible deployments and CI pipeline execution. This ensures consistent Python environment setup across development and production without requiring additional programming languages.
CI/CD Automation with YAML
GitHub Actions workflows reside in .github/workflows/ and use YAML syntax. The ci.yml file orchestrates linting, testing, and type checking pipelines that validate Python code quality on every pull request.
Build Automation with Makefile
A Makefile provides convenient shortcuts for common development tasks such as running tests, building Docker images, and executing linting commands without memorizing complex CLI arguments.
Configuration Files: JSON
JSON files including langgraph.json and opencode.json store structured configuration data consumed by the agent framework. These define graph structures and tool registries that the Python code loads at runtime.
Documentation with Markdown
Human-readable documentation uses Markdown (.md) files including README.md, INSTALLATION.md, SECURITY.md, and CUSTOMIZATION.md. While not executable code, these are essential for project onboarding and contributor guidelines.
Key Source Files by Language
The following table maps critical file paths to their respective languages in the Open-SWE codebase:
| File Path | Language | Purpose |
|---|---|---|
agent/webapp.py |
Python | FastAPI application entry point |
agent/utils/slack.py |
Python | Slack integration utilities |
agent/tools/github_comment.py |
Python | GitHub commenting tool implementation |
agent/middleware/ensure_no_empty_msg.py |
Python | Message filtering middleware |
tests/*.py |
Python | pytest test suite |
Dockerfile |
Dockerfile | Container image definition |
.github/workflows/ci.yml |
YAML | Continuous integration pipeline |
Makefile |
Makefile | Build automation commands |
langgraph.json |
JSON | Agent graph configuration |
README.md |
Markdown | Project documentation |
Summary
- Python is the sole programming language used for executable logic in Open-SWE, powering the agent framework, utilities, tools, and tests.
- Dockerfile, YAML, Makefile, JSON, and Markdown provide supporting infrastructure for containerization, CI/CD, build automation, configuration, and documentation.
- Core implementation files include
agent/webapp.pyfor the web server,agent/utils/slack.pyfor integrations, andagent/tools/github_comment.pyfor GitHub automation. - All testing is implemented in Python using pytest within the
tests/directory.
Frequently Asked Questions
Is Open-SWE written entirely in Python?
Yes, all executable logic in Open-SWE is implemented in Python. While the repository includes configuration files in YAML and JSON, build scripts using Makefile syntax, and documentation in Markdown, the core agent functionality, utilities, and tools are exclusively Python modules.
What Python version does Open-SWE require?
The repository uses modern Python patterns including type hints and async/await syntax throughout the codebase. While the specific minimum version isn't explicitly stated in the source files, the use of contemporary Python features suggests compatibility with Python 3.9 or later, which is standard for FastAPI and modern async libraries.
Does Open-SWE use any domain-specific languages for configuration?
Yes, Open-SWE employs JSON for agent graph configuration via langgraph.json and opencode.json, which define the structure and tool registries consumed by the Python runtime. Additionally, YAML is used for GitHub Actions CI/CD workflows, and Makefile syntax handles build automation commands.
Are there any compiled languages or extensions in the repository?
No, the repository does not contain any compiled languages such as C, C++, Rust, or Go. Open-SWE is a pure Python project with no native extensions or compiled dependencies within the source tree itself, relying instead on containerization via Dockerfile for environment management.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →