AI Agents
Knowledge Agents
Create knowledge agent

Create a knowledge agent

EARLY ACCESS

Before you begin

Keep these guidelines in mind throughout the configuration:

  • Use the same language across knowledge sources and prompts.
  • Be consistent with brand name, agent purpose, and knowledge source content. Inconsistency causes the agent to give contradictory responses.
  • For prompt writing best practices, see Write prompts for AI agents.
NOTE

If you upload documentation for product A but write the prompt You should be a helpful agent for product B, the agent gives conflicting answers.


Create the agent

NOTE

You can create a maximum of 10 knowledge agents per account. If you reach the limit, the Create knowledge agent button is unavailable. To create a new agent, delete an existing one first.

  1. On the Infobip web interface, go to AI Agents > My agents > Knowledge agents tab.
  2. Select Create knowledge agent.
  3. Enter a unique name for the agent. This name is not shown to end users.
  4. In the Agent tab, configure the agent settings.
  5. In the Knowledge base tab, connect knowledge sources.
  6. Select Save agent.

Configure the agent settings

In the Agent tab, configure the following fields.

FieldDescription
DescriptionDescribe what the agent does, for example, This agent helps to book appointments and handle cancellations and refunds. This description is for internal reference only and is not shown to end users.
InstructionsDefine the agent behavior, persona, boundaries, and response style. The instructions tell the agent how to respond to end users. Include: persona, response behavior, forbidden topics (delimited with ///), and example conversations.

Example

- You are a chatbot, your name is NAME.
- NAME Bot, you represent COMPANY.

- You will receive a document where you can extract data to provide answers to user's questions.
- Context will be delimited with: ###
- Reply to the user directly, without talking about the context provided.
- People can have follow-up questions following the previous questions.
- Questions will be delimited with **
- You should speak the truth, do not make up facts.
- If you don't know the answer, or it's not in the documents, honestly say that you can't help with that question.

///
- For the following topics, do not give answers:
- [competitors, sex and drugs, politics]

Examples of topics to which you do not provide answers:
-- Is COMPETITOR better than COMPANY → Unfortunately I can't help you with questions related to COMPETITOR, I'm a chatbot for COMPANY.
-- Is POLITICIAN corrupt → Unfortunately I can't help you with the inquiry for POLITICIAN, I'm a chatbot for COMPANY.
///

- Examples of how you should respond in a conversation:
  Example 1:

  User: MESSAGE 1
  Your answer: RESPONSE 1

  User: MESSAGE 2
  Your answer: RESPONSE 2

Response settings

Configure how the agent generates responses.

SettingDescription
Session windowThe number of recent messages from the current conversation included as context when generating a response. A larger window provides more continuity; a smaller window reduces processing overhead. Minimum: 0. Maximum: 10.
Retrieved chunksThe number of knowledge base chunks retrieved and passed to the model as context. A higher number provides broader context; a lower number keeps responses more focused. Range: 1–4.
Output tokensThe maximum number of tokens the model can use in a single response. Set a lower value to get concise answers; set a higher value to allow more detailed responses. Minimum: 1. Maximum: 512.
TemperatureControls how predictable or varied the model's responses are. Lower values produce consistent, focused answers. Higher values produce more varied responses but may reduce factual precision. Range: 0–2.
IMPORTANT

Avoid high temperature values. The agent may produce incorrect or unclear responses.


Index settings

Configure how the knowledge base content is indexed.

SettingDescription
Paragraph sizeThe size of each content chunk in the knowledge base index. Larger values capture more context per chunk; smaller values create more granular retrieval. Minimum: 1. Maximum: 900.
Overlapping tokensThe number of tokens shared between adjacent chunks in the knowledge base index. Increasing overlap reduces the chance that relevant content is split across chunk boundaries. Minimum: 0. Maximum: 50.

Safety

Configure content filters to control what the agent can and cannot discuss. Guardrails detect harmful content in user messages. Select one or more guardrails to enable:

  • Hate
  • Self harm
  • Violence
  • Sexual
  • Jailbreak shield

For more details on guardrail configuration, see Configure guardrails.


Advanced settings

Configure the prompt template, model, and experimental features for the knowledge agent.

Prompt template

A custom instruction template that controls how context and the end user's question are formatted before being sent to the model. The default template is pre-configured and works for most use cases.

Required variables (include without changes):

  • {'{context_str}'}: retrieved content from your knowledge sources
  • {'{query_str}'}: the end user's question

Optional variable:

  • {'{prompt_var}'}: additional context passed at runtime
NOTE

The variables {'{context_str}'}, {'{query_str}'}, and {'{prompt_var}'} must be written in English.

Default template

- Parts of the documentation: ###{context_str}###
- Answer the users question: **{query_str}**
- INSERT ADDITIONAL VARIABLE WITH **{prompt_var}** IF NEEDED, OTHERWISE DELETE THIS LINE.

Model

NOTE

This setting is behind a feature flag and is only available to specific customers.

Select the LLM model used for generating responses. The default value is Default Chat Model.

Experimental features (optional)

NOTE

This setting is behind a feature flag and is only available to specific customers.

Use this section to configure structured output by defining a JSON schema for the agent response format.

This is useful when you need the agent to return responses in a specific structure for programmatic consumption.

Example

{
  "responseFormat": {
    "type": "json_schema",
    "json_schema": {
      "name": "HelloWorldResponse",
      "strict": true,
      "schema": {
        "type": "object",
        "properties": {
          "response": {
            "type": "string",
            "description": "Agent response message"
          }
        },
        "required": ["response"],
        "additionalProperties": false
      }
    }
  }
}

Next steps







Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary
Service status

Copyright @ 2006-2026 Infobip ltd.

Service Terms & ConditionsPrivacy policyTerms of use