Anatomy of an AI Agent