SWE Development Kit
Build Software Engineering agents locally with frameworks and tools of your choice
Overview
SWE Development Kit (swekit) is a powerful framework for building Software Engineering agents using Composio’s tooling ecosystem. It provides tools like Github, Repo Indexing, Repo Search, File Manager, Shell Manager, and more.
Key Features
- Agent Scaffolding: Quickly create Devin like agents that work out-of-the-box with popular agentic frameworks like CrewAI, LlamaIndex, and more.
- Flexible Workspace Environments: Operate your agents within a variety of secure and isolated environments including Docker, E2B, and FlyIO for security and isolation.
- Customizable Tools: Add or optimize your agent’s abilities with a variety of tools.
- Benchmarking: Evaluate your agents against the SWE-bench, a comprehensive benchmark for software engineering tasks.
Introduction to Key Concepts
- Workspace Environments: These are isolated and secure execution contexts where agents can be run. They ensure that agents operate in a controlled setting, which can be tailored for specific security or resource needs. Examples include containerized environments like Docker, virtualized environments like E2B, and cloud-based platforms like FlyIO.
- Custom Tools: These are specialized utilities or enhancements that can be integrated into your agent to extend its functionality or improve its performance. They can range from simple scripts to complex software packages.
- Benchmarks: Benchmarks are standardized tests that measure the performance and effectiveness of your agents. They provide a way to compare different agents and track improvements over time.
Getting Started
Installation
Begin by installing the core packages:
For additional functionality, install packages for your preferred framework (e.g., CrewAI):
Connect your Github Account
To utilize Github Issues as a task source, link your Github account as follows:
There are two ways to provide the GitHub access token for git clone:
- Set the environment variable
GITHUB_ACCESS_TOKEN='<git_access_token>'
. - Use the GitHub account connected to your toolset entity. However, this method has limitations:
- The agent won’t be able to push or create PRs.
- You need to set
export ALLOW_CLONE_WITHOUT_REPO='true'
.
Option 1 is recommended for full functionality.
Create a New Agent
Generate your agent’s scaffolding:
Argument | Description | Accepted Values |
---|---|---|
-f | Specifies the framework to use | crewai , langgraph |
-o | Sets the output directory for generated files | Any valid directory path |
Scaffold support for other frameworks coming soon!
This process will establish a new agent at swe_agent
with essential files:
main.py
: The main script to execute the agentagent.py
: The agent’s core definitionprompts.py
: Prompts to guide the agent’s actionsbenchmark.py
: A runner for the SWE-Bench benchmarksinput.py
: A helper file to take inputs from the usercustom_tools.py
: A file to add custom tools to the agent
Start Docker Server
To use Docker as the default workspace environment, ensure your Docker server is running
If you prefer to run the agent locally without Docker (Unsafe), modify the workspace configuration in agent.py
by setting the WorkspaceType.Docker()
to WorkspaceType.Host()
.
Run the Agent
To activate the agent, proceed to its directory and execute:
You will be prompted to specify the repository and issue for the agent to address.
Was this page helpful?