Inspiration
Notion is a productivity app and has an AI assistant built into it, and I keep an extensive personal journal and information relating to my life. I found out that it was able to give me a new view on all my information that I already had. It was like giving a voice to my personal data and it was super helpful to interact with it in a human language format. So I thought, what if we give canvas, a ubiquitous platform in today's education system, the same ability. Thus Canvas AI assistant was born. ---------------------------------------------------------------------------------------------------------------## What it does This project explores how to use the Gemini API to help students retrieve and interact with information from Canvas.It can: -Answer student questions about their coursework and academic life -Automatically pull in relevant data from Canvas
-Save time and help students focus on studying instead of managing schedules.
How we built it
1.Integrated the Canvas LMS API through a helper module called canvas_wrapper.py, which handles API calls and errors.
2.Registered several Canvas-related functions as tools in Gemini using GenerateContentConfig.
3.Built two user interfaces:
-A command-line interface in main.py
-A web-based chat interface using Flask in app.py
4.Maintained conversation context as a list of messages and passed it to Gemini for generating contextual replies.
Challenges we ran into :
The biggest challenge was figuring out how to reliably and seamlessly feed all relevant Canvas data into the Gemini API.This required: -Dynamically retrieving complex, nested data like course structures, assignments, submissions, grades, and user profiles -Staying within Canvas API rate limits -Proper error handling -Structuring the data in a format Gemini could understand and use as tool input
Tool-calling in Gemini is also not always predictable. Coordinating this entire pipeline in real time without breaking context was the most technically difficult and fragile part of the project.
Accomplishments that we're proud of
-Designed everything in a modular way, making it easy to scale or expand to other LMS platforms -Got Gemini to not just respond, but to think using tools, pulling live data from Canvas to ground its responses -Successfully implemented both CLI and web interfaces -Created a truly interactive AI assistant grounded in real student data
What we learned
The biggest lesson was learning the boundaries of large language models (LLMs). Gemini can: -Misinterpret intent -Call the wrong tools But when used correctly, it shines in reasoning, summarizing, and understanding context. We also learned about resilience in system design: -APIs can fail -Gemini can misbehave -Users input unexpected things
We built with these realities in mind and created graceful fallbacks to keep the system running smoothly.
What's next for Canvas AI assist
Currently, the system uses static developer tokens, which are not secure or scalable. The next major step is to implement OAuth 2.0 authentication using Auth0: -Let users securely log in with their own Canvas accounts -Support access token refreshing for long sessions -Enable secure, multi-user functionality
Built With
- api-integrations
- gemini
- python
- python-package-index
Log in or sign up for Devpost to join the conversation.