When Cody reads your recent emails from Outlook, it needs to decide which messages represent actionable tasks and which category they belong to. By default this is handled by a local keyword-based classifier, but you can optionally connect an AI provider to get significantly more accurate, context-aware classification — especially useful when email subjects are ambiguous or in mixed languages.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/miu-ll/Cody-assistant/llms.txt
Use this file to discover all available pages before exploring further.
Privacy Guarantee
Before configuring AI, it is important to understand exactly what data leaves your machine:Only the email subject line and the sender’s display name are sent to the AI provider. The email body is never transmitted.The privacy-first design is enforced at the source in
outlook.ts. The AI prompt is constructed exclusively from message.subject and message.sender fields — the bodyPreview field stays on your machine and is used only by the local classifier.
AI Providers
Cody supports two providers, selectable via theAiProvider type:
Azure OpenAI is the recommended provider for corporate use. When your organization deploys Azure OpenAI, all API calls go to your company’s own Azure tenant. Microsoft’s enterprise data processing terms apply: the data is not used to train shared models and does not leave your corporate environment. This makes Azure OpenAI the right choice for sensitive business communications.
The AiConfig Interface
Configuration Steps
- Azure OpenAI
- OpenAI
Obtain credentials from your IT department
You need three values from whoever manages your Azure OpenAI resource:
- Endpoint — in the form
https://<resource-name>.openai.azure.com/ - Deployment name — the name given to the deployed model (e.g.
gpt-4o-mini) - API key — one of the two keys shown in the Azure portal under Keys and Endpoint
Open Cody Settings
Click the settings icon in the assistant panel, then navigate to the Inteligencia Artificial (AI) section.
Select Azure OpenAI
Choose Azure OpenAI from the provider selector. The Endpoint and Deployment fields will appear.
Enter your credentials
Fill in the endpoint URL, deployment name, and API key. Cody saves these fields as
aiEndpoint, aiDeployment, and aiApiKey in AppSettings.How Classification Works
When AI is configured and an Outlook sync runs, Cody sends a batch request containing the numbered list of email subjects and sender names. The AI responds with a JSON array assigning each email anisTask flag, a task title, a category, a subcategory, a priority, and an optional dueInDays estimate.
The result is mapped back onto each InboxSuggestion:
| Field | Source when AI is active | Source without AI |
|---|---|---|
category | AI response (validated against known taxonomy) | Local keyword classifier |
subcategory | AI response (validated against parent category) | Local keyword classifier |
priority | AI response (urgent / high / normal) | Keyword heuristic |
dueAt | AI dueInDays converted to ISO timestamp | Keyword heuristic (today / tomorrow / +3 days) |
confidence | 0.93 | 0.88 (keyword match) or 0.58 (fallback) |
needsReview | true when category is "Por clasificar" | true when category is "Por clasificar" |
Fallback Behavior
No AI configured
Cody uses its built-in keyword classifier. Action verbs in the subject and body preview (e.g. “revisar”, “confirmar”, “enviar”) trigger task creation. Category assignment is regex-based and may require more manual review.
AI configured but unavailable
If the AI request fails — due to a network error, timeout (25 s), or invalid credentials — Cody falls back to the local keyword classifier silently. No sync is blocked and no error is shown to the user.
Reviewing Low-Confidence Suggestions
When the AI (or local classifier) assigns the category"Por clasificar" to a suggestion, the needsReview flag is set to true. Cody highlights these suggestions in the Inbox panel and prompts you to confirm or change the category before accepting the task. This keeps your task list clean without requiring you to re-sync.
Settings Reference
All AI settings live in theAppSettings interface:
%APPDATA%/cody-desktop-assistant/cody-data.json on the user’s machine. It is never written to the project repository or transmitted to any server other than the configured AI provider.