event → hook → outcome → action
Your harness. Your rules.
A hook engine for Pi giving you control. Start with a ready-made library or define your own, and install either one from GitHub. Build hooks for yourself, your team or the world!
Config in .pi/hookit.json · managed from /hooks
tool_call
pass / block
Pi · before a tool runs
tool_result
pass / patch
Pi · after a tool returns
turn_end
pass / report
Pi · at the end of a turn
agent_end
pass / report
Pi · after the agent loop ends
agent_settled
pass / report
Pi · when the agent settles
session_before_switch
pass / cancel
Pi · before a session switch
session_before_fork
pass / cancel
Pi · before a session fork
hook_result
pass / report
HooKit · once per originating result
A Hook subscribes to one Event. Pi emits the seven Native Events; HooKit projects
hook_result once for each originating Hook Result. The Native Event Outcome is frozen before owned Actions and reactive Hooks run. Events referenceStart here
Reference
field-by-field · schema-backedThe contract behind every field in schema.json.
what do you want to do?
⚠Block a dangerous commandtutorial→⌘Subscribe to the right Eventreference→▶Pick an Action for an outcomereference→◈Review the trust boundaryconcept→
Browse the full Reference→