How to Define Routes with Attributes in the Microsoft 365 Agents SDK in C#
· 8 min read
Routes in the Microsoft 365 Agents SDK are usually registered in the agent's constructor, one OnMessage or OnActivity call at a time. There's a second way: put an attribute on the handler method itself, and the SDK registers the route for you. The handler and its rule then sit together.
