agent-playground / Exports / PlaygroundExecutor
Class: PlaygroundExecutor
Table of contents
Constructors
Methods
- createAgent
- updateAgentTools
- getAgentConfiguration
- updateAgentToolsFromCard
- run
- execute
- runStream
- getPlaygroundStatistics
- recordPlaygroundAction
- recordBlockCreation
- getVisualizationData
- getPlaygroundEvents
- getHistory
- clearHistory
- dispose
- updateAuth
- isWebSocketConnected
- getLastExecutionId
Constructors
constructor
• new PlaygroundExecutor(serverUrl, authToken, options): PlaygroundExecutor
Parameters
| Name | Type |
|---|---|
serverUrl | string |
authToken | string |
options | Object |
options.eventService | IEventService |
options.logger? | ILogger |
Returns
Defined in
agent-playground/src/lib/playground/robota-executor.ts:70
Methods
createAgent
▸ createAgent(config): Promise<void>
Parameters
| Name | Type |
|---|---|
config | IPlaygroundAgentConfig |
Returns
Promise<void>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:94
updateAgentTools
▸ updateAgentTools(agentId, tools): Promise<{ version: number }>
Parameters
| Name | Type |
|---|---|
agentId | string |
tools | IPlaygroundTool[] |
Returns
Promise<{ version: number }>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:115
getAgentConfiguration
▸ getAgentConfiguration(agentId): Promise<{ version: number ; tools: { name: string ; parameters?: string[] }[] ; updatedAt: number ; metadata?: Record<string, unknown> }>
Parameters
| Name | Type |
|---|---|
agentId | string |
Returns
Promise<{ version: number ; tools: { name: string ; parameters?: string[] }[] ; updatedAt: number ; metadata?: Record<string, unknown> }>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:126
updateAgentToolsFromCard
▸ updateAgentToolsFromCard(agentId, card): Promise<{ version: number }>
Parameters
| Name | Type |
|---|---|
agentId | string |
card | Object |
card.id | string |
card.name | string |
card.description? | string |
Returns
Promise<{ version: number }>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:139
run
▸ run(prompt): Promise<IPlaygroundExecutorResult>
Parameters
| Name | Type |
|---|---|
prompt | string |
Returns
Promise<IPlaygroundExecutorResult>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:158
execute
▸ execute(prompt, onChunk?): Promise<IPlaygroundExecutorResult>
Parameters
| Name | Type |
|---|---|
prompt | string |
onChunk? | (chunk: string) => void |
Returns
Promise<IPlaygroundExecutorResult>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:193
runStream
▸ runStream(prompt): AsyncGenerator<string, IPlaygroundExecutorResult, any>
Parameters
| Name | Type |
|---|---|
prompt | string |
Returns
AsyncGenerator<string, IPlaygroundExecutorResult, any>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:226
getPlaygroundStatistics
▸ getPlaygroundStatistics(): IPlaygroundMetrics
Returns
IPlaygroundMetrics
Defined in
agent-playground/src/lib/playground/robota-executor.ts:263
recordPlaygroundAction
▸ recordPlaygroundAction(actionType, metadata?): Promise<void>
Parameters
| Name | Type |
|---|---|
actionType | "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/robota-executor.ts:267
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/robota-executor.ts:274
getVisualizationData
▸ getVisualizationData(): IVisualizationData
Returns
Defined in
agent-playground/src/lib/playground/robota-executor.ts:281
getPlaygroundEvents
▸ getPlaygroundEvents(): IConversationEvent[]
Returns
Defined in
agent-playground/src/lib/playground/robota-executor.ts:284
getHistory
▸ getHistory(): TUniversalMessage[]
Returns
TUniversalMessage[]
Defined in
agent-playground/src/lib/playground/robota-executor.ts:288
clearHistory
▸ clearHistory(): void
Returns
void
Defined in
agent-playground/src/lib/playground/robota-executor.ts:293
dispose
▸ dispose(): Promise<void>
Returns
Promise<void>
Defined in
agent-playground/src/lib/playground/robota-executor.ts:297
updateAuth
▸ updateAuth(userId, sessionId, authToken): void
Parameters
| Name | Type |
|---|---|
userId | string |
sessionId | string |
authToken | string |
Returns
void
Defined in
agent-playground/src/lib/playground/robota-executor.ts:315
isWebSocketConnected
▸ isWebSocketConnected(): boolean
Returns
boolean
Defined in
agent-playground/src/lib/playground/robota-executor.ts:319
getLastExecutionId
▸ getLastExecutionId(): null | string
Returns
null | string