Skip to main content
Clip an extension onto a tool to produce a wrapped or transformed variant. An extension is a clip-on power that wraps or transforms a tool into a new variant. Applying one branches the tool: the original stays bound, and a new <tool>_<extension> variant appears alongside it. You load the extension’s module, then attach it to a tool — from the manifest or at runtime.

Load the extension module

Name each extension module under extensions_modules. Importing the module runs its registration, adding the extension to the global catalog.
manifest.yml
List the registered extensions to confirm the catalog:

Attach it to a tool

Attach an extension in the manifest with the extensions map on a tools entry. The map is keyed by tool name; a value is one combo ([cache]) or a list of combos. A stacked combo [[a, b]] layers both onto one branch.
manifest.yml
The extensions map only attaches — it never selects a tool. A mapped tool that is absent from the selected set raises loudly. A preset carries its extensions in its own body instead: extensions on create and on save-version. A branch of a preset runs the preset, so the preset’s fixed arguments, its input schema or input map, and its output rules all hold on the branch (see presets).

Or attach at runtime

Apply a tool’s full combo list at runtime. Each --combo is one combo, written as a JSON array of extension elements; repeat it to author several combos at once. An element is a bare extension name or a {"name", "config"} object binding the extension’s settings. The write checks the settings against the schema the extension declares and binds each combo once before anything is stored, so a value the schema or the extension refuses is an error naming the combo and the extension, and the manifest is left unchanged. Passing no --combo clears the tool’s extensions. To change one combo without rewriting the whole list, tai tools extensions-add appends a single combo and tai tools extensions-remove drops one, leaving the tool’s other combos in place — adding a combo already present is refused, as is removing one the tool does not carry.
A wrapper presents the wrapped tool’s input schema unchanged apart from its own control kwargs; a transformer presents its own composed schema. Stacked extensions apply left to right, so [cache, batch] produces batch(cache(tool)).

See also