The agents claimed they faced discrimination at work because of their race.
The Secret Service also agreed to take steps to help its employees move up within the organization.
Secret Service agents have been in the news this week because of increased security for the swearing-in of Donald Trump as president.
The Secret Service guards the president, his family and other U.S. officials. The agency also investigates financial crimes.
In 2000, ten agents asked a federal court to force the agency to make changes in the way it promoted its agents. They said the Secret Service showed discrimination in deciding who was offered employment, moved to a higher position, sent to other offices and received bonus payments. They also said race played a deciding role in how people were punished for wrongdoing.
Reginald Moore worked as a Secret Service agent for more than 20 years. He claimed that between 1999 and 2002, he asked for a job promotion more than 180 times but was never chosen.
Moore was later promoted twice. But in court documents he said those moves happened only after he was moved to another office, made an official protest against the agency, and then took legal action.
Many of the other agents said they had similar experiences. A 2006 court document says top agency officials had for many years failed to act on their criticisms.
The agents said the Secret Service, in their words, "has failed to protect its African-American Special Agents from racial discrimination in virtually every aspect of their employment. Discrimination against African-American Agents in the Secret Service has become part of the fabric of the agency and has spanned several decades."
The agreement reached this week says the agents who made claims will be paid up to $300,000.
The Secret Service is part of the Department of Homeland Security. Jeh Johnson leads the department. In a statement, he said the agreement is "the right thing to do." He said the agency has made changes to its policies.
"I am pleased that we are able to finally put this chapter of Secret Service history behind us. Had the matter gone to trial, it would have required that we re-live things long past, just at a time when the Secret Service is on the mend."
Court documents note that the agency's promotion system begins with examiners rating agents on their writing and speaking ability. The agents are also rated on their ability to lead and direct others and to consider problems and suggest solutions.
Those ratings are then used to create a list of agents who the examiners believe are best-qualified for promotion. Having the top rating does not guarantee that an agent will be promoted, however. Instead, a senior agency official makes a suggestion to a group of other leaders. This group then tells the director of the agency who it believes should be promoted.
The agreement notes that the agency has made changes to the first step in this process -- the rating system. These changes were based on the suggestions of experts who do not work for the agency.
The agreement says the second part of the process -- choosing the agents to be promoted -- will also be changed, using ideas from non-agency experts.
The group of officials who tell the agency director which agents should be promoted is now required to note why each agent was chosen. The group must also note why agents were not chosen.
Also, the Secret Service will pay a non-agency expert to examine the process to decide if any parts of it cause harm to African-American candidates. If the experts find that harm is caused, they will advise the agency on ways to end it.
I'm Christopher Jones-Cruise.