agent-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
| Name | Type | Default value |
|---|---|---|
options | IPlaygroundStatisticsOptions | {} |
logger | ILogger | SilentLogger |
Returns
Defined in
agent-playground/src/lib/playground/plugins/playground-statistics-plugin.ts:33
Methods
recordPlaygroundExecution
▸ recordPlaygroundExecution(result): Promise<void>
Parameters
| Name | Type |
|---|---|
result | IPlaygroundExecutionResult |
Returns
Promise<void>
Defined in
agent-playground/src/lib/playground/plugins/playground-statistics-plugin.ts:66
recordUIInteraction
▸ recordUIInteraction(type, metadata?): Promise<void>
Parameters
| Name | Type |
|---|---|
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
agent-playground/src/lib/playground/plugins/playground-statistics-plugin.ts:87
recordBlockCreation
▸ recordBlockCreation(_blockType, _metadata?): Promise<void>
Parameters
| Name | Type |
|---|---|
_blockType | string |
_metadata? | Record<string, TUniversalValue> |
Returns
Promise<void>
Defined in
agent-playground/src/lib/playground/plugins/playground-statistics-plugin.ts:104
getPlaygroundStats
▸ getPlaygroundStats(): IPlaygroundStatisticsStats
Returns
IPlaygroundStatisticsStats
Defined in
agent-playground/src/lib/playground/plugins/playground-statistics-plugin.ts:114
resetStatistics
▸ resetStatistics(): void
Returns
void
Defined in
agent-playground/src/lib/playground/plugins/playground-statistics-plugin.ts:124