> For the complete documentation index, see [llms.txt](https://docs.qolaba.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qolaba.ai/chatbot/agents/using-agents-in-chat.md).

# Using Agents in Chat

Agents are selected and managed directly from the chat interface. Switching agents mid-conversation is supported — giving you flexibility to shift roles without starting a new chat.

***

#### Selecting an Agent

1. Open the **Agent Selector** in the chat input area
2. Choose your desired agent — pre-built or custom

All prompts sent after selection will follow that agent's system instructions and draw from its attached knowledge context. The agent name is displayed in the interface so you always know which one is active.

***

#### Switching Agents

You can switch to a different agent at any point in the conversation:

1. Open the **Agent Selector**
2. Select a different agent

The new agent's instructions apply to all subsequent prompts. Earlier messages in the thread remain as-is.

{% hint style="info" %}
Switching agents mid-chat changes behavior going forward — it does not retroactively reprocess earlier responses. For a completely fresh agent context, start a new chat.
{% endhint %}

***

#### Best Practices

* **Use pre-built agents for quick role-based tasks** — No setup needed; select and start prompting immediately
* **Use custom agents for recurring workflows** — Build once, reuse across any number of chats
* **Attach knowledge bases to agents handling domain-specific tasks** — The agent will reference your documents automatically without per-session uploads
* **Keep system instructions specific** — Structured, detailed instructions produce consistent, high-quality outputs
* **Start a new chat when switching to a very different task** — Carrying over context from a previous role can influence outputs in unintended ways
