Intelligence · interface

ContextProvider

A read-only snapshot the model is told about.

Explained in Agents and behaviour.

interface ContextProvider<T>
import type { ContextProvider } from '@driftengine/ai';

In depth

Context and tools are separate surfaces and the separation improves behaviour: nearby objects are context, inspecting one in detail is a tool, moving is a tool.

Properties

NameTypeDescription
idreadonlystringStable and versioned, like a tool id: project.visible@5.
priorityreadonlynumber
maxItemsreadonlyoptionalnumber

Methods

describe

describe(): { readonly title: string; readonly schema: ToolSchema; }

sample

sample(subject: string): T
ParameterTypeDescription
subjectstring