Example run · Full path
One run, start to finish.
A feature request goes down the full path: a question, a plan, three tasks in their own worktree, and a review. An illustrative run, shortened. Real runs print more.
How it works
A request, a classifier, three paths.
A classifier reads each request and picks one of three fixed workflows. Each workflow is a LangGraph graph, so a run always takes the same steps for the same kind of request, and a small change never pays for a big one's process.
Answer
A question or a diagnosis.
It reads a snapshot of your working tree. No branch, no commits.
Quick
A small, well-specified change.
Up to three reviews, each followed by a fix. If a fix fails its tests, Phil offers the full path.
Full
A feature, a refactor, design work or a broad project.
Planned, critiqued and approved before any code is written. Design options on request.
Decisions
Five decisions.
The choices that shape the experiment, and what we saw.
FIG 0.1
01 · Routing
A classifier picks the workflow
A small decision model, TypeSafe Jev, sorts each request into a path. If Jev is unavailable, your low model does it.
Deciding whether you asked a question or want a refactor is a classification problem. It doesn't need a large chat model.
What we saw: In the 2026-10-06 benchmark, Jev routed 50 cases with no wrong-path or unsafe routes, about 12× faster than the low model at p95 and about 4× cheaper.
FIG 0.2
02 · Models
Two tiers, plus vision
A high tier for judgement (architect, critic, reviewer) and a low tier for doing the work (implementer, tester). An optional vision model reads images only when an agent's own model can't. Each tier can come from OpenRouter, OpenAI, Anthropic, Google, Ollama, or an OpenAI-compatible endpoint.
Most of a run is routine work. Paying for the most capable model on every step spends the most where it helps the least.
FIG 0.3
03 · Structure
A fixed graph, not a free-roaming agent
Each workflow is a LangGraph graph. Its steps hand the next one a contract it can check, and state is checkpointed in SQLite.
A run that always takes the same steps is easier to predict, to measure and to debug, and a stopped run resumes where it left off.
FIG 0.4
04 · Context
Context kept small
Sub-agents return short answers instead of their whole search. Repeated history is prompt-cached on Anthropic models; other vendors cache on their own. Skills load only for the stages they help.
Most tokens in a long run are the same context sent again. Sending less, and paying less for what repeats, is where the savings are.
What we saw: With prompt caching on, 68% of the architect's input came from the cache, and its cost on the same goal fell from $0.38 to $0.21.
FIG 0.5
05 · Security
Agent shells never see your keys
Key and token variables are removed from every command an agent runs, code those commands run can't read a stored key through keyring, and commands with shell operators are rejected.
An agent that can run shell commands is one prompt injection away from reading your keys. This doesn't stop a malicious test from reaching the OS keychain directly, so review what agents add.
Install · Three commands
Install it and point it at a repo.
Phil needs Python 3.14, which uv installs for you if it's missing. Run phil setup once to pick a provider and models, then run phil in any git repo.
01 · Install
From PyPI, with uv (or pipx install phil-agent):
uv tool install phil-agent02 · Set up
Pick a provider and a model for each tier. Your key goes in the OS key store.
phil setup03 · Run
Start a chat in any git repo:
phil