Behind the scenes
This page covers what Chatvia does after a reply is sent, and the background work that keeps an install running. It is mostly useful for the person who runs the server.
After each reply
These steps run after the chatter has the answer, so they never slow it down.
- Chat log. The message is written to the chat log, with the knowledge and tools it used. Your team sees it in Chatlog.
- Message count. Each agent reply counts once toward the workspace's message limit, and each message a signed-in chatter sends counts toward their own limit. Refusals by the guardrails and errors are not counted. When a workspace reaches 80% and 100% of its limit, the workspace owner gets a notification.
- Analytics. Messages, feedback, the knowledge used and tool calls are added to the agent's analytics.
- Sentiment and tone. When turned on for the agent, each chatter message gets a sentiment and a tone.
- Title. The conversation gets a short title.
- Topics. About six hours after a conversation starts, an AI model reads it once and sorts it into topics. It also suggests new topics your team may want to add.
Some things happen only when the chatter asks for them:
- Feedback. A thumbs up or down is saved with the answer.
- Human handoff. When a chatter asks for a person, the team members who may take over chats get a notification. See Human handoff.
- Forms. When the agent shows a form in the chat and the chatter sends it, the entry is saved as a lead. It can also be sent to your CRM, and your team gets a notification.
Live updates
Chatvia keeps a live connection to open pages through its real-time server (Laravel Reverb). It is used for:
- Training progress on the Sources tab.
- New messages and typing indicators during a human handoff.
- Notifications in the dashboard bell.
The answers themselves don't use this connection. They stream straight back in the response to the chatter's message.
Background workers
Slow work runs in background workers, managed by Laravel Horizon. The workers are split into groups, so a big upload never holds up a chat:
| Group | What it does |
|---|---|
| Chat | Writes messages to the chat log, handles messages from messaging apps, and runs short jobs such as e-mails. |
| Files and websites | Reads, splits, enhances and embeds sources, and makes exports. |
| Analytics | Conversation analysis with AI, evaluations and sending security events to your SIEM. |
| Records | Saves the analytics numbers and the audit logs (tool calls, guardrails and security events). These are quick writes, so they never wait behind the AI work. |
| Audio and video | Transcribes audio and video. These jobs can take hours, so they have their own group. |
| Live voice calls | One worker per live voice call. |
The admin can change how many workers each group may use in Settings → Platform → Queue workers. Each worker uses about 80 MB of memory. If your server has little memory, lower them. If training is slow, raise Files and websites. Save, then click Restart queue.
Workers must be running
If the workers are stopped, chats still get answers, but nothing new is trained, chat logs fall behind, and analytics stop. The admin panel's Status page shows whether the workers are running.
Scheduled jobs
Chatvia runs some jobs on a timer. Most of them delete old data, so the database doesn't grow forever and data is not kept longer than needed.
| How often | What runs |
|---|---|
| Hourly | Sort new conversations into topics. Refresh websites that are set to train again on a schedule. |
| Nightly | Delete conversations older than the workspace's retention period, old chat attachments, expired tool approvals, old leads and expired visitor blocks. |
| Nightly | Delete old records: tool activity and guardrail events (after 90 days), notifications (after 7 days, set in Settings → Workspaces), analytics events and security logs. |
| Twice a day | Back up the database (the newest 14 backups are kept). |
The scheduler must run every minute for these jobs to work. The installation guides set it up for you.
Analytics
Chatvia writes a short record for every message: the agent, whether a
chatter or the agent wrote it, and how long the answer took. It does not keep
what the message said. These records feed the numbers in
analytics, such as how many chatters an agent had.
They are kept in a database of their own, named analytics by default.
This log grows with every message, so it gets large on a busy install.
Why Chatvia needs pg_partman
pg_partman is a PostgreSQL extension that splits a large table into smaller parts. Chatvia uses it to keep one part of the message log per month.
- Faster numbers. A count over the last 30 days reads only the months it needs, not the whole log.
- Quick clean-up. When records are older than the retention period, the nightly job removes a whole month in one step.
- Disk space comes back. A removed month frees its disk space at once.
Without pg_partman, the log is one table that keeps growing. Analytics gets slower as it grows, and the nightly job must delete old records one by one, which takes long and keeps the database busy. So analytics does not work as it should. The admin panel's Setup and Status pages warn you when pg_partman is missing.
The Docker setup and install.sh include pg_partman. Chatvia turns it on
when it creates the analytics tables, so it must be on the database server
before the first install.
Where to look when something is wrong
| You see | Look at |
|---|---|
| A source stays in Pending or Processing | The Status page: are the workers running? Is the document reader or speech to text service connected? |
| Answers miss things that are in the sources | The answer's confidence in Chatlog. Check the source trained. Try a reranker. Turn on AI enhancement and train the source again. See How search works. |
| Answers miss codes, names or rare words | Is Hybrid search on? Which engine does the Status page show? |
| Chatters are told to wait | The per-visitor and per-agent message rate limits in the agent's security settings. |
| The agent refuses normal questions | Guardrails → Activity shows what was blocked and why. |