AI Prompt Character and Token Estimator Lite helps OutSystems applications estimate prompt size before sending content to an AI model.
The component provides live character count, word count, approximate token count, remaining token capacity, usage percentage, warning state, and limit-exceeded state. It supports Detailed, Compact, and Inline display modes, along with configurable token limits, warning thresholds, whitespace normalization, optional metrics, and a progress bar.
The reusable OnEstimateChanged event lets consuming applications monitor prompt usage and disable AI submission once the configured limit is exceeded.
OnEstimateChanged
Token values are estimated at roughly one token per four characters. Actual token usage varies by AI model, tokenizer, language, formatting, source code, and special characters use a provider-specific tokenizer when exact token counts are required.
Few Ux improvements.