Bring your own Agent to MS Teams
8 hours ago
- #Agent Deployment
- #Bot Integration
- #Microsoft Teams
- Integrate existing agents into Microsoft Teams using the Teams TypeScript SDK's HTTP server adapter pattern without modifying the original server.
- The SDK injects a POST /api/messages endpoint, verifies requests, and routes messages, allowing seamless connection to Slack bots, LangChain chains, or Azure AI Foundry agents.
- For Slack bots, share the same Express server to handle both Slack and Teams events, using separate endpoints like /slack/events and /api/messages.
- For LangChain chains, invoke the chain with Teams messages, optionally sending typing indicators before responding.
- For Azure AI Foundry agents, forward Teams messages to the Foundry agent and relay responses back.
- A Python SDK is available with similar patterns for FastAPI or ASGI frameworks.
- Register the bot by obtaining a public URL (e.g., using Dev Tunnels or ngrok), using the Teams CLI to create the app and populate environment variables, and sideloading it into Teams for testing.