Skip to content

agent-playground / Exports

agent-playground

Table of contents

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

TBlockCollectionEvent

Ƭ TBlockCollectionEvent: { type: "block_added" ; block: IBlockMessage } | { type: "block_updated" ; blockId: string ; updates: Partial<IBlockMetadata> } | { type: "block_removed" ; blockId: string } | { type: "blocks_cleared" }

Block collection events for real-time updates

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:258


TBlockCollectionListener

Ƭ TBlockCollectionListener: (event: TBlockCollectionEvent) => void

Block collection listener

Type declaration

▸ (event): void

Parameters
NameType
eventTBlockCollectionEvent
Returns

void

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:267


TPlaygroundEventName

Ƭ TPlaygroundEventName: "user_message" | "assistant_response" | "tool_call_start" | "tool_call_complete" | "tool_call_error" | "execution_start" | "execution_complete" | "execution_error"

Defined in

agent-playground/src/lib/playground/plugins/playground-history-plugin.ts:6


TPlaygroundProvider

Ƭ TPlaygroundProvider: "openai" | "anthropic" | "google"

Defined in

agent-playground/src/lib/playground/project-manager.ts:16


TPlaygroundMode

Ƭ TPlaygroundMode: "agent"

Defined in

agent-playground/src/lib/playground/robota-executor-types.ts:58


TPlaygroundUiErrorKind

Ƭ TPlaygroundUiErrorKind: "user_message" | "recoverable" | "fatal"

Defined in

agent-playground/src/lib/playground/robota-executor-types.ts:60


TPlaygroundWebSocketEventPayload

Ƭ TPlaygroundWebSocketEventPayload: IPlaygroundWebSocketMessage | IPlaygroundWebSocketAuthenticatedEvent | IPlaygroundWebSocketConnectionEvent | IPlaygroundWebSocketErrorEvent

Defined in

agent-playground/src/lib/playground/websocket-client.ts:56


TPlaygroundWebSocketEventHandler

Ƭ TPlaygroundWebSocketEventHandler: (payload: TPlaygroundWebSocketEventPayload) => void

Type declaration

▸ (payload): void

Parameters
NameType
payloadTPlaygroundWebSocketEventPayload
Returns

void

Defined in

agent-playground/src/lib/playground/websocket-client.ts:62


TPlaygroundWebSocketMessageKind

Ƭ TPlaygroundWebSocketMessageKind: "playground_update" | "auth" | "ping" | "pong"

Discriminant values for playground WebSocket message types.

Defined in

agent-remote/dist/browser/browser.d.mts:176

Variables

PLAYGROUND_WS_MESSAGE_TYPES

Const PLAYGROUND_WS_MESSAGE_TYPES: Object

Type declaration

NameType
PLAYGROUND_UPDATE"playground_update"
AUTH"auth"
PING"ping"
PONG"pong"

Defined in

agent-playground/src/lib/playground/websocket-client.ts:19


PLAYGROUND_WS_CLIENT_EVENTS

Const PLAYGROUND_WS_CLIENT_EVENTS: Object

Type declaration

NameType
AUTHENTICATED"authenticated"
CONNECTION"connection"
ERROR"error"
PLAYGROUND_UPDATE"playground_update"

Defined in

agent-playground/src/lib/playground/websocket-client.ts:26

Functions

createBlockTrackingHooks

createBlockTrackingHooks(blockCollector, logger?, options?): IToolHooks

Create block tracking hooks that implement the universal IToolHooks interface This connects the SDK's universal hook system to the web app's block visualization

Parameters

NameTypeDefault valueDescription
blockCollectorIBlockDataCollectorundefinedThe block collector instance
loggerILoggerSilentLoggerOptional logger for debugging
optionsObject{}Additional configuration options
options.parentBlockId?stringundefinedParent block ID for nested tool calls
options.level?numberundefinedLevel for hierarchical nesting
options.blockTypeMapping?Record<string, TBlockKind>undefinedCustom block type mapping

Returns

IToolHooks

Defined in

agent-playground/src/lib/playground/block-tracking/block-hooks.ts:43


createDelegationTrackingHooks

createDelegationTrackingHooks(blockCollector, logger?, options?): IToolHooks

Create delegation tracking hooks for team agent scenarios Tracks when agents delegate tasks to other agents

Parameters

NameTypeDefault value
blockCollectorIBlockDataCollectorundefined
loggerILoggerSilentLogger
optionsObject{}
options.parentBlockId?stringundefined
options.level?numberundefined

Returns

IToolHooks

Defined in

agent-playground/src/lib/playground/block-tracking/block-hooks.ts:309


validatePlaygroundConfig

validatePlaygroundConfig(): IPlaygroundConfig

Validate and parse playground configuration from environment variables

Returns

IPlaygroundConfig

Defined in

agent-playground/src/lib/playground/config-validation.ts:24


getPlaygroundConfig

getPlaygroundConfig(): IPlaygroundConfig

Get playground configuration with validation

Returns

IPlaygroundConfig

Defined in

agent-playground/src/lib/playground/config-validation.ts:69


isFeatureEnabled

isFeatureEnabled(feature): boolean

Check if playground feature is enabled

Parameters

NameType
feature"remoteExecution" | "streaming" | "tools"

Returns

boolean

Defined in

agent-playground/src/lib/playground/config-validation.ts:76


validateFirebaseConfig

validateFirebaseConfig(): Object

Validate Firebase configuration for playground

Returns

Object

NameType
validboolean
missingVarsstring[]

Defined in

agent-playground/src/lib/playground/config-validation.ts:84


logConfigurationStatus

logConfigurationStatus(): void

Development helper to log configuration status

Returns

void

Defined in

agent-playground/src/lib/playground/config-validation.ts:108


generateDemoExecutionData

generateDemoExecutionData(blockCollector): void

Generate demo execution data for testing the tree visualization

Parameters

NameType
blockCollectorIPlaygroundBlockCollector

Returns

void

Defined in

agent-playground/src/lib/playground/demo-execution-data.ts:21


generateComplexDemoData

generateComplexDemoData(blockCollector): void

Generate a second demo scenario - Complex multi-tool execution

Parameters

NameType
blockCollectorIPlaygroundBlockCollector

Returns

void

Defined in

agent-playground/src/lib/playground/demo-execution-data.ts:300


createPlaygroundSandbox

createPlaygroundSandbox(config, transformCode): Object

Create a sandbox environment for secure code execution

Parameters

NameType
configIPlaygroundConfig
transformCode(code: string, config: IPlaygroundConfig) => string

Returns

Object

NameType
execute(code: string) => Promise<{ result: TUniversalValue ; logs: string[] }>
cleanup() => void

Defined in

agent-playground/src/lib/playground/remote-injection-sandbox.ts:20


injectRemoteExecutor

injectRemoteExecutor(userCode, config): string

Transform user code to inject RemoteExecutor into all AI providers

Parameters

NameType
userCodestring
configIPlaygroundConfig

Returns

string

Defined in

agent-playground/src/lib/playground/remote-injection.ts:35


generateMockEnvironment

generateMockEnvironment(): Record<string, string>

Returns

Record<string, string>

Defined in

agent-playground/src/lib/playground/remote-injection.ts:128


requiresTransformation

requiresTransformation(code): boolean

Parameters

NameType
codestring

Returns

boolean

Defined in

agent-playground/src/lib/playground/remote-injection.ts:137


previewTransformation

previewTransformation(code, config): Object

Parameters

NameType
codestring
configIPlaygroundConfig

Returns

Object

NameType
originalstring
transformedstring
changesstring[]

Defined in

agent-playground/src/lib/playground/remote-injection.ts:147


extractProviderInfo

extractProviderInfo(code): Object

Parameters

NameType
codestring

Returns

Object

NameType
providersstring[]
modelsstring[]
hasToolsboolean
hasPluginsboolean

Defined in

agent-playground/src/lib/playground/remote-injection.ts:165


PlaygroundApp

PlaygroundApp(props): React.ReactElement

Parameters

NameType
propsObject
props.defaultServerUrl?string

Returns

React.ReactElement

Defined in

agent-playground/src/playground/components/PlaygroundApp.tsx:278


PlaygroundDemo

PlaygroundDemo(): JSX.Element

PlaygroundDemo

No-login demo page component. This intentionally does not call any LLM providers. It renders deterministic demo execution data using the block-tracking visualizer.

Returns

JSX.Element

Defined in

agent-playground/src/playground/components/PlaygroundDemo.tsx:12

Released under the MIT License.