American Telephone & Telegraph Co. Chairman Charles L. Brown sought to assure an overflow crowd of 5,000 shareholders yesterday that the company's divestiture agreement with the Reagan administration was in the best interests of the company, its 3 million stockholders and its billions of customers.

Speaking to many skeptical shareholders at the company's first annual meeting since the break-up plan was announced last January, Brown said that even though divestiture of AT&T's 22 local operating companies was not the Bell System's choice, "it is a solution which can be made to work by Bell System people."

Brown said the settlement ends "the ominous, expensive, distracting government antitrust case" that cost the company $380 million and threatened to break up AT&T in ways "which might well make no business sense."

Even more significant, Brown said, the agreement will finally permit AT&T to enter any business activity it wishes, including the computer and data processing business from which it has been barred for the past 25 years.

The settlement "is a clean break from the tangle of issues which, if not otherwise solved--and soon--would debilitate this country's telecommunications system and delay the introduction of new technologies and new services which consumers want," he said.

However, Brown said, pending legislation in Congress that would impose tighter restrictions on the Bell System than the administration's divestiture plan would hurt AT&T and its local operating companies. He urged all shareholders to join the firm's letter-writing campaign to Congress in opposition to the legislation, HR 5158. Since the campaign was launched a month ago, AT&T estimates 135,000 letters have been sent to Congress from employes and shareholders.

The company encouraged even more letters yesterday. Before entering the annual meeting, shareholders were given buttons that said "HR 5158 is a wrong number." They also were given a form letter and asked to sign it and send it to their representatives. AT&T volunteered to mail the letters for them.

One shareholder said during the meeting that he believed the legislation was a good idea. Brown urged him to get in touch with local AT&T officials who would give him "chapter and verse" on the bad points of the measure.

The legislation's sponsor, Rep. Timothy Wirth (D-Colo.) "distorts" the consequences of the bill, Brown charged. He said the measure would impose an immediate, $5.8-billion tax bill on local companies.

Under the settlement, the divested local companies would be barred from offering Yellow Pages, telephone equipment, long distance or any service other than local.

Many state and federal regulators as well as members of Congress have urged that these restrictions be lifted. Brown indicated he would not oppose such a move. "I didn't think up these restrictions, the Justice Department did. We're not in favor of restrictions on anybody," he said.

However, he added, even if the restrictions remain, the local companies will not suffer because the sharp increase in demand for communications services will mean greater revenues to them.

Brown also announced AT&T's earnings for the first three months of this year. Profits totaled $1.7 billion ($2.04 per share), up from $1.5 billion ($1.92) in 1981's first quarter. Revenues for the first three months of this year were $15.6 billion, up from $13.5 billion a year ago. This was a "creditable result for business in a weak economy," he said.