Back to Portfolio
Live in Production

Sezon Mail — AI Email Agent in Telegram

LLM-judged email triage for a B2B client: model-decided importance with a deterministic safety net, and a feedback loop that changes behavior without a code deploy.

TypeScript · grammY · Next.js · FastAPI · Gemini · Prisma · Resend

Core Implementations

Model-Judged Triage

No fixed category list anywhere in the schema. Gemini decides summary, emergent label, importance tier, and its own confidence per email.

GeminiJSON SchemaZero Rules

Deterministic Safety Net

Regex guardrail always surfaces payment, invoice, refund, and legal content in EN/UA/RU — regardless of what the model decided.

GuardrailsRegexTrilingual

Behavioral Feedback Loop

Inline Important / Not this presses and plain-language taught rules persist to Postgres and change future triage — no code deploy.

PostgresInline KeyboardsNo Deploy

Write Before Triage

Svix-verified webhook acknowledged inside Telegram's 9-second budget; every email persists before AI runs, so a model failure never loses a message.

Svix HMACResendReliability

Two Surfaces, One Schema

grammY bot on VPS/Docker plus Next.js Mini App on Vercel, sharing one Prisma schema — with Zod ↔ Pydantic mirrored wire contracts.

PrismaZodPydantic