Catch type bugs in code your AI agent writes
Install Pyrefly
$ pip install pyrefly && pyrefly initTell your agent to use it
Add a skill file so your agent runs
pyrefly checkbefore it calls a task done, or a Stop hook if it needs more convincing. Read the setup guide.Let it fix what Pyrefly finds
Errors come back fast and specific enough to act on, so your agent can correct itself and re-check before the code ever reaches you.
Works where you or your agent writes Python
Performance Comparison
Type checking the PyTorch codebase from scratch.ⓘTested using Macbook
(10 cores: 8 performance + 2 efficiency cores, 32 GB RAM)
(10 cores: 8 performance + 2 efficiency cores, 32 GB RAM)
PyreflyⓘCommand: "pyrefly check"
Pyrefly uses as many threads as possible
Pyrefly uses as many threads as possible
PyrightⓘCommand: "pyright --threads=8"
8 threads yielded the best performance after testing multiple settings
8 threads yielded the best performance after testing multiple settings
MyPyⓘCommand: "dmypy run"