Skip to main content

@elizaos/core v1.0.0-beta.7 / getTypedService

Function: getTypedService()

getTypedService<T>(runtime, serviceType): T

Generic factory function to create a typed service instance

Type Parameters

T extends TypedService<any, any>

Parameters

runtime: IAgentRuntime

The agent runtime

serviceType: ServiceTypeName

The type of service to get

Returns

T

The service instance or null if not available

Defined in

packages/core/src/types.ts:1748