Goldnat Plugins
← Back to Moodle

Moodle AI Connect — Installation & Setup Guide

Install and connect local_aiconnect (Servio Protocol) to your Moodle LMS. 2 free tools for student flow + 4 Pro. Teacher Pro sold separately.

📅 Updated: 2026-07-07 🎬 Video: moodle-install-connect

Overview

Goldnat AI Connect for Moodle (local_aiconnect) turns the LMS into a Servio Protocol tool server. The basic plugin is designed for students — viewing courses and grades. A separate Teacher Pro extension (in development) will support creating assignments, enrolling users, submitting grades, and updating courses.

What you get:

  • 2 free toolsgetCourses, getUserProfile
  • Student Pro upgradegetCourse, getAssignments, getGrades, sendMessage
  • Separate Pro extension: moodle-teacher-ai-connect (Teacher/Admin — 6 tools: enroll, createAssignment, submitGrade, updateCourse, searchUsers, getEnrollments)

Prerequisites

  • Moodle 4.1+ (4.3+ recommended)
  • PHP 7.4+ (8.1+ recommended)
  • MySQL/MariaDB or PostgreSQL
  • HTTPS required
  • Site admin for installation, enrolled user for use

Installation

  1. Download the plugin ZIP from your personal area at goldnat.ai (sign in → your plugins → download the latest version).
  2. Site administration → Plugins → Install plugins.
  3. Drag & drop the ZIP → Install plugin from ZIP file.
  4. Continue → Moodle runs DB migrations automatically.
  5. Save changes on the settings page that appears.
  6. Verify at Site administration → Notifications that there are no errors.

Connecting to an AI Agent

  1. User profile → Preferences → AI Connect Tokens (or /local/aiconnect/mytokens.php).
  2. Generate Prompt → copy and paste into your agent.
  3. OAuth PKCE runs → approve.

First Test

  • “What courses am I enrolled in?” → moodle.getCourses
  • “Who am I on the system?” → moodle.getUserProfile

With Student Pro:

  • “What assignments do I have in ‘Intro to AI’?” → moodle.getAssignments
  • “What are my grades in that course?” → moodle.getGrades

With Teacher Pro (future):

  • “Enroll student@example.com in course 5” → moodle.enrollUser
  • “Create a new assignment in course 3” → moodle.createAssignment

Reconnecting

Tokens valid for 30 days. Refresh:

  1. My Tokens → Revoke the old token.
  2. Generate Prompt again.

Token Management

/local/aiconnect/mytokens.php page with 6 filters and bulk actions. Tokens are tied to a specific user_id in Moodle — you can’t use one user’s token as another.

Uninstalling the Plugin

1. Revoke all tokens

  • My Tokens → Revoke All — kills every active agent session immediately.

2. Uninstall via UI

  • Site administration → Plugins → Plugins overview → find local_aiconnect → click Uninstall.
  • Moodle will prompt to confirm dropping the DB tables → confirm.

3. Remove the files

rm -rf /path/to/moodle/local/aiconnect/

4. Purge caches

php admin/cli/purge_caches.php

Or via UI: Site administration → Development → Purge all caches.

Common Troubleshooting

ErrorCauseFix
Plugin not compatible with Moodle versionMoodle 3.xUpgrade to 4.1+
Manifest 404Web services not enabledSite admin → Advanced → Enable web services
Permission denied (Grade assignment)User isn’t a teacher on the courseAssign the teacher role on the relevant course
Course not found (courseid=1)Trying to use the FrontpageFrontpage isn’t a real course — use courseid ≥ 2

Support

Need help? Contact us and we’ll get back to you.

Video Tutorial (Coming Soon)

Segments: (A) Goldnat AI Connect on the Servio Protocol, (B) installing via Site administration, (C) connecting to an AI agent, (D) student flow — my courses and grades.

Screenshots

Moodle Site administration → Plugins
Navigate to Site administration → Plugins → Install plugins
Upload ZIP + Install
Install from ZIP + Continue
My Tokens page
Generate prompt for AI agent connection

🎬 Video Tutorial — Coming Soon

A 3-5 minute video covering: intro → install → connect → demo.

Tag: moodle-install-connect

Status: Awaiting production

Pro

Moodle AI Connect Pro — Teacher Tools

New here? Start with the basic setup guide above.

What Pro adds

The free Moodle plugin gives AI agents read-only access to courses, enrolments and grades. Pro adds the teacher write tools, so an agent can enrol students, create assignments, grade submissions, and message learners.

Pro ships as a separate Moodle plugin (local_aiconnectteacher) that declares a dependency on the free local_aiconnect plugin. The core plugin loads the Pro tools only when the edition is Pro — otherwise they never appear in the manifest.

Pro tools

ToolScopeWhat it does
enrollUserwriteEnrol a user into a course (manual enrolment)
createAssignmentwriteCreate an assignment in a course
submitGradewriteSubmit a grade for a student’s assignment
sendMessagewriteSend an instant message to a user
updateCoursewriteUpdate a course’s full name or summary
searchUserswriteSearch users by name or email

Enabling Pro

  1. Install the free Moodle plugin first (see the basic guide above).
  2. Install the local_aiconnectteacher plugin, then run admin/cli/upgrade.php.
  3. Set the edition to Pro: AICONNECT_EDITION=pro, or set the edition config for local_aiconnect to pro.
  4. Purge caches and regenerate your connection prompt — the six Pro tools now appear.

Scope note

All Pro tools require the write scope. Actions still run against the token owner’s own Moodle capabilities — the scope is the ceiling, the user’s role permissions are the floor. For example, submitGrade requires the token owner to hold the grading capability in that course’s context.

This guide is informational and non-binding. Steps and behavior can vary between platforms and plugin versions. For the binding terms, see the Terms & Conditions.

Tools

Available tool calls.

26 tools exposed via the Servio protocol. Pro tools are marked.

moodle

  • moodle.createAssignment Creates a new assignment in the course with name, instructions, and due date. Pro
  • moodle.enrollUser Enrolls a user (student/teacher) in a given course. Pro
  • moodle.exportGradebookCSV Exports the course gradebook as a CSV file (students × grade items). Pro
  • moodle.exportGradebookExcel Exports the course gradebook as an Excel (.xlsx) file, returned base64-encoded. Pro
  • moodle.getCourseGradebook Get the full gradebook for a course: every enrolled student with their grade in each grade item (Pro) Pro
  • moodle.getStudentGrades Get all grades for a single student in a course, item by item, with the course total (Pro) Pro
  • moodle.searchUsers Searches users by name or email address. Pro
  • moodle.sendMessage Sends a personal message to a student or a group of students through the Moodle messaging system. Pro
  • moodle.submitGrade Enters a grade for a student's assignment and saves it to the gradebook. Pro
  • moodle.updateCourse Updates the course details (name, description, settings). Pro
  • moodle.getCourseContent Return the learning materials and resources of a course the student is enrolled in. Pro
  • moodle.getMyAssignments List the current student's assignments with due dates and submission status. Pro
  • moodle.getMyAttendance Return the current student's attendance record across courses. Pro
  • moodle.getMyCourses List the courses the current student is enrolled in, with progress and next due dates. Pro
  • moodle.getMyFeedback Get the teacher feedback on the current student's submitted assignments. Pro
  • moodle.getMyGrades Get the current student's grades across all their courses. Pro
  • moodle.getMySchedule Return the current student's calendar: classes, deadlines and events. Pro
  • moodle.markNotificationsRead Mark the current student's Moodle notifications as read. Pro
  • moodle.sendMessageToTeacher Send a private message from the current student to a course teacher. Pro
  • moodle.submitAssignment Submit an assignment on behalf of the current student (text or file). Pro
  • moodle.getAssignments Returns the list of assignments in a given course.
  • moodle.getCourse Returns full details of a single course by course ID.
  • moodle.getCourses Returns the list of courses the user is enrolled in, with name, code, and ID.
  • moodle.getEnrollments Returns the list of users enrolled in a course and their roles.
  • moodle.getGrades Returns the user's grades on the course grade items.
  • moodle.getUserProfile Returns the authenticated user's profile (name, email, details).