Heisentools: let an agent rewrite a mock.py until it mirrors any real tool's API

kieranklaassen · x · 2026-10-16

A playful but practical technique called "Heisentools" (borrowing kyle kukshtel's heisenfunction idea + autoresearch): stand up a fake service and have an AI agent rewrite mock.py until it mirrors the real tool calls it has observed and extrapolates to new ones. In the fakeslack example, mock.py answers the agent under test directly — no model runs, no real Slack touched — while a calibration loop scores its answers against recorded real replies and rewrites on low scores. This avoids rate limits, context drift, and polluting your database when testing agents. Tested on real Slack messages; works for any service (fakegmail, fakegithub...).

Original post →

More from coding & agent

coding & agent channel →