For Agents
Execute 90 Moodle web service functions covering user management, course operations, grading, assignments, quizzes, forum posts, messaging, and calendar events on any Moodle 4.5 instance.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Moodle Web Services API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Moodle Web Services API.
Enroll and unenrol users from courses with automatic role assignment
Retrieve and submit assignment grades with feedback across all course participants
Search and create courses with full metadata including categories and timelines
GET STARTED
Use for: I need to enroll a user in a Moodle course, Retrieve all assignment submissions for a course, I want to create a new course in a specific category, Get the grades table for a student in a course
Not supported: Does not handle Moodle plugin installation, theme customization, or server administration — use for web service data operations only.
Jentic publishes the only available OpenAPI specification for Moodle Web Services API, keeping it validated and agent-ready. Exposes 90 RPC-style web service functions for managing users, courses, enrollments, grades, assignments, quizzes, forums, calendar events, messages, competencies, and file uploads on self-hosted Moodle instances. Authentication uses a wstoken passed as a query parameter, obtained from the /login/token.php endpoint. Supports Moodle 4.5 with coverage across core subsystems including course completion tracking and competency frameworks.
Send messages to conversations and manage user blocking and read receipts
Track activity completion and course completion status per user
Upload files and manage course content modules programmatically
Query competency frameworks and evaluate user competency progress
Patterns agents use Moodle Web Services API for, with concrete tasks.
★ AI Agent Course and Enrollment Management
AI agents use the Moodle Web Services API through Jentic to automate course creation, user enrollment, and role assignment on self-hosted Moodle instances. The agent searches for enrollment functions like enrol_manual_enrol_users, loads the parameter schema, and executes without navigating Moodle's web service plugin configuration. This enables automated provisioning of courses and cohorts at the start of each academic term across institutions running Moodle 4.5.
Enroll user ID 42 in course ID 7 with the student role using the enrol_manual_enrol_users web service function
Assignment Grading and Feedback Workflow
Programmatically retrieve assignment submissions, apply grades, and submit feedback across entire courses. The mod_assign_get_submissions function returns all student submissions for an assignment, mod_assign_get_grades retrieves existing grades, and mod_assign_save_grade saves a new grade with feedback. This supports automated grading pipelines and bulk feedback distribution for courses with hundreds of students.
Retrieve submissions for assignment module in course 15 via mod_assign_get_submissions, then save a grade of 85 with feedback using mod_assign_save_grade
Student Progress Tracking and Completion
Monitor student progress through courses by querying activity completion status, course completion records, and grade reports. The core_completion_get_activities_completion_status function returns completion state for all activities in a course, while gradereport_user_get_grade_items provides the full grade breakdown. This enables early-intervention dashboards that identify students falling behind.
Check completion status for user 99 in course 20 using core_completion_get_course_completion_status and list incomplete activities via core_completion_get_activities_completion_status
Forum and Messaging Automation
Automate forum participation monitoring and direct messaging within Moodle. The mod_forum_get_forum_discussions function lists all discussion threads, mod_forum_get_discussion_posts retrieves replies, and mod_forum_add_discussion creates new threads. The messaging subsystem supports sending instant messages, retrieving conversations, and managing read state across 90 web service endpoints.
Post a new discussion titled 'Week 5 Assignment Q&A' in the forum for course 12 using mod_forum_add_discussion
90 endpoints — jentic publishes the only available openapi specification for moodle web services api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/webservice/rest/enrol_manual_enrol_users
Enroll users in courses with role assignment
/webservice/rest/core_course_create_courses
Create new courses with metadata
/webservice/rest/core_course_search_courses
Search courses by keyword
/webservice/rest/mod_assign_get_submissions
Get all submissions for an assignment
/webservice/rest/mod_assign_save_grade
Save a grade with feedback for a submission
/webservice/rest/core_user_create_users
Create new user accounts in bulk
/webservice/rest/gradereport_user_get_grade_items
Get grade items for a user in a course
/login/token.php
Obtain a web service token for authentication
/webservice/rest/enrol_manual_enrol_users
Enroll users in courses with role assignment
/webservice/rest/core_course_create_courses
Create new courses with metadata
/webservice/rest/core_course_search_courses
Search courses by keyword
/webservice/rest/mod_assign_get_submissions
Get all submissions for an assignment
/webservice/rest/mod_assign_save_grade
Save a grade with feedback for a submission
Three things that make agents converge on Jentic-routed access.
Credential isolation
Moodle web service tokens (wstoken) are stored encrypted in the Jentic vault (MAXsystem). Agents receive scoped access tokens — raw credentials and service tokens never enter the agent's context.
Intent-based discovery
Agents search by intent (e.g., 'enroll a user in a moodle course') and Jentic returns matching Moodle web service functions with their parameter schemas, so the agent can call the right function without navigating Moodle's plugin documentation.
Time to first call
Direct Moodle integration: 3-7 days for token setup, function discovery, and error handling across 90 functions. Through Jentic: under 1 hour — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Specific to using Moodle Web Services API through Jentic.
Why is there no official OpenAPI spec for Moodle Web Services API?
Moodle does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Moodle Web Services API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Moodle Web Services API use?
Moodle uses an API key (wstoken) passed as a query parameter on every request. Tokens are obtained from the /login/token.php endpoint using username and password credentials plus the service shortname. Through Jentic, the wstoken is stored in the encrypted MAXsystem vault, so agents authenticate without handling raw credentials.
Can I enroll users in a Moodle course with the API?
Yes. Use the enrol_manual_enrol_users function, which accepts an array of enrollments each specifying a user ID, course ID, and role ID (5 for student, 3 for teacher). You can also use enrol_manual_unenrol_users to remove enrollments or enrol_self_enrol_user for self-service enrollment.
How do I retrieve assignment grades for a student through Jentic?
Search Jentic for 'get moodle assignment grades' to find the gradereport_user_get_grade_items function. This returns all grade items for a specific user in a course, including assignment grades, quiz scores, and computed totals. Install with pip install jentic, then search, load the schema, and execute with the user and course IDs.
What are the rate limits for the Moodle Web Services API?
Rate limits depend on the Moodle instance configuration set by the site administrator. There are no universal limits in the spec. Administrators typically configure request throttling via the Moodle security settings. Self-hosted instances can adjust these limits based on server capacity.
Does the Moodle API support file uploads?
Yes. The core_files_upload function handles file uploads to Moodle's file system. You provide the file content, filename, and target context (course, user, etc.). The core_files_get_files function retrieves file listings from any file area in the system.
/webservice/rest/core_user_create_users
Create new user accounts in bulk
/webservice/rest/gradereport_user_get_grade_items
Get grade items for a user in a course
/login/token.php
Obtain a web service token for authentication