Supporting both local and cloud LLMs, with autopilot mode and extensible tools.
PatchPal is an AI coding agent that helps you build software, debug issues, and automate tasks. It supports agent skills, tool use, and executable Python generation, enabling interactive workflows for tasks such as data analysis, visualization, web scraping, API interactions, and research with synthesized findings.
Most agent frameworks are built in TypeScript. PatchPal is Python-native, designed for developers who want both interactive terminal use (patchpal) and programmatic API access (agent.run("task")) in the same tool—without switching ecosystems.
Key Features
- Terminal Interface for interactive development
- Python SDK for flexibility and extensibility
- Built-In and Custom Tools
- Skills System and MCP Integration
- Autopilot Mode using Ralph Wiggum loops
- Project Memory automatically loads project context from
~/.patchpal/repos/<repo-name>/MEMORY.mdat startup.
PatchPal prioritizes customizability: custom tools, custom skills, a flexible Python API, and support for any tool-calling LLM.
Full documentation is here.
$ pip install patchpal # install
$ patchpal # startPlatform support: Linux, macOS, and Windows are all supported
-
Install:
pip install patchpal -
Get an API key or a Local LLM Engine:
- [Cloud] For Anthropic models (default): Sign up at https://console.anthropic.com/
- [Cloud] For OpenAI models: Get a key from https://platform.openai.com/
- [Local] For vLLM: Install from https://docs.vllm.ai/ (free - no API charges) Recommended for Local Use
- [Local] For Ollama: Install from https://ollama.com/ (
⚠️ requiresOLLAMA_CONTEXT_LENGTH=32768- see Ollama section below) - For other providers: Check the LiteLLM documentation
-
Set up your API key as environment variable:
# For Anthropic (default)
export ANTHROPIC_API_KEY=your_api_key_here
# For OpenAI
export OPENAI_API_KEY=your_api_key_here
# For vLLM - API key required only if configured
export HOSTED_VLLM_API_BASE=http://localhost:8000 # depends on your vLLM setup
export HOSTED_VLLM_API_KEY=token-abc123 # optional depending on your vLLM setup
# For Ollama, no API key required
# For other providers, check LiteLLM docs- Run PatchPal:
# Use default model (anthropic/claude-sonnet-4-5)
patchpal
# Use a specific model via command-line argument
patchpal --model openai/gpt-5.2-codex # or openai/gpt-5-mini, anthropic/claude-opus-4-5, etc.
# Use vLLM (local)
# Note: vLLM server must be started with --tool-call-parser and --enable-auto-tool-choice
export HOSTED_VLLM_API_BASE=http://localhost:8000
export HOSTED_VLLM_API_KEY=token-abc123
patchpal --model hosted_vllm/openai/gpt-oss-120b
# Use Ollama (local - requires OLLAMA_CONTEXT_LENGTH=32768)
export OLLAMA_CONTEXT_LENGTH=32768
patchpal --model ollama_chat/gpt-oss:120b
# Or set the model via environment variable
export PATCHPAL_MODEL=openai/gpt-5.2
patchpalTip for Local Models: Local models (i.e., models served by Ollama or vLLM) may work better with these settings:
PATCHPAL_MINIMAL_TOOLS=trueandPATCHPAL_ENABLE_WEB=false- For models with function calling: Provides only essential tools (read_file,read_lines,write_file,edit_file,run_shell), reducing tool confusionPATCHPAL_REACT_MODE=true- For models without function calling: Enables text-based tool invocation (see ReAct mode docs)- For Ollama, additionally setting
PATCHPAL_STREAM_OUTPUT=falsemay help with tool call reliability
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.
There are so many coding agent harnesses. Why build yet another one?
- Most agent harnesses are 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.
Full documentation is available here.

