Skip to main content
Improving an agent is a loop: find what is wrong, propose a change, test it before customers see it, apply it, check the results, and roll it back if it made things worse. Totebot has a tool for each step, in the dashboard and in the API. You can follow the loop yourself, or let a coding agent such as Claude Code run it for you.

The loop

1

Find what to fix

Open AI Lab from your agent’s sidebar. The Findings tab lists what is worth fixing, measured from your own conversations in the last 30 days: knowledge that failed to load or expired, knowledge no customer question found, questions the bot could not answer, how many test questions pass, and how often your model searches your knowledge.For more detail:
  • Knowledge gaps list the questions your agent answered badly, with the thumbs-downs and handovers behind them.
  • Analytics shows volume, quality and revenue for any date range.
  • In the live preview, Show bot reasoning steps shows what the agent searched for before each reply, or that it responded from memory.
2

Propose a change

Click Check my instructions on the Findings tab. An AI reviewer reads your instructions next to your knowledge and last month’s results, and suggests exact edits: conflicting rules, facts that belong in knowledge, missing basics such as shipping or returns. Changes that add a link, contact details, a discount or an offer are marked Check before using.For a missing answer, add a Q&A or text in Knowledge. For a dated offer, set Use until so the agent stops using it when the offer ends (see Keeping knowledge current).
3

Test it before it goes live

Start experiment loads the change into a draft and opens the Experiment tab. Nothing is saved. Click Ask both to put the same question to the live agent and the draft side by side, and Run test questions to see which of your test questions the draft fixes or breaks.To check the change on real customers before you switch, run an experiment: a share of new conversations gets the change, and you compare thumbs-down rate, handovers and credits per conversation with the current setup. Experiments are turned on per workspace: contact support to enable them.
4

Apply it

Click Save to live agent on the Experiment tab, or save in Settings → AI. If the draft fails a test question the live agent passes, Totebot asks you to confirm first. Train the agent after knowledge changes.
5

Check the results

Test questions run again after every training. After a few days of real conversations, look at the AI Lab findings, your knowledge gaps and Analytics again, and compare them with the weeks before the change.
6

Roll back if it got worse

AI Lab → Notebook lists every change to the instructions and settings, with the test result of changes saved from AI Lab. Click Undo on a change to put back the settings the agent had just before it. See History and rollback.

Let Claude Code run the loop

The Totebot CLI gives a coding agent the same tools: the readiness checklist, the instructions check, test runs against an unsaved prompt or model, one-off preview chats, dry runs that show each change before and after, revisions and rollback. Ask it to “optimize my agents”, and it follows the recipe in Optimize your agents with Claude Code. The key you give it decides what it may do. A read-only key can only analyse and propose. To let it apply changes, an owner turns on the write scopes it needs under Team settings → API keys → Edit access. Every change it makes is recorded in the audit log and in the AI Lab Notebook under the key’s name.

Good habits

  • Change one thing at a time. If you change the instructions and the model together, you cannot tell which one helped.
  • Write a test question for every fix. It keeps the fix from breaking again later.
  • Give a change a few days. A handful of conversations proves little either way.
  • Keep facts in knowledge, not in the instructions. Prices, pack sizes and dated offers are easier to update, and to date, as knowledge entries.