A production-ready multi-agent system using Google Gemini API for analyzing exam papers and generating study recommendations.
- Hub-and-Spoke Architecture: Main orchestrator + 3 specialist sub-agents
- professor_profiler_agent (Root): Orchestrates workflow
- taxonomist: Classifies questions by topic and Bloom's taxonomy (Sequential)
- trend_spotter: Analyzes statistical shifts in exam patterns (Sequential)
- strategist: Generates actionable study plans (Sequential)
- Parallel Processing: Batch question classification
- Sequential Workflow: Orchestrated multi-step analysis pipeline
- Custom Tools:
read_pdf_content: Extract text from PDF exam papersvisualize_trends: Generate matplotlib charts for trend analysisanalyze_statistics: Compute frequency distributions
- Built-in Tools: Code Execution for data analysis
- MCP Integration: Extensible tool framework for future integrations
- InMemorySessionService: State management across conversations
- Memory Bank: Long-term storage of:
- Historical exam patterns
- Student preferences
- Previously analyzed papers
- Context Compaction: Smart summarization to manage token limits
- Structured Logging: JSON logs with correlation IDs
- Tracing: Request flow tracking through agent hierarchy
- Metrics: Performance counters for agent execution time, tool usage, token consumption
- Pause/Resume: Support for multi-document batch processing
- Checkpoint System: Save intermediate results
User Query → Runner → Root Agent (professor_profiler_agent)
↓
[1. Ingest PDF Tool]
↓
[2. Taxonomist Sub-Agent]
↓ (tagged questions)
[3. Trend Spotter Sub-Agent]
↓ (trend report)
[4. Strategist Sub-Agent]
↓ (study plan)
Final Response
- LLM: Google Gemini 2.0 (Flash for classification, Pro for analysis)
- Framework: Custom ADK (Agent Development Kit)
- PDF Processing: pypdf
- Visualization: matplotlib
- Data Analysis: pandas
- State Management: In-memory with persistence option
- Observability: Python logging + custom metrics
- Model: gemini-2.0-pro-exp
- Role: Orchestrator
- Tools: read_pdf_content, visualize_trends, analyze_statistics
- Sub-agents: taxonomist, trend_spotter, strategist
- Model: gemini-2.0-flash-exp (cost-effective for classification)
- Role: Question classification
- Output: Tagged questions with topics and Bloom's levels
- Callback: Suppresses intermediate output
- Model: gemini-2.0-pro-exp (complex analysis)
- Role: Statistical trend analysis
- Output: Shift report with frequency and cognitive trends
- Callback: Suppresses intermediate output
- Model: gemini-2.0-pro-exp
- Role: Study plan generation
- Output: Hit List, Safe Zone, Drop List recommendations
GOOGLE_API_KEY=
GOOGLE_CLOUD_PROJECT=your_project_id # Optional
GOOGLE_CLOUD_LOCATION=global # Optional
GOOGLE_GENAI_USE_VERTEXAI=False # Use Gemini API directly- Local: Python script with ADK runner
- Web Interface:
adk webcommand (if ADK supports) - API Server: FastAPI wrapper for REST endpoints
- Cloud: Cloud Run / Cloud Functions deployment ready