Skip to content

TurnHook

reference
1 min readUpdated

Kind: Interface

Source: atloria-monorepo/libs/agent-core/src/runtime/types.ts

Hook invoked before each model call within the agent loop. Allows domain layers to:

  • Inject runtime state into instructions (turn budget, progress, tool result summaries)
  • Monitor context pressure and warn the agent
  • Track turn progression

Implemented by domain layers (e.g., PmeTurnHook), wired in agent-runtime.ts via the SDK's callModelInputFilter.

Was this page helpful?

Download as PDF