Status: [UNTESTED] Endpoints found: http://127.0.0.1:8081/v1/chat/completions Source: https://github.com/rusty4444/copilot-365-hermes-proxy # Microsoft 365 Copilot → OpenAI Proxy

Buy Me A Coffee

> **⚠️ Proof of Concept** — This is a functional prototype, not a production-ready integration. Microsoft 365 Copilot's Graph API has undocumented context window limits (~16K-32K effective tokens) and enforces usage restrictions (rate limits, content filtering, auth scoping). The proxy handles conversation rotation to mitigate context limits (see [Context Window Management](#context-window-management)), but reliability in long-running or high-throughput scenarios is not guaranteed. Use at your own risk.

Copilot 365 Hermes Proxy

A local FastAPI proxy that translates **OpenAI-compatible `/v1/chat/completions`** requests into **Microsoft Graph Copilot Chat API** calls. Designed for use with AI agent frameworks (like Hermes Agent) that support custom OpenAI-format providers. ## Architecture ``` Your AI Agent (OpenAI client) | | HTTP POST /v1/chat/completions v Copilot365 Proxy (FastAPI, localhost:8081) | | OAuth2 Bearer Token | POST /beta/copilot/conversations/{id}/chat v Microsoft Graph Copilot API | v OpenAI-compatible JSON response ``` ## Configuration | Variable | Default | Description | |---|---|---| | `COPILOT_PROXY_HOST` | `127.0.0.1` | Bind address | | `COPILOT_PROXY_PORT` | `8081` | Listen port | | `GRAPH_API_VERSION` | `beta` | Graph API version | | `COPILOT_MAX_TURNS` | `50` | Max turns per conversation before rotating (avoids context-window exhaustion) | | `USER_TIMEZONE` | `UTC` | Timezone hint sent to Copilot | | `COPILOT_FORWARD_SYSTEM_PROMPT` | `1` | Forward the agent's `system`/`developer` messages to Copilot so it adopts the host agent's persona (`0` to disable) | ## Agent Persona (System Prompt Forw