ClouisleClouisle

Tutorial: Build a Customer Service Agent

Build a customer service Agent in your team that cites a knowledge base and calls web search

After completing this tutorial, you will have a customer service Agent that answers product questions, cites internal documentation, queries the web when needed, and shows run sources.

Prerequisites

You are logged in to Clouisle; the current team has an enabled chat model; you have a usable knowledge base, or create one first by following Create a knowledge base. Web search requires the server-side TAVILY_API_KEY configuration.

Final Result

The customer service Agent is in the Published state, with a system prompt, one linked knowledge base, the web search tool, and at least one suggested question.

Customer service Agent final result
Customer service Agent final result

Step 1: Create the Agent

First create the resource shell so later steps can configure knowledge and tools in the same Agent.
  1. Open Apps > Create app > Agent.
  2. Set the name to 客服助手 and describe the service scope in the description.
  3. Select a chat model authorized for the team.
  4. Save in Agent settings.
Customer service Agent creation result
Customer service Agent creation result

Step 2: Write the Prompt

State citation priority and escalation rules for uncertainty explicitly to reduce fabrication when the knowledge base has no answer.

In Prompt, enter:

你是 Clouisle 产品客服助手。
优先根据关联知识库回答,并在有来源时给出引用。
知识库没有足够信息时,明确说明不确定,不要编造版本、配置或价格。
只有用户要求最新外部信息时才使用网页搜索。
回复使用简体中文,先给结论,再给步骤。

Save and send a product question in the preview.

The knowledge base anchors customer service answers to fact sources your enterprise can review.
  1. On the Knowledge base card, select Add.
  2. Select the target knowledge base.
  3. Use hybrid retrieval with Top K of 5 and a threshold of 0.3.
  4. Save.
Customer service Agent knowledge base binding
Customer service Agent knowledge base binding
Use external search only for time-sensitive information beyond the knowledge base, so not every question depends on the live web.
  1. In Tools, select Add.
  2. Select the built-in web_search.
  3. If Configuration required appears, contact an administrator to configure the Tavily API Key.
  4. Save and test a question that needs external information.

Step 5: Publish & Accept

  1. Verify citations with an internal documentation question.
  2. Verify tool calls with a time-sensitive question.
  3. Verify refusal or uncertainty statements with a sensitive question not covered by the knowledge base.
  4. Select Publish and open the Public page.
  5. In Agent Logs, confirm conversations, sources, tool results, and Token usage.

Acceptance criteria

Internal questions have sources; external questions trigger web_search only when needed; tool failures show errors instead of faked success; the Agent public page supports continued multi-turn conversations.

How is this guide?

On this page