HarnessHooks
Properties
Section titled “Properties”onAgentEnd?
Section titled “onAgentEnd?”optional onAgentEnd?: (context, agentId) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onAgentStart?
Section titled “onAgentStart?”optional onAgentStart?: (context, agentId) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onBeforeModelCall?
Section titled “onBeforeModelCall?”optional onBeforeModelCall?: (context, data) => Promise< | void| BeforeModelCallResult>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<
| void
| BeforeModelCallResult>
onConversationEnd?
Section titled “onConversationEnd?”optional onConversationEnd?: (session, outcome) => Promise< | void | { csatChannel?: "email" | "sms" | "in-app"; csatInvited: boolean;}>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<
| void
| {
csatChannel?: "email" | "sms" | "in-app";
csatInvited: boolean;
}>
onEnd?
Section titled “onEnd?”optional onEnd?: (context, result) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
{ |
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onError?
Section titled “onError?”optional onError?: (context, error) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onHandoff?
Section titled “onHandoff?”optional onHandoff?: (context, from, to, reason) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onMemoryIngest?
Section titled “onMemoryIngest?”optional onMemoryIngest?: (context, session) => Promise<boolean | void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<boolean | void>
onMemoryIngested?
Section titled “onMemoryIngested?”optional onMemoryIngested?: (context, session) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onMessage?
Section titled “onMessage?”optional onMessage?: (context, message) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onPersistenceError?
Section titled “onPersistenceError?”optional onPersistenceError?: (session, error) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onSessionEnd?
Section titled “onSessionEnd?”optional onSessionEnd?: (session, metadata) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onStart?
Section titled “onStart?”optional onStart?: (context) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<void>
onStepEnd?
Section titled “onStepEnd?”optional onStepEnd?: (context, step, result) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onStepStart?
Section titled “onStepStart?”optional onStepStart?: (context, step) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onStreamPart?
Section titled “onStreamPart?”optional onStreamPart?: (context, part) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onTokensUpdate?
Section titled “onTokensUpdate?”optional onTokensUpdate?: (context, turn) => void | Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”void | Promise<void>
onToolCall?
Section titled “onToolCall?”optional onToolCall?: (context, call) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onToolError?
Section titled “onToolError?”optional onToolError?: (context, call, error) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onToolResult?
Section titled “onToolResult?”optional onToolResult?: (context, call) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
onTurnEnd?
Section titled “onTurnEnd?”optional onTurnEnd?: (context, summary) => Promise<void | TurnEndHookResult>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void | TurnEndHookResult>