After reading up on SNMP and some of the questions help here I think understand the agent role as a SNMP service to device (Like SQL, it is an API to storage).
When you execute a SQL query the SQL engine does all the work and returns the result - You don't need to be aware of how the storage and where the storage is done.
But MIBs are not actual storage , so what is the role of my agent?
if the agent only register the MIB like i follow in this tutorial, so it not used as handler at all and it means that there is a pyhiscal storage that you can set and get to there without bypass the handler. in the tutorial all you do it this:
netsnmp_register_int_instance("my example int variable", my_registration_oid, OID_LENGTH(my_registration_oid), &example1, NULL);
no need in handler to process calls.
Say that I want monitor my application's pending request queue, so I want an agent that all SNMP request for application_pending_request will be fired for it and it will return the queue depth. Why do I need to have an actual MIB when all I need to poll my application queue in order to get result?