---
title: Bots configuration reference
nav: Bots configuration
summary: Find the Bots business settings by task: limits, backup models, retention, source links, the website widget, and how Jev review affects your bots.
order: 55
---
# Bots configuration reference

This page finds the Bots business settings by what you want to do. To create a bot, choose its model account or connect Telegram, see [Serve visitors with your bot](/docs/bots/). For every setting's default and range, see that page's [commercial configuration reference](/docs/bots/#configuration).

## Two ways to change settings {#how}

- **On your phone**: open **Settings → Bots / Customer service** and select the bot. Change quotas under the limits and tap "Save limits". Backup models, messages, retention and the widget are under "Business settings: fallback models, messages and widget".
- **Ask Agent J**: say what you want. Agent J reads the full settings description, keeps your current settings, and sends the change to your paired phone. It takes effect only after you sign it. The Agent cannot approve its own change, and a change never contains a key.

All settings stay on your Agent J host.

## Limits: serve more or fewer visitors {#limits}

The defaults are cautious: 20 messages per visitor per day, 100 per bot per day, 100 per day across the whole host, and 100,000 tokens per day for models and safety reviews together. Each visitor can send 6 messages per minute, a message holds up to 2000 characters, and 4 visitors are served at once. You can raise or lower all of them; a message can go up to 4000 characters.

When a model call ends with unknown usage, the reserved amount is not given back, so costs are never under-counted. You can change what visitors see when a limit is reached; see messages below.

## Backup models: switch when the main model fails {#fallback}

Up to two backup models can follow the main model, three in total, tried in order. Backups use the same ten pay-as-you-go providers as your own model key. Each backup needs its own key for this bot, added through the secret card; it never borrows your main Agent's key. If all three fail, visitors can get up to six documentation links.

A spent budget, a safety refusal or a permission refusal never makes the bot switch models to answer anyway. Backup models cost money too, billed to their own keys.

## Retention: how long chats are kept {#retention}

Chats, visitor identities and counters stay only on your Agent J host. They are kept for 30 days by default, adjustable from 1 to 3650 days, and cleaned every hour. By default the model looks back over the last 24 hours and at most 40 messages; you can change both.

## Source links: answers cite the original {#citations}

"Append source links" is on by default: answers include the original address of the material they used. Material imported from a web address remembers that address. A local file gets a link only if you give it an HTTPS source address; no link is ever invented.

Sources can refresh daily or weekly. They refresh only while the host is online and the bot is enabled; if a refresh fails, the previous copy stays. Visitors cannot make the bot fetch any address they like.

## Messages and after hours {#messages}

You can rewrite six messages: welcome, off-topic, handed to a person, temporarily unavailable, after hours and limit reached. Each holds up to 1000 characters and can have separate Chinese and English text.

After hours, pick one: politely refuse (the default); let the AI answer without any tools; or only take a message and notify you without calling a model. Messages left this way count toward the limits.

## Website widget: one line on your own site {#embed}

1. Under "Allowed embedding websites (HTTPS origins, comma separated)", enter your site's full HTTPS address, such as `https://www.example.com`.
2. Tap "Copy embed code" and paste the line into your page. It looks like this (`data-bot` is your bot's public name):

```html
<script src="https://agentj.app/bots/embed.js" data-bot="your-bot-name" async></script>
```

A floating button appears in a corner of the page. Visitors tap it to open a tall chat window, or a floating sheet on phones. Closing it or pressing Esc keeps the conversation. The chat runs in an isolated, encrypted window; your website itself never receives the messages. The button's position and colour, the welcome text, up to six quick questions and whether it opens on load are all in the business settings. On first visit, visitors still have to trust the code the page loads.

Visitors can keep typing while they wait. "Merge queued messages" is on by default: queued text goes out as one message and counts once, and visitors can take queued text back to edit it.

## Visitor privacy and dangerous content {#safety}

Before visitor messages are stored, recognisable keys and card numbers are removed. Not every secret can be recognised, so never ask visitors for passwords. "Block dangerous commands" is on by default: destructive commands and download-and-run commands in answers are stopped. On the website, only links to the domains you list are clickable; other links show as plain text.

## Handing over to you, and email replies {#handoff}

When a visitor asks for a person, you can reply in the chat for 48 hours by default; the visitor has to be online to receive it. To reply by email, set up [Agent J mail](/docs/email/) first, then turn on handoff email in the business settings. The visitor leaves an address; you check it and sign a verification-code email (valid for 10 minutes, locked after 5 wrong tries). Once the visitor enters the code, you check the recipient and text of each email and sign it. At most three emails per conversation, the code email included; a failed send is never retried automatically.

## How Jev review affects your bots {#jev}

Every bot follows the Jev master switch in **Settings → Safety**. The three choices are explained in [Jev safety options](/docs/jev/).

- **On** (TypeSafe or OpenRouter): visitor questions and bot answers, including your own replies, pass Jev before they go out. With a missing key or a failed review, the bot sends nothing and never switches to another account.
- **Off, signed by you**: no Jev review is requested and the bot keeps answering. Local credential filters, dangerous-command blocking, permissions and tool limits all stay.
- **Nothing chosen and no key**: the bot cannot go live.

In the business settings you can choose normal customer-service criteria or strict mode; strict also refuses questions outside your business.
