openlesson

# openLesson Agent API Skill

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "openlesson" with this command: npx skills add dncolomer/open-lesson

openLesson Agent API Skill

You are an AI agent that can interact with the openLesson tutoring platform via API.

Overview

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.

Important: No Browser Tool Required

You do not need a browser tool. You only need shell tools (e.g., curl) to make API calls to openLesson.

Important: Audio-Only System

CRITICAL: The openLesson platform is audio-only. The analyze endpoint accepts ONLY audio input, NOT text.

  • Always convert speech to base64-encoded audio before calling the analyze endpoint
  • Supported formats: webm, mp4, ogg
  • Do not send text to the analyze endpoint - it will be rejected

Authentication

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.

Credentials

This skill requires an API key for the openLesson API:

  • Environment variable: OPENLESSON_API_KEY
  • How to obtain: Generate from the user's dashboard at /dashboard
  • No calendar access needed: The skill does NOT create actual calendar events. "Reminders" means the agent proactively notifies the human when a session is due — this is behavioral, not a technical integration.

Session State

Session IDs are stored in-memory for the duration of the conversation. No persistent storage is used or required.

Bash Command Patterns

When running API calls as shell commands, use this pattern to avoid JSON escaping issues:

Basic POST with JSON body

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 @-'

With variables

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 @-"

Start session

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 @-'

Analyze audio

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 @-'

Endpoints

1. Generate Learning Plan

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:

  • 7 days: 3-5 sessions
  • 14 days: 4-7 sessions
  • 30 days (default): 5-10 sessions
  • 60 days: 8-14 sessions
  • 90 days: 10-18 sessions
  • 180 days: 15-25 sessions

2. Start Session

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
  }
}

3. Analyze Audio Chunk

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
}

4. End Session

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
}

5. Get Session Summary

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"
}

Complete Agent Workflow

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']}")

Error Handling

  • 401: Invalid or inactive API key
  • 403: Session doesn't belong to this key or wrong endpoint
  • 404: Session not found
  • 500: Internal server error

Tips for Agents

  1. Always use audio: The analyze endpoint ONLY accepts audio. Never send text.
  2. Record in webm format: This is the preferred format (Opus codec)
  3. Chunk audio: Send 30-60 second chunks for analysis
  4. Follow up: If requiresFollowUp is true, ask the follow-up question and record response
  5. Track gap scores: Use gap score to determine when user has mastered a concept
  6. Use bash -c for curl: When running API calls in shell scripts, use the bash -c 'printf "..." | curl ... --data-binary @-' pattern to avoid JSON escaping issues
  7. Schedule all sessions: When you generate a learning plan, it is important to schedule all the sessions suggested in the plan for your human. Create calendar events or reminders for each session so they can follow the plan. Always remind your human when a session is due - don't wait for them to ask.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Xiaohongshu Ops

小红书端到端运营:账号定位、选题研究、内容生产、发布执行、数据复盘。 Use when: (1) 用户要写小红书笔记/帖子, (2) 用户说"发小红书"/"写个种草文"/"出一篇小红书", (3) 用户讨论小红书选题/热点/爆款分析/竞品对标, (4) 用户提到账号定位/人设/内容方向规划, (5) 用户要求生成...

Registry SourceRecently Updated
Automation

WeMP Ops

微信公众号全流程运营:选题→采集→写作→排版→发布→数据分析→评论管理。 Use when: (1) 用户要写公众号文章或提供了选题方向, (2) 用户说"写一篇关于XXX的文章"/"帮我写篇推文"/"出一篇稿子", (3) 用户要求采集热点/素材/竞品分析, (4) 用户提到公众号日报/周报/数据分析/阅读量/...

Registry SourceRecently Updated
Automation

agent-stock

用于股票行情查询与分析的命令行技能。用户提到 stock 命令、股票代码、最新资讯、市场概览、K 线或配置管理时调用。

Registry SourceRecently Updated
openlesson | V50.AI