Skip to content

agents / Exports / AgentLifecycleEvents

Interface: AgentLifecycleEvents

Agent lifecycle events

Table of contents

Properties

Properties

beforeCreate

Optional beforeCreate: (config: AgentConfig) => void | Promise<void>

Called before agent creation

Type declaration

▸ (config): void | Promise<void>

Parameters
NameType
configAgentConfig
Returns

void | Promise<void>

Defined in

packages/agents/src/managers/agent-factory.ts:45


afterCreate

Optional afterCreate: (agent: AgentInterface, config: AgentConfig) => void | Promise<void>

Called after successful agent creation

Type declaration

▸ (agent, config): void | Promise<void>

Parameters
NameType
agentAgentInterface
configAgentConfig
Returns

void | Promise<void>

Defined in

packages/agents/src/managers/agent-factory.ts:47


onCreateError

Optional onCreateError: (error: Error, config: AgentConfig) => void | Promise<void>

Called when agent creation fails

Type declaration

▸ (error, config): void | Promise<void>

Parameters
NameType
errorError
configAgentConfig
Returns

void | Promise<void>

Defined in

packages/agents/src/managers/agent-factory.ts:49


onDestroy

Optional onDestroy: (agentId: string) => void | Promise<void>

Called when agent is destroyed

Type declaration

▸ (agentId): void | Promise<void>

Parameters
NameType
agentIdstring
Returns

void | Promise<void>

Defined in

packages/agents/src/managers/agent-factory.ts:51

Released under the MIT License.