Install
openclaw skills install open-lessonInteract with the openLesson tutoring API to generate learning plans, start audio-based sessions, analyze reasoning gaps, and manage tutoring workflows.
openclaw skills install open-lessonYou are an AI agent that can interact with the openLesson tutoring platform via API.
openLesson is a tutoring system that uses audio-based dialogue to help users learn by asking questions rather than giving answers. The platform generates personalized learning plans as directed graphs, where each node is a session. Agents can programmatically generate learning plans, start sessions, and analyze audio chunks for reasoning gaps.
You do not need a browser tool. You only need shell tools (e.g., curl) to make API calls to openLesson.
CRITICAL: The openLesson platform is audio-only. The analyze endpoint accepts ONLY audio input, NOT text.
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Important: Always use https://www.openlesson.academy for API calls. The domain openlesson.academy has a redirect that loses the Authorization header.
API keys can be generated from the user's dashboard at /dashboard.
This skill requires an API key for the openLesson API:
OPENLESSON_API_KEY/dashboardSession IDs are stored in-memory for the duration of the conversation. No persistent storage is used or required.
When running API calls as shell commands, use this pattern to avoid JSON escaping issues:
bash -c 'printf "{\"topic\":\"Quantum Computing\",\"days\":60}" | curl -X POST "https://www.openlesson.academy/api/agent/plan" -H "Authorization: Bearer $OPENLESSON_API_KEY" -H "Content-Type: application/json" --data-binary @-'
TOPIC="Quantum Computing"
DAYS=60
bash -c "printf '{\"topic\":\"$TOPIC\",\"days\":$DAYS}' | curl -X POST 'https://www.openlesson.academy/api/agent/plan' -H 'Authorization: Bearer $OPENLESSON_API_KEY' -H 'Content-Type: application/json' --data-binary @-"
bash -c 'printf "{\"plan_node_id\":\"NODE_UUID\",\"problem\":\"Explain neural networks\"}" | curl -X POST "https://www.openlesson.academy/api/agent/session/start" -H "Authorization: Bearer $OPENLESSON_API_KEY" -H "Content-Type: application/json" --data-binary @-'
bash -c 'printf "{\"session_id\":\"SESSION_UUID\",\"audio_base64\":\"BASE64_DATA\",\"audio_format\":\"webm\"}" | curl -X POST "https://www.openlesson.academy/api/agent/session/analyze" -H "Authorization: Bearer $OPENLESSON_API_KEY" -H "Content-Type: application/json" --data-binary @-'
Creates a directed graph of learning sessions for a given topic.
Endpoint: POST /api/agent/plan
Request:
{
"topic": "Machine Learning Fundamentals",
"days": 30 // optional: number of days to spread the plan across (default: 30)
}
Response:
{
"planId": "uuid",
"topic": "Machine Learning Fundamentals",
"days": 30,
"nodes": [
{
"id": "uuid",
"title": "Introduction to ML",
"description": "Basic concepts and overview",
"is_start": true,
"next_node_ids": ["uuid2"],
"status": "available"
}
]
}
Days to Sessions:
Starts a new Socratic session.
Endpoint: POST /api/agent/session/start
Request:
{
"problem": "Explain how gradient descent works in neural networks",
"plan_node_id": "uuid-from-plan" // optional, links to plan node
}
Response:
{
"sessionId": "uuid",
"problem": "Explain how gradient descent works...",
"nodeTitle": "Gradient Descent",
"planId": "uuid",
"status": "active",
"instructions": {
"audioFormat": "webm",
"submitEndpoint": "/api/agent/session/analyze",
"maxChunkDuration": 60000
}
}
Submits an audio chunk for Socratic analysis. Returns reasoning gap score and follow-up questions.
Endpoint: POST /api/agent/session/analyze
Request:
{
"session_id": "uuid-from-start",
"audio_base64": "base64-encoded-audio-data",
"audio_format": "webm"
}
Response:
{
"sessionId": "uuid",
"gapScore": 0.7,
"signals": [
"Missing consideration of local minima",
"No mention of learning rate impact"
],
"transcript": "transcribed audio...",
"followUpQuestion": "What happens when the gradient becomes very small?",
"requiresFollowUp": true
}
Ends an agent session and generates a summary report.
Endpoint: POST /api/agent/session/end
Request:
{
"session_id": "uuid-from-start"
}
Response:
{
"success": true,
"sessionId": "uuid",
"message": "Session ended and report generated",
"chunkCount": 5,
"wordCount": 1200
}
Retrieves the summary report of a completed session.
Endpoint: GET /api/agent/session/summary?session_id=xxx
Response (if ready):
{
"ready": true,
"sessionId": "uuid",
"report": "# Session Report\n\n## Overview\n...",
"createdAt": "2026-02-24T12:00:00Z",
"status": "completed"
}
Response (if not ready):
{
"ready": false,
"message": "Session report not ready yet. Call /session/end first to generate the report.",
"sessionId": "uuid",
"status": "active"
}
import base64
import requests
API_KEY = "your_api_key"
BASE_URL = "https://openlesson.academy"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# Step 1: Generate a learning plan (optional: specify days)
plan_response = requests.post(
f"{BASE_URL}/api/agent/plan",
json={
"topic": "Quantum Computing",
"days": 14 # optional: number of days for the plan
},
headers=HEADERS
)
plan = plan_response.json()
# Step 2: Start a session for the first node
first_node = next(n for n in plan["nodes"] if n["is_start"])
session_response = requests.post(
f"{BASE_URL}/api/agent/session/start",
json={"plan_node_id": first_node["id"], "problem": first_node["title"]},
headers=HEADERS
)
session = session_response.json()
# Step 3: Record and analyze audio
# 1. Record audio from user (use browser MediaRecorder or similar)
# 2. Convert to base64
with open("audio.webm", "rb") as f:
audio_base64 = base64.b64encode(f.read()).decode()
analyze_response = requests.post(
f"{BASE_URL}/api/agent/session/analyze",
json={
"session_id": session["sessionId"],
"audio_base64": audio_base64,
"audio_format": "webm"
},
headers=HEADERS
)
analysis = analyze_response.json()
print(f"Gap Score: {analysis['gapScore']}")
print(f"Follow-up: {analysis['followUpQuestion']}")
requiresFollowUp is true, ask the follow-up question and record responsebash -c 'printf "..." | curl ... --data-binary @-' pattern to avoid JSON escaping issues