InfraLoka AcademyPathwayAI
PathwayAI

All terms

Kamus AI

Agent hook

Your own code that runs automatically at set points in an agent loop, for example before a tool is used.

A hook that runs before a tool is used can refuse a dangerous call, ask for approval or change the input. A hook that runs afterwards can write to an audit log. Its strength: a hook is ordinary code that always runs, not an instruction the model can ignore.

Also called: Agent hook, hook, hooks

Appears in 2 lessons