Education
Learning platforms, school districts, and ed-tech startups adding AI tutors, homework help, or curriculum-authoring assistants on top of @pleach/recipes/education.
The education use case covers K-12 districts, university research groups, ed-tech startups, and learning-platform vendors building AI tutors, homework help, study-skill coaches, or curriculum-authoring assistants. Procurement usually gates the buy on three things:
- Identifier redaction, so a pasted transcript doesn't leak student PII to the model.
- A per-session spend cap, so a runaway loop can't burn the district's quota.
- Per-district tenancy, so one district's data and spend never reach another's.
This page is the landing for the use case. Three sub-pages go deeper:
- Student safety: the shipped redaction patterns and how to extend them for your district.
- FERPA / COPPA scope: what the compliance posture covers and what it doesn't. Read it before signing a procurement form.
- Per-district tenant + cost-cap: multi-tenant composition and cost ceilings at the gateway boundary.
Who this is for
- A district team standing up an AI homework helper behind a per-student or per-session spend ceiling.
- An ed-tech vendor adding a tutor to an LMS, where the district is the customer and the student is the data subject.
- A university research group capturing every chat session for semester-over-semester comparison.
- A startup whose buyer expects a FERPA / COPPA conversation and asks what you redact before the model sees it.
Quickstart
npm install @pleach/recipes @pleach/complianceimport { educationAgent } from "@pleach/recipes/education";
const bot = educationAgent({
districtId: "district-1234",
complianceProfile: "ferpa+coppa",
contentSafety: ["self-harm", "profanity"],
costCapUsdPerSession: 0.25,
});
const reply = await bot.ask(
"Hi Mrs. Johnson — Student ID 9876543 needs help with fractions",
);
// LLM sees: "Hi Mrs. Johnson — [STUDENT] needs help with fractions"That config wires three pieces:
- The student-safety scrubber from
@pleach/compliance/education(see Student safety). It redacts the message beforeask()forwards it, wherever you later persist the transcript. - A per-session cost-cap policy at your ceiling. You drive it from your own per-turn gate (see Per-district tenant + cost-cap).
- A compliance profile plugin that maps the FERPA / COPPA labels to the
closest shipped analog,
gdpr. A notice prints to your console.
What you get
- Redaction of student ID patterns, grade bands, school-issued email domains, and labeled parent contact lines in the user message.
- A per-session cost ceiling on the runtime.
- A
districtIdtag your audit ledger, cost aggregator, or billing pipeline can read to scope writes to one district. - The same
Chatbotsurface assimpleChatbot:ask,newSession,reset,runtime.
What you provide alongside it
Plan for these in your procurement review.
Your district's duty. The FERPA / COPPA review stays with you. See What you provide for the controls that belong to your district.
Setup. educationAgent.ask() doesn't enforce the cost cap. For a hard
cutoff, wire CostCeilingMiddleware from @pleach/gateway/swarm
at the routing boundary. See
Per-district tenant + cost-cap.
Not in Pleach yet:
- A FERPA or COPPA profile. The
ComplianceProfileunion is"hipaa" | "gdpr" | "pci-dss" | "soc2".educationAgentacceptsferpa,coppaandferpa+coppa, applies thegdprbundle, and records both the requested and applied profile. This isn't full FERPA / COPPA adequacy. - Pedagogical replay. The
pedagogicalReplayfield is recorded and doesn't change runtime behaviour. - Content-category moderation. The scrubber redacts student-identifying
fragments only.
contentSafetyis recorded for your telemetry. For category-level enforcement, wire a moderation API or your own classifier.
Config reference
type EducationContentSafetyCategory =
| "self-harm"
| "age-inappropriate"
| "profanity"
| "off-curriculum";
type EducationComplianceProfile = "ferpa" | "coppa" | "ferpa+coppa";
interface EducationAgentConfig extends SimpleChatbotConfig {
/** Stable district / institutional tenant id. Required. */
districtId: string;
/** Pseudonymous per-student attribution id. Optional. */
studentId?: string;
/** FERPA / COPPA profile. Maps to `gdpr` bundle today. */
complianceProfile?: EducationComplianceProfile;
/** Recorded on the runtime. */
contentSafety?: readonly EducationContentSafetyCategory[];
/** Recorded only; gateway is the enforcement point. */
perDistrictMonthlyBudgetUsd?: number;
/** Recorded only; greenfield runtime required. */
pedagogicalReplay?: { enabled: boolean };
/** Default 0.50. Drives the in-memory cost-cap ceiling. */
costCapUsdPerSession?: number;
/** Default true. Pass false to skip student-safety scrubbing. */
studentSafetyEnabled?: boolean;
}Source
The factory ships from @pleach/recipes/education. Its helpers ship from
@pleach/compliance/education. The per-root-turn cost cap in
Per-district tenant + cost-cap
ships from @pleach/core/spawn.
See also
- Student safety
- FERPA / COPPA scope
- Per-district tenant + cost-cap
- Worked example: a district privacy request
@pleach/recipesoverviewcompliantChatbot: the sibling recipe for HIPAA / GDPR / PCI-DSS / SOC 2.