All agencies base their rates on several key factors, roughly in descending order of importance: credit score, driving history, vehicle, age/gender, and marital status. What discounts they apply from there varies greatly from agency to agency.
There is no consideration for how long you've had insurance in general. Would a grocery store give you a discount just because you've bought groceries for the past 10 years?
You're acting like this will be your first auto insurance policy. If you already have an auto policy with someone, obviously get rates from them. Ask them if they take into account loyalty with the company for rates down the road. I know State Farm does, not sure about others.
Also ask your current and other agencies about discounts that might apply to you: no accidents, good academic discounts, student discounts, military/public safety, etc. Anything unique about yourself that might apply, ask. You never know what discounts these companies have and the agent won't always go through the effort of finding out for you.
Also consider combining insurance for multi-line discounts. Renter's/homeowner insurance, life insurance, etc.
I was added to my Dad's State Farm policy when I started driving. They later split me out under my own policy. This had the effect of showing me having been a State Farm customer since my Dad first started his own policy. Thus I have a very long history with them and per several agents, a highly discounted rate compared to most people. YMMV