Docs/ Rules, context & knowledge

Context engine (client brain)

Context folders, client profiles, and variables the agent reads before it drafts, so replies use your real facts.

The context engine is the knowledge your AI agent writes from. You give it context folders of notes and files, client profiles for the accounts you work with, and variables for the exact values it should never guess. Everything lives in one place: Settings → Context & Variables.

The three building blocks

Context is organised in three layers. Folders carry the shared knowledge — your voice, your company, your policies. Client profiles carry what is specific to one account. Variables carry exact values the agent must use word for word.

Building blockWhat it holdsWhen the agent uses it
Context folderUp to 5 notes, 5 .md items, and uploaded reference filesWhen you draft from a mailbox the folder is attached to, or in an Autopilot scope rule that adds it
Client profileStatus, point of contact, tier, tags, variables, open loops, don't-forget notes, guardrails, and filesWhen the profile is attached to the mailbox, assigned to the thread by an inbox rule, or added by an Autopilot scope rule
Global variableA reusable {{key}} and its value — a calendar link, company name, standard rateAlongside your client profiles; a client's own value overrides the global one

Where to find it

Open Settings, then Context & Variables in the AI group. The page shows three cards in order: Context Folders, Global variables, and Client profiles.

How context folders work

A context folder is a named collection of reference material the agent reads while it drafts — your house voice, facts about your business, pricing rules, standard answers. Folders belong to your account, not to a single mailbox, so one folder can serve several mailboxes.

A folder only does something once it is attached. In Settings → Mailboxes, open a mailbox and tick one or more folders under Context folders. Every draft written from that mailbox then follows every selected folder. Autopilot scope rules can add extra folders for the mail they cover.

A folder has to contain something usable before you can attach it: at least one note with text, or one uploaded file that has finished processing. Empty folders, folders whose notes are all blank, and folders whose only file is still processing or failed show as unavailable, with the reason next to them.

If you set up AI Emaily with the onboarding assistant, you may already have a starter folder — named after your company, or My context — attached to your mailboxes. Open it to review and edit what it holds.

  • Notes — up to 5 per folder, each with an optional title and up to 20,000 characters of text. You can edit them any time.
  • .md items — up to 5 per folder. Upload a .md, .markdown, or .txt file and its text is stored in the folder. To change one, remove it and upload it again.
  • Context files — PDF, DOCX, MD, or TXT reference documents, converted to text the agent can read (see below).

Create a context folder

  1. 1

    Open Context & Variables

    Go to Settings → Context & Variables and find the Context Folders card.

  2. 2

    Click New folder and name it

    Give the folder a name that describes what is in it — for example Brand voice, Investors, or Support policies.

  3. 3

    Add notes

    Type an optional title (Note is used if you leave it blank), paste the context the agent should follow, and click Add note. Repeat for up to 5 notes.

  4. 4

    Upload .md items (optional)

    Click Upload .md to add up to 5 Markdown or plain-text files. Their text is stored in the folder alongside your notes.

  5. 5

    Click Save folder

    Nothing is stored until you save. Once the folder is saved, you can reopen it with the pencil icon to attach context files.

  6. 6

    Attach the folder to a mailbox

    Go to Settings → Mailboxes, edit the mailbox, and tick the folder under Context folders. Drafts from that mailbox now use it.

One topic per note

Short, specific notes work better than one long document. Keep your writing voice in one note, your product facts in another, and your policies in a third. They are easier to update, and a long note is more likely to be trimmed.

Upload context files

Context files let you hand the agent longer source material: a contract, a brand guide, a spec sheet, a services one-pager. You can attach them to a saved folder or a saved client profile with the Upload files button. You can select several files at once.

Each file is converted to text in the background. Its chip shows Processing…, then Ready. If the text is longer than 20,000 characters, the chip says Ready · trimmed, and only the first part is used. A file that could not be read shows Failed.

  • Formats: PDF, DOCX, MD, and TXT. Older .doc files are not supported — save them as .docx first.
  • Size: up to 10 MB per file, and up to 5 files per folder or profile.
  • Scanned PDFs: text is extracted, not recognised from images, so a scanned or image-only PDF fails with “No readable text found”. Export a PDF with selectable text instead.
  • Your plan: if your plan doesn't include file uploads, the uploader says so. Notes and .md items work on every plan.

Only the text is kept

After conversion, AI Emaily deletes the original file and keeps only the extracted text. The agent treats file contents as reference facts, never as instructions — so a line inside a document cannot tell the agent to do something.

Client profiles

A client profile is the brain for one account. Create one with Add client profile in the Client profiles card, fill in what you know, and click Save profile. You can file each profile in a folder to keep them organised.

FieldWhat it holds
Name and domainsThe client's name and their email domains (for example acme.com, acme.io)
StatusWhere the relationship stands (for example Active — renewal in 18 days)
Point of contactWho you deal with at the account
Tier and tagsHow important the account is, plus freeform labels
VariablesKey and value pairs for this client, such as pricing.pro = $2,400 / mo
Open loopsThings you owe or are waiting on — one per line
Don't forgetReminders the agent keeps in mind on every draft — one per line
GuardrailsMust-follow rules, such as never mention pricing without approval — one per line
Context filesReference documents for this client (once the profile is saved)

How a profile reaches your drafts

A profile is used in three ways. It can be attached to a mailbox: in Settings → Mailboxes, tick it under Client profiles, and the agent draws on it for that mailbox's mail. It can be assigned to specific threads by an inbox rule with the Assign client profile action — for example, every email from acme.com. And an Autopilot scope rule can add it for the mail that rule covers.

When a thread has a profile assigned, the Context panel on the right of the thread shows its status, point of contact, open loops, don't-forget notes, guardrails, and variables. The domains on a profile also tell AI Emaily that mail from those addresses comes from a known client, which raises its importance in your inbox.

Route a client automatically

To have a profile follow every email from a client, create an inbox rule that matches their domain and add the Assign client profile action. See Inbox rules for how to build one.

Variables

Variables are exact values the agent must use rather than guess. Global variables live in the Global variables card: type a key (such as my.calendly), a value, and click Add. Edit a value in place, or remove it with the trash icon. Client variables live on each client profile.

When the same key exists in more than one place, the client's value wins over the global one. The agent receives your variables as known facts and is told to use the real values and never invent them. In templates and signatures, a {{key}} placeholder is swapped for its value when you insert it.

Guardrails, don't-forget notes, and open loops

These three lists live on each client profile, one entry per line. Guardrails are sent to the agent as rules it must follow. Don't-forget notes are reminders for every reply. Open loops tell it what is still outstanding with that client.

They are included for drafts you write with Copilot and for anything Autopilot handles, so the same client rules apply whether or not you review the draft first.

Autopilot needs context to send

Autopilot will only send on its own when the rule it is working under has at least one usable context folder — either the mailbox's folders or one picked on the rule. Without one, it drafts the reply and holds it for your review.

What goes into a draft

When you ask for a draft, the agent gathers the profile assigned to the thread, the profiles and folders attached to the mailbox, and anything added by a matching Autopilot scope rule. Each Autopilot scope rule can also switch off the mailbox's own context or profiles and use only what the rule picks.

Context is included in full rather than searched, up to a fixed size: about 24,000 characters of notes per folder, and about 40,000 characters of file text per folder or profile. Short notes are always kept whole; if a folder goes over, the longest notes are trimmed first.

Edit or delete context

Use the pencil icon to rename a folder or change its notes, and the trash icon to delete it. Before a folder is deleted, AI Emaily warns you if a mailbox or Autopilot rule relies on it — including when auto-replies would pause because the rule would be left with no context. Deleting a folder or profile removes it from every draft straight away.

Related guides

Frequently asked

Feature overview

Rules & Brain

Ready to try it?

Start Free Trial