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
Name | Type |
---|---|
config | AgentConfig |
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
Name | Type |
---|---|
agent | AgentInterface |
config | AgentConfig |
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
Name | Type |
---|---|
error | Error |
config | AgentConfig |
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
Name | Type |
---|---|
agentId | string |
Returns
void
| Promise
<void
>