Programming with Pixels (PwP)
Overview
Programming with Pixels (PwP) is a modern framework for evaluating and developing Software Engineering (SWE) agents that interact with computers as humans do - through visual perception and basic actions like typing and clicking.
Our motivating hypothesis is that achieving general-purpose Software Engineering (SWE) agents requires a shift to computer-use agents that can interact with any IDE interface through screenshots and primitive actions, rather than through specialized tool APIs.
Installation
Prerequisites
- Python 3.6+
- Docker
- (Optional) NVIDIA GPU with CUDA support
Using pip (Recommended)
pip install programming-with-pixels
Development Installation
git clone https://github.com/ProgrammingWithPixels/pwp.git
cd pwp
pip install -e .
Quick Start
from pwp import PwP
from pwp import PwPBench
# Create a basic environment
env = PwP(image_name='pwp_env')
# Take a screenshot
observation = env.render()
observation.save('screenshot.png')
# Execute a command
result = env.step("echo 'Hello, World!'")
print(result['output'])
# Try a benchmark task
bench = PwPBench('humaneval')
dataset = bench.get_dataset()
task_env = bench.get_env(dataset[0])
Command Line Interface
For quicker testing, PwP also comes with a convenient command-line interface:
# Start an environment
pwp env --vnc
# List available benchmark tasks
pwp list
# Run a benchmark
pwp bench humaneval
Examples
Check out the examples directory for demonstration scripts:
- Quickstart: Complete walkthrough of PwP's capabilities, including environment interaction, benchmarks, and advanced features
- Basic Demo: Simple environment setup and interaction showcase
- Demo2: Additional demonstration of PwP features
Benchmark Tasks
PwP-Bench comes with a wide range of benchmark tasks for evaluating agents:
- HumanEval: Python coding problems
- Design2Code: Converting design mockups to code
- ChartMimic: Recreating charts from visual references
- SWE-bench: Software engineering tasks
- And many more!
You will first need to setup benchmarks for evaluating agents. See the benchmark documentation for more details.
Evaluating Agents
For detailed examples, check out the agent implementations in the src/pwp/agents directory. Each agent type can be customized with different LLM backends and system prompts to optimize for various tasks.
Building Custom Environments
Build the Base Environment
# Build the base PWP environment
cd src/pwp/docker/
docker build -t pwp_env .
Custom Environment
You can create custom Docker environments by extending the base image:
FROM pwp_env
# Install additional dependencies
RUN apt-get update && apt-get install -y \
your-package-here \
&& rm -rf /var/lib/apt/lists/*
# Add custom files
COPY your-files /home/devuser/your-files
Package Structure
The PwP package consists of several modules:
pwp.env: Core environment module for managing Docker containerspwp.bench: Benchmark module with various programming taskspwp.agents: Agent implementations for solving taskspwp.utils: Utility functions for image processing and other helperspwp.tools: Tools for agent interaction with environmentspwp.functions: Function implementations for toolspwp.prompts: Prompt templates for different agent types
See the package documentation for more details on each module.
Contributing
We welcome contributions to the PwP project! Please see our contribution guidelines for more information.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use PwP in your research, please cite our paper:
@article{pwp2025,
title={Programming with Pixels: Computer-Use Meets Software Engineering},
author={Aggarwal, Pranjal and Welleck, Sean},
journal={arXiv preprint arXiv:2502.00000},
year={2025}
}
Acknowledgments
- This project builds on various open-source tools and libraries
- Thanks to all contributors who have helped shape the project
Release files for programming-with-pixels 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| programming_with_pixels-0.1.5.tar.gz | 60.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| programming_with_pixels-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 122.9 MB
Release files / programming_with_pixels-0.1.5.tar.gz
| Download URL | programming_with_pixels-0.1.5.tar.gz |
|---|---|
| Size | 60.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
727cce5a56700154ed8669f6f60f3aad0b8e0f2f72a0823f27b96fe1bf87db68
|
|
BLAKE2b-256 checksum How to use checksums |
e18466ba5de99a1a8e6a1e0f1cfa9730cdbb6cff8e2ffbaf3d452d9c5bbc5767
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / programming_with_pixels-0.1.5-py3-none-any.whl
| Download URL | programming_with_pixels-0.1.5-py3-none-any.whl |
|---|---|
| Size | 62.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26bdebec7016cc9c0ecbeb94a47e16d81396827953e427bd7cf72429d152de7c
|
|
BLAKE2b-256 checksum How to use checksums |
7001a93613c1de6f35fda6341036a24eb6b1f5bc66ab63b4fc348cd2e02bbc58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|