Build intelligent learning experiences with our powerful SDK. Integrate Bayesian Knowledge Tracing, adaptive learning, and cognitive analytics in minutes.
npm install @cognitive-engine/sdkGet up and running with the PrepSt SDK in under 5 minutes
Add the package to your project
Configure with your API key
Use our powerful APIs
# Install the SDK
npm install @prepst/sdk
# Initialize in your project
import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})
# Start tracking learning
const result = await engine.track({
userId: 'user_123',
conceptId: 'algebra_basics',
correct: true,
timeSpent: 45
})# Install the SDK
yarn add @prepst/sdk
# Initialize in your project
import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})
# Start tracking learning
const result = await engine.track({
userId: 'user_123',
conceptId: 'algebra_basics',
correct: true,
timeSpent: 45
})# Install the SDK
pnpm add @prepst/sdk
# Initialize in your project
import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})
# Start tracking learning
const result = await engine.track({
userId: 'user_123',
conceptId: 'algebra_basics',
correct: true,
timeSpent: 45
})Secure your API requests with API keys and environment variables
Generate API keys from your dashboard. Keep them secure and never commit them to version control.
# .env.local
PREPST_API_KEY=ps_live_abc123...
PREPST_SECRET_KEY=ps_secret_xyz789...Always use API keys on the server side. Never expose them in client-side code or public repositories.
// server.ts
import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})Real-world examples to help you integrate cognitive learning into your application
import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})
// Track a learning event
const result = await engine.track({
userId: 'student_123',
conceptId: 'quadratic_equations',
questionId: 'q_456',
correct: true,
timeSpent: 120, // seconds
difficulty: 0.65,
metadata: {
source: 'practice_quiz',
attemptNumber: 2
}
})import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})
// Get mastery predictions for a student
const predictions = await engine.predict({
userId: 'student_123',
concepts: ['algebra_basics', 'geometry', 'trigonometry']
})import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})
// Get adaptive question recommendations
const questions = await engine.getAdaptiveQuestions({
userId: 'student_123',
conceptId: 'linear_equations',
count: 5,
targetDifficulty: 'optimal', // 'easy', 'medium', 'hard', 'optimal'
cognitiveLoadLimit: 0.7
})import { PrepSt } from '@prepst/sdk'
const engine = new PrepSt({
apiKey: process.env.PREPST_API_KEY
})
// Get detailed analytics for a student
const analytics = await engine.getAnalytics({
userId: 'student_123',
timeRange: 'last_30_days',
includeInsights: true
})Our four-phase approach to cognitive learning combines cutting-edge AI with proven educational science
We build a probabilistic model of each learner's knowledge state using Bayesian Knowledge Tracing (BKT). This goes beyond simple right/wrong tracking to understand the underlying cognitive patterns.
Our engine selects the optimal next question based on your current knowledge state, learning velocity, and cognitive load. Every interaction is personalized.
The system detects learning plateaus, misconceptions, and optimal challenge points in real-time, triggering targeted interventions when needed.
Every interaction feeds back into the model, creating a continuously improving understanding of how you learn best. The engine gets smarter with every question.
Key terminology and principles that power the cognitive learning engine
A probabilistic model that estimates a learner's mastery of a skill based on their performance history. Unlike simple scoring, BKT accounts for guessing, slipping, and learning rate.
Example:
If a student answers correctly, BKT updates the probability they've mastered the concept, considering they might have guessed.
Breaking down subjects into the smallest possible learning units. Instead of 'Algebra', we track mastery of 'solving linear equations with one variable' separately from 'factoring quadratics'.
Example:
SAT Math is decomposed into 200+ micro-concepts, each tracked independently.
A framework for measuring question difficulty and learner ability on the same scale. Helps select questions at the optimal difficulty level for each learner.
Example:
A question with difficulty 0.7 is ideal for a learner with ability 0.7, maximizing information gain.
The mental effort required to process information. Our engine monitors cognitive load to prevent overwhelm and optimize learning efficiency.
Example:
After three difficult questions, the system may present an easier review question to reduce cognitive strain.
A learning technique that increases intervals between reviews of material. Our engine automatically schedules reviews at optimal times for long-term retention.
Example:
A mastered concept is reviewed after 1 day, then 3 days, then 7 days, then 14 days.
The rate at which a learner acquires new knowledge. Our engine tracks velocity to predict future performance and adjust pacing.
Example:
A learner with high velocity in geometry but low velocity in algebra receives more geometry content.
Our phased approach to building the world's first cognitive learning engine
Guidelines for maximizing the effectiveness of the cognitive learning engine
Common questions about the cognitive learning engine
Complete reference for all available endpoints and methods
/v2/trackTrack a learning event and update knowledge state
/v2/predictGet mastery predictions for concepts
/v2/questions/adaptiveGet adaptive question recommendations
/v2/analyticsRetrieve learning analytics and insights
/v2/conceptsCreate or update concept definitions
/v2/knowledge-graphGet the knowledge graph for a user
Base URL: https://api.cognitive-engine.com
See how leading organizations use our SDK to transform learning experiences
Build adaptive learning experiences for K-12, higher education, and test prep platforms
Create intelligent training programs that adapt to employee skill levels and learning pace
Enhance MOOCs and online courses with cognitive intelligence and adaptive content
Power tutoring platforms with AI-driven insights and personalized recommendations