Video by Meta Open Source via YouTube

Coding agents are writing more Python than ever, but in large projects, generated code is prone to type errors. In this video, we walk through a few tips for getting your agent to use Pyrefly so that every piece of generated code gets type checked automatically.
In this video we cover two approaches:
1️⃣ Agent Skills – Set up skill files and AGENTS.md directives so your agent knows to run pyrefly check before finishing any task.
2️⃣ CLI Hooks – Configure hooks on the Stop event so type checking runs every time the agent completes a task, with no manual prompting required.
Type checking is in the sweet spot for agents: it’s fast enough to iterate on, robust enough to catch real issues, and actionable enough for an agent to fix on its own.
🔗 Links & Resources:
get started with pyrefly: pip install pyrefly
Pyrefly website: https://pyrefly.org
Blog post (full walkthrough with code examples): https://pyrefly.org/blog/pyrefly-agentic-loop/
#Pyrefly #TypeChecking #Python #CodingAgents #AI #DeveloperTools #StaticAnalysis #ClaudeCode #AgenticWorkflows