Share via


AgentComponent class

Abstract base class for defining an AgentComponent.

Remarks

An AgentComponent allows the registration of services, custom actions, memory scopes, and adapters. To make components available to the system, derive from this class and implement the configureServices method. These components are consumed by the system in appropriate places. When using Composer, the configureServices method is called automatically by the agent runtime, provided the components are registered in the configuration.

Properties

z

A Zod schema for validating that an object is an AgentComponent.

Methods

configureServices(ServiceCollection, Configuration)

Configures the services, custom actions, memory scopes, and adapters for the component.

Property Details

z

A Zod schema for validating that an object is an AgentComponent.

static z: ZodType<AgentComponent, ZodTypeDef, AgentComponent>

Property Value

ZodType<AgentComponent, ZodTypeDef, AgentComponent>

Remarks

This schema checks if the object has a configureServices method.

Method Details

configureServices(ServiceCollection, Configuration)

Configures the services, custom actions, memory scopes, and adapters for the component.

function configureServices(services: ServiceCollection, configuration: Configuration)

Parameters

services
ServiceCollection

The service collection to which services can be added.

configuration
Configuration

The configuration object for accessing settings.