# Override agent settings in web/sms chat?

**URL:** <https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262>\
**Category:** Support Help\
**Tags:** general\
**Created:** [April 8, 2026, 6:43pm UTC](https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262 "2026-04-08T18:43:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony3](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/anthony3/32/1392_2.png) [@anthony3](https://community.retellai.com/u/anthony3)\
**Post date:** [April 8, 2026, 6:43pm UTC](https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262/1 "2026-04-08T18:43:40Z")

</div>

Hey there! I’m hoping to override Knowledge Base variables in our SMS / Web Chat agent workflow so we can have one main prompt and dynamically use the right knowledge bases based on our own logic.

I’m not able to get that to work by providing an agent\_override in our API call to start a new chat.

How can I accomplish this behavior? The AI helper on the forum said it’s possible, but it didn’t work.

```auto
curl -i -sS https://api.retellai.com/create-chat \

  -X POST \                            

  -H "Authorization: Bearer $RETELL_API_KEY" \

  -H "Content-Type: application/json" \

  --data @- <<JSON      

{                                         

  "agent_id": "$AGENT_ID",

  "agent_version": $AGENT_VERSION,

  "metadata": {

    "test": "web-chat-kb-override-probe"

  },

  "agent_override": {

    "retell_llm": {

      "knowledge_base_ids": ["$KB_ID"],

      "kb_config": {

        "top_k": 3,

        "filter_score": 0.8

      }

    }

  }

}

```

The above block returns a new chat but the agent has no idea how to answer questions about what would have been in the custom KB\_ID that we pass in. Here’s an example chat ID created by this method: **chat\_5165779fefc361f75c6fb6b4a30**

---

<div class="post-metadata">

**Author:** ![Shah-Fazal](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/shah-fazal/32/2522_2.png) [@Shah-Fazal](https://community.retellai.com/u/Shah-Fazal)\
**Post date:** [April 8, 2026, 6:53pm UTC](https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262/2 "2026-04-08T18:53:51Z")

</div>

Hi @anthony3

Agent overrides for chat/SMS use the field name `il`, not `agent_override`. The `agent_override` field name you’re using isn’t recognized by the API. The correct field for per-session overrides is `il`, and it does support `retell_llm.knowledge_base_ids` and `retell_llm.kb_config`.

our request should look like:

```auto
{
  "agent_id": "$AGENT_ID",
  "agent_version": "$AGENT_VERSION,
  "metadata": { "test": "web-chat-kb-override-probe" },
  "il": {
    "retell_llm": {
      "knowledge_base_ids": ["$KB_ID"],
      "kb_config": {
        "top_k": 3,
        "filter_score": 0.8
      }
    }
  }
}

```

Replace `agent_override` with `il` and the knowledge base override should take effect for that chat session.

You can see the full details here ([Inbound webhook - Retell AI](https://docs.retellai.com/features/inbound-call-webhook)) and ( [Outbound Calls (Make Calls) - Retell AI](https://docs.retellai.com/deploy/outbound-call))

Thank You

---

<div class="post-metadata">

**Author:** ![anthony3](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/anthony3/32/1392_2.png) [@anthony3](https://community.retellai.com/u/anthony3)\
**Post date:** [April 8, 2026, 6:59pm UTC](https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262/3 "2026-04-08T18:59:31Z")

</div>

Thanks, just tried it out, but still not seeing the retrieval from my KB. Can you check **chat\_e28fabe28219b4bf8caad8ddcb7** to see if **knowledge\_base\_31232fb26ad71ef6** was set with the “il” field correctly?

---

<div class="post-metadata">

**Author:** ![Shah-Fazal](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/shah-fazal/32/2522_2.png) [@Shah-Fazal](https://community.retellai.com/u/Shah-Fazal)\
**Post date:** [April 8, 2026, 7:01pm UTC](https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262/4 "2026-04-08T19:01:11Z")

</div>

Hi @anthony3

I’ve shared it with our team for review.

We’ll keep you updated as soon as we have more information.

Best regards

---

<div class="post-metadata">

**Author:** ![Shah-Fazal](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/shah-fazal/32/2522_2.png) [@Shah-Fazal](https://community.retellai.com/u/Shah-Fazal)\
**Post date:** [April 8, 2026, 7:28pm UTC](https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262/5 "2026-04-08T19:28:59Z")

</div>

Hi @anthony3

Team checked the chat session `chat_e28fabe28219b4bf8caad8ddcb7` — the knowledge base `knowledge_base_31232fb26ad71ef6` was not applied to this chat. The LLM configuration used by your chat agent currently has no knowledge bases attached.

The reason is that the Create Chat API does not currently support the `agent_override` parameter — this feature is only available for voice call creation endpoints (Create Phone Call, Create Web Call, Register Phone Call). So even if you pass `agent_override` with `knowledge_base_ids` when creating a chat, it won’t take effect.

To use a knowledge base in your chat agent, you’d need to add it directly to the LLM/Response Engine configuration in the dashboard (or via the Update Retell LLM API) so it’s baked into the agent itself.

Thank You

---

<div class="post-metadata">

**Author:** ![anthony3](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/anthony3/32/1392_2.png) [@anthony3](https://community.retellai.com/u/anthony3)\
**Post date:** [April 9, 2026, 7:53pm UTC](https://community.retellai.com/t/override-agent-settings-in-web-sms-chat/2262/6 "2026-04-09T19:53:15Z")

</div>

Hm. This would be extremely useful for our texting use case and will have to do that entire dynamic knowledge base workflow outside of Retell, which we do not prefer.
