How to Build Your Own Local AI Agent with Tool Calling and Memory