If you choose the AGPL licensed library, apparently you have no other choice than to relase your software as Open Source under the AGPL as well.
See these questions here at Programmers.SE for more information:
Of course you can't get binding legal advice from here, but the answers in the links above all sound pretty clear.
Given the fact that you have another available library to pick which is under the MIT license, this is a no-brainer: pick the MIT licensed library.
The MIT license is one of the most permissive open source licenses. As Andres F. already said in his answer, it allows basically everything.
Quote from Wikipedia:
It is a permissive free software license, meaning that it permits reuse within proprietary software provided all copies of the licensed software include a copy of the MIT License terms.
So you are allowed to use a MIT-licensed library in your software, no matter if your software is free / open source or not.
Concerning your question about GPL, see the GPL FAQ.
Quote from the link:
Does the GPL require that source code of modified versions be posted
to the public?
The GPL does not
require you to release your modified version, or any part of it. You
are free to make modifications and use them privately, without ever
releasing them. This applies to organizations (including companies),
too; an organization can make a modified version and use it internally
without ever releasing it outside the organization.
But if you release the modified version to the public in some way, the
GPL requires you to make the modified source code available to the
program's users, under the GPL.
Thus, the GPL gives permission to release the modified program in
certain ways, and not in other ways; but the decision of whether to
release it is up to you.
- if you use GPL code privately, do what you want
- if you ever release it in any form, it must be with source code and under the GPL