Usage logs and statistics

What Aimogen Pro records for every AI request, the graphs and per-chatbot reporting, and the retention settings that keep the tables manageable.

Usage Logs#

One row per API request, in {prefix}aiomatic_logs:

ColumnContains
userIdWho made it, where known
ipTheir IP
sessionSession identifier
modelThe model used
assistant_idThe assistant, if any
modeRequest mode
unitsTokens or units consumed
typeUnit type
priceEstimated cost
envWhich feature made the request
tagsTags
apiRefProvider reference
timeWhen

env is the column that makes this useful. It identifies the feature — a chatbot request, a bulk rule, a PHP API call with your own label, the Playground. Filtering by it tells you which feature is spending your budget.

Aimogen Pro > System & Logs > Usage Logs

Enabling it#

Settings › Statistics

SettingWhat it does
Enable Usage TrackingRecords the row. Leave this on
Enable Detailed Usage TrackingAlso stores prompt and response text in aiomatic_logmeta

Usage Graphs#

The same data plotted: call count, token count, cost and generated image count over time. Useful for spotting the day a change made costs jump.

Chatbot Usage#

Added in 2.8.8. Total tokens and words per chatbot over a chosen period — today, the last 7 or 30 days, this or last month, or a custom range.

Activity Logs#

A different log: one entry per rule execution, recording what ran and what failed. This is where the provider error text appears in full.

Enable it with Enable Logging (Settings › General Settings). Enable Detailed Logging adds verbose entries.

The log file location is shown on the Maintenance tab.

Prices are estimates#

The price column is calculated from the plugin internal model price table. It is close, and good for relative comparison between features and over time.

It is not your invoice. Provider pricing changes, and the table is compiled per release. Treat your provider dashboard as authoritative.

Retention#

Logs grow. On a busy site with detailed tracking, aiomatic_logmeta grows fastest.

SettingWhereWhat it does
Auto Clear LogsSettings › General SettingsSchedules the aiomaticactionclear event on the chosen interval
Retention optionsLimits & Statistics SettingsWhat is kept and for how long
Delete LogsMaintenanceClears them now

Set a retention policy on any production site. See Maintenance and cleanup.

Reading the logs#

"What did last month cost?" Usage Graphs, or Usage Logs summed by date.

"Which feature is expensive?" Group Usage Logs by env.

"Which user is consuming the budget?" Group by userId and ip. If every request shows the same IP, your CDN is masking it — see the aiomatic_get_ip filter.

"Why did that rule fail?" Activity Logs, then match the error against API and provider errors.

"Was a request even made?" If Activity Logs shows a rule ran but Usage Logs has no row, the failure happened before the API call — usually configuration.

Programmatic access#

The aiomatic_get_items filter receives log query results, so you can adjust or export them. See Filter reference.

The tables are documented in Data model if you need to query them directly.

Common problems#

Usage Logs is empty. Tracking is off, or logs were cleared.

Prices show as zero. The model is not in the price table — common with custom endpoints and newly added models.

The database is growing quickly. Detailed tracking plus no retention policy.

Every request shows the same IP. A CDN or reverse proxy. Fix with the aiomatic_get_ip filter.

Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.