For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Build an AI Agent

Build an AI Agent

This guide covers creating, configuring, and testing Answer Agents, the most common type of AI Agent. Answer Agents respond to user questions and assist support teams using Knowledge Sources, integrations, and web search.

For instructions on building other agent types, see Doc Updater Agents and Insights Agent.

On this page

How AI Answer Agents work

Answer Agents use your instructions, request context, and configured information sources to generate responses and perform supported actions.

The agent uses AI models for tasks such as:

  • Checking whether a query is restricted or has a predefined answer

  • Selecting tools and API calls when integrations are configured

  • Generating an answer from Knowledge Sources

  • Formatting the response according to your instructions

How AI Agents use models internally

ClearFeed can use different models for these tasks to balance complexity and response time. The model you choose under Select AI Model controls answer generation from Knowledge Sources, which affects answer quality and latency. ClearFeed selects models for the other tasks independently.

Internal models come from the same providers—Groq, OpenAI, and Gemini—but may include models outside the agent's model dropdown.

Context available to the agent

The agent uses the following information to understand the question and prepare an answer:

  • Question: The question the agent needs to answer.

  • Conversation: Previous messages and information extracted from shared images, when available.

  • Request details: Form fields and the ticket title, when available.

  • Customer details: Selected customer fields and their descriptions, when available. See Provide Customer Context to AI Agents to choose which fields to include.

How form data is passed

Form fields included in the request context give the agent both the field's value and information about what it means. For example:

Field detail
Example

Field name

Product edition

Current value on the request

Enterprise

Description, if provided

The edition affected by this request

Field type

Select

Available options

Free, Pro, Enterprise

For select and multi-select fields, the agent receives all configured options, including those that are not selected. Other field types include text.

The description comes from the custom field's Description. AI Description is not used for this context.

Understand Images in Conversations

Answer Agents can read images posted in Slack conversations and use them as part of the conversation context.

This helps the agent understand:

  • Error messages and banners shown in screenshots

  • Visible IDs, URLs, and other troubleshooting details

  • The screen or workflow the user is referring to

This is especially useful when users report issues by sharing screenshots instead of describing the problem fully in text.

Creating an AI Answer Agent

  1. From the left navigation in the ClearFeed web app, go to AI > Agent Studio.

  2. Click New AI Agent.

  3. Choose Answer Agent.

Enable at least one of the following to create an Answer Agent:

  • A Knowledge Source

  • An integration

  • Web Search

Add and Prioritize Knowledge Sources

Knowledge Sources define what information the Answer Agent can access. They are optional if Web Search or integrations are enabled.

You can configure Knowledge Sources in one of the following ways:

  • Add All: Allow the agent to use all indexed Knowledge Sources.

  • Pick Specific: Limit the agent to selected Knowledge Sources using tags to control scope.

Prioritizing Knowledge Sources for AI Agents

ClearFeed lets you prioritize knowledge sources used by your AI Agents when generating answers. This gives you control over which documentation the agent should prefer when multiple knowledge sources are connected.

Each knowledge source connected to an AI Agent can be marked as Primary using tags.

How it works

  • When prioritization is enabled, you define one or more tags that identify Primary Knowledge Sources

  • The AI Agent searches all primary knowledge sources first

  • If a confident answer can be generated from these sources, the agent does not consult secondary sources

  • Secondary knowledge sources are used only if the primary sources do not sufficiently cover the question

When prioritization is disabled

  • The AI Agent searches all connected knowledge sources equally, with no preference—this is the default behavior for existing agents

Configuring Search Results and Citations

Use Advanced Settings in the agent's Add Knowledge Sources section to control generated answers, search results, and citations. Under Customize AI Responses, configure the options below, then click Publish. These settings apply when the agent runs as a Virtual Agent or Agent Assistant at the Collection level.

  • Display AI-Generated Answers: Choose whether AI-generated responses are shown.

  • Share Search Results: Display relevant search results alongside the answer and configure how many results to show.

  • Share References: Display documentation references used to generate the answer and configure how many references to show (up to 6).

  • Exclude Certain Knowledge Sources from References: Contact ClearFeed Support and provide a list of Knowledge Source tags to exclude. URLs from these sources will be hidden from the final references list, but the AI Agent can still use them to generate answers.

    Example use case: Your AI Agent uses both public help docs and internal runbooks to answer questions. Hide internal runbook URLs from the references list while allowing the agent to use their content to generate answers.

Customize AI Responses settings in Agent Studio

Add Integrations to the AI Agent

Answer Agents can connect to external systems to perform actions and to lookup information.

Supported Integrations

Jira, HubSpot, GitHub, Zendesk, Notion, Okta, JumpCloud, Kandji, Asset Panda, BambooHR.

Integration Permissions

Under Advanced Settings, control what the agent is allowed to do for each integration:

  • Grant specific permissions manually

  • Allow only current permissions

  • Enable all current and future permissions

By default, all current and future permissions are enabled. This can be customized at any time.

Restricted Mode

Restricted Mode prevents unauthorized access to employee data by ensuring that AI Agents can only act on behalf of the user who is interacting with them.

When Restricted Mode is enabled for an integration:

  • User identity is enforced — All actions are performed only on behalf of the authenticated user making the request

  • Actions are scoped to the requesting user — Operations like viewing employee details, requesting time off, or updating information apply only to that user's own data

  • Global listing tools are disabled — Tools that list all employees or allow browsing other users' information are automatically blocked to prevent data leakage

  • Knowledge Bases and Web Search continue to work — These information sources operate normally and are not affected by Restricted Mode

Use Case

Restricted Mode is particularly valuable for HR and employee management integrations such as:

  • BambooHR — Available now

  • Okta — Available now

Without Restricted Mode, a user could potentially ask the AI Agent to view or modify another employee's information. With Restricted Mode enabled, the Agent will refuse any request that attempts to access data belonging to someone other than the requesting user.

Example Behavior

Without Restricted Mode:

User: "What is John Smith's salary?" Agent: Provides John Smith's salary information

With Restricted Mode:

User: "What is John Smith's salary?" Agent: "I can only provide information about your own profile. I cannot access other employees' data."

User: "Show me my time-off balance" Agent: Displays the requesting user's own time-off balance

Enable Web Search to let the agent use current information from the public web alongside its configured Knowledge Sources and integrations. The agent can also use Web Search as its only information source.

When Web Search is enabled, the {{web_search}} tool is available for use in agent instructions. See Reference tools with placeholders for details.

Customize Answers based on Customer Properties

Use either or both methods to tailor the agent's answers to a customer:

Access conditions determine which sources the agent can use. Customer context helps the agent interpret the question and tailor its answer.

Restrict Knowledge Source Access by Customer Conditions

ClearFeed lets you restrict specific Knowledge Sources linked to an AI Agent so they are available only for customers who match defined customer conditions.

This is useful when the same AI Agent serves multiple customer segments, but some documentation should only be used for a subset of customers.

You can add multiple customer conditions and map each condition to one or more Knowledge Source tags.

How it works

  • Knowledge Sources that are not mapped to any customer condition remain public for that AI Agent

  • Knowledge Sources mapped to a customer condition are available only when the invoking customer matches that condition

  • If a Knowledge Source matches multiple conditions, the customer only needs to satisfy one of those conditions to access it

  • At invocation time, ClearFeed first determines the customer tied to the request and evaluates that customer's properties before deciding which Knowledge Sources the AI Agent can use

Configuring customer conditions for Knowledge Source access

Example

Assume your AI Agent has access to these Knowledge Sources:

  • General Help Center tagged public-docs

  • Enterprise Setup Guide tagged enterprise-docs

  • Premium Success Playbooks tagged premium-docs

You then configure these customer conditions:

  • If Customer = Acme Corp, allow tag enterprise-docs

  • If customer custom field Plan = Premium, allow tag premium-docs

At runtime:

  • A customer with no matching condition can use only General Help Center

  • A request from the customer Acme Corp can use General Help Center and Enterprise Setup Guide

  • A customer on the Premium plan can use General Help Center and Premium Success Playbooks

How Customer Conditions Work with Primary Knowledge Sources

Primary Knowledge Source selection and customer-based access control work together in the following way:

  1. Based on your Primary Knowledge Source tags, each selected Knowledge Source is classified as either Primary or Secondary

  2. At invocation time, ClearFeed uses the customer's properties to determine which Knowledge Sources of the AI Agent the customer can access

  3. Within that accessible set, some Knowledge Sources will be Primary and others will be Secondary based on your configuration of the Primary Knowledge Source tags

Provide Customer Context to AI Agents

Available on External Helpdesk accounts. Internal Helpdesk accounts do not have the Customer context card.

Customer context lets an Answer Agent use selected customer field values — such as plan, region, or product edition — when answering a request. The agent can use these details to better select knowledge relevant to the user's questions and craft more relevant answers.

To configure customer context:

  1. Go to AI → AI Agents and open an Answer Agent.

  2. Under Knowledge, find the Customer context card.

  3. Click + Fields and select the customer fields the agent can use.

  4. Test the agent in the test panel, then click Publish.

By default, no customer fields are included. The agent receives only the standard request details. When a request arrives, ClearFeed provides the agent with the requesting customer's values for the selected fields.

The agent also receives each selected field's description when one is provided. Add a clear description that explains what the field represents and, where useful, what its values mean. For example, describe Hosting Region as the customer's hosting location, and explain what values such as EU and US indicate. This helps the agent interpret the customer's details and use them appropriately when answering.

Example: A Knowledge Source documents prices for EU and US hosting, and the prices differ by region. A customer asks, “What does my plan cost?” If the agent has access to the customer's Hosting Region field, it can use that context to find the price for the customer's region and give a more relevant answer.

Note

  • If a request form field and a customer field contain the same detail, the request form field takes priority because it reflects the specific request. For example, if both fields provide the hosting region, the agent uses the region from the request form.

  • If a selected customer field is deleted or changed to an unsupported type, it appears as Unavailable in the Customer context card. Remove unavailable fields before testing or publishing the agent.

Provide Instructions for the AI Agent

Instruction Structure

Answer Agent instructions define how the agent reasons, uses tools, and generates responses.

  • Agent description: The Agent description defines the agent’s core responsibility and operating boundaries. It sets the foundation for how the agent interprets queries, selects tools, and responds. It should clearly state:

    • What the agent is responsible for

    • How it should behave at a high level

    • Whether it must rely on tools or can answer directly

  • Restricted queries: Specify queries the agent must never answer to avoid sensitive or non-permissible responses. When detected, the agent replies with the restricted-query response from Response generation. New agents include a default response there, "I can't answer this, the support team will respond soon.", which you can edit. If no response is set, the agent writes its own refusal. Examples:

    • System credentials

    • Admin access

    • Salary or compensation data

  • Predefined answers: Answers to common questions that the agent returns directly, without searching.

  • Answer lookup: Define how the agent plans and executes tasks, including:

    • When tools must be used

    • How multiple tools should be sequenced

    • When execution should stop due to insufficient data

  • Response generation: Control tone, language, formatting, and fallback behavior.

    • Tone and length: Keep answers clear, concise, and aligned with your brand.

    • Language: By default, respond in the same language as the query.

    • Knowledge lookup and fallback: Generate a response when relevant information is found. Otherwise, return a fallback message.

Reference tools with placeholders

Placeholders in instructions reference tools the agent can use. Start typing a placeholder in the Instructions box to see available suggestions. Referencing a tool guides the agent's use of it; the reference does not invoke the tool or substitute a value into the instructions.

For example, you can instruct the agent: "When asked to summarize this discussion, use {{chat_analysis.process_chat}} to extract the key decisions and action items."

The following placeholders are available depending on the agent's configuration:

Placeholder shown in the editor
Purpose
Availability

{{chat_analysis.process_chat}}

Analyze the current conversation, such as to summarize it or extract action items.

Standard

{{common.get_current_date_time}}

Retrieve the current date and time, including when interpreting expressions such as "today" or "tomorrow".

Standard

{{knowledge_base.search_knowledge_base}}

Search the agent's configured knowledge sources for an answer.

When knowledge sources are selected

{{web_search}}

Search the public web. The agent can use this alongside knowledge base search.

When web search is enabled

Integration tools, for example {{jira.create_jira_issue}} and {{zendesk.search_zendesk_tickets}}, are available only if the integration is connected to the agent and the specific tool is enabled under Integration Permissions.

The list of available tools is subject to change.

How the Agent Uses Your Instructions

At a high level, each instruction section is used at a specific step:

  1. Checks for a direct response. The agent checks whether it can reply without searching: a greeting or thanks, a restricted query, or a question that a predefined answer fully covers. If so, it sends that reply and stops. This check runs at the same time as the lookup.

  2. Looks up the answer. The agent decides which Knowledge Sources, web search or integrations to use, following Answer lookup instructions. If Answer lookup instruction requires information that the request doesn't include, the agent asks the user for it instead of searching.

  3. Writes the response. The agent turns what it found into the final reply, following Response generation. If it found nothing useful, it sends the fallback message.

Section
Check for a direct response
Look up the answer
Write the response

Agent description

Yes

Yes

Yes

Restricted queries

Yes

No

No

Predefined answers

Yes

Yes

No

Answer lookup

No

Yes

No

Response generation

Yes

No

Yes

The agent also uses context from the request:

  • Attached images: Used in every step.

  • Conversation history: Used when the agent checks for a direct response and looks up the answer.

  • Request title and form fields: Used when the agent looks up the answer and writes the response.

  • Customer context: On External Helpdesk accounts, the values of the customer fields selected under Customer context. Used in the same steps as form fields.

Tip: Put requirements such as "ask for the operating system before troubleshooting" in Answer lookup, and tone, formatting and fallback messages in Response generation.

Improve Prompt (AI-Assisted)

The Improve Prompt option refines simple or incomplete instructions into a structured, production-ready prompt.

  • Available for new and existing agents

  • Disabled once improved

  • Re-enabled only if instructions change

Mentioning Slack users in AI Agent responses

By default, if you ask the AI Agent to mention someone by name in a predefined answer, the name appears as plain text and does not notify that person in Slack. To have the Agent post a Slack mention that notifies the user, include the user's Slack mention syntax in your prompt.

How to set it up

  1. Get the Slack member ID for each person you want mentioned. In Slack, open the person's profile, click More, then Copy member ID. It looks like U01ABC2DEF.

  2. In your AI Agent instructions, reference each person using Slack's user mention syntax <@USER_ID> — for example, <@U01ABC2DEF>.

  3. Instruct the Agent to include the mention syntax in its response and preserve it exactly. For example:

Requirements

  • Each person you want to notify must already be a member of the channel where the Agent responds. An app-generated mention will not notify someone who isn't in the channel.

  • The mention must appear in the response exactly as <@USER_ID>. If the syntax is altered — wrapped in backticks, turned into a display name, or missing a character — Slack will not expand it into a mention.

Select AI Model

ClearFeed lets you choose the AI model provider and a specific model for each Answer Agent. The selected provider and model are used when the agent generates responses from Knowledge Sources. Note this section only applies for customers who are not using Bring Your Own Model mode.

Supported Providers and Models (and some notes for each)

The number of AI models in the market can be confusing. Cost, Latency and Accuracy are tradeoffs. Expensive models can be more accurate, but also very slow. ClearFeed provides a selected subset of models from different providers that give users good choice over latency and quality at a reasonable cost. ClearFeed also has DPAs and no logging settings with each of these providers - that assure that your data stays secure and is not used for training AI models.

Below are the list of models currently available in ClearFeed:

  • OpenAI: Models from OpenAI, with OpenAI as the inference platform. Available models:

    • GPT-6 Luna: high speed, medium quality.

    • GPT-6.1 Terra: lower speed, but higher quality than GPT-6 Luna.

  • Gemini: Gemini models from Google, also using Google Cloud as the inference platform.

    • Gemini-3-flash-preview: medium speed and quality.

    • Gemini-3.1-pro: similar to GPT-6.1 Terra with lower speed and higher quality.

Selecting the AI model provider and model for an Answer Agent

By default, new AI Agents in ClearFeed come pre-configured with GPT-6 Luna model from OpenAI. Users are advised to try GPT-6.1 Terra if quality of answers is unsatisfactory with GPT-6 Luna. To compare the performance of individual models, you can look them up on the Artificial Analysis site — for example, the GPT-5.4 mini model card.

Note:

  • Reasoning Effort: All models listed above are thinking models. For these models, ClearFeed defaults to the medium reasoning effort. The reasoning effort is not currently configurable by the user.

  • Deprecated Models: GPT-4.1, GPT-5.4 mini and GPT-OSS-120B (Groq) are deprecated. Agents already using them keep them, but they can't be selected for other agents.

  • Model Coverage: If you need a model not listed in the dropdown, contact ClearFeed Support. We are continuously evaluating and adding new providers and models.

Customize and Test your Agent

Customize Look and Feel

Customize how the agent appears when it posts public responses in supported channels:

  • Display Name

  • Profile Photo (image URL)

  • Description for internal clarity

Testing Your Agent

Validate behavior before enabling the agent in production with chat-based or ticket/request-based testing.

Chat-Based Testing

  • Simulate conversations

  • Review responses

  • Inspect the Execution Plan, including tools, steps, and references

Ticket / Request-Based Testing

  • Test against existing tickets or requests

  • Validate behavior when ticket context and fields are present

  • Mirror real Virtual Agent and Agent Assistant usage

FAQs

  1. What’s the difference between selecting a provider/model and BYOM? Answer: Model selection uses ClearFeed-managed credentials; BYOM uses your organization's API key and provider account. See Bring Your Own Model for setup details.

  2. Which setting takes precedence: BYOM or provider/model selection? Answer: If BYOM is configured, it always overrides the provider chosen in the agent — all requests use the BYOM provider and credentials. Within that provider, the model dropdown still applies: if you have selected a specific model, ClearFeed uses it for Gold tier (Knowledge Source response generation); otherwise ClearFeed uses the provider's default Gold tier model.

  3. Can different Answer Agents use different providers or models? Answer: Yes. Provider and model selection is per Answer Agent. Multiple Answer Agents in the same workspace can use different providers or models, depending on the options available in that workspace.

  4. Will switching providers or models change my agent’s behavior? Answer: Yes. Different providers and models may vary in response quality, latency, style, and verbosity. We recommend testing a few sample questions before using a new provider or model in production.

  5. How can I prevent the AI Agent from showing search results or references, so it only provides the answer? Answer: Disable Share Search Results and Share References under Customize AI Responses. See Configuring Search Results and Citations for setup steps.

Other agent types

Last updated