PatchPal — A Python-Native AI Coding and Automation Agent¶

Batteries-included by default, lightweight when you need it. Runs on local and small-context models, sandboxed on Linux, macOS, and Windows. Use it from the terminal or as a Python SDK.
PatchPal is a Python-native AI coding agent harness that helps you build software, debug issues, and automate tasks. You can use it interactively through the terminal UI (patchpal) or headless through the Python SDK (agent.run("task")). It supports agent skills, tool use, and generating and running Python code, enabling interactive workflows for tasks such as data analysis, visualization, web scraping, API interactions, and research with synthesized findings. It was originally designed for working with private data (e.g., via local models or AWS GovCloud Bedrock) and on resource-constrained machines.
Batteries-included, or lightweight when you need it. Out of the box, PatchPal includes built-in tools for file editing, shell commands, code analysis, web search, browser automation, and task planning. It also supports skills, MCP, and autopilot, and installs as a single Python package. For local or small-context models, TinyAgent automatically slims down to five core tools plus optional web tools, with a compact system prompt, handoff compaction, and selective file reading. On larger windows, PATCHPAL_MINIMAL_TOOLS=true gives a similar reduced toolset.
Key Features
- Local Models with small-context-window support (TinyAgent) and ReAct mode
- Sandbox Mode for secure container isolation with network restrictions on Linux, macOS, and Windows
- Python SDK for flexibility and extensibility
- Built-in and Custom Tools
- Terminal Interface for interactive development
- Browser Automation for interactive web tasks, form filling, and JavaScript-heavy sites
- Skills System and MCP Integration
- Autopilot Mode using Ralph Wiggum loops
Quick Start¶
Model support: Any LiteLLM-supported model can be used. Platform support: Linux, macOS, and Windows are all supported
Beyond Coding: General Problem-Solving¶
While originally designed for software development, PatchPal is also a general-purpose assistant. With web search, file operations, shell commands, and custom tools/skills, it can help with research, data analysis, document processing, log file analyses, etc.

FAQ¶
There are so many coding agent harnesses. Why build yet another one?
- Most agent harnesses are built in TypeScript. We wanted something in Python that we could easily extend for our custom workflows.
- PatchPal includes a unique guardrails system that is better suited to privacy-conscious use cases involving sensitive data.
- We needed an agent harness that seamlessly works with both local and cloud models, including AWS GovCloud Bedrock models.
On Windows Subsystem for Linux (WSL), why is it stalling intermittently at "Thinking..."?
This is a known issue with WSL2.
Try examining and then lowering the mtu: