agentskit.js

ChatTriggerOptions

Auto-generated API reference for ChatTriggerOptions.

Interface: ChatTriggerOptions<TContext>

Defined in: chat-trigger.ts:171

#Type Parameters

#TContext

TContext = unknown

#Properties

#adapter

adapter: ChatSurfaceAdapter

Defined in: chat-trigger.ts:172


#agent

agent: AgentHandle<TContext>

Defined in: chat-trigger.ts:173


#autoReply?

optional autoReply?: boolean

Defined in: chat-trigger.ts:191

Auto-reply with the agent's output via adapter.reply when present.


#buildContext?

optional buildContext?: (event) => TContext

Defined in: chat-trigger.ts:184

Build the per-event runtime context (e.g. tenant id, user id). Default: \{ event \}.

#Parameters

event

ChatSurfaceEvent

#Returns

TContext


#buildTask?

optional buildTask?: (event) => string

Defined in: chat-trigger.ts:179

Build the agent task from the parsed event. Default: pull event.text for message / mention / reply, fall back to a structured JSON encoding for events without text (reaction, file).

#Parameters

event

ChatSurfaceEvent

#Returns

string


#filter?

optional filter?: (event) => boolean

Defined in: chat-trigger.ts:189

Filter events before running the agent. Return false to skip. Useful for ignoring bot-on-bot loops or off-hours messages.

#Parameters

event

ChatSurfaceEvent

#Returns

boolean


#onEvent?

optional onEvent?: (event) => void

Defined in: chat-trigger.ts:200

Observability hook.

#Parameters

event

ChatTriggerObserverEvent

#Returns

void


#strict?

optional strict?: boolean

Defined in: chat-trigger.ts:198

Reject construction when adapter.verify is missing. Default true β€” set to false only when you have an external auth proxy in front of the trigger. Surfaces the footgun at author time instead of accepting spoofed webhooks at runtime.

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page