Skip to content

playground / Exports / PlaygroundStatisticsPlugin

Class: PlaygroundStatisticsPlugin

PlaygroundStatisticsPlugin

Standalone recorder for Playground metrics. This is intentionally not coupled to the SDK plugin system; it just stores metrics for the Playground UI.

Table of contents

Constructors

Methods

Constructors

constructor

new PlaygroundStatisticsPlugin(options?, logger?): PlaygroundStatisticsPlugin

Parameters

NameTypeDefault value
optionsIPlaygroundStatisticsOptions{}
loggerAbstractLoggerSilentLogger

Returns

PlaygroundStatisticsPlugin

Defined in

playground/src/lib/playground/plugins/playground-statistics-plugin.ts:26

Methods

recordPlaygroundExecution

recordPlaygroundExecution(result): Promise<void>

Parameters

NameType
resultIPlaygroundExecutionResult

Returns

Promise<void>

Defined in

playground/src/lib/playground/plugins/playground-statistics-plugin.ts:59


recordUIInteraction

recordUIInteraction(type, metadata?): Promise<void>

Parameters

NameType
type"chat_send" | "agent_create" | "team_create" | "agent_start" | "team_start" | "agent_stop" | "team_stop" | "block_expand" | "block_collapse" | "config_change"
metadata?Record<string, TUniversalValue>

Returns

Promise<void>

Defined in

playground/src/lib/playground/plugins/playground-statistics-plugin.ts:78


recordBlockCreation

recordBlockCreation(_blockType, _metadata?): Promise<void>

Parameters

NameType
_blockTypestring
_metadata?Record<string, TUniversalValue>

Returns

Promise<void>

Defined in

playground/src/lib/playground/plugins/playground-statistics-plugin.ts:90


getPlaygroundStats

getPlaygroundStats(): IPlaygroundStatisticsStats

Returns

IPlaygroundStatisticsStats

Defined in

playground/src/lib/playground/plugins/playground-statistics-plugin.ts:97


resetStatistics

resetStatistics(): void

Returns

void

Defined in

playground/src/lib/playground/plugins/playground-statistics-plugin.ts:107

Released under the MIT License.