Skip to content
AgentsKit

@agentskit/runtime — Interfaces

API interfaces for @agentskit/runtime.

#Interface: AgentHandle<TContext>

Defined in: topologies.ts:14

Ready-made multi-agent topologies. Each builder takes a set of AgentHandles + config and returns a single AgentHandle that presents the ensemble as a normal agent to the rest of the system.

An AgentHandle is intentionally minimal — name + run(task, context?) => Promise&lt;string> — so any runtime (our own createRuntime, a LangChain Runnable, a bare HTTP endpoint) can participate without coupling.

#Type Parameters

#TContext

TContext = unknown

#Properties

#abort?

optional abort?: () => void

Defined in: topologies.ts:18

Best-effort cancellation hook used when a topology deadline expires.

#Returns

void


#name

name: string

Defined in: topologies.ts:15


#run

run: (task, context?) => Promise<string>

Defined in: topologies.ts:16

#Parameters

task

string

context?

TContext

#Returns

Promise<string>


#Interface: AuctionConfig

Defined in: multi-agent.ts:123

#Properties

#bidCriteria

readonly bidCriteria: "fastest" | "lowest-cost" | "highest-confidence" | "custom"

Defined in: multi-agent.ts:126


#bidders

readonly bidders: readonly string[]

Defined in: multi-agent.ts:124


#fallback?

readonly optional fallback?: string

Defined in: multi-agent.ts:129


#reservePrice?

readonly optional reservePrice?: object

Defined in: multi-agent.ts:127

#tokens?

readonly optional tokens?: number

#usd?

readonly optional usd?: number


#task?

readonly optional task?: unknown

Defined in: multi-agent.ts:125


#timeout?

readonly optional timeout?: object

Defined in: multi-agent.ts:128

#ms

readonly ms: number


#Interface: BlackboardConfig<TContext>

Defined in: topologies.ts:223

#Type Parameters

#TContext

TContext = unknown

#Properties

#agents

agents: AgentHandle<TContext>[]

Defined in: topologies.ts:225


#isDone?

optional isDone?: (blackboard, iteration) => boolean

Defined in: topologies.ts:227

Return an output when no further iterations are needed.

#Parameters

blackboard

string

iteration

number

#Returns

boolean


#maxIterations?

optional maxIterations?: number

Defined in: topologies.ts:229

Max iterations. Default 5.


#name?

optional name?: string

Defined in: topologies.ts:224


#onEvent?

optional onEvent?: TopologyObserver

Defined in: topologies.ts:230


#Interface: ChatFileUploadEvent

Defined in: chat-trigger.ts:97

File / attachment upload.

#Extends

#Properties

#channel

channel: ChatSurfaceChannel

Defined in: chat-trigger.ts:53

#Inherited from

ChatSurfaceMeta.channel


#contentType?

optional contentType?: string

Defined in: chat-trigger.ts:102

MIME type when known.


#eventId

eventId: string

Defined in: chat-trigger.ts:56

Surface-native event id (Slack event_id, Discord interaction id, etc.).

#Inherited from

ChatSurfaceMeta.eventId


#name

name: string

Defined in: chat-trigger.ts:100

File name as supplied by the surface.


#receivedAt?

optional receivedAt?: string

Defined in: chat-trigger.ts:60

ISO 8601 timestamp from the surface, when available.

#Inherited from

ChatSurfaceMeta.receivedAt


#sizeBytes?

optional sizeBytes?: number

Defined in: chat-trigger.ts:106

Size in bytes when reported.


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:52

#Inherited from

ChatSurfaceMeta.surface


#threadId?

optional threadId?: string

Defined in: chat-trigger.ts:58

Thread / parent message id when the event is in-thread.

#Inherited from

ChatSurfaceMeta.threadId


#type

type: "file_upload"

Defined in: chat-trigger.ts:98


#url?

optional url?: string

Defined in: chat-trigger.ts:104

URL the surface exposes for download (may require surface auth).


#user

user: ChatSurfaceUser

Defined in: chat-trigger.ts:54

#Inherited from

ChatSurfaceMeta.user


#Interface: ChatInstallationEvent

Defined in: chat-trigger.ts:110

App installed in a workspace / guild / tenant.

#Extends

#Properties

#action

action: "installed" | "uninstalled"

Defined in: chat-trigger.ts:113

Install / uninstall action.


#channel

channel: ChatSurfaceChannel

Defined in: chat-trigger.ts:53

#Inherited from

ChatSurfaceMeta.channel


#eventId

eventId: string

Defined in: chat-trigger.ts:56

Surface-native event id (Slack event_id, Discord interaction id, etc.).

#Inherited from

ChatSurfaceMeta.eventId


#receivedAt?

optional receivedAt?: string

Defined in: chat-trigger.ts:60

ISO 8601 timestamp from the surface, when available.

#Inherited from

ChatSurfaceMeta.receivedAt


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:52

#Inherited from

ChatSurfaceMeta.surface


#tenantId

tenantId: string

Defined in: chat-trigger.ts:115

Tenant / workspace / guild id.


#threadId?

optional threadId?: string

Defined in: chat-trigger.ts:58

Thread / parent message id when the event is in-thread.

#Inherited from

ChatSurfaceMeta.threadId


#type

type: "installation"

Defined in: chat-trigger.ts:111


#user

user: ChatSurfaceUser

Defined in: chat-trigger.ts:54

#Inherited from

ChatSurfaceMeta.user


#Interface: ChatMentionEvent

Defined in: chat-trigger.ts:70

A direct mention of the bot or a slash command.

#Extends

#Properties

#channel

channel: ChatSurfaceChannel

Defined in: chat-trigger.ts:53

#Inherited from

ChatSurfaceMeta.channel


#command?

optional command?: string

Defined in: chat-trigger.ts:74

Slash command name without leading '/' (when applicable).


#eventId

eventId: string

Defined in: chat-trigger.ts:56

Surface-native event id (Slack event_id, Discord interaction id, etc.).

#Inherited from

ChatSurfaceMeta.eventId


#receivedAt?

optional receivedAt?: string

Defined in: chat-trigger.ts:60

ISO 8601 timestamp from the surface, when available.

#Inherited from

ChatSurfaceMeta.receivedAt


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:52

#Inherited from

ChatSurfaceMeta.surface


#text

text: string

Defined in: chat-trigger.ts:72


#threadId?

optional threadId?: string

Defined in: chat-trigger.ts:58

Thread / parent message id when the event is in-thread.

#Inherited from

ChatSurfaceMeta.threadId


#type

type: "mention"

Defined in: chat-trigger.ts:71


#user

user: ChatSurfaceUser

Defined in: chat-trigger.ts:54

#Inherited from

ChatSurfaceMeta.user


#Interface: ChatMessageEvent

Defined in: chat-trigger.ts:64

A plain text message addressed to nobody in particular.

#Extends

#Properties

#channel

channel: ChatSurfaceChannel

Defined in: chat-trigger.ts:53

#Inherited from

ChatSurfaceMeta.channel


#eventId

eventId: string

Defined in: chat-trigger.ts:56

Surface-native event id (Slack event_id, Discord interaction id, etc.).

#Inherited from

ChatSurfaceMeta.eventId


#receivedAt?

optional receivedAt?: string

Defined in: chat-trigger.ts:60

ISO 8601 timestamp from the surface, when available.

#Inherited from

ChatSurfaceMeta.receivedAt


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:52

#Inherited from

ChatSurfaceMeta.surface


#text

text: string

Defined in: chat-trigger.ts:66


#threadId?

optional threadId?: string

Defined in: chat-trigger.ts:58

Thread / parent message id when the event is in-thread.

#Inherited from

ChatSurfaceMeta.threadId


#type

type: "message"

Defined in: chat-trigger.ts:65


#user

user: ChatSurfaceUser

Defined in: chat-trigger.ts:54

#Inherited from

ChatSurfaceMeta.user


#Interface: ChatReactionEvent

Defined in: chat-trigger.ts:86

Emoji reaction added or removed on a message.

#Extends

#Properties

#added

added: boolean

Defined in: chat-trigger.ts:93

True when the reaction was added; false when removed.


#channel

channel: ChatSurfaceChannel

Defined in: chat-trigger.ts:53

#Inherited from

ChatSurfaceMeta.channel


#emoji

emoji: string

Defined in: chat-trigger.ts:91

Emoji shortcode, e.g. thumbsup.


#eventId

eventId: string

Defined in: chat-trigger.ts:56

Surface-native event id (Slack event_id, Discord interaction id, etc.).

#Inherited from

ChatSurfaceMeta.eventId


#messageId

messageId: string

Defined in: chat-trigger.ts:89

Reacted-to message id.


#receivedAt?

optional receivedAt?: string

Defined in: chat-trigger.ts:60

ISO 8601 timestamp from the surface, when available.

#Inherited from

ChatSurfaceMeta.receivedAt


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:52

#Inherited from

ChatSurfaceMeta.surface


#threadId?

optional threadId?: string

Defined in: chat-trigger.ts:58

Thread / parent message id when the event is in-thread.

#Inherited from

ChatSurfaceMeta.threadId


#type

type: "reaction"

Defined in: chat-trigger.ts:87


#user

user: ChatSurfaceUser

Defined in: chat-trigger.ts:54

#Inherited from

ChatSurfaceMeta.user


#Interface: ChatReplyEvent

Defined in: chat-trigger.ts:78

Reply inside an existing thread.

#Extends

#Properties

#channel

channel: ChatSurfaceChannel

Defined in: chat-trigger.ts:53

#Inherited from

ChatSurfaceMeta.channel


#eventId

eventId: string

Defined in: chat-trigger.ts:56

Surface-native event id (Slack event_id, Discord interaction id, etc.).

#Inherited from

ChatSurfaceMeta.eventId


#parentId

parentId: string

Defined in: chat-trigger.ts:82

Required: parent message id being replied to.


#receivedAt?

optional receivedAt?: string

Defined in: chat-trigger.ts:60

ISO 8601 timestamp from the surface, when available.

#Inherited from

ChatSurfaceMeta.receivedAt


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:52

#Inherited from

ChatSurfaceMeta.surface


#text

text: string

Defined in: chat-trigger.ts:80


#threadId?

optional threadId?: string

Defined in: chat-trigger.ts:58

Thread / parent message id when the event is in-thread.

#Inherited from

ChatSurfaceMeta.threadId


#type

type: "reply"

Defined in: chat-trigger.ts:79


#user

user: ChatSurfaceUser

Defined in: chat-trigger.ts:54

#Inherited from

ChatSurfaceMeta.user


#Interface: ChatSurfaceAdapter

Defined in: chat-trigger.ts:135

Surface adapter contract. An adapter wraps a provider SDK (Bolt, discord.js, Bot Framework) and turns raw inbound events into the normalized ChatSurfaceEvent. Returning null from parse is a deliberate skip — the trigger emits a 'skipped' observer event and returns a 200 so the surface stops retrying.

#Properties

#parse

parse: (req) => ChatSurfaceEvent | Promise<ChatSurfaceEvent | null> | null

Defined in: chat-trigger.ts:138

Parse an inbound webhook into a normalized event. Return null to ignore.

#Parameters

req

WebhookRequest

#Returns

ChatSurfaceEvent | Promise<ChatSurfaceEvent | null> | null


#reply?

optional reply?: (event, text) => void | Promise<void>

Defined in: chat-trigger.ts:152

Optional reply hook — used when the agent's output should post back.

#Parameters

event

ChatSurfaceEvent

text

string

#Returns

void | Promise<void>


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:136


#verify?

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

Defined in: chat-trigger.ts:150

Verify the request signature. Return false to reject with 401. The factory refuses to construct without verify unless \{ strict: false \} is passed — explicit opt-out so unverified webhook handlers cannot ship by accident.

Replay protection (eventId dedup, timestamp window) is the adapter's responsibility — the trigger does not enforce it. The normalized eventId and receivedAt fields exist precisely so adapters can implement dedup against a memory backend.

#Parameters

req

WebhookRequest

#Returns

boolean | Promise<boolean>


#Interface: ChatSurfaceChannel

Defined in: chat-trigger.ts:42

Channel / room / DM identifier.

#Properties

#id

id: string

Defined in: chat-trigger.ts:43


#kind?

optional kind?: "dm" | "group" | "channel" | "thread"

Defined in: chat-trigger.ts:47

Whether the channel is a 1:1 DM, group DM, or shared channel.


#name?

optional name?: string

Defined in: chat-trigger.ts:45

Optional human-readable channel name.


#Interface: ChatSurfaceMeta

Defined in: chat-trigger.ts:51

Common metadata every event carries.

#Extended by

#Properties

#channel

channel: ChatSurfaceChannel

Defined in: chat-trigger.ts:53


#eventId

eventId: string

Defined in: chat-trigger.ts:56

Surface-native event id (Slack event_id, Discord interaction id, etc.).


#receivedAt?

optional receivedAt?: string

Defined in: chat-trigger.ts:60

ISO 8601 timestamp from the surface, when available.


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:52


#threadId?

optional threadId?: string

Defined in: chat-trigger.ts:58

Thread / parent message id when the event is in-thread.


#user

user: ChatSurfaceUser

Defined in: chat-trigger.ts:54


#Interface: ChatSurfaceUser

Defined in: chat-trigger.ts:33

Stable identity of a sender across surfaces.

#Properties

#id

id: string

Defined in: chat-trigger.ts:34


#isBot?

optional isBot?: boolean

Defined in: chat-trigger.ts:38

True when the sender is a bot (including this agent).


#name?

optional name?: string

Defined in: chat-trigger.ts:36

Display name when available.


#Interface: ChatTrigger

Defined in: chat-trigger.ts:228

#Properties

#handler

handler: WebhookHandler

Defined in: chat-trigger.ts:229


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:230


#Interface: ChatTriggerObserverEvent

Defined in: chat-trigger.ts:155

#Properties

#event?

optional event?: ChatSurfaceEvent

Defined in: chat-trigger.ts:167


#reason?

optional reason?: string

Defined in: chat-trigger.ts:169

Error or skip reason.


#surface

surface: ChatSurface

Defined in: chat-trigger.ts:166


#type

type: "received" | "rejected" | "handled" | "skipped" | "replied" | "reply_failed"

Defined in: chat-trigger.ts:165

  • received → before any work
  • skipped → adapter parse returned null OR filter rejected
  • handled → agent ran successfully
  • replied → adapter.reply succeeded after handled (autoReply only)
  • reply_failed → adapter.reply threw after handled (HTTP still 200)
  • rejected → request did not produce a successful agent run (verify failed, parse threw, agent threw)

#Interface: ChatTriggerOptions<TContext>

Defined in: chat-trigger.ts:172

#Type Parameters

#TContext

TContext = unknown

#Properties

#adapter

adapter: ChatSurfaceAdapter

Defined in: chat-trigger.ts:173


#agent

agent: AgentHandle<TContext>

Defined in: chat-trigger.ts:174


#autoReply?

optional autoReply?: boolean

Defined in: chat-trigger.ts:192

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


#buildContext?

optional buildContext?: (event) => TContext

Defined in: chat-trigger.ts:185

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:180

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


#eventSchema?

optional eventSchema?: JSONSchema7

Defined in: chat-trigger.ts:207

Opt-in JSON Schema for the parsed ChatSurfaceEvent (ADR-0011). When set together with validateEvent, an event that fails the schema is rejected with HTTP 400 before the agent runs — defence in depth on top of adapter.verify. The schema type is the same JSONSchema7 accepted by ArgsValidator.


#filter?

optional filter?: (event) => boolean

Defined in: chat-trigger.ts:190

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:214

Observability hook.

#Parameters

event

ChatTriggerObserverEvent

#Returns

void


#strict?

optional strict?: boolean

Defined in: chat-trigger.ts:199

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.


#validateEvent?

optional validateEvent?: ArgsValidator

Defined in: chat-trigger.ts:212

Validator used with eventSchema. Use createAjvValidator() from @agentskit/tools/validation. No-op unless eventSchema is also set.


#Interface: CompareConfig

Defined in: multi-agent.ts:93

#Properties

#agents

readonly agents: readonly string[]

Defined in: multi-agent.ts:94


#input?

readonly optional input?: unknown

Defined in: multi-agent.ts:95


#selection

readonly selection: CompareSelection

Defined in: multi-agent.ts:96


#Interface: CompiledFlow<TInput>

Defined in: flow.ts:170

#Type Parameters

#TInput

TInput = unknown

#Properties

#definition

definition: FlowDefinition

Defined in: flow.ts:171


#order

order: string[]

Defined in: flow.ts:172


#run

run: (input?, options?) => Promise<Record<string, unknown>>

Defined in: flow.ts:173

#Parameters

input?

TInput

options?

RunFlowOptions

#Returns

Promise<Record<string, unknown>>


#Interface: CompileFlowOptions<TInput>

Defined in: flow.ts:147

#Type Parameters

#TInput

TInput = unknown

#Properties

#definition

definition: FlowDefinition

Defined in: flow.ts:148


#registry

registry: FlowRegistry<TInput>

Defined in: flow.ts:149


#Interface: CronJob<TContext>

Defined in: background.ts:14

#Type Parameters

#TContext

TContext = unknown

#Properties

#agent

agent: AgentHandle<TContext>

Defined in: background.ts:17


#context?

optional context?: TContext

Defined in: background.ts:20


#runOnStart?

optional runOnStart?: boolean

Defined in: background.ts:22

Run the job exactly once on start before the first tick.


#schedule

schedule: string

Defined in: background.ts:16

Standard 5-field cron (* * * * *) or an every:&lt;ms> shortcut.


#task?

optional task?: string | ((now) => string)

Defined in: background.ts:19

Task the agent receives each fire. Default: scheduled: &lt;name>.


#Interface: CronScheduler

Defined in: background.ts:147

#Properties

#start

start: () => void

Defined in: background.ts:148

#Returns

void


#stop

stop: () => void

Defined in: background.ts:149

#Returns

void


#tick

tick: (now?) => Promise<void>

Defined in: background.ts:151

Manually fire every job whose schedule matches now. Useful in tests.

#Parameters

now?

Date

#Returns

Promise<void>


#Interface: CronSchedulerOptions<TContext>

Defined in: background.ts:25

#Type Parameters

#TContext

TContext = unknown

#Properties

#jobs

jobs: CronJob<TContext>[]

Defined in: background.ts:26


#now?

optional now?: () => Date

Defined in: background.ts:36

Clock override for tests.

#Returns

Date


#onEvent?

optional onEvent?: (event) => void

Defined in: background.ts:28

Observability hook.

#Parameters

event
error?

string

job

string

now

Date

result?

string

type

"tick" | "run:start" | "run:end" | "run:error"

#Returns

void


#scheduleTick?

optional scheduleTick?: (fn) => () => void

Defined in: background.ts:38

Timer override for tests — takes tick handler, returns stop fn.

#Parameters

fn

() => void

#Returns

() => void


#Interface: DebateConfig

Defined in: multi-agent.ts:113

#Properties

#earlyExit?

readonly optional earlyExit?: string

Defined in: multi-agent.ts:120


#format?

readonly optional format?: unknown

Defined in: multi-agent.ts:115


#judge

readonly judge: string

Defined in: multi-agent.ts:118


#opponent

readonly opponent: string

Defined in: multi-agent.ts:117


#proponent

readonly proponent: string

Defined in: multi-agent.ts:116


#rounds

readonly rounds: number

Defined in: multi-agent.ts:119


#topic

readonly topic: unknown

Defined in: multi-agent.ts:114


#Interface: DelegateConfig

Defined in: types.ts:15

#Properties

#adapter?

optional adapter?: AdapterFactory

Defined in: types.ts:18


#maxSteps?

optional maxSteps?: number

Defined in: types.ts:19


#skill

skill: SkillDefinition

Defined in: types.ts:16


#tools?

optional tools?: ToolDefinition<Record<string, unknown>>[]

Defined in: types.ts:17


#Interface: DurableRunner

Defined in: durable.ts:54

#Properties

#history

history: () => Promise<StepRecord<unknown>[]>

Defined in: durable.ts:62

Read the full log for the current run.

#Returns

Promise<StepRecord<unknown>[]>


#reset

reset: () => Promise<void>

Defined in: durable.ts:64

Drop the log for the current run (dangerous — breaks resume).

#Returns

Promise<void>


#step

step: <TResult>(stepId, fn, options?) => Promise<TResult>

Defined in: durable.ts:60

Execute fn under the name stepId. If the step has already been recorded in the log for this runId, return the recorded result without re-running. Otherwise run, record, return.

#Type Parameters

TResult

TResult

#Parameters

stepId

string

fn

() => TResult | Promise<TResult>

options?
name?

string

#Returns

Promise<TResult>


#Interface: DurableRunnerOptions

Defined in: durable.ts:37

#Properties

#maxAttempts?

optional maxAttempts?: number

Defined in: durable.ts:41

Max attempts per step. Default 1 (fail fast).


#onEvent?

optional onEvent?: (event) => void

Defined in: durable.ts:45

Observability — fires on replay-hit, retry, completion.

#Parameters

event

DurableEvent

#Returns

void


#retryDelayMs?

optional retryDelayMs?: number

Defined in: durable.ts:43

Backoff in ms between attempts. Default 0.


#runId

runId: string

Defined in: durable.ts:39


#store

store: StepLogStore

Defined in: durable.ts:38


#Interface: FlowDefinition

Defined in: flow.ts:31

#Properties

#description?

optional description?: string

Defined in: flow.ts:34


#name

name: string

Defined in: flow.ts:32


#nodes

nodes: FlowNode[]

Defined in: flow.ts:35


#version?

optional version?: string | number

Defined in: flow.ts:33


#Interface: FlowHandlerContext<TInput>

Defined in: flow.ts:38

#Type Parameters

#TInput

TInput = unknown

#Properties

#deps

deps: Record<string, unknown>

Defined in: flow.ts:43

Outputs of every dependency, keyed by node id.


#input

input: TInput

Defined in: flow.ts:41

Initial input passed to runFlow.


#node

node: FlowNode

Defined in: flow.ts:39


#with

with: Record<string, unknown>

Defined in: flow.ts:45

Static inputs from node.with.


#Interface: FlowNode

Defined in: flow.ts:18

#Properties

#id

id: string

Defined in: flow.ts:20

Unique within the flow. Used as durable step id.


#name?

optional name?: string

Defined in: flow.ts:22

Display label. Defaults to id.


#needs?

optional needs?: string[]

Defined in: flow.ts:28

Ids of nodes that must finish before this one starts.


#run

run: string

Defined in: flow.ts:24

Handler key — must exist in the FlowRegistry.


#with?

optional with?: Record<string, unknown>

Defined in: flow.ts:26

Static inputs passed to the handler.


#Interface: FlowValidationIssue

Defined in: flow.ts:54

#Properties

#code

code: "duplicate-id" | "missing-handler" | "unknown-dependency" | "self-dependency" | "cycle"

Defined in: flow.ts:55


#message

message: string

Defined in: flow.ts:56


#nodeId?

optional nodeId?: string

Defined in: flow.ts:57


#Interface: FlowValidationResult

Defined in: flow.ts:60

#Properties

#issues

issues: FlowValidationIssue[]

Defined in: flow.ts:62


#ok

ok: boolean

Defined in: flow.ts:61


#order

order: string[]

Defined in: flow.ts:64

Topologically ordered ids when the flow is valid.


#Interface: HierarchicalConfig<TContext>

Defined in: topologies.ts:179

#Type Parameters

#TContext

TContext = unknown

#Properties

#maxDepth?

optional maxDepth?: number

Defined in: topologies.ts:185

Maximum depth. Default 5.


#name?

optional name?: string

Defined in: topologies.ts:180


#onEvent?

optional onEvent?: TopologyObserver

Defined in: topologies.ts:186


#root

root: HierarchicalNode<TContext>

Defined in: topologies.ts:181


#route?

optional route?: (input) => HierarchicalNode<TContext> | undefined

Defined in: topologies.ts:183

Pick which child (if any) to descend into. Return undefined to stop.

#Parameters

input
node

HierarchicalNode<TContext>

task

string

#Returns

HierarchicalNode<TContext> | undefined


#Interface: HierarchicalNode<TContext>

Defined in: topologies.ts:172

#Type Parameters

#TContext

TContext = unknown

#Properties

#agent

agent: AgentHandle<TContext>

Defined in: topologies.ts:173


#children?

optional children?: HierarchicalNode<TContext>[]

Defined in: topologies.ts:176


#tags?

optional tags?: string[]

Defined in: topologies.ts:175

Free-form tags the router can match against.


#Interface: QuotaExceededEvent

Defined in: quota.ts:35

#Properties

#at

at: string

Defined in: quota.ts:44

ISO timestamp.


#kind

kind: "perRun" | "perWindow" | "dryRun"

Defined in: quota.ts:38

Which limit fired.


#limit

limit: number

Defined in: quota.ts:40

The configured limit (count).


#observed

observed: number

Defined in: quota.ts:42

What we observed (count).


#tool

tool: string

Defined in: quota.ts:36


#Interface: QuotaSnapshot

Defined in: quota.ts:70

#Properties

#perRun

perRun: Record<string, Record<string, number>>

Defined in: quota.ts:71


#perWindow

perWindow: Record<string, number[]>

Defined in: quota.ts:72


#Interface: QuotaTracker

Defined in: quota.ts:57

#Properties

#check

check: (tool, runId) => void

Defined in: quota.ts:59

Throws and reserves one admission when the tool is over budget.

#Parameters

tool

string

runId

string

#Returns

void


#record

record: (tool, runId) => void

Defined in: quota.ts:61

Records a successful tool invocation against the counters.

#Parameters

tool

string

runId

string

#Returns

void


#release

release: (tool, runId) => void

Defined in: quota.ts:63

Releases an admission when tool execution fails before it completes.

#Parameters

tool

string

runId

string

#Returns

void


#resetRun

resetRun: (runId) => void

Defined in: quota.ts:65

Reset per-run counters for a finished runtime.run().

#Parameters

runId

string

#Returns

void


#snapshot

snapshot: () => QuotaSnapshot

Defined in: quota.ts:67

Inspect counters (debugging / dashboards).

#Returns

QuotaSnapshot


#Interface: QuotaTrackerOptions

Defined in: quota.ts:47

#Properties

#env?

optional env?: string

Defined in: quota.ts:50

Active environment tag ('production', 'staging', …).


#now?

optional now?: () => number

Defined in: quota.ts:54

Wall clock — overridable for tests.

#Returns

number


#onExceeded?

optional onExceeded?: (event) => void

Defined in: quota.ts:52

Sink for quota events.

#Parameters

event

QuotaExceededEvent

#Returns

void


#quotas

quotas: QuotaMap

Defined in: quota.ts:48


#Interface: ReadonlySharedContext

Defined in: shared-context.ts:9

#Methods

#entries()

entries(): Record<string, unknown>

Defined in: shared-context.ts:12

#Returns

Record<string, unknown>


#get()

get(key): unknown

Defined in: shared-context.ts:10

#Parameters

key

string

#Returns

unknown


#has()

has(key): boolean

Defined in: shared-context.ts:11

#Parameters

key

string

#Returns

boolean


#Interface: RunFlowOptions

Defined in: flow.ts:152

#Properties

#maxAttempts?

optional maxAttempts?: number

Defined in: flow.ts:158

Forwarded to createDurableRunner.


#onEvent?

optional onEvent?: (event) => void

Defined in: flow.ts:160

#Parameters

event

FlowRunEvent

#Returns

void


#retryDelayMs?

optional retryDelayMs?: number

Defined in: flow.ts:159


#runId?

optional runId?: string

Defined in: flow.ts:154

Defaults to a fresh runId per call. Reuse to resume after a crash.


#store?

optional store?: StepLogStore

Defined in: flow.ts:156

Defaults to an in-memory store. Use createFileStepLog for durability.


#Interface: RunOptions

Defined in: types.ts:44

#Properties

#delegates?

optional delegates?: Record<string, DelegateConfig>

Defined in: types.ts:52


#maxSteps?

optional maxSteps?: number

Defined in: types.ts:48


#runId?

optional runId?: string

Defined in: types.ts:50

Stable identifier shared by all tool calls in this run.


#sharedContext?

optional sharedContext?: SharedContext

Defined in: types.ts:53


#signal?

optional signal?: AbortSignal

Defined in: types.ts:51


#skill?

optional skill?: SkillDefinition

Defined in: types.ts:47


#systemPrompt?

optional systemPrompt?: string

Defined in: types.ts:46


#tools?

optional tools?: ToolDefinition<Record<string, unknown>>[]

Defined in: types.ts:45


#Interface: RunResult

Defined in: types.ts:56

#Properties

#content

content: string

Defined in: types.ts:57


#durationMs

durationMs: number

Defined in: types.ts:61


#messages

messages: Message[]

Defined in: types.ts:58


#steps

steps: number

Defined in: types.ts:59


#toolCalls

toolCalls: ToolCall[]

Defined in: types.ts:60


#Interface: RuntimeConfig

Defined in: types.ts:22

#Properties

#adapter

adapter: AdapterFactory

Defined in: types.ts:23


#delegates?

optional delegates?: Record<string, DelegateConfig>

Defined in: types.ts:32


#maxDelegationDepth?

optional maxDelegationDepth?: number

Defined in: types.ts:33


#maxSteps?

optional maxSteps?: number

Defined in: types.ts:29


#maxTokens?

optional maxTokens?: number

Defined in: types.ts:31


#memory?

optional memory?: ChatMemory

Defined in: types.ts:26


#observers?

optional observers?: Observer[]

Defined in: types.ts:28


#onConfirm?

optional onConfirm?: (toolCall) => MaybePromise<boolean>

Defined in: types.ts:34

#Parameters

toolCall

ToolCall

#Returns

MaybePromise<boolean>


#retriever?

optional retriever?: Retriever

Defined in: types.ts:27


#systemPrompt?

optional systemPrompt?: string

Defined in: types.ts:25


#temperature?

optional temperature?: number

Defined in: types.ts:30


#tools?

optional tools?: ToolDefinition<Record<string, unknown>>[]

Defined in: types.ts:24


#validateArgs?

optional validateArgs?: ArgsValidator

Defined in: types.ts:41

Opt-in runtime validator for tool-call arguments (ADR-0008). When set, model-produced args are checked against each tool's JSON Schema before execution; mismatches raise AK_TOOL_INVALID_INPUT. Use createAjvValidator() from @agentskit/tools/validation.


#Interface: SharedContext

Defined in: shared-context.ts:1

#Methods

#entries()

entries(): Record<string, unknown>

Defined in: shared-context.ts:5

#Returns

Record<string, unknown>


#get()

get(key): unknown

Defined in: shared-context.ts:2

#Parameters

key

string

#Returns

unknown


#has()

has(key): boolean

Defined in: shared-context.ts:4

#Parameters

key

string

#Returns

boolean


#readOnly()

readOnly(): ReadonlySharedContext

Defined in: shared-context.ts:6

#Returns

ReadonlySharedContext


#set()

set(key, value): void

Defined in: shared-context.ts:3

#Parameters

key

string

value

unknown

#Returns

void


#Interface: SpeculateInput

Defined in: speculate.ts:23

#Properties

#candidates

candidates: SpeculativeCandidate[]

Defined in: speculate.ts:24


#pick?

optional pick?: "first" | "longest" | SpeculatePicker

Defined in: speculate.ts:35

Picker strategy:

  • 'first' (default): first candidate to settle without error
  • 'longest': the candidate with the most output text
  • function: custom picker receives all results in settle order

When 'first' is used, losers are aborted as soon as the winner settles. Custom pickers wait for all candidates to finish first.


#request

request: AdapterRequest

Defined in: speculate.ts:25


#timeoutMs?

optional timeoutMs?: number

Defined in: speculate.ts:37

Hard timeout in ms per candidate. Default: none.


#Interface: SpeculateOutput

Defined in: speculate.ts:40

#Properties

#all

all: SpeculativeResult[]

Defined in: speculate.ts:43


#losers

losers: SpeculativeResult[]

Defined in: speculate.ts:42


#winner

winner: SpeculativeResult

Defined in: speculate.ts:41


#Interface: SpeculativeCandidate

Defined in: speculate.ts:4

#Properties

#abortOnLoser?

optional abortOnLoser?: boolean

Defined in: speculate.ts:9

Cancel this candidate when another wins first. Default true.


#adapter

adapter: AdapterFactory

Defined in: speculate.ts:7


#id

id: string

Defined in: speculate.ts:6

Human label used in results.


#Interface: SpeculativeResult

Defined in: speculate.ts:12

#Properties

#aborted?

optional aborted?: boolean

Defined in: speculate.ts:18


#chunks

chunks: StreamChunk[]

Defined in: speculate.ts:14


#error?

optional error?: Error

Defined in: speculate.ts:17


#id

id: string

Defined in: speculate.ts:13


#latencyMs

latencyMs: number

Defined in: speculate.ts:16


#text

text: string

Defined in: speculate.ts:15


#Interface: StepLogStore

Defined in: durable.ts:30

#Properties

#append

append: <T>(record) => Promise<void>

Defined in: durable.ts:31

#Type Parameters

T

T

#Parameters

record

StepRecord<T>

#Returns

Promise<void>


#clear?

optional clear?: (runId) => Promise<void>

Defined in: durable.ts:34

#Parameters

runId

string

#Returns

Promise<void>


#get

get: <T>(runId, stepId) => Promise<StepRecord<T> | null>

Defined in: durable.ts:32

#Type Parameters

T

T

#Parameters

runId

string

stepId

string

#Returns

Promise<StepRecord<T> | null>


#list

list: (runId) => Promise<StepRecord<unknown>[]>

Defined in: durable.ts:33

#Parameters

runId

string

#Returns

Promise<StepRecord<unknown>[]>


#Interface: StepRecord<TResult>

Defined in: durable.ts:18

Temporal-style durable execution primitive. Wraps any side-effectful step in a runner.step(name, fn) call; the result is appended to a StepLogStore. When the run restarts (after a crash, a deploy, or a retry), replayed steps short-circuit to the recorded value and only new steps execute.

Deterministic replay requires two rules from callers:

  1. Step names are stable across runs (ideally derived from the business key — e.g. search:$\{query\} — so the log stays meaningful even as code reorders).
  2. Steps are pure from the perspective of the log — the fn does the side effect, the result is everything later steps need.

#Type Parameters

#TResult

TResult = unknown

#Properties

#attempt

attempt: number

Defined in: durable.ts:27


#endedAt

endedAt: string

Defined in: durable.ts:26


#error?

optional error?: string

Defined in: durable.ts:24


#name

name: string

Defined in: durable.ts:21


#result?

optional result?: TResult

Defined in: durable.ts:23


#runId

runId: string

Defined in: durable.ts:19


#startedAt

startedAt: string

Defined in: durable.ts:25


#status

status: "success" | "failure"

Defined in: durable.ts:22


#stepId

stepId: string

Defined in: durable.ts:20


#Interface: SupervisorConfig<TContext>

Defined in: topologies.ts:36

#Type Parameters

#TContext

TContext = unknown

#Properties

#maxRounds?

optional maxRounds?: number

Defined in: topologies.ts:42

Maximum delegation rounds. Default 1.


#onEvent?

optional onEvent?: TopologyObserver

Defined in: topologies.ts:43


#route?

optional route?: (task, workers) => AgentHandle<TContext>

Defined in: topologies.ts:40

How the supervisor picks a worker. Default: round-robin.

#Parameters

task

string

workers

AgentHandle<TContext>[]

#Returns

AgentHandle<TContext>


#supervisor

supervisor: AgentHandle<TContext>

Defined in: topologies.ts:37


#workers

workers: AgentHandle<TContext>[]

Defined in: topologies.ts:38


#Interface: SwarmConfig<TContext>

Defined in: topologies.ts:90

#Type Parameters

#TContext

TContext = unknown

#Properties

#members

members: AgentHandle<TContext>[]

Defined in: topologies.ts:92


#merge?

optional merge?: (results) => string | Promise<string>

Defined in: topologies.ts:94

Merge member outputs into a single result. Default: longest.

#Parameters

results

object[]

#Returns

string | Promise<string>


#name?

optional name?: string

Defined in: topologies.ts:91


#onEvent?

optional onEvent?: TopologyObserver

Defined in: topologies.ts:97


#timeoutMs?

optional timeoutMs?: number

Defined in: topologies.ts:96

Per-member timeout in ms.


#Interface: ToolQuota

Defined in: quota.ts:21

Per-tool quota / blast-radius limits. Beyond rate-limiting (#163), agents need hard ceilings — "no matter what, this run cannot send more than 50 emails" — so a runaway loop cannot dump 10k messages or run a destructive query a thousand times.

Two limits per tool:

  • perRun — counter resets on every runtime.run().
  • perWindow — sliding window (default 60s) shared across runs.

Exceeding either raises a typed ToolError with code AK_TOOL_QUOTA_EXCEEDED and emits a tool:quota:exceeded callback so observers / cost-guards can react.

Closes issue #801.

#Properties

#dryRunRequiredIn?

optional dryRunRequiredIn?: string[]

Defined in: quota.ts:30

Mark the tool as "dry-run only" in production. When the env tag is matched, the runtime throws before execute() is invoked.


#perRun?

optional perRun?: number

Defined in: quota.ts:23

Hard cap per runtime.run() invocation.


#perWindow?

optional perWindow?: object

Defined in: quota.ts:25

Sliding-window cap (count, window) shared across all runs.

#count

count: number

#windowMs

windowMs: number


#Interface: TopologyLogEvent

Defined in: topologies.ts:21

#Properties

#agent?

optional agent?: string

Defined in: topologies.ts:24


#iteration?

optional iteration?: number

Defined in: topologies.ts:27


#phase

phase: "dispatch" | "agent:start" | "agent:end" | "merge" | "done"

Defined in: topologies.ts:23


#result?

optional result?: string

Defined in: topologies.ts:26


#task?

optional task?: string

Defined in: topologies.ts:25


#topology

topology: string

Defined in: topologies.ts:22


#Interface: Validator

Defined in: validator-guard.ts:31

#Properties

#check

check: (ctx) => ValidatorResult | Promise<ValidatorResult>

Defined in: validator-guard.ts:41

Return true (or a \{ ok: true \} object) when the output passes. Return false (or \{ ok: false, reason \}) to fail.

Async checks are supported — useful for eval LLM-judge or RAG citation lookups.

#Parameters

ctx

ValidatorCheckContext

#Returns

ValidatorResult | Promise<ValidatorResult>


#maxRetries?

optional maxRetries?: number

Defined in: validator-guard.ts:45

Cap retries per run. Default 1.


#name

name: string

Defined in: validator-guard.ts:33

Stable id for audit logs / dashboards.


#onFail?

optional onFail?: ValidatorAction

Defined in: validator-guard.ts:43

What to do on failure. Default 'retry' (with up to maxRetries).


#repairPrompt?

optional repairPrompt?: (ctx) => string

Defined in: validator-guard.ts:50

Repair instruction appended to the regenerator on retry. Lets the agent self-correct. Receives the failure context.

#Parameters

ctx
output

string

reason?

string

#Returns

string


#Interface: ValidatorAuditEvent

Defined in: validator-guard.ts:63

#Properties

#at

at: string

Defined in: validator-guard.ts:65

ISO timestamp.


#attempts

attempts: number

Defined in: validator-guard.ts:69

Total attempts made.


#failures

failures: object[]

Defined in: validator-guard.ts:71

Per-failure detail. Empty when outcome: 'accepted' on first try.

#action

action: ValidatorAction

#attempt

attempt: number

#reason?

optional reason?: string

#validator

validator: string


#outcome

outcome: "fallback" | "accepted" | "blocked"

Defined in: validator-guard.ts:67

Outcome of the run.


#output

output: string

Defined in: validator-guard.ts:73

Final output that left the guard.


#Interface: ValidatorCheckContext

Defined in: validator-guard.ts:24

#Properties

#attempt

attempt: number

Defined in: validator-guard.ts:26

Attempt index (0-based) for the current run.


#output

output: string

Defined in: validator-guard.ts:28

Output being validated.


#Interface: ValidatorGuard

Defined in: validator-guard.ts:93

#Properties

#run

run: (options) => Promise<ValidatorGuardRun>

Defined in: validator-guard.ts:94

#Parameters

options

ValidatorGuardRunOptions

#Returns

Promise<ValidatorGuardRun>


#Interface: ValidatorGuardOptions

Defined in: validator-guard.ts:55

#Properties

#audit?

optional audit?: (event) => void

Defined in: validator-guard.ts:60

Audit hook — receives every accepted, retried, or blocked decision.

#Parameters

event

ValidatorAuditEvent

#Returns

void


#fallback?

optional fallback?: string

Defined in: validator-guard.ts:58

Deterministic fallback text used when onFail: 'fallback' fires.


#validators

validators: Validator[]

Defined in: validator-guard.ts:56


#Interface: ValidatorGuardRun

Defined in: validator-guard.ts:76

#Properties

#accepted

accepted: boolean

Defined in: validator-guard.ts:80

True when a validator chain accepted; false when blocked / fallback.


#attempts

attempts: number

Defined in: validator-guard.ts:82

Total attempts made.


#failures

failures: object[]

Defined in: validator-guard.ts:83

#action

action: ValidatorAction

#attempt

attempt: number

#reason?

optional reason?: string

#validator

validator: string


#output

output: string

Defined in: validator-guard.ts:78

Output that survived the gauntlet (or the fallback).


#Interface: ValidatorGuardRunOptions

Defined in: validator-guard.ts:86

#Properties

#regenerate

regenerate: (repair?) => Promise<string>

Defined in: validator-guard.ts:88

Regenerate the output. Receives the optional repair prompt.

#Parameters

repair?

string

#Returns

Promise<string>


#seed?

optional seed?: string

Defined in: validator-guard.ts:90

Initial output to validate (skips first regenerate call).


#Interface: VoteConfig

Defined in: multi-agent.ts:105

#Properties

#agents

readonly agents: readonly string[]

Defined in: multi-agent.ts:106


#ballot

readonly ballot: VoteBallot

Defined in: multi-agent.ts:108


#input?

readonly optional input?: unknown

Defined in: multi-agent.ts:107


#judgeAgent?

readonly optional judgeAgent?: string

Defined in: multi-agent.ts:110


#onTie

readonly onTie: "first" | "judge" | "human"

Defined in: multi-agent.ts:109


#Interface: WebhookOptions<TContext>

Defined in: background.ts:233

#Type Parameters

#TContext

TContext = unknown

#Properties

#agent

agent: AgentHandle<TContext>

Defined in: background.ts:234


#context?

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

Defined in: background.ts:241

Pass-through context for the agent.


#extractTask?

optional extractTask?: (req) => string

Defined in: background.ts:239

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:246

#Parameters

event
error?

string

type

"received" | "rejected" | "handled"

#Returns

void


#strict?

optional strict?: boolean

Defined in: background.ts:245

Refuse construction without verification. Defaults to true.


#verify?

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

Defined in: background.ts:243

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

#Parameters

req

WebhookRequest

#Returns

boolean | Promise<boolean>


#Interface: WebhookRequest

Defined in: background.ts:222

#Properties

#body?

optional body?: string | Record<string, unknown>

Defined in: background.ts:224


#headers?

optional headers?: Record<string, string | string[] | undefined>

Defined in: background.ts:223


#Interface: WebhookResponse

Defined in: background.ts:227

#Properties

#body

body: string

Defined in: background.ts:229


#headers?

optional headers?: Record<string, string>

Defined in: background.ts:230


#status

status: number

Defined in: background.ts:228

Explore nearby

On this page

Interface: AgentHandle<TContext>Type ParametersTContextPropertiesabort?ReturnsnamerunParameterstaskcontext?ReturnsInterface: AuctionConfigPropertiesbidCriteriabiddersfallback?reservePrice?tokens?usd?task?timeout?msInterface: BlackboardConfig<TContext>Type ParametersTContextPropertiesagentsisDone?ParametersblackboarditerationReturnsmaxIterations?name?onEvent?Interface: ChatFileUploadEventExtendsPropertieschannelInherited fromcontentType?eventIdInherited fromnamereceivedAt?Inherited fromsizeBytes?surfaceInherited fromthreadId?Inherited fromtypeurl?userInherited fromInterface: ChatInstallationEventExtendsPropertiesactionchannelInherited fromeventIdInherited fromreceivedAt?Inherited fromsurfaceInherited fromtenantIdthreadId?Inherited fromtypeuserInherited fromInterface: ChatMentionEventExtendsPropertieschannelInherited fromcommand?eventIdInherited fromreceivedAt?Inherited fromsurfaceInherited fromtextthreadId?Inherited fromtypeuserInherited fromInterface: ChatMessageEventExtendsPropertieschannelInherited fromeventIdInherited fromreceivedAt?Inherited fromsurfaceInherited fromtextthreadId?Inherited fromtypeuserInherited fromInterface: ChatReactionEventExtendsPropertiesaddedchannelInherited fromemojieventIdInherited frommessageIdreceivedAt?Inherited fromsurfaceInherited fromthreadId?Inherited fromtypeuserInherited fromInterface: ChatReplyEventExtendsPropertieschannelInherited fromeventIdInherited fromparentIdreceivedAt?Inherited fromsurfaceInherited fromtextthreadId?Inherited fromtypeuserInherited fromInterface: ChatSurfaceAdapterPropertiesparseParametersreqReturnsreply?ParameterseventtextReturnssurfaceverify?ParametersreqReturnsInterface: ChatSurfaceChannelPropertiesidkind?name?Interface: ChatSurfaceMetaExtended byPropertieschanneleventIdreceivedAt?surfacethreadId?userInterface: ChatSurfaceUserPropertiesidisBot?name?Interface: ChatTriggerPropertieshandlersurfaceInterface: ChatTriggerObserverEventPropertiesevent?reason?surfacetypeInterface: ChatTriggerOptions<TContext>Type ParametersTContextPropertiesadapteragentautoReply?buildContext?ParameterseventReturnsbuildTask?ParameterseventReturnseventSchema?filter?ParameterseventReturnsonEvent?ParameterseventReturnsstrict?validateEvent?Interface: CompareConfigPropertiesagentsinput?selectionInterface: CompiledFlow<TInput>Type ParametersTInputPropertiesdefinitionorderrunParametersinput?options?ReturnsInterface: CompileFlowOptions<TInput>Type ParametersTInputPropertiesdefinitionregistryInterface: CronJob<TContext>Type ParametersTContextPropertiesagentcontext?runOnStart?scheduletask?Interface: CronSchedulerPropertiesstartReturnsstopReturnstickParametersnow?ReturnsInterface: CronSchedulerOptions<TContext>Type ParametersTContextPropertiesjobsnow?ReturnsonEvent?Parameterseventerror?jobnowresult?typeReturnsscheduleTick?ParametersfnReturnsInterface: DebateConfigPropertiesearlyExit?format?judgeopponentproponentroundstopicInterface: DelegateConfigPropertiesadapter?maxSteps?skilltools?Interface: DurableRunnerPropertieshistoryReturnsresetReturnsstepType ParametersTResultParametersstepIdfnoptions?name?ReturnsInterface: DurableRunnerOptionsPropertiesmaxAttempts?onEvent?ParameterseventReturnsretryDelayMs?runIdstoreInterface: FlowDefinitionPropertiesdescription?namenodesversion?Interface: FlowHandlerContext<TInput>Type ParametersTInputPropertiesdepsinputnodewithInterface: FlowNodePropertiesidname?needs?runwith?Interface: FlowValidationIssuePropertiescodemessagenodeId?Interface: FlowValidationResultPropertiesissuesokorderInterface: HierarchicalConfig<TContext>Type ParametersTContextPropertiesmaxDepth?name?onEvent?rootroute?ParametersinputnodetaskReturnsInterface: HierarchicalNode<TContext>Type ParametersTContextPropertiesagentchildren?tags?Interface: QuotaExceededEventPropertiesatkindlimitobservedtoolInterface: QuotaSnapshotPropertiesperRunperWindowInterface: QuotaTrackerPropertiescheckParameterstoolrunIdReturnsrecordParameterstoolrunIdReturnsreleaseParameterstoolrunIdReturnsresetRunParametersrunIdReturnssnapshotReturnsInterface: QuotaTrackerOptionsPropertiesenv?now?ReturnsonExceeded?ParameterseventReturnsquotasInterface: ReadonlySharedContextMethodsentries()Returnsget()ParameterskeyReturnshas()ParameterskeyReturnsInterface: RunFlowOptionsPropertiesmaxAttempts?onEvent?ParameterseventReturnsretryDelayMs?runId?store?Interface: RunOptionsPropertiesdelegates?maxSteps?runId?sharedContext?signal?skill?systemPrompt?tools?Interface: RunResultPropertiescontentdurationMsmessagesstepstoolCallsInterface: RuntimeConfigPropertiesadapterdelegates?maxDelegationDepth?maxSteps?maxTokens?memory?observers?onConfirm?ParameterstoolCallReturnsretriever?systemPrompt?temperature?tools?validateArgs?Interface: SharedContextMethodsentries()Returnsget()ParameterskeyReturnshas()ParameterskeyReturnsreadOnly()Returnsset()ParameterskeyvalueReturnsInterface: SpeculateInputPropertiescandidatespick?requesttimeoutMs?Interface: SpeculateOutputPropertiesallloserswinnerInterface: SpeculativeCandidatePropertiesabortOnLoser?adapteridInterface: SpeculativeResultPropertiesaborted?chunkserror?idlatencyMstextInterface: StepLogStorePropertiesappendType ParametersTParametersrecordReturnsclear?ParametersrunIdReturnsgetType ParametersTParametersrunIdstepIdReturnslistParametersrunIdReturnsInterface: StepRecord<TResult>Type ParametersTResultPropertiesattemptendedAterror?nameresult?runIdstartedAtstatusstepIdInterface: SupervisorConfig<TContext>Type ParametersTContextPropertiesmaxRounds?onEvent?route?ParameterstaskworkersReturnssupervisorworkersInterface: SwarmConfig<TContext>Type ParametersTContextPropertiesmembersmerge?ParametersresultsReturnsname?onEvent?timeoutMs?Interface: ToolQuotaPropertiesdryRunRequiredIn?perRun?perWindow?countwindowMsInterface: TopologyLogEventPropertiesagent?iteration?phaseresult?task?topologyInterface: ValidatorPropertiescheckParametersctxReturnsmaxRetries?nameonFail?repairPrompt?Parametersctxoutputreason?ReturnsInterface: ValidatorAuditEventPropertiesatattemptsfailuresactionattemptreason?validatoroutcomeoutputInterface: ValidatorCheckContextPropertiesattemptoutputInterface: ValidatorGuardPropertiesrunParametersoptionsReturnsInterface: ValidatorGuardOptionsPropertiesaudit?ParameterseventReturnsfallback?validatorsInterface: ValidatorGuardRunPropertiesacceptedattemptsfailuresactionattemptreason?validatoroutputInterface: ValidatorGuardRunOptionsPropertiesregenerateParametersrepair?Returnsseed?Interface: VoteConfigPropertiesagentsballotinput?judgeAgent?onTieInterface: WebhookOptions<TContext>Type ParametersTContextPropertiesagentcontext?extractTask?ParametersreqReturnsonEvent?Parameterseventerror?typeReturnsstrict?verify?ParametersreqReturnsInterface: WebhookRequestPropertiesbody?headers?Interface: WebhookResponsePropertiesbodyheaders?status