Skip to main content

Namespace: openaiAgents

Classes

Interfaces

Type Aliases

HostedToolCredentialsResolver

Ƭ HostedToolCredentialsResolver: (identity: HostedToolIdentity) => HostedToolCredentials | undefined | Promise<HostedToolCredentials | undefined>

Resolves the credentials for one hosted tool, Worker-side.

Called for every hosted tool that has somewhere to put a credential, on each model invocation, so a deployment that reads from a secret manager should cache. A hosted MCP tool needs a server label to be asked about; a shell tool needs a container_auto environment with a domain allowlist; a code interpreter needs an inline container definition with a domain allowlist — naming an existing container by id skips the callback even though that container may carry an allowlist of its own. Only the fields the Workflow left out are filled in; return nothing to leave a tool as the Workflow declared it.

A throw fails the model Activity, keeping whatever retryability it carries. The error's own message reaches Workflow history, so keep credentials out of it.

Type declaration

▸ (identity): HostedToolCredentials | undefined | Promise<HostedToolCredentials | undefined>

Parameters
NameType
identityHostedToolIdentity
Returns

HostedToolCredentials | undefined | Promise<HostedToolCredentials | undefined>


HostedToolIdentity

Ƭ HostedToolIdentity: { connectorId?: string ; name: string ; serverLabel: string ; serverUrl?: string ; tool: "hostedMcp" } | { allowedDomains: string[] ; name: string ; tool: "shell" } | { allowedDomains: string[] ; name: string ; tool: "codeInterpreter" }

The hosted tool a credential is being requested for, identified by the non-secret configuration the Workflow declared. A shell or code interpreter tool carries its own name; every tool hostedMcpTool() builds is named hosted_mcp, so serverLabel with serverUrl or connectorId is what separates two of those — two sharing both are indistinguishable here.


MCPServerProvider

Ƭ MCPServerProvider: StatelessMCPServerProvider | StatefulMCPServerProvider


SerializableModelActivityOptions

Ƭ SerializableModelActivityOptions: Omit<ModelActivityOptions, "summary"> & { summary?: string }

Plugin-side model Activity options propagated to Workflows via the __openai_agents_config header. The function form of summary is excluded because functions cannot survive JSON serialization.

Variables

DEDICATED_WORKER_FAILURE_TYPE

Const DEDICATED_WORKER_FAILURE_TYPE: "DedicatedWorkerFailure"

Error type for dedicated-Worker scheduling and heartbeat failures.