Skip to content
AgentsKit

@agentskit/core β€” Type Aliases

API type aliases for @agentskit/core.

#Type Alias: AdapterFactory

AdapterFactory = object

Defined in: packages/core/src/types/adapter.ts:55

Factory that turns a request into a stream of model output.

#Param

request

Messages and model context for the response.

#Properties

#capabilities?

optional capabilities?: AdapterCapabilities

Defined in: packages/core/src/types/adapter.ts:58

Optional capabilities hint. See AdapterCapabilities.


#createSource

createSource: (request) => StreamSource

Defined in: packages/core/src/types/adapter.ts:56

#Parameters

request

AdapterRequest

#Returns

StreamSource


#Type Alias: AgentEvent

AgentEvent = AgentEventPayload & object

Defined in: packages/core/src/types/agent.ts:38

Typed lifecycle event emitted by an agent or runtime observer source.

#Type Declaration

#correlation?

readonly optional correlation?: AgentEventContext


#Type Alias: ArgsValidator

ArgsValidator = (schema, args) => ArgsValidationResult

Defined in: packages/core/src/types/tool.ts:56

Validate tool arguments against a JSON Schema before execution.

#Parameters

#schema

JSONSchema7

#args

Record<string, unknown>

#Returns

ArgsValidationResult


#Type Alias: BudgetStrategy

BudgetStrategy = "drop-oldest" | "sliding-window" | "summarize"

Defined in: packages/core/src/budget.ts:6

Strategy used to reduce a request when it exceeds its token budget.


#Type Alias: ContentPart

ContentPart = TextPart | ImagePart | AudioPart | VideoPart | FilePart

Defined in: packages/core/src/types/content.ts:52

Supported provider-neutral parts of a multi-modal message.


#Type Alias: DataRegion

DataRegion = "eu" | "us" | "apac"

Defined in: packages/core/src/types/common.ts:5

Cloud region used to describe where a service stores or processes data.


#Type Alias: EmbedFn

EmbedFn = (text) => Promise<number[]>

Defined in: packages/core/src/types/memory.ts:91

Convert text into its numeric embedding vector.

#Parameters

#text

string

Content to embed.

#Returns

Promise<number[]>

The text embedding as an array of numbers.


#Type Alias: InferSchemaType<T>

InferSchemaType<T> = T extends object ? InferJSONSchemaObject<T> : Record<string, unknown>

Defined in: packages/core/src/types/tool.ts:101

Infer a TypeScript argument object from a JSON Schema literal.

#Type Parameters

#T

T


#Type Alias: MaybePromise<T>

MaybePromise<T> = T | Promise<T>

Defined in: packages/core/src/types/common.ts:2

Accept a value returned synchronously or through a promise.

#Type Parameters

#T

T


#Type Alias: MessageRole

MessageRole = "user" | "assistant" | "system" | "tool"

Defined in: packages/core/src/types/message.ts:5

Role assigned to a message in a conversation.


#Type Alias: MessageStatus

MessageStatus = "pending" | "streaming" | "complete" | "error"

Defined in: packages/core/src/types/message.ts:7

Lifecycle state of a message while it is created or processed.


#Type Alias: PartKind

PartKind = ContentPart["type"]

Defined in: packages/core/src/types/content.ts:55

Discriminator values used by the supported content-part variants.


#Type Alias: StreamStatus

StreamStatus = "idle" | "streaming" | "complete" | "error"

Defined in: packages/core/src/types/stream.ts:2

State of a response stream.


#Type Alias: ToolAuthorizationPhase

ToolAuthorizationPhase = "propose" | "execute"

Defined in: packages/core/src/types/tool.ts:160

Stage at which a tool authorization decision is requested.


#Type Alias: ToolAuthorizer

ToolAuthorizer = (toolCall, context) => MaybePromise<ToolAuthorizationDecision>

Defined in: packages/core/src/types/tool.ts:170

Callback that decides whether a proposed or executing tool call is allowed.

#Parameters

#toolCall

ToolCall

Proposed or executing tool call.

#context

ToolAuthorizationContext

Conversation, tool, and authorization phase.

#Returns

MaybePromise<ToolAuthorizationDecision>

A sync or async allow/deny decision.


#Type Alias: ToolCallStatus

ToolCallStatus = "pending" | "running" | "complete" | "error" | "requires_confirmation"

Defined in: packages/core/src/types/tool.ts:6

Runtime state of a model-requested tool call.


#Type Alias: VectorFilter

VectorFilter = VectorFilterCompound | {[field: string]: VectorFilterPredicate; }

Defined in: packages/core/src/types/memory.ts:63

Portable metadata filter accepted by vector-memory search.


#Type Alias: VectorFilterOperator

VectorFilterOperator = { $eq: VectorFilterPrimitive; } | { $ne: VectorFilterPrimitive; } | { $in: VectorFilterPrimitive[]; } | { $nin: VectorFilterPrimitive[]; } | { $gt: number | string; } | { $gte: number | string; } | { $lt: number | string; } | { $lte: number | string; } | { $exists: boolean; }

Defined in: packages/core/src/types/memory.ts:42

Comparison operators supported by portable vector metadata filters.


#Type Alias: VectorFilterPredicate

VectorFilterPredicate = VectorFilterPrimitive | VectorFilterOperator

Defined in: packages/core/src/types/memory.ts:54

Primitive equality shorthand or an explicit metadata filter operator.


#Type Alias: VectorFilterPrimitive

VectorFilterPrimitive = string | number | boolean | null

Defined in: packages/core/src/types/memory.ts:39

Normalized metadata-filter shape (v1). Every vector backend translates this into its own native filter language; callers stay portable.

  • Object form is field β†’ predicate (implicit AND across fields).
  • Predicate is either a primitive (shorthand for \{ $eq: ... \}) or one of the operator objects below.
  • $and / $or compose nested filters.

Example: { tags: { $in: ['docs', 'rag'] }, version: { $gte: 2 } } { $or: [{ author: 'alice' }, { author: 'bob' }] }

Explore nearby