To be notified of events by Microsoft Agent, you must implement the IAgentNotifySink interface, and create and register an object of that type following COM conventions:
// Create a notification sink
pSink = new AgentNotifySink;
pSink->AddRef();
// And register it with Microsoft Agent
hRes = pAgent->Register((IUnknown *)pSink, &lNotifySinkID);
Remember to unregister your notification sink when your application shuts down and releases Microsoft Agent's interfaces.