AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified Apache-2.0 Self-run

Trifecta

mcp-theoriongd-trifecta Β· by TheOrionGD

πŸŽ“ AI-powered educational agent built with Google ADK & Groq LLM β€” generates personalized 7-day study plans, RAG-backed Q&A, quiz generation, and Human-in-the-Loop checkpoints for safe, adaptive learning.

β€” No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add mcp-theoriongd-trifecta

βœ“ scanned Β· βœ“ verified, works with Claude Code, Cursor, and more.

Security review

βœ“ Passed

No issues found. Passed automated security review. Β· v0.1.0 How review works β†’

  • βœ“ Prompt-injection patterns
  • βœ“ Secret / credential exfiltration
  • βœ“ Dangerous shell & filesystem operations
  • βœ“ Untrusted network calls
  • βœ“ Known-malicious package signatures

What it can access

  • βœ“ Network access No
  • βœ“ Filesystem access No
  • βœ“ Shell / process execution No
  • ● Environment & secrets Used
  • βœ“ Dynamic code execution No

From automated source analysis of v0.1.0. β€œUsed” means the capability is present in the source β€” more access means more to trust, not that it’s unsafe.

View the full security report β†’

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-theoriongd-trifecta)

Reliability & compatibility

βœ“ Security review passed
0 installs to date
β€” no reviews yet
● 1mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work β†’
Are you the author of Trifecta? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

πŸŽ“ Trifecta Agent

The Trifecta is an advanced educational AI assistant built using the Google Agents SDK. It designs personalized, multi-turn study pathways tailored to individual student needs by dynamically diagnosing knowledge gaps, checking inputs for security violations, retrieving reference material via an MCP retrieval-augmented generation (RAG) vector store, and yielding structured 7-day study plans. Incorporating two distinct Human-in-the-Loop (HITL) checkpointsβ€”one for security moderation and another for parent/teacher study plan approvalβ€”the system ensures that educational material is safe, relevant, and fully aligned with pedagogical requirements.

πŸŽ₯ Video Demonstration

[](https://youtu.be/YrWtIcUnS5M)

πŸ—οΈ Architecture and Agent Hierarchy

The agent workflow is structured as a directed graph of nodes orchestrating different sub-agents and validation rules. Below is the ASCII architecture diagram showing the execution path:

               +----------------------------------------+
               |              Student Input             |
               +----------------------------------------+
                                    |
                                    v
                       +-------------------------+
                       |       parse_input       |
                       +-------------------------+
                                    |
                                    v
                       +-------------------------+
                       |   security_checkpoint   |  |  security_moderation  | (HITL Checkpoint 1)
        +------------------+   [safe]    +-----------------------+
                 |
                 v (grades quiz / subtopics)
        +------------------+
        | weakness_tracker |
        +------------------+
                 |
                 v (finds subtopic weaknesses)
        +----------------------+
        | study_plan_generator |  loop back to study_plan_generator

πŸ“‹ Prerequisites

Before setting up the project, ensure you have the following installed:

  • Python 3.13+: The core execution runtime.
  • Node.js 18+: Required to run the frontend SPA student interface.
  • uv: Modern, high-performance Python package manager (highly recommended).
  • Google Cloud SDK (gcloud): Required for Cloud services (if deploying to GCP).
  • Groq API Key: A valid API Key from Groq Console.

πŸš€ Quick-Start

Follow these steps to clone, configure, and boot up the local playground and teacher dashboard:

1. Clone the Repository

git clone  capstone-study-coach
cd capstone-study-coach/trifecta-agent

2. Install Dependencies

Set up the virtual environment and install both Python back-end packages and Node.js front-end packages:

# Install Python packages and CLI utilities
pip install -e ".[dev]"

# Download required fonts for PDF export generation
python scripts/download_fonts.py

# Install frontend UI dependencies
cd frontend && npm install
cd ..

3. Configure the Environment

Create a .env file in the trifecta-agent root folder based on the example:

copy .env.example .env

Open .env and configure your API key and port preferences:

GROQ_API_KEY=gsk_YourActualAPIKeyHere
ADK_BASE_URL=http://127.0.0.1:8001
ALLOW_ORIGINS=*

4. Launch the System

Run the predefined commands in separate terminals (or use the provided start.ps1 script on Windows):

  • Backend Agent Server (ADK):

``bash # Launches the integrated ADK server & MCP endpoints at http://127.0.0.1:8001 uvicorn trifecta_agent.fast_api_app:app --port 8001 ``

  • Teacher/Moderator Dashboard (FastAPI):

``bash # Launches Uvicorn API server & glassmorphic SPA at http://127.0.0.1:8080 make dashboard ``

  • Student UI (Vite + React):

``bash # Launches Vite development server at http://localhost:7860 make student-ui ``


πŸ€– Sub-Agents & HITL Flows

The Personal Trifecta employs modular sub-agents to divide responsibilities, combined with interactive checkpoints for safety and quality control:

Sub-Agents

  1. Security Checkpoint (PII Redaction & Injection Defense): Uses Microsoft Presidio Analyzer and Anonymizer engines to scrub names, phone numbers, SSNs, email addresses, and student IDs. It also inspects inputs for prompt injection attack patterns.
  2. Interactive Quiz Agent: Triggers a turn-by-turn multiple-choice testing flow. It queries the document index via FastMCP to ground the generated questions and requests Groq (Llama 3) to construct exactly 5 questions based on the student's selected difficulty.
  3. Weakness Tracker Agent: A deterministic, rule-based Python analyzer. It aggregates historical quiz responses, groups them by subtopic, flags any subtopic scoring below WEAKNESS_THRESHOLD (default: 60%), and assigns priority categories (high, medium, low).
  4. Study Plan Generator Agent: Prompts the Groq (Llama 3) model to synthesize a structured 7-day schedule utilizing structured JSON formatting. It prioritizes identified high-priority weakness topics, integrates FastMCP study resources, and narrates a motivational introduction.

Human-in-the-Loop (HITL) Checkpoints

  1. Security Escalation (Checkpoint 1): If security_checkpoint detects a potential prompt injection keyword, the workflow pauses, raising a security_escalation interrupt. A human moderator must audit the input on the Teacher Dashboard to mark it Safe (anonymizing and resuming the quiz) or Malicious (raising a value error and terminating the session).
  2. Study Plan Approval (Checkpoint 2): Before a 7-day study plan is delivered to the student, the workflow pauses, creating a study_plan_approval interrupt. A teacher or parent reviews the plan on the dashboard and can choose to:
  • Approve: Delivers the study plan directly to the student UI.
  • Revise: Submits a revision note (e.g., "Add more algorithms practice") which routes execution back to the study_plan_generator to rebuild the plan.
  • Reject: Cancels the study plan and notifies the student.

πŸ“„ Ingesting Materials & Teacher Console Navigation

To ground the quiz questions and study plans, and manage the student experience, perform the following steps:

πŸ“Š Teacher Console Features

The Teacher Administration Console at http://127.0.0.1:8080 provides five major tabs:

  1. Overview & Charts: Real-time KPI summaries (Active Sessions, Awaiting Reviews, Avg Accuracy, and Indexed Chunks) and Chart.js graphs mapping subtopic proficiency and timeline activity.
  2. Student Sessions: Registry of active sessions. Teachers can click on any Session ID to inspect a deep-dive Student Profile, displaying PII audit logs, question-by-question quiz answers, and generated plan schedules.
  3. Review Queue: Consolidated center to resolve HITL prompts, displaying a visual day-by-day preview grid for proposed study plans.
  4. MCP Knowledge Base: Drag-and-drop document upload paired with an index browser to search and preview RAG chunks.
  5. Agent Settings: Adjust thresholds (e.g. weakness threshold, quiz length, model) dynamically.

1. Ingest Study Materials

  1. Open the Teacher Console at http://127.0.0.1:8080 and switch to the MCP Knowledge Base tab.
  2. Drag & drop or browse to select a PDF, TXT, or Markdown document in the upload zone.
  3. Click Upload to MCP Vector Store. The file is forwarded to the FastMCP server, split into overlapping chunks, and indexed into the local index.json vector file. You can search indexed chunks in the real-time inspector.

2. Play a Quiz Session

  1. Open the Student UI at http://localhost:7860 (or run a CLI session in the playground).
  2. Start a session by entering a topic and difficulty (e.g., "Python loops hard").
  3. The quiz agent will search the MCP index for loops, build 5 questions, and present them one-by-one.
  4. Answer each question. The agent provides immediate feedback.
  5. After the final question, the Weakness Tracker prints a report, and the Study Plan Generator drafts a plan.
  6. The UI will pause and display "Waiting for parent/teacher approval...".
  7. Go to the dashboard, click Review, insert optional instructions, and click Approve Plan or Request Revision.
  8. The student UI immediately updates with the approved plan.
  9. Export: Students can click the Download PDF button to receive a beautifully branded, offline-ready ReportLab A4 PDF of their study schedule.

πŸ“Š Running Evaluations

The evaluation loop measures response quality and graph performance against custom datasets.

Configuration

Metrics are defined in tests/eval/eval_config.yaml. The suite utilizes a custom LLM-as-a-Judge metric (custom_response_quality) to score agent responses on a scale from 1 (poor) to 5 (excellent), along with a programmatic metric (agent_turn_count) to track conversation lengths.

Run Evaluations

Use the agents-cli executable to generate conversation traces and run evaluation metrics:

# Step 1: Synthesize testing datasets (optional)
agents-cli eval dataset synthesize --count 10

# Step 2: Generate traces using test inputs
agents-cli eval generate --dataset tests/eval/datasets/basic-dataset.json --output eval_traces/

# Step 3: Grade the traces using configured metrics
agents-cli eval grade --config tests/eval/eval_config.yaml --traces eval_traces/ --output grade_results.json

To run regression comparison or cluster failures:

# Compare candidate traces against baseline
agents-cli eval compare baseline_grades.json grade_results.json

# Cluster and analyze failure modes
agents-cli eval analyze grade_results.json

πŸ† Kaggle Submission Notes: Agents for Good (Education Track)

When packaging this agent for submission to the Kaggle Agents for Good β€” Education Track, review the following structural configurations:

  1. API Key Loading: The agent is designed to run self-contained. It reads GROQ_API_KEY from the environment. Ensure this key is injected during notebook execution or kaggle secret setup.
  2. Offline Execution & Local Ingestion:
  • The MCP document vector store uses a lightweight, self-contained mathematical TF-IDF engine inside mcp_server/server.py.
  • It relies on a local JSON file (index.json) for persistence, eliminating external database dependencies.
  • If submitting to an offline environment, ensure index.json is packaged inside the zip bundle so pre-ingested syllabus materials are readable.
  1. Container Constraints: The FastAPI server and MCP server run internally as stdio processes. For submission notebook execution:
  • Package the dependencies in a single requirements.txt or configure the notebook to run pip install -e . offline using wheelhouses.
  • Do not run uvicorn as a blocking process; execute the agent directly using the Runner script or the agents-cli harness.

πŸ“„ License

This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file or visit http://www.apache.org/licenses/LICENSE-2.0 for more details.

Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source β€” we do not rehost the code.

  • Author: TheOrionGD
  • Source: TheOrionGD/Trifecta
  • License: Apache-2.0
  • Homepage: https://raw.githack.com/TheOrionGD/Trifecta-Agent/refs/heads/theoriongd/about.html

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.