import { Agent, RunContext } from '@openai/agents'; interface UserContext { name: string; } function buildInstructions(runContext: RunContext) { return `The user's name is ${runContext.context.name}. Be extra friendly!`; } const agent = new Agent({ name: 'Personalized helper', instructions: buildInstructions, });