Agent / foldkit-agent/metakit

Tool

interface · packages/agent/src/metakit.ts:64

interface Tool<Key extends string, Input, Model, Principal> {
  (
    description: string,
  ): Variant<Input, Input, Input, SnakeCase<Key>, Model, Principal, undefined>
  <MessageInput = Input, const Name extends string = SnakeCase<Key>>(
    config: ToolConfig<Input, MessageInput, Model, Principal, Name>,
  ): Variant<Input, Input, MessageInput, Name, Model, Principal, undefined>
}

One transition's tool: call it with a description, or a ToolConfig, and put the result under the Message tag it dispatches in Agent.expose.