Agent / API

foldkit-agent/metakit

foldkit-agent/metakit: the transitions of a metakit Machine as variants for Agent.expose. Each one takes its input Schema, its JSON Schema and its availability from the transition, so the guard written once in metakit is what an agent is shown and what refuses its call.

A separate entry point so that a page exposing no machine loads no metakit.

Functions

machineToolsA variant for Agent.expose from each transition of a metakit Machine:

Interfaces

BoundAgentTypesWhat machineTools reads of a bound agent (Agent.forModel, Agent.forApplication, either withPrincipal): its Model and Principal, so the tools fit that…
ServiceFreeTransitionA transition machineTools can make a tool of: expose decodes its input with no services, so its input Schema must need none. A transition from…
ToolOne transition's tool: call it with a description, or a ToolConfig, and put the result under the Message tag it dispatches in Agent.expose.
ToolConfigWhat a tool adds to its transition: words for the agent, and the parts a transition cannot say.

Types

MachineToolsA tool for every transition of the machine, keyed as the machine keys them.