⚠️ NOTICE: This repository has been discontinued. Development continues in hemsoft-power-ai.
AI agent demo using Microsoft.Extensions.AI with tool-calling capabilities via OpenRouter.
- Terminal Tools: Execute PowerShell commands
- Web Search Tools: Search the web for information
- Outlook Mail Tools: Access Outlook/Hotmail mailbox (inbox, read, send, search, delete, move, junk)
| Variable | Required | Description |
|---|---|---|
OPENROUTER_API_KEY |
Yes | OpenRouter API key for LLM access |
OPENROUTER_BASE_URL |
Yes | OpenRouter endpoint (https://openrouter.ai/api/v1) |
GRAPH_CLIENT_ID |
For Mail | Azure app registration client ID for Microsoft Graph |
- Register an app at Microsoft Entra admin center
- Set "Supported account types" to Personal Microsoft accounts only
- Add Mobile and desktop applications platform with redirect URI:
http://localhost - Enable Allow public client flows
- Add API permissions:
User.Read,Mail.Read,Mail.ReadWrite,Mail.Send - Set
GRAPH_CLIENT_IDto your Application (client) ID
.\run.ps1Or:
dotnet run --project src/AgentDemo.ConsoleIn the chat interface:
check inbox- List recent emailsread <id>- Read a specific emailsearch <query>- Search emailssend <to> <subject> <body>- Send an emaildelete <id>- Delete an emailmove <id> <folder>- Move email to folder (inbox, archive, deleteditems, junkemail)exit- Quit the application