Intro
Petsitter sits between the tools you already use and the AI provider they talk to.
That's really all it is: a small thing running on your own machine that requests pass through on their way out, and replies pass through on their way back. Your tools don't need to know it's there, and nothing about the way you work has to change.
Once something is sitting in the middle, a few things become possible:
-
You can see what's actually being sent. Every request and every reply, as it happens. Most of the time you'll never think about this — right up until something behaves oddly and you'd really like to look. (see how)
-
You can help a model along. Some models are shaky at tool calling, or hand back JSON that doesn't quite parse. Petsitter can smooth that over in the middle, so you don't have to change your tools or go find a bigger model. (see how)
-
You can keep private things private. API keys and personal details can be taken out before anything leaves your machine. (see how)
None of it is on until you turn it on, and you can take it back out whenever you like — point your tool back where it was and it's as if petsitter had never been there.
uvx petsitter
Nothing else to set up. Have a look around, and if none of it is useful, no harm done.
A bit more precisely
Petsitter is an OpenAI-compatible proxy that layers smart harnesses on top of language models to give them capabilities they don't natively have. It also makes finicky behaviors reliable and dependable.
You install it, point it at a model, load a few example tricks, and suddenly things that model couldn't do before such as tool calling, structured JSON, multi-step reasoning start working. You can also protect secrets, have memory, share server instances across harnesses, and extend the tool trivially.
The built-in tricks are starting points. Tweak them, combine them, or use them as a reference to build something entirely different. Petsitter isn't a turnkey product; it's a kit.
How It Works
Petsitter intercepts every request/response pair and runs it through a pipeline of hooks. Each trick picks which hooks it needs:
system_prompt- Inject instructions before the model sees the conversationpre_hook- Modify messages or inject tool definitions before the API callpost_hook- Validate, retry, or transform the model's responseinfo- Declare capabilities back to your application
Tricks also have lifecycle hooks (install, startup, shutdown, uninstall) for managing resources across their lifetime.
A trick can be as simple as appending a sentence to the system prompt, or as involved as routing subtasks to three different models in parallel. There's a GUI at / with tabs for managing tricksets and their tricks (Tricks / Models / Agents), a live activity log (Logs), and per-trickset logging configuration (Settings).
The Tricks tab lists your local tricks/*.py alongside community tricks published by other people, and the speech-bubble button in the header opens a Try It panel that sends a message through the pipeline so you can watch which tricks fire.
You can also edit tricks, reorder them, disable, add new ones, and filter them:
Petsitter is part of the DAY50 suite of open-source tools for local AI workflows and constructing better agents.
The core goals of Petsitter are:
- No model changes required - Works with any OpenAI-compatible endpoint
- Pluggable architecture - Write your own tricks in Python. (Skills are included in
.agents) - Transparent to your app - Point your existing code at petsitter instead of the model
- Mix and match - Combine multiple tricks for compound effects
Quick Start
Quickest way:
$ uvx petsitter
Or you can do one off invocation:
# Run petsitter, reading settings from the default config file
# (~/.config/petsitter/config.json, or $PET_CONFIG_DIR)
petsitter -l localhost:8080
# Or point at a specific config file (model, tricksets, etc. all live there)
petsitter -c another_petsitter_config.conf.json -l localhost:8080
Configure the upstream model, tricksets, and modelset via the dashboard at http://localhost:8080 or the pet CLI — everything is persisted to the config file, so a plain petsitter starts the same way next time. pet accepts the same -c flag (before the subcommand, e.g. pet -c another_petsitter_config.conf.json ls) so both tools can target the same config area.
Either way, now you can point your AI applications to http://localhost:8080/v1 and you're going through the petsitter middleware.
Try It
The speech-bubble button in the header opens a conversation panel docked over the dashboard. Type a message and it goes through chat_completions() exactly as a real client's would: same trickset matching, same keyword gating, same hooks, same upstream. It is not a simulation.
What comes back with each reply:
- A pill per trick. Bright means it changed something, and the tooltip lists the stages it ran (
Ran: system_prompt, post_hook). Dim means it was loaded but did nothing. - Why a trick stayed quiet. A keyword-gated trick that didn't fire reads
Did not fire, needs keyword: banana. - Timing and tokens, next to the trickset that handled it.
- The rows light up. Tricks that actually did something pulse in the Loaded Tricks list, so you can watch a reorder or a config change take effect.
Drag the panel by its header to move it, drag its corner to resize, and ⇲ snaps it back to the bottom right. Whether it's open, where it sits, and the conversation itself are all remembered across refreshes.
It targets whichever trickset is selected in the pill bar, so switching tricksets switches what you're testing.
Documentation
- What each bundled trick does — The tricks that ship with petsitter, what each one is for, and how to turn it on.
- Writing your own trick — The four hooks, the data each one gets, and the lifecycle around them.
- Tricksets and routing — Grouping tricks, and deciding which requests they apply to.
- Connecting your coding tools — Pointing Claude Code, Codex and opencode at petsitter, and putting them back.
- Model configuration — Naming upstream models so tricks can reach more than one.
- Command line reference — petsitter's flags and the pet subcommands.
- Community tricks — Installing tricks other people wrote, and publishing your own.
- Proxy behaviour — Host override, the config diagnostic, and the HTTP surface petsitter serves.
- When things go wrong — Known rough edges and how they show up.
- Working on petsitter — Running the tests, and driving petsitter from other code.
License
MIT
Metadata
Release files for petsitter 0.8.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| petsitter-0.8.4.tar.gz | 1.7 MB | Without provenance | Details for petsitter-0.8.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| petsitter-0.8.4-py3-none-any.whl | Python 3 | none | any | Details for petsitter-0.8.4-py3-none-any.whl |
Total release size: 3.3 MB
Release files / petsitter-0.8.4.tar.gz
| Download URL | petsitter-0.8.4.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d33d75ff89604a1b577086a817b25cb33cb4f55ae2b43db06a3deb05a86dc4a
|
|
BLAKE2b-256 checksum How to use checksums |
dc06afbf5b3b04f877c155ca838e03e8ebd057495bc9497fbbe7025fd7c7aa49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / petsitter-0.8.4-py3-none-any.whl
| Download URL | petsitter-0.8.4-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d182380e28d9af1b40b35f138b9e902971a961bbee19a86430a1d09dabfc5704
|
|
BLAKE2b-256 checksum How to use checksums |
e9806f45db448e67557ee04f38a8a2767a9b893b368504bc8210ad24623dda14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for petsitter 0.8.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.