agentskit.js

WebhookOptions

Auto-generated API reference for WebhookOptions.

Interface: WebhookOptions<TContext>

Defined in: background.ts:196

#Type Parameters

#TContext

TContext = unknown

#Properties

#agent

agent: AgentHandle<TContext>

Defined in: background.ts:197


#context?

optional context?: TContext | ((req) => TContext)

Defined in: background.ts:204

Pass-through context for the agent.


#extractTask?

optional extractTask?: (req) => string

Defined in: background.ts:202

Extract the task string from the webhook body. Default: body.task for JSON bodies, or the raw string.

#Parameters

req

WebhookRequest

#Returns

string


#onEvent?

optional onEvent?: (event) => void

Defined in: background.ts:207

#Parameters

event
error?

string

type

"received" | "rejected" | "handled"

#Returns

void


#verify?

optional verify?: (req) => boolean | Promise<boolean>

Defined in: background.ts:206

Verify the incoming request (signature, token, etc.).

#Parameters

req

WebhookRequest

#Returns

boolean | Promise<boolean>

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page