# Learning Studio

The Learning Studio's structured generator is `/api/tools/learn`. It requires the existing signed-in or agent tool access check, rate limits, and AI provider/quota checks. The route schema is authoritative.

Send JSON with `topic` (2–120 characters), optional `level` (`curious`, `building`, `deep dive`), `difficulty` (`dumb`, `smart`, `genius`), `style` (`balanced`, `story`, `hands-on`, `first-principles`, `socratic`), `goal`, and `mode` (`map`, `lesson`, `quiz`, `coach`, `flashcards`). Optional focus, learner response, checkpoint, and reference fields guide the next step; prior attempts are capped at three.

The route returns structured learning content and validates distinct quiz choices and module titles. Treat model output as generated instruction, not verified fact. The app's client tracks progress and XP; this endpoint only generates a response. Do not claim to have recorded learner progress. Avoid sending unrelated private account data in topic/reference fields. Provider failure or exhausted quota must be reported rather than bypassed.

Learning Studio also contains browser-local saved work. Those local drafts are not available to an API agent unless the user explicitly copies them into a request.
