Introducing two features to the OpenRouter Agent SDK: lifecycle hooks and async tools! If you aren't familiar, the Agent SDK is our toolkit for building agentic applications with OpenRouter. These two additions allow to build even more robust AI workflows.
Lifecycle hooks let you take specified actions at fixed points in the callModel loop. Block destructive commands, track token usage and cost, redact secrets from prompts, or mutate tool arguments before execution.
Full hook list and more info on how to use them in the docs: https://t.co/f4Ri4NqxGi
Hooks provide an enforcement point for policy inside the rather than around it, and deferred tools let a run pause for human review and resume from a webhook hours later in another process.
Checking sign-in…
Loading comments…