Back
Y
Yugati/Docs

Introduction

Yugati is an AI-powered productivity layer for Gmail and Google Calendar. It combines a conversational AI agent with manual inbox and calendar management into one unified interface — so you spend less time context-switching and more time on the work that matters.

This guide covers everything from connecting your accounts to getting the most out of the agentic chat. If you're new, start with Quick Start.

Yugati is built on top of OpenAI's Agents SDK and uses GPT-4.1 as the core reasoning model. All processing happens server-side — your credentials never leave our infrastructure.

Quick Start

  1. 1

    Sign in with Google

    Click Continue with Google on the homepage. Yugati requests only the scopes it needs: Gmail read + compose, and Calendar read + write. You can review and revoke these at any time from Google Account Permissions.

  2. 2

    Connect your integrations

    After sign-in, go to Dashboard → Integrations. Click Connectnext to Gmail and Google Calendar. Each integration opens a Google OAuth popup — approve it and you're done. Both connections are independent so you can connect either without the other.

  3. 3

    Set your preferences

    Go to Dashboard → Overview → Preferences (or click your avatar). Set your email focus (work / personal / both) and preferred writing style (formal / professional / casual). The agent uses these to tailor every draft it writes.

  4. 4

    Start a conversation

    Open Agentic in the sidebar and type your first request — for example: “Summarise my unread emails from today” or “Schedule a 30-min call with Alex next Tuesday afternoon.”

Agentic Mode

The agentic chat is powered by an OpenAI Agents SDK pipeline with input and output guardrails, multi-turn conversation memory, and tool use for email and calendar actions.

Guided vs Auto mode

The mode selector (top-right of the chat) controls how much the agent acts autonomously:

  • Guided (default)— The agent describes what it intends to do and waits for your confirmation before taking actions like sending emails or creating events. Best when you're getting started.
  • Auto — The agent completes multi-step tasks end-to-end without interruptions. Great for batch operations once you trust its judgment.

Example prompts

"Summarise all unread emails from last 48 hours"
"Draft a follow-up to my last email with Sarah, keep it brief"
"Find a 1-hour slot this week where both me and team@company.com are free"
"Send the meeting notes I just typed to everyone in yesterday's standup"
"Move my 3pm call to tomorrow morning and notify the attendees"
"What did Alice say about the Q3 report?"

Usage limits

Each plan has a monthly message quota. When you reach the limit, you'll see a clear error. Usage resets at the start of each billing period. See Plans & Billing for exact limits.

Context window

Conversation history is preserved server-side per session ID. Long threads are automatically summarised to stay within the model context window, so older turns are condensed but never lost for the agent's reasoning.

The agent can send real emails and create real calendar events. Always review actions in Guided mode before switching to Auto.

Email Management

The Mail page gives you a keyboard-driven inbox view with AI-powered compose. It connects directly to your Gmail via the Corsair integration layer.

Navigation

  • j / k — next / previous email
  • Enter — open selected email
  • Esc — close / go back
  • c — compose new email

AI Compose

Click Compose (or press c) to open the AI draft panel. Describe what you want to say and the agent drafts a full email in your preferred writing style. You can edit the draft before sending. Compose actions count toward your monthly compose quota, separate from agent messages.

Voice input

Click the microphone icon in the chat or compose box to dictate. Yugati uses OpenAI Whisper for transcription. Voice messages count against your monthly voice quota. Audio is processed server-side and not stored after transcription.

Search

Use the search bar at the top of the Mail page to query your inbox. Results are fetched live from Gmail — Yugati does not index or cache your email content.

Calendar

The Calendar page renders your Google Calendar events in a month/week/day view with day-level detail on click.

Viewing events

The default view is month. Click any day to see a detailed event list for that day. Click an event to see its full description, attendees, and Google Meet link (if any).

AI-powered scheduling

From the agentic chat you can ask the agent to:

  • Find free slots across multiple attendees
  • Create events with full details (title, time, location, description)
  • Update or cancel existing events
  • Send calendar invites on your behalf

The Calendar page reflects changes made by the agent in real time — refresh after an agentic action if the event list doesn't update automatically.

Timezone handling

Yugati uses your browser's detected timezone for display. When asking the agent to schedule across time zones, be explicit: “4pm EST” or “noon in London”. The agent passes the correct UTC offset to Google Calendar.

Integrations

Yugati uses Corsair — an OAuth integration layer — to connect third-party services. Each integration is scoped per user; no cross-user data access is possible.

Connecting Gmail

  1. Go to Dashboard → Integrations
  2. Click Connect next to Gmail
  3. Approve the Google OAuth screen
  4. The status indicator turns green — you're connected

Connecting Google Calendar

Same steps as Gmail, but select Google Calendar in the Integrations list.

Re-authenticating

OAuth tokens expire or can be revoked by Google. If Yugati shows a Connection lost error, click Reconnect on the Integrations page. This refreshes your token without losing any settings.

Disconnecting

Click Disconnecton the Integrations page. This removes your stored token from Yugati's servers. You can also revoke access from Google Account Permissions directly — Yugati will detect this on the next request.

Yugati only holds OAuth refresh tokens encrypted server-side. Short-lived access tokens are never persisted.

Preferences

Preferences control how the agent tailors its output. Access them from Dashboard → Overview by clicking the preferences panel.

SettingOptions
Email FocusWork, Personal, Both
Writing StyleFormal, Professional, Casual

Changes take effect immediately — the next message sent to the agent will use the updated preferences. Existing conversation history is not affected.

Plans & Billing

Yugati is billed monthly through Razorpay. Plans auto-renew. Usage resets at the start of each billing period.

PlanMessagesVoiceCompose
Free50 / mo10 / mo20 / mo
Standard500 / mo100 / mo200 / mo
Premium2 000 / mo500 / mo1 000 / mo
EnterpriseUnlimitedUnlimitedUnlimited

Upgrading

Go to Dashboard → Billing and choose a plan. Payment is processed via Razorpay. The new plan is activated immediately after payment confirmation — your usage limits update in real time.

Cancelling

Click Cancel Plan on the Billing page. Your paid plan stays active until the end of the current billing period, then reverts to Free. No data is lost.

Failed payments

If payment fails, Yugati will notify you via email. Your account is not suspended immediately — you have a 3-day grace period to update payment details.

Privacy & Security

  • Data in transit — All communication is encrypted with TLS 1.3. HTTP Strict Transport Security (HSTS) is enforced with a 2-year max-age.
  • Data at rest — Database at rest is AES-256 encrypted. OAuth tokens are encrypted before storage and decrypted only at request time.
  • Email content — Yugati does not index or cache your email content. It is fetched on demand, passed to the model, and discarded. Nothing persists beyond the active request.
  • Session security — Sessions use HTTP-only, Secure, SameSite=Lax cookies. CSRF attacks are mitigated by same-site policy and per-session tokens.
  • Guardrails — Every message passes through a two-layer safety system before the main AI model runs. The first layer (input guardrail) classifies the message — if it is off-topic or a prompt injection attempt, the request is blocked immediately and the main model is never called. Because no tokens are consumed by the main model on blocked requests, the token count and cost for those requests is always $0.00. The second layer (output guardrail) scans every response for sensitive data such as OAuth tokens or credentials before it reaches you.
  • Google OAuth scopes — Yugati requests only the minimum scopes required. You can review and revoke them at any time from Google Account Permissions.
  • Account deletion — Email privacy@yugati.com to request full account and data deletion. Deletion is processed within 30 days.

Troubleshooting

Gmail / Calendar shows as disconnected

Go to Dashboard → Integrations and click Reconnect. If the issue persists, disconnect the integration, revoke it from Google Account Permissions, then reconnect fresh.

Agent response is very slow

The first message in a new session may take 2–4 s while the pipeline warms up. Subsequent messages stream in real time. If slowness persists, check your network and whether OpenAI's status page reports any incidents.

I hit my usage limit early

Usage is counted per calendar month, resetting at the start of your billing period. You can upgrade instantly from the Billing page. If you believe the count is wrong, contact support.

Agent sent an email I didn't intend

Check your Gmail Sent folder. You can recall the email using Gmail's native Undo Send feature if it's within the undo window. Switch to Guided mode to require confirmation before future sends.

Sign-in popup is blocked

Yugati uses a popup for Google OAuth. If your browser blocks it, allow popups for the Yugati domain in your browser settings, then try again.

Payment failed / plan not activated

Verify the Razorpay transaction in your bank. If payment was deducted but the plan wasn't activated, email support@yugati.com with the transaction ID.

Keyboard Shortcuts

ShortcutAction
j/Next email
k/Previous email
EnterOpen selected email
EscClose / go back
cCompose new email
rReply to open email
/Focus search
Ctrl+EnterSend email / submit prompt

Email Architecture

For the curious: here's exactly how Yugati loads your inbox so fast, and why refreshing the page doesn't trigger a slow fetch every time.

Query routing — what gets cached vs. fetched live

Before touching any cache, Yugati decides whether the request is cacheable at all. Only your default inbox view (in:inbox) is served from cache. Category tabs (Primary, Social, Promotions), search results, and label filters always go straight to Gmail so you always see real-time data where it counts.

Tier 1 — Direct database query (~50 ms)

Yugati stores a local copy of your inbox metadata in its database every time you load or send email. On subsequent loads, a single indexed SQL query returns your inbox in about 50 ms — no Gmail API call needed. If that copy is older than 3 minutes, a background refresh fires silently; you get the cached result instantly and the next load will already have fresh data.

Tier 2 — Integration layer (~200 ms)

If the direct query comes back empty (e.g., right after clearing the DB or a schema migration), Yugati falls back to the Corsair integration layer — a higher-level abstraction over the same data. Slower than the direct query, but always correct regardless of internal schema changes. The same stale-and-refresh logic applies.

Tier 3 — Live Gmail API (~10–15 s)

Only reached on a brand-new account or if both cache layers are completely empty. Yugati fetches your 15 most recent inbox messages from Gmail, enriches each one with pre-parsed subject/from/date fields, and writes them to the local cache so every subsequent load hits Tier 1.

Client-side memory cache

On the browser side, React Query holds the inbox result in memory for 3 minutes. Navigating away and back within that window returns the in-memory result instantly — no network round-trip at all. After 3 minutes it silently revalidates in the background.

Full flow at a glance

You open the inbox
  │
  ▼
Browser memory (React Query)?  ──yes──▶  instant (< 1 ms)
  │ no
  ▼
Server receives tRPC request
  │
  ├──▶  Tier 1: local DB query              ~50 ms   ◀── normal path
  │       └── stale? background refresh fires
  │
  ├──▶  Tier 2: integration abstraction     ~200 ms  ◀── fallback
  │       └── stale? background refresh fires
  │
  └──▶  Tier 3: live Gmail API             ~10–15 s  ◀── first-ever load only
              └── writes enriched data to local cache
Search and category tabs (Primary, Social, etc.) always bypass the cache and query Gmail directly — you're always seeing real results there, not a snapshot.

Agent Architecture

Every message you send to the agentic chat passes through a three-stage security pipeline before any AI model touches it. Here's why each stage exists and what it catches.

Stage 1 — Regex injection detection (zero latency, zero cost)

The very first check is pure pattern matching — no AI model, no network call. It scans your message for known prompt injection signatures: HTML comment overrides (<!-- ... -->), phrases like “ignore all previous instructions” or “IMPORTANT SYSTEM MESSAGE”, markdown heading overrides, and similar patterns. If any match, the message is blocked immediately — the main model is never called and no tokens are spent.

Stage 2 — Topic safety check (~200 ms)

A lightweight AI classifier (GPT-4o-mini) checks whether the message is actually about Gmail or Google Calendar. Requests for code help, math, general knowledge, or anything outside Yugati's scope are refused here — before the main model runs. This stage also catches sophisticated injections that the regex in Stage 1 might miss.

Stage 3 — Prompt enhancer (~300 ms)

Only messages that pass both safety gates reach the enhancer. It uses a small fast model (GPT-4.1-nano) to clarify vague phrasing — turning “follow up with them” into a precise instruction the main model can execute reliably. Short or already-clear messages skip this step entirely.

Agent run — GPT-4.1 with dual guardrails

The enhanced message is handed to GPT-4.1 with two additional guardrails running in parallel:

  • Input guardrail — A second safety check on the enhanced prompt (defense-in-depth: catches anything the enhancer might have altered).
  • Output guardrail — Scans every chunk of the response before it reaches you. Blocks OAuth tokens, private keys, PEM headers, or any other credentials from appearing in the output, even if the model would otherwise include them.

Why this order matters

The enhancer is itself an LLM. If an injected prompt were passed to it, the enhancer would process and execute the injection before any guardrail ran — turning attacker-controlled text into real model output. Stages 1 and 2 run before the enhancer so that injected prompts never touch any AI model, not even the small one.

Full pipeline

Your message
  │
  ▼
Stage 1: Regex injection scan         zero latency, zero cost
  │ blocked → "I'm focused on Gmail and Calendar…"
  │ passes
  ▼
Stage 2: Topic safety classifier      ~200 ms  (GPT-4o-mini)
  │ blocked → polite refusal, injectionFlag logged
  │ passes
  ▼
Stage 3: Prompt enhancer              ~300 ms  (GPT-4.1-nano)
  │ (skipped for short / clear messages)
  ▼
Agent run                             streaming  (GPT-4.1)
  ├── input guardrail (defense-in-depth)
  └── output guardrail (no credentials in response)

Logging

Every message — allowed or blocked — is logged with its outcome. Blocked messages are flagged so patterns can be detected over time. Injection attempts are tagged separately from off-topic blocks so they can be reviewed independently.

StatusMeaning
okMessage processed normally
blocked_inputStage 1 (injection pattern) or Stage 2 (off-topic)
blocked_outputOutput guardrail caught credentials in response
Blocked requests consume no GPT-4.1 tokens. The cost of a rejected injection attempt is effectively $0.00 — only the lightweight classifier in Stage 2 is called.
All data encrypted in transit and at rest