Cogniti can interface with Moodle LMS through LTI 1.3 and Moodle’s web services API.
LTI 1.3 #
The LTI 1.3 connection allows Cogniti agents, interactive mini-apps, and sandboxes to be embedded into Moodle for seamless access by students.
In Moodle Site administration admin, go to Plugins, then Activity modules, then Manage activities, then External tool, then Settings, then Add preconfigured tool.
These are the important settings (the others you can decide for yourself):
- Tool URL: https://app.cogniti.ai/lti/launch
- LTI version: LTI 1.3
- Public key type: Keyset URL
- Public keyset: Please contact us, or view this in your organisation administration screen in Cogniti. It will be typically in the form of https://app.cogniti.ai/lti/jwks/<organisation_id>. Each organisation has its own key. The key is only needed for LTI Advantage services (such as the Names and Roles Provisioning Services).
- Initiate login URL: https://app.cogniti.ai/lti/login
- Redirection URI(s): https://app.cogniti.ai/lti/launch
- Custom parameters
- domain=<your moodle domain e.g. sydney.moodlecloud.com>
- course_id=$CourseSection.label
- course_name=$CourseSection.title
- resource_link_id=$ResourceLink.id
- Tool configuration usage: Show as preconfigured tool when adding an external tool
- Default launch container: Embed, without blocks
- Services
- IMS LTI Names and Role Provisioning: Use this service
- Privacy
- Share launcher’s name with tool: Always
- Share launcher’s email with tool: Always
- Miscellaneous
- Default organisation ID: Site hostname
Once the configuration has been established, please make a note of the following so that a Cogniti system administrator can configure this connection on the Cogniti end. You can obtain these details through Site administration admin, then Plugins, then Activity modules, then External tool, then Manage tools, and clicking the list icon or view configuration icon (depending on your Moodle version):


- Platform ID (your Moodle site’s URL)
- Client ID
- Deployment ID
- Public keyset URL
- Access token URL
- Authentication request URL
Web services API (experimental) #
The API connection allows Cogniti to connect to Moodle and pull resources such as files, Moodle page content, and assignment descriptions. These resources can be used to improve the accuracy of AI agent responses.
- Enable web services
- Site administration → Advanced features → Enable web services (tick)
- Site administration → Server → Web services → Manage protocols → REST (enable)
- Create a service account for Cogniti
- Site administration → Users → Add a new user. Use a dedicated, non-admin, non-human account, e.g. cogniti_svc_wsapi. Do not reuse a staff account. Leave it unenrolled in every course. It does not need enrolment — the role below grants read access site-wide, and staying unenrolled keeps it out of participant lists.
- Create the role
- Site administration → Users → Permissions → Define roles → Add a new role, with context type System. Start from No role, not Manager, and allow only the following capabilities.
| Capability | Why | What breaks without it |
|---|---|---|
| webservice/rest:use | Call REST at all. | Every call fails |
| moodle/course:view | Read course content without being enrolled | Course contents empty / denied |
| moodle/user:viewdetails | Look users up at all | Email lookup fails and users cannot be identified |
| moodle/site:viewuseridentity | Return email in user lookups | The user is dropped because the searched field is not visible |
| moodle/course:viewparticipants | List another user’s courses | Their courses silently omitted |
| moodle/site:viewparticipants | Same check at a different context level — grant both | As above |
| moodle/role:review | Required by core_enrol_get_enrolled_users_with_capability | Teacher detection fails → user teaches nothing |
| moodle/course:viewhiddencourses | Include unpublished courses | Hidden courses missing from the picker |
| moodle/course:viewhiddenactivities | Include unpublished activities | Unpublished activities missing from a course |
| moodle/course:ignoreavailabilityrestrictions | Also import activities gated by date or completion rules | Can only select content that is showing to students |
- Assign system role to the service account
- Site administration → Users → Permissions → Assign system roles → assign the new role to the service account. System context, not inside a course.
- Create the external service
- Site administration → Server → Web services → External services → Add.
- Name it (e.g. `Cogniti`), tick Enabled.
- Tick Authorised users only.
- Tick Can download files — this is a service setting, not a capability.
- Then in that service’s row → Functions → Add functions, and add exactly:
- core_webservice_get_site_info
- core_user_get_users_by_field
- core_enrol_get_users_courses
- core_enrol_get_enrolled_users_with_capability
- core_course_get_contents
- mod_page_get_pages_by_courses
- mod_assign_get_assignments
- Then Authorised users → add the service account.
- Site administration → Server → Web services → External services → Add.
- Mint the token
- Site administration → Server → Web services → Manage tokens → Add. Select the service account and the service. Copy it at creation. Neither an admin nor the user can retrieve the value later — if lost, delete and recreate.
Once this is done, send the following information to a Cogniti system administrator:
- Moodle domain: e.g. moodle.example.edu (hostname only)
- Moodle API credentials: the web services token for the service account.