Implementing Short-Term and Long-Term Memory in Agentic Ai Systems