There are other ways to use AI in a school setting. Grading homework is a tedious and time-consuming task that would likely be simple for an AI to do.
YMMV, but in my school, teachers can access AI while students (mostly) can't. It's possible to allow AI for teachers and not students.
You still have to double check the Agent's grading as they still make frequent minor mistakes, that while they don't really impact coding as much or can be caught with tests, that is not the case here.