Intelligence · interface

ToolDefinition

W is the consumer's world view, and this package never constrains it.

Explained in Agents and behaviour.

interface ToolDefinition<A, R, W>
import type { ToolDefinition } from '@driftengine/ai';

In depth

An engine package that knew what a world contained would be an engine package that knew what game it was in. A guard asking world.exists(id) is the consumer's sentence, written against the consumer's world.

Properties

NameTypeDescription
idreadonlystringStable and versioned — inspect@1. Never renumbered once shipped.
descriptionreadonlystring
schemareadonlyToolSchema
rateClassreadonlyoptionalstring
idempotentreadonlyoptionalboolean

Methods

admits

admits(args: A, world: W): boolean

Whether this call is still true of the world.

ParameterTypeDescription
argsA
worldW
More

Declared once, at registration, by the tool. The model never writes one: a model-authored precondition on a model-authored action is the model marking its own homework.

execute

execute(args: A, world: W): R
ParameterTypeDescription
argsA
worldW