How danielg0798/instruct-ai_m2 works
CourseGuide AI is a prototype that guides students through course-specific questions while respecting instructor-defined help boundaries. A student question enters the agent, which is configured to classify the request and look up the course policy through MCP tools before producing a guided response; students can also ask which courses are available. The MCP server implements those tools, and policy lookup loads YAML configuration or falls back to a default. The sampled code also shows client setup and console tracing. The README documents these capabilities; unsampled runtime behavior is not inferred.
Main entry points: m2_agent.py CourseGuide Agent · course_policy_mcp.py Policy MCP Server · policy_loader.py Policy Loader · physics_101.yaml Physics Policy
Components 12
Student Agent
- CourseGuide Agent
src/m2_agent.py - Console Tracing
src/shared/tracing.py
MCP Tools
- Policy MCP Server
mcp_servers/course_policy_mcp.py - Help Classifier
mcp_servers/course_policy_mcp.py - Policy Lookup Tool
mcp_servers/course_policy_mcp.py - Course Listing Tool
mcp_servers/course_policy_mcp.py
Course Policies
- Policy Loader
src/shared/policy_loader.py - Physics Policy
config/physics_101.yaml - Chemistry Policy
config/chemistry_201.yaml - Shared Configuration
src/shared/config.py
Other components
- Student
- Model API
Connections 16
- Student → CourseGuide Agent: asks question
README.md - CourseGuide Agent → Policy MCP Server: connects via MCP
src/m2_agent.py - Policy MCP Server → Help Classifier: registers tool
mcp_servers/course_policy_mcp.py - Policy MCP Server → Policy Lookup Tool: registers tool
mcp_servers/course_policy_mcp.py - Policy MCP Server → Course Listing Tool: registers tool
mcp_servers/course_policy_mcp.py - CourseGuide Agent → Help Classifier: requests classification
src/m2_agent.py - CourseGuide Agent → Policy Lookup Tool: requests policy
src/m2_agent.py - CourseGuide Agent → Course Listing Tool: requests course list
src/m2_agent.py - Policy Lookup Tool → Policy Loader: loads policy
mcp_servers/course_policy_mcp.py - Policy Loader → Physics Policy: reads YAML
src/shared/policy_loader.py - Policy Loader → Chemistry Policy: reads YAML
src/shared/policy_loader.py - Course Listing Tool → Physics Policy: lists files
mcp_servers/course_policy_mcp.py - Course Listing Tool → Chemistry Policy: lists files
mcp_servers/course_policy_mcp.py - CourseGuide Agent → Model API: runs model
README.md - CourseGuide Agent → Console Tracing: configures tracing
src/m2_agent.py - CourseGuide Agent → Student: returns response
README.md