Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Alejandrin08/Hackathon-SPEI/llms.txt
Use this file to discover all available pages before exploring further.
The nudge endpoint is served by the AI service at
http://localhost:8001. It is an internal service and does not require authentication.POST /ai/nudge
Evaluates behavioral signals to determine whether the user is struggling on a given screen. Call this endpoint periodically while a user is active on a screen to decide whether to surface contextual help.Request body
Identifier for the current screen, e.g.,
"send-money", "login", "transfer-confirm".Number of form validation errors the user has encountered on this screen. Must be
≥ 0.Number of seconds the user has spent on the current screen. Must be
≥ 0.Number of times the user has navigated back from this screen. Must be
≥ 0.Total number of steps in the current flow. Use
1 for single-screen flows. Must be ≥ 1.The step the user is currently on. Must be
≥ 1.Optional user identifier for logging and analytics.
Optional session identifier for correlating events across a session.
Response
Echoed user identifier from the request.
Echoed session identifier from the request.
Screen name from the request.
Version of the nudging model that produced the result.
Nudge types
| Type | Threshold | Action |
|---|---|---|
assist | difficulty_score > 0.75 | Offer step-by-step help. |
info | difficulty_score > 0.40 | Show an informational hint. |
warning | difficulty_score ≤ 0.40 | Display a soft security or context warning. |
Reason codes
| Code | Description |
|---|---|
high_error_rate_or_time | Many validation errors or excessive time on screen. |
moderate_difficulty | Moderate difficulty signals detected. |
low_difficulty | Low difficulty — user is progressing normally. |
Response
Health check
GET /ai/health
Returns the current load status of the nudging model. Use this to verify the AI service is running before making predictions.
