Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/UAnirudh/IntelliPlan/llms.txt

Use this file to discover all available pages before exploring further.

IntelliPlan ships two distinct AI conversational surfaces accessible via API: the Plani Tutor (/api/tutor), a deep academic tutor that teaches subjects step by step and never just hands over answers, and the Plani assistant chatbot (/api/chatbot), a lighter assistant scoped to helping students use IntelliPlan itself. The tutor is backed by a full adaptive student model — a persistent learning profile, per-topic mastery scores on a weighted moving average, tracked mistake patterns, durable learner memory, and modality routing (auditory / visual / reading / blended). The adaptive layer is exposed through a suite of sub-endpoints under /api/tutor/adaptive/ that let you read and write the student model directly, enabling rich third-party learning applications.
The tutor and chatbot endpoints use session-based authentication (Flask-Login cookie) in the web UI, but can also be called directly as authenticated users. The adaptive sub-endpoints are part of the main web app and require an active login session.

POST /api/tutor — Main Tutor Endpoint

The primary multi-turn tutoring endpoint. Submit a conversation history and receive a teaching reply from Plani. Plani never simply provides the answer; it asks follow-up questions, builds understanding incrementally, and adapts its explanation style and difficulty to the student’s persistent profile.
cURL
curl -X POST https://intelliplan.tech/api/tutor \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "I dont understand how to find the derivative of x squared"
      }
    ],
    "conversation_id": null
  }'

Request Body

messages
array
required
Array of conversation message objects. Each object must have a role field ("user" or "assistant") and a content field (string). Pass the full conversation history for multi-turn context.
conversation_id
integer
ID of an existing conversation to continue. When provided, the server merges the stored history with the incoming messages. Omit or pass null to start a new conversation.
modality_mode
string
Override the student’s stored modality for this turn. Accepted values: "auto", "auditory", "visual", "reading", "blended". When omitted, the stored profile value is used.

Response Fields

reply
string
Plani’s teaching response as a markdown-formatted string. May include interactive artifact markup when the student’s modality supports it.
conversation_id
integer
The ID of the conversation record. Pass this in subsequent requests to continue the same thread.
title
string
Auto-generated conversation title derived from the first user message. Only set when the conversation is newly titled; otherwise reflects the stored title.
modality
object
Present when the adaptive student model is active. Contains mode (the resolved modality string), weights (per-modality weight vector), and active (list of currently active modalities).
The tutor endpoint enforces a monthly message limit (default 50 messages/month for free accounts). When the limit is reached, the endpoint returns HTTP 429 with {"error": "limit_reached", "remaining": 0, "limit": 50}. Responses also pass through an AI safety firewall — messages that violate content guidelines receive a refusal reply rather than a teaching response.

GET /api/tutor/adaptive/profile — Get Learning Profile

Retrieves the student’s full adaptive learning profile, including grade level, subjects, goals, explanation style preferences, and the currently detected learning modality with its computed weights.
cURL
curl -X GET https://intelliplan.tech/api/tutor/adaptive/profile
200 OK
{
  "profile": {
    "id": 7,
    "grade_level": "11",
    "subjects": ["AP Biology", "AP Calculus BC", "AP US History"],
    "goals": "Get a 5 on AP Calc in May",
    "explanation_style": "step-by-step",
    "learning_modality": "visual"
  },
  "modality": {
    "mode": "visual",
    "weights": {
      "auditory": 0.15,
      "visual": 0.60,
      "reading": 0.25
    },
    "labels": {
      "auditory": "Auditory",
      "visual": "Visual",
      "reading": "Reading/Writing",
      "blended": "Blended"
    }
  }
}
profile
object
The student’s stored learning profile. Fields are sparse — only the properties that have been set will be present.
modality
object
Current modality resolution including the stored mode, computed weight vector, and display labels for all modes.

POST /api/tutor/adaptive/profile — Update Learning Profile

Updates the student’s adaptive learning profile. Partial patches are allowed — only the fields you include are updated. Used during onboarding or when the student edits their profile from the tutor sidebar.
cURL
curl -X POST https://intelliplan.tech/api/tutor/adaptive/profile \
  -H "Content-Type: application/json" \
  -d '{
    "grade_level": "11",
    "subjects": ["AP Biology", "AP Calculus BC"],
    "goals": "Score 90%+ on midterms",
    "explanation_style": "analogies"
  }'
200 OK
{
  "profile": {
    "id": 7,
    "grade_level": "11",
    "subjects": ["AP Biology", "AP Calculus BC"],
    "goals": "Score 90%+ on midterms",
    "explanation_style": "analogies"
  }
}
grade_level
string
Student’s current grade level (e.g. "11", "12", "freshman").
subjects
array
List of subjects the student is studying.
goals
string
The student’s learning goals in free text.
explanation_style
string
Preferred explanation style (e.g. "step-by-step", "analogies", "concise").

GET /api/tutor/adaptive/dashboard — Mastery Dashboard

Returns the full adaptive learning dashboard: per-topic mastery scores, tracked mistake patterns, the durable learner memory summary, and AI-generated study recommendations. This is the data source for the tutor progress sidebar.
cURL
curl -X GET https://intelliplan.tech/api/tutor/adaptive/dashboard
200 OK
{
  "mastery": {
    "AP Calculus BC / Derivatives": 0.72,
    "AP Biology / Cell Division": 0.45,
    "AP US History / Reconstruction": 0.88
  },
  "mistakes": [
    {
      "id": 14,
      "topic": "AP Calculus BC / Chain Rule",
      "description": "Confuses chain rule with product rule when functions are nested",
      "frequency": 3,
      "resolved": false
    }
  ],
  "learner_memory": {
    "summary": "Responds well to worked examples before abstract rules. Strong in history and reading comprehension; needs scaffolding for multi-step math. Prefers visual representations for calculus.",
    "strengths": ["History analysis", "Reading comprehension"],
    "friction_points": ["Multi-step calculus", "Lab report structure"]
  },
  "recommendations": [
    "Review chain rule with visual function composition diagrams.",
    "Practice spaced repetition on Cell Division flashcards — mastery is below 50%."
  ]
}
mastery
object
Map of "Subject / Topic" keys to mastery scores between 0 and 1. Scores are computed on a weighted moving average (70% history, 30% newest evidence) with confidence that grows as attempts accumulate.
mistakes
array
List of recurring misconceptions extracted from conversation transcripts. Each entry tracks frequency and resolved state.
learner_memory
object
The LLM-built durable model of how this student learns — strengths, friction points, explanation patterns that land, and strategies the tutor should use.
recommendations
array
AI-generated study recommendations based on current mastery state and tracked mistakes.

POST /api/tutor/adaptive/modality — Set Learning Modality

Sets the student’s learning modality mode. The modality governs how Plani frames explanations: auditory learners get spoken-optimized phrasing; visual learners get more diagrams and interactive artifacts; reading learners get structured text. auto lets the system detect the dominant modality from the student’s behavior.
cURL
curl -X POST https://intelliplan.tech/api/tutor/adaptive/modality \
  -H "Content-Type: application/json" \
  -d '{"mode": "visual"}'
mode
string
required
Learning modality. Accepted values: "auto", "auditory", "visual", "reading", "blended".
200 OK
{
  "mode": "visual",
  "weights": {
    "auditory": 0.10,
    "visual": 0.75,
    "reading": 0.15
  },
  "active": ["visual"]
}

POST /api/tutor/adaptive/summarize — Close a Conversation

Closes an active tutor conversation by triggering a full session summary pipeline: it extracts a session summary (topics covered, what was understood, what was struggled with, and what to review next), identifies any new recurring mistake patterns, and updates the student’s per-topic mastery scores. Call this when the student finishes a study session to persist the gains.
cURL — summarize by conversation ID
curl -X POST https://intelliplan.tech/api/tutor/adaptive/summarize \
  -H "Content-Type: application/json" \
  -d '{"conversation_id": 391}'
conversation_id
integer
ID of the conversation to summarize. When provided, the server loads the stored messages automatically.
messages
array
Alternatively, supply the conversation messages directly as an array of {role, content} objects. Takes precedence over conversation_id if both are provided.
200 OK
{
  "summary": "Covered the power rule and chain rule for derivatives. Student understood the power rule quickly but confused chain rule with product rule twice. Recommend revisiting chain rule with composition examples.",
  "mastery_updates": {
    "AP Calculus BC / Power Rule": 0.80,
    "AP Calculus BC / Chain Rule": 0.42
  },
  "new_mistakes": [
    {
      "topic": "AP Calculus BC / Chain Rule",
      "description": "Confuses chain rule with product rule"
    }
  ]
}

GET /api/tutor/adaptive/memory-imports — List Memory Imports

Returns all learner memory exports that have been imported from other AI assistants (e.g. a ChatGPT conversation export). Each import contributes to the durable learner memory model.
cURL
curl -X GET https://intelliplan.tech/api/tutor/adaptive/memory-imports

POST /api/tutor/adaptive/memory-imports — Import Memory

Imports learner context exported from another AI assistant. The text is processed immediately — the adaptive engine blends modality signals from the import into the student’s weight vector and rebuilds the durable learner memory so the import is felt on the very next tutor message.
cURL
curl -X POST https://intelliplan.tech/api/tutor/adaptive/memory-imports \
  -H "Content-Type: application/json" \
  -d '{
    "raw_text": "This student has been studying AP Calculus. They struggle with related rates but are strong at integration by parts...",
    "provider": "chatgpt",
    "source_label": "ChatGPT memory export, Feb 2025"
  }'
raw_text
string
required
The raw exported text from another AI assistant. Maximum 200,000 characters.
provider
string
The AI provider the export came from (e.g. "chatgpt", "claude", "gemini"). Defaults to "unknown".
source_label
string
A human-readable label for this import (e.g. "ChatGPT memory export, Feb 2025"). Maximum 160 characters.

POST /api/tutor/adaptive/mistakes/{id}/resolve — Resolve a Mistake

Marks a specific tracked mistake as resolved. Use this when the student has demonstrably mastered the concept and the mistake no longer needs to be watched for in future sessions.
cURL
curl -X POST https://intelliplan.tech/api/tutor/adaptive/mistakes/14/resolve
200 OK
{
  "ok": true
}
Returns HTTP 404 if the mistake ID does not exist or does not belong to the current student.

POST /api/chatbot — Plani Assistant

A lighter-weight assistant scoped exclusively to helping students use IntelliPlan: explaining features, answering questions about study schedules, navigating settings, and similar in-app guidance. This endpoint does not teach academic subjects — use POST /api/tutor for that.
cURL
curl -X POST https://intelliplan.tech/api/chatbot \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "How do I connect my Canvas account?"
      }
    ]
  }'
messages
array
required
Array of {role, content} message objects. The last 10 messages are used for context.
200 OK
{
  "reply": "To connect Canvas, head to **Settings → Integrations** and click **Connect Canvas**. You'll need your Canvas domain (e.g. `myschool.instructure.com`) and a personal access token from Canvas Account Settings → Approved Integrations. Once connected, your assignments will import automatically! 🎓"
}
reply
string
Plani’s response as a markdown-formatted string. Maximum ~320 tokens.
The chatbot endpoint is appropriate for embedding a help assistant in a shell or sidebar UI. For academic tutoring, always use POST /api/tutor — the chatbot is not designed for multi-turn teaching and will redirect academic questions to Plani Tutor.

Adaptive Tutor Architecture Summary

Learning Profile

Grade level, subjects, goals, and explanation preferences. Editable via the profile endpoints. Seeds every system prompt.

Subject Mastery

Per-topic scores on a weighted moving average (70% history, 30% newest), with confidence that grows as attempts accumulate.

Mistake Patterns

Recurring misconceptions extracted from transcripts. Plani watches for registered mistakes in every subsequent session.

Modality Routing

Auto-detects the dominant learning modality from behavior. Auditory, visual, reading/writing, and blended modes all change how Plani structures its responses.

Build docs developers (and LLMs) love