Skip to content

Implement AI-powered personalised learning lab with Cloudflare Workers AI#1

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-ai-personalized-learning-lab
Draft

Implement AI-powered personalised learning lab with Cloudflare Workers AI#1
Copilot wants to merge 3 commits intomainfrom
copilot/add-ai-personalized-learning-lab

Conversation

Copy link

Copilot AI commented Mar 8, 2026

Greenfield implementation of LearnPilot — an adaptive learning platform backed by Cloudflare Workers AI (@cf/meta/llama-3.1-8b-instruct). The repo previously contained only a README and LICENSE.

Data layer (learning/models.py)

  • Topic, Course, Lesson — content hierarchy
  • LearnerProfile — skill level, learning style, XP, day streaks
  • AdaptivePath / PathLesson — ordered AI-generated lesson sequences per learner
  • LearningSession / Message — tutoring conversation persistence
  • Progress — per-lesson score, completion, attempt count, XP award

Cloudflare AI integration (learning/ai/)

  • cloudflare_ai.py — thin HTTP client for the Workers AI REST API; transparently routes through a deployed Cloudflare Python Worker when CLOUDFLARE_WORKER_URL is set
  • tutor.pyIntelligentTutor: structured prompts for concept explanation (adapts to skill level + learning style), practice question generation, answer evaluation (returns score 0–1 / feedback / correct_answer), conversation continuation, and session summaries
  • adaptive.pyAdaptiveCurriculum: generates ordered lesson paths as JSON, recommends next lesson based on history, adjusts difficulty from recent scores, produces progress insights
# Direct API usage example
tutor = IntelligentTutor()
result = tutor.evaluate_answer(
    question="What is a Python decorator?",
    learner_answer="A function that wraps another function",
    topic="Python Functions",
)
# → {"score": 0.85, "feedback": "…", "correct_answer": "…"}

Cloudflare Python Worker (workers/)

  • workers/src/worker.py — edge worker using env.AI binding; exposes /ai/chat, /ai/explain, /ai/practice, /ai/evaluate, /ai/path endpoints with CORS
  • workers/wrangler.toml — deploy with wrangler deploy (Python workers + AI binding)

Django app (learning/)

  • Views: dashboard, course list/detail, session start/chat/end, AJAX evaluate API, progress with AI insights
  • seed_data management command seeds 4 topics, 6 courses, 21 lessons
  • 50 unit + integration tests covering models, AI modules, and HTTP views

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.cloudflare.com
    • Triggering command: /usr/bin/python python manage.py test tests --verbosity=2 (dns block)
    • Triggering command: /usr/bin/python python manage.py test tests --verbosity=1 rd --local /usr/local/.ghcup/bin/git credential.helpegit (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

AI-powered personalized learning lab that adapts to each learner in real time. Combines natural language processing, adaptive curricula, intelligent tutoring, and progress tracking to create a dynamic educational experience with interactive explanations, guided practice, and continuous feedback. uses Cloudflare AI python workers


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 8, 2026 23:06
…s AI

Co-authored-by: A1L13N <193832434+A1L13N@users.noreply.github.com>
Co-authored-by: A1L13N <193832434+A1L13N@users.noreply.github.com>
Copilot AI changed the title [WIP] Add AI-powered personalized learning lab with real-time adaptation Implement AI-powered personalised learning lab with Cloudflare Workers AI Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants