AI Agents
The app.core.agents module contains the core logic for the AI-powered features of Personal Guru.
PlannerAgent
Responsible for generating and updating study plans.
generate_study_plan(topic, user_background)
Generates a structured list of study steps for a given topic.
- Inputs:
topic(str): The subject to learn.user_background(str): User's persona/level (e.g., "Beginner").
- Output:
List[str]of step titles.
update_study_plan(topic_name, user_background, current_plan, comment)
Modifies an existing study plan based on user feedback.
- Inputs:
comment: User's request (e.g., "Add more physics").
- Output:
List[str](Updated plan).
FeedbackAgent
Evaluates user answers to quizzes and assessment questions.
evaluate_answer(question_obj, user_answer, answer_is_index=False)
- Inputs:
question_obj: Dict containing the question and correct answer.user_answer: The user's input.
- Output:
dictcontaining:is_correct(bool)feedback(str)
ChatAgent
Handles free-form Q&A about the study material.
get_answer(question, conversation_history, context, user_background, plan=None)
- Inputs:
question: User's query.context: The content of the current study step.
- Output:
str(The AI's answer).
SuggestionAgent
Generates topic suggestions based on the user's profile.
generate_suggestions(user_profile, past_topics)
- Output:
List[str]of suggested topics.
TopicTeachingAgent (Base)
Base class for generating educational content. See mode-specific implementations for details.