> ## Documentation Index
> Fetch the complete documentation index at: https://docs.totebot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Keeping knowledge current

> Automatic training after edits, and start and end dates for knowledge

Your agent picks up most knowledge changes on its own, and you can give time-limited knowledge, such as a promotion, a start and end date.

## Automatic training after edits

When you add, refresh, or delete **Q\&A**, **text**, or **files**, your agent trains on its own. You don't need to click **Train agent**. Training starts about 30 seconds after your last change, so a burst of edits trains once. The Knowledge pages show the training status while it runs.

Website pages, sitemaps, and Notion pages are not included. After you add or change those sources, click **Train agent** as before.

If a training run is already in progress, the new one waits for it to finish.

## Validity dates

Some knowledge is only true for a while: a sale, a holiday opening time, a seasonal delivery promise. Give a **Q\&A** or **text** entry a validity window, and your agent uses it only inside those dates.

### Set the dates

When you add a Q\&A or text entry, or on its detail page, fill in:

* **Use from**: the first day the agent may use the entry.
* **Use until**: the last day the agent may use the entry.

Both are optional, and you can set just one of them. The dates cover whole days in your time zone, and the end date must be on or after the start date. To change the dates of an existing entry, open it and click **Save dates**. You can also set them from the [CLI](https://docs.totebot.ai/cli/commands.md#knowledge-and-training) (`--valid-until`) or the [Public API](https://docs.totebot.ai/api/public-api.md#validity-dates), for example from Claude Code.

### What the agent does

* Before **Use from**, and after **Use until**, the agent does not use the entry. You don't need to retrain when a date is reached; the change applies within a few minutes.
* While an entry with an end date is in use, the agent knows the end date, so it can tell customers until when an offer runs.

### Badges

The Q\&A and text lists, and the entry's detail page, show the state of dated entries:

* **Scheduled**: the start date is in the future. The agent does not use it yet.
* **Expired**: the end date has passed. The agent no longer uses it.

> [!TIP]
>
> Add a promotion with an end date as soon as you plan it. You don't have to remember to delete it, and the agent stops mentioning it the day after it ends.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.