Tools extend what an Agent can do: call external APIs, run custom logic, or fetch data on demand. When the LLM decides to use a Tool, SAALT calls your App to execute it. A Tool can also ship a UI component that visualizes its result in the chat.
How Tools work
SAALT calls your App's /tools route (GET) to list the available Tools; these are offered to the LLM. When the LLM invokes one, SAALT sends a POST to /tools with the chosen toolIdentifier in the body, and your App executes it. The Bridge helps you define and execute Tools, but you can implement the route in any language.
Defining a Tool
A Tool defined with the Bridge's Tools helper:
Code
execute must resolve to { result: unknown; error?: string } — put your payload under result, and set error (a string) when the call fails.
To implement Tools in another language, expose a /tools route that returns the array of Tool definitions (omit execute) and handle the POST yourself; the request body carries the toolIdentifier to dispatch on.
Tool components
SAALT can render a custom federated React component for a Tool's result in the chat UI. Add your federated component's name to the Tool definition, and the chat UI fetches it from your App.
Next steps
- Bridge — the full
ToolsAPI andToolExecuteParams. - Views — build the federated component that visualizes a Tool result.
- Architecture — where
/toolssits among an App's routes.