Skip to main content
Montero is an AI tutor available at /app/alumno/montero. It answers questions, guides your thinking through the Socratic method, helps you review class material, and provides general educational support — all in Spanish, adapted to your age.

Starting a chat

When you open Montero, the sidebar shows your existing chats. The main area prompts you with “¿Qué quieres aprender hoy?” and a rotating set of example questions.
1

Choose a chat mode

Before sending your first message, select one of three modes using the pill buttons: Aprendizaje, Repaso, or General. See Chat modes for a detailed explanation of each.
2

Type your question

Type in the text area. Messages are capped at 300 characters. The character counter turns amber at 250 characters and red at 300.
3

Send the message

Press Enter to send. Use Shift+Enter for a line break without sending.
4

Read the response

Montero’s response streams back in real time with a typewriter effect — text appears character by character as it arrives from the server.
The chat mode you select before the first message is locked for the entire chat. You cannot change the mode mid-conversation.

Usage limits

LimitValue
Daily messages40 per day (resets at midnight, America/Monterrey timezone)
Messages per chat20 questions per chat session
Message length300 characters
When the daily limit is reached:
  • A banner overlays the input area: “Has alcanzado el límite diario de preguntas. Podrás volver a usar Montero mañana.”
  • The input and send button are disabled.
  • The “New chat” button is also disabled.
When a per-chat limit is reached:
  • An overlay appears on the input area: “Este chat alcanzó el límite de preguntas.”
  • You can still view the chat history.
  • Start a new chat (click the + button) to continue asking questions.
Daily message counts are tracked per student in the America/Monterrey timezone. The max_daily_messages value is configurable server-side (defaults to 40).

Chat sidebar

The left sidebar (or top strip on mobile) lists your existing chats, newest first. Up to 30 chats are loaded on page open.
  • Search — the search box filters chats by message content in real time, client-side.
  • New chat — the + button clears the selected chat and returns to the intro screen so you can choose a mode and start fresh.
  • Delete chat — hover over a chat item to reveal the × button. A confirmation dialog appears before deletion. The chat is permanently removed.
Each chat item in the sidebar shows a preview of the first user message, or “Nuevo chat” if no messages exist.

Streaming responses and typewriter effect

Responses arrive as a streaming text/plain HTTP response. The client renders text in chunks every 30 ms, 6 characters at a time (TICK_MS = 30, CHARS_PER_TICK = 6). This creates the typewriter animation. While a response is loading, an animated pulsing dot appears where the reply will appear. If an error occurs, Montero shows: “Ups, hubo un problema. Intenta de nuevo.”

YouTube video integration

In Aprendizaje (learning) mode only, a YouTube toggle button appears next to the input area.
1

Enable video

Click the YouTube icon button. It turns blue/filled when active.
2

Send your question

Send your message as normal. Montero answers first, then searches YouTube for a relevant video.
3

View the video

A loading message — “Buscando el mejor video para ti…” — appears while the video is being found. The video is then embedded inline in the chat as a lite-youtube element. If no suitable video is found, Montero displays “No encontré un video adecuado esta vez.”
YouTube search uses the YouTube Data API v3 restricted to Spanish results (relevanceLanguage: 'es') from Mexico (regionCode: 'MX'). The search query is generated by an AI model based on the last three user messages in the conversation.
The video toggle resets to off after each message. If you want a video with your next question, toggle it on again before sending.

Safety and content moderation

Every message is scanned for potentially harmful content (self-harm, violence, drugs, fraud, bullying, etc.) in parallel with the main AI response. If a message triggers the safety classifier:
  • Montero responds with a safe support message instead of answering the question.
  • The conversation is flagged and a notification is sent to your tutor/parent.
  • The chat is locked (limited: true) — you cannot send further messages in that session.

Quick-start learning topics

The learning page at /app/alumno/aprender provides topic cards (Arte, Inglés, Música, Computación, Geografía, Lengua, Matemática, Historia). Clicking a topic navigates to /app/alumno/montero?tema={topic}, which auto-sends your first message: “Quiero aprender sobre ” in Aprendizaje mode.

API reference

Send a message (streaming)

POST /api/student/chatting
Content-Type: application/json
{
  "chatId": "uuid",
  "type": "learning",
  "previousMessages": [
    { "role": "user", "content": "¿Qué es un átomo?" },
    { "role": "assistant", "content": "Un átomo es..." }
  ],
  "userMessage": "¿Y qué son los electrones?",
  "video": false
}
Returns a streaming text/plain response. Special inline markers:
  • __loading_video__ — signals that a video search is in progress
  • video-{videoId} — the YouTube video ID to embed
  • video-none — no suitable video was found
Error codes:
  • 403 with "límite diario" in body — daily limit reached
  • 403 with "límite de preguntas" in body — per-chat limit reached

Delete a chat

POST /api/student/delete-chat
Content-Type: multipart/form-data
FieldTypeDescription
recordstring (UUID)ID of the chat to delete
namestringFirst user message (used for logging)
Response
{ "success": true }