Index Ai Academy
Glossary · Phase 10 · Agent harnesses

Lifecycle hook

Also written: lifecycle hooks, PreToolUse, PostToolUse

Code a harness runs at a set moment, such as before or after each tool call. It can block, change or add to what happens.

Try it now

Prompts ask, and hooks enforce.

Learn it properly

Hooks and skills · Extend a harness at lifecycle events, and load know-how on demand. About 35 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write