Install
Admin tools
The plugin extends the usage-log collection with:- Grouped list views
- A Usage Analytics view with date-range filtering and models/users breakdown tables
@frogbotai/plugin-import-export yourself and point it at the usage collection:
Report API
Authenticated callers can request aggregated data directly:groupBy accepts model, user, or day. apiKey is also accepted when @frogbotai/plugin-api-keys is installed, in any order, or when the usage collection has an apiKey relationship. Other values return 400.
The endpoint allows any authenticated caller by default, matching FrogBot’s default access. Pass access to narrow it with an ordinary access function. Returning false forbids the request; returning a Where restricts the rows the report reads:
allow() returns an access function, the roles plugin composes here without being a dependency:
Options
Large date ranges scan every matching usage row. Add rollups only after deployment profiling demonstrates that this portable path is insufficient.