Skip to main content

Invoke Custom Service as an AI Tool

Learn how to add a published Custom Service as an AI Tool for Yeeflow AI Agents and Copilots. By using Custom Services as tools, AI can execute reusable business logic and perform configured business operations.

Overview

After a Custom Service is published, it can be added as an AI Tool for an AI Agent or Copilot.

The Invoke custom service tool allows AI to:

  • Execute reusable business logic

  • Process business data

  • Transform information

  • Perform configured operations

  • Return structured results

Before adding a Custom Service as an AI Tool, make sure you have a published Custom Service.

For information about creating and publishing Custom Services, see:


Add Invoke Custom Service Tool

You can add the Invoke custom service tool from the AI Agent or Copilot configuration page.

Steps

  1. Open your AI Agent or Copilot.

  2. Go to the Tools tab.

  3. Click Add a tool.

  4. Select: Invoke custom service

After selecting the tool, the Invoke custom service configuration window opens.


Configure Invoke Custom Service

Before configuring the tool details, select the Custom Service you want to use.

The configuration window includes:

  • Select a service

  • Name

Select Service

After selecting Invoke custom service, choose the Custom Service you want to add as a tool.

The service selector displays available services from:

  • This application

  • Shared

You can search for a service by name.

Only published Custom Services can be selected.

If you need to create or manage Custom Services, click: Manage services

You can also access Custom Services from:

Application Settings → Integrations → Custom services

For more information, see:

Name

The Name field defines the tool name displayed to the AI Agent or Copilot.

Use a clear and descriptive name so the AI can better understand the purpose of the tool.

After selecting the service and entering the name, you can choose:

  • Add: Add the tool with the current configuration.

  • Add and configure: Add the tool and continue configuring details such as description, inputs, and outputs.


对,你这个理解更准确。这里的层级关系应该是:

AI Tool  └─ Tool type: Invoke custom service      └─ Service: Selected Custom Service

也就是说:

  • Tool 是 AI Agent / Copilot 的一个工具配置项。

  • 这个 Tool 的类型是 Invoke custom service

  • 在这个 Tool 里面,会显示它调用的是哪个 Service

  • Service 不是和 Tool 并列的独立配置,而是这个 Tool 调用的对象。

所以文章里不要写成 Tool and Service,容易让人误解成两个同级模块。

建议这样写:


Tool

The Tool section shows that this AI Tool uses Invoke custom service.

It also displays the selected Custom Service that will be invoked when the AI Agent or Copilot uses this tool.

The selected Custom Service provides the business logic, inputs, and outputs for this AI Tool.


如果你想更贴近 UI,可以写成:


Tool

The Tool section identifies the tool type added to the AI Agent or Copilot.

For this configuration, the tool type is Invoke custom service.

Under this section, the selected Custom Service is displayed. This is the service that will be executed when the AI uses this tool.


这段比 “Tool and Service” 更准确,层级也清楚。

完整放在 Configure Tool Information 里可以这样:


Configure Tool Details

After selecting a Custom Service, configure the tool details.

The configuration includes:

  • Name

  • Description

  • Tool

Name

The tool name identifies the capability available to the AI Agent or Copilot.

Use a clear name that describes what the tool does.

Description

The description helps the AI understand when this tool should be used.

A clear description should explain:

  • What the tool does

  • What type of operation it performs

  • When the AI should call it

Tool

The Tool section shows that this AI Tool uses Invoke custom service.

It also displays the selected Custom Service that will be invoked when the AI Agent or Copilot uses this tool.

Click the Open icon next to the service name to open the Custom Service management page: Application Settings → Integrations → Custom services

From there, you can view, edit, or manage the selected Custom Service.


Configure Tool Variables

The variables available in the AI Tool are inherited from the selected Custom Service.

These variables are configured when creating the Custom Service and define:

  • Inputs: Data required when the Custom Service is executed.

  • Outputs: Results returned after the Custom Service completes.

Custom Service (Define variables)         

AI Tool (Configure inputs and outputs)

AI Agent / Copilot execution

For more information about Custom Service variables, see:


Configure Inputs

Input variables define the data passed to the Custom Service when the AI Agent or Copilot calls the tool.

The available inputs are automatically displayed based on the selected Custom Service.

For each input, you can configure how the value is provided.

Available options depend on the input type and may include:

  • Dynamically fill with AI

  • Custom value

The AI can provide input values based on:

  • User requests

  • Conversation context

  • Available information


Configure Completion

The Completion section defines what the AI Agent or Copilot does after the tool finishes running.

In After running, choose how the tool should behave after execution:

  • Waiting for response: The AI waits for the Custom Service result and uses the returned output in the response or following steps.

  • Do not response: The tool runs without returning a response to the AI.

Use Waiting for response when the AI needs to use the Custom Service output, such as generated text, processed data, or structured results.


Configure Outputs

Output variables define the results returned by the Custom Service.

To make outputs available to the AI Agent or other tools:

  1. Click Add output.

  2. Select the outputs provided by the Custom Service.

  3. Click OK.

Only selected outputs will be available after the tool execution.

Outputs can be used by the AI Agent or other tools to:

  • Generate responses

  • Provide structured results

  • Continue AI execution


Test the Tool

Before publishing, use Test run to verify the AI Tool behavior.

During testing, you can check:

  • Whether the AI can identify when to use the tool.

  • Whether required inputs are provided correctly.

  • Whether the Custom Service returns the expected results.


Enable and Publish the Tool

After testing the tool:

  1. Enable the tool.

  2. Save the configuration.

  3. Publish the AI Agent or Copilot.

The Custom Service will then become available as an AI capability.


Troubleshooting

The Custom Service is not available

Check that:

  • The Custom Service has been published.

  • The service exists in the current application or has been shared.

  • You have permission to access the service.


The AI does not call the Custom Service

Check that:

  • The tool description clearly explains its purpose.

  • The Custom Service inputs are configured correctly.

  • The AI Agent or Copilot has access to the tool.


Tool execution returns an error

Check that:

  • Required input values are available.

  • The Custom Service works correctly in TEST RUN.

  • The service output variables are configured correctly.


Related Articles

Did this answer your question?