UNPKG

@openai/agents-core

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

43 lines (42 loc) • 2.1 kB
import type { Agent, AgentOutputType } from '../agent'; import { type RunState } from '../runState'; import type { SandboxRuntimeManager } from '../sandbox/runtime'; import type { SandboxMemoryAgentRunner } from '../sandbox/memory/generation'; import type { SandboxRuntimeModel } from '../sandbox/runtime/agentPreparation'; import type { Span } from '../tracing/spans'; import type { Trace } from '../tracing/traces'; import type { AgentInputItem } from '../types'; import type { ToolNameCollisionPolicy } from './runConfig'; export type SandboxMemoryPersistenceContext = { sdkSessionId?: () => Promise<string | undefined>; inputOverride?: () => string | AgentInputItem[] | undefined; }; export declare function prepareSandboxInterruptedTurnResume<TContext, TAgent extends Agent<TContext, AgentOutputType>>(args: { startingAgent: TAgent; state: RunState<TContext, TAgent>; sandboxRuntime: SandboxRuntimeManager<TContext>; runConfigModel?: SandboxRuntimeModel; toolNameCollisionPolicy?: ToolNameCollisionPolicy; tracingParent?: Span<any> | Trace; }): Promise<void>; export declare function finalizeSandboxRuntime<TContext>(args: { state: RunState<TContext, Agent<TContext, AgentOutputType>>; sandboxRuntime: SandboxRuntimeManager<TContext>; preserveSessionsForInterruption: boolean; finishAgentSpanForInterruption?: boolean; runError?: unknown; groupId?: string; memoryContext?: SandboxMemoryPersistenceContext; runAgent: SandboxMemoryAgentRunner; tracingParent?: Span<any> | Trace; }): Promise<void>; export declare function rehydrateInterruptedTurnExecutionTools<TContext, TAgent extends Agent<TContext, AgentOutputType>>(args: { startingAgent: TAgent; state: RunState<TContext, TAgent>; sandboxRuntime: SandboxRuntimeManager<TContext>; runConfigModel?: SandboxRuntimeModel; toolNameCollisionPolicy?: ToolNameCollisionPolicy; force?: boolean; tracingParent?: Span<any> | Trace; }): Promise<void>; export declare function isSandboxRuntimeAgent<TContext>(agent: Agent<TContext, AgentOutputType>): boolean;