Skip to content

Tool Calls

When an agent invokes a tool in a Karli Studio chat, the call can be shown to the user with varying levels of detail. Agentlab gives flow designers two knobs per tool: a human-readable title, and a display mode.

Display Modes

Each tool can be rendered in one of three modes:

  • Hidden (none) — the call is not displayed in the chat. The agent still receives the result; the user simply doesn't see that the tool ran. Useful for noisy or internal tools whose presence would distract the conversation.
  • Summary line (line) — a single line announcing the call, with the tool's title and elapsed time. This is the default. Lightweight and unobtrusive while still confirming that something happened.
  • Expandable line (expandable) — the summary line plus a chevron that reveals the tool's inputs and outputs in full. Useful when transparency matters, or for debugging during development.

Configuring a Tool

On any tool-enabled component, open the Actions modal to see the tools the component exposes. Clicking a row opens a sidebar containing, among other things, two fields that control how that tool's calls appear in the chat:

  • Title shown in chat — free text shown when the tool is invoked (e.g. Looking up date). Leave blank to fall back to the component's default or to the tool's slug.
  • Display in chat — the display mode from the list above.

Changes take effect on the next flow run.

Per-Component Defaults (Advanced)

Component authors can pre-set both knobs directly on an Output(...) declaration. This is useful when a component should always present itself with a particular title or display mode, regardless of which flow it lands in.

from lfx.io import Output
from lfx.custom.custom_component.component import Component

class CurrentDateComponent(Component):
    outputs = [
        Output(
            name="get_current_date",
            method="get_current_date",
            tool_title="Looking up date",
            tool_display="line",
        ),
    ]

These defaults appear pre-filled in the Actions sidebar. Flow designers can still override them per flow.

Precedence

For any given tool call, the values used are resolved in this order:

  1. User override in the Actions sidebar (per flow)
  2. Author default declared on the Output(...)
  3. Runtime fallbackSummary line for the display mode, and the tool's slug for the title