FRAMEWORK

OpenAI Agents

Attach exact behavior context at agent lifecycle boundaries without turning Vira into the agent runtime or tool orchestrator.

EXECUTION BOUNDARY

Vira resolves at the selected agent lifecycle boundary and records the resulting execution afterward. Agent planning, tools, handoffs, and runner semantics remain in the agent framework.

IDENTITY PRESERVED

Keep the behavior identity attached to the host framework.

  • agent-start resolve identity
  • Behavior Point
  • exact behavior revision
  • trace identity

SUPPORTED OPERATIONS

Use Vira where the control boundary actually belongs.

  1. 01

    resolve at agent start

  2. 02

    carry returned context through the run

  3. 03

    trace the agent result at agent end

  4. 04

    preserve exact behavior identity for later review

IMPLEMENTATION HOOK

Keep the host runtime native.

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

Integration does not equal authority.

Boundary

Lifecycle hooks use runtime-scoped credentials.

Boundary

Publishing and high-impact control operations stay outside the agent runner.

LIMITATIONS

State what the adapter does not control.

  • Vira does not become the agent planner.
  • Fail-open metadata-only traces cannot become authoritative Teach evidence.
  • Agent tool authority still requires explicit registry/control semantics.

Use the integration guide for the exact runtime contract.