Boundary
Lifecycle hooks use runtime-scoped credentials.
FRAMEWORK
Attach exact behavior context at agent lifecycle boundaries without turning Vira into the agent runtime or tool orchestrator.
EXECUTION BOUNDARY
IDENTITY PRESERVED
SUPPORTED OPERATIONS
resolve at agent start
carry returned context through the run
trace the agent result at agent end
preserve exact behavior identity for later review
IMPLEMENTATION HOOK
This example mirrors the repository documentation. The exact API contract remains in Docs and source.
const hooks = createOpenAIAgentsHooks(vira, {
context: { kind:"agent", host:{ name:"openai-agents", runtime:"node" }, modelTarget:{ provider:"openai", model:"your-model-id" } },
});
const context = await hooks.onAgentStart(resolveRequest);
const output = await runner.run(agent, input);
await hooks.onAgentEnd(context, output);SECURITY BOUNDARY
Lifecycle hooks use runtime-scoped credentials.
Publishing and high-impact control operations stay outside the agent runner.
LIMITATIONS