Skip to content

agent-playground / Exports / UniversalToolFactory

Class: UniversalToolFactory

Universal Tool Factory Provides a unified interface for creating any type of tool with automatic block tracking Leverages the universal Hook system from @robota-sdk/agent-core

Table of contents

Constructors

Methods

Constructors

constructor

new UniversalToolFactory(options): UniversalToolFactory

Parameters

NameType
optionsIUniversalToolFactoryOptions

Returns

UniversalToolFactory

Defined in

agent-playground/src/lib/playground/universal-tool-factory.ts:27

Methods

createFunctionTool

createFunctionTool(schema, executor, options?): FunctionTool

Create FunctionTool with block tracking

Parameters

NameType
schemaIToolSchema
executorTToolExecutor
optionsObject
options.parentBlockId?string
options.level?number
options.logger?ILogger

Returns

FunctionTool

Defined in

agent-playground/src/lib/playground/universal-tool-factory.ts:35


createOpenAPITool

createOpenAPITool(_config, options?): null

Create OpenAPITool with block tracking Note: OpenAPITool not available in current SDK version

Parameters

NameType
_configRecord<string, TUniversalValue>
optionsObject
options.parentBlockId?string
options.level?number
options.logger?ILogger

Returns

null

Defined in

agent-playground/src/lib/playground/universal-tool-factory.ts:53


createMCPTool

createMCPTool(_config, _schema, options?): null

Create MCPTool with block tracking Note: MCPTool not available in current SDK version

Parameters

NameType
_configRecord<string, TUniversalValue>
_schemaRecord<string, TUniversalValue>
optionsObject
options.parentBlockId?string
options.level?number
options.logger?ILogger

Returns

null

Defined in

agent-playground/src/lib/playground/universal-tool-factory.ts:70


createDelegationTool

createDelegationTool(_teamContainer, _availableTemplates, options?): null

Create AgentDelegationTool with delegation tracking Note: AgentDelegationTool not available in current SDK version

Parameters

NameType
_teamContainerRecord<string, TUniversalValue>
_availableTemplatesRecord<string, TUniversalValue>[]
optionsObject
options.parentBlockId?string
options.level?number
options.logger?ILogger

Returns

null

Defined in

agent-playground/src/lib/playground/universal-tool-factory.ts:88


getBlockCollector

getBlockCollector(): IBlockDataCollector

Get block collector for direct access

Returns

IBlockDataCollector

Defined in

agent-playground/src/lib/playground/universal-tool-factory.ts:105

Released under the MIT License.