Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

This repo has moved. Active development is happening in the sibling repo, which pairs plain-English Markdown with Python code. We're maintaining only that one for now, until there is demand for a Markdown-only version or more languages.

See you over at the active repo: https://github.com/Azure-Samples/m365-inbox-serverless-agent-python

M365 Inbox Agent for Azure Functions (Markdown) Open in GitHub Codespaces

An AI agent that triages your Microsoft 365 inbox: it escalates urgent mail to Teams, drafts replies, and emails you a daily briefing — all following rules you write in plain markdown.

Powered by Azure Functions and Microsoft 365 connectors. You bring the markdown logic that drives every decision — no hand-written code.

Run it locally in minutes against sample data, point it at your real inbox, then deploy it so it runs on its own.

🐍 Want a code escape hatch (a deterministic Python classifier and offline hacking)? See the Python sibling (how they differ).

What it does for you

  • 🚨 Escalate — VIP / urgent mail is posted to your Teams channel, with an @mention.
  • ✉️ Reply — action-required mail gets a grounded draft reply.
  • 📋 Brief — a daily summary of what matters lands in your inbox.
  • 💬 Chat — ask read-only questions about your recent mail.

→ Full walkthroughs in docs/use-cases.md.

Prerequisites

  • Python 3.13+ (the agent host and local client run on it). Easiest install: uv, then uv python install 3.13.
  • Azure Functions Core Tools v4 ≥ 4.12.0 (the v5 preview is not yet compatible).
  • Azure Developer CLI (azd).
  • An Azure subscription. azd provision (Quickstart step 2) creates the Microsoft Foundry model deployment the agents need — required even for the offline path.
  • For real M365 (or azd up): permission to authorize Microsoft 365 connectors, plus the connector-namespace CLI extension:
    curl -fsSL https://aka.ms/connector-namespace-cli-install | sh

Quickstart

Five steps: install, get resources, run locally, try it, deploy.

1. Install the tools

brew tap azure/functions
brew install azure-functions-core-tools@4
brew install azure-dev   # azd
npm install -g azurite
curl -LsSf https://astral.sh/uv/install.sh | sh

Linux / Windows / WSL: use the Core Tools v4 install guide, azd install guide, Azurite install guide, and uv install guide.

2. Get the resources you need

azd provision creates the Foundry model deployment the agents require (needed even offline); hydrate copies the settings into local.settings.json. No API keys — managed identity throughout.

azd provision
./infra/scripts/hydrate-local-settings.sh

Yes — even the offline, sample-data run needs this one-time azd provision, because the agents call a Foundry model. It provisions the model deployment only; it never touches your inbox.

3. Run the local client

azurite --silent --location .azurite   # terminal A
uv run func start                      # terminal B
uv run python chat.py                  # terminal C

4. Try it (offline, safe)

Pick 1, 2, or 3. The client shows a 🟡 Offline banner and runs every agent in DRY RUN against sample-data/inbox/*.json: it produces the full deliverable as text and calls no connector, so nothing is ever sent. Pick 5 to chat with the sample inbox.

Want it to act on your real inbox while still local? See Go live with real M365.

5. Deploy to Azure, then try it again

azd up

Known issue (point-in-time): azd up may currently fail at the deploy step on Python 3.13 — the Flex remote build uses Python 3.11.8 (Azure/azure-dev#8538). Simple workaround: docs/deploy-python-313.md. This note can be removed once the bug is fixed.

Now inbox-triage fires automatically on every new email — no client, no waiting. Send yourself a message, then watch your Teams channel (VIP / incident) or your inbox (replies). Tail the live trace with azd monitor --logs.

Clean up

azd down --purge

Hitting an error? See docs/troubleshooting.md.

Make it yours

  • ✍️ Edit skills/vip-rules.md to set your VIPs, what to skip, and what escalates to Teams.
  • 🔁 The weekly-rule-suggestions agent proposes tuning that you approve by hand.
  • 🔒 Use this repo as a private template before adding real rules or tenant data.

→ Full guide: docs/customize.md.

How it works (the short version)

This is an Azure Functions app on the serverless agents runtime. Each agent is a markdown file (*.agent.md) that reasons over your rules in skills/*.md — no hand-written code. Microsoft 365 actions go through Entra-authorized MCP connectors — no app secrets, managed identity end to end.

→ Deeper dives: How it works · Configuration & deployment · Customize · Troubleshooting & reference

Learn more

About

Agent that takes control of your m365 agent through scanning, rules, monitoring and report making. Functions, Connectors, and Serverless Agents in Markdown.

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages