American foreign aid often conjures up an image of national treasure wasted abroad, of vast sums of taxpayers' money disappearing into obscure foreign lands, of wheat rotting on distant docks, and worse.

But if money has been squandered, one thing is certain: it has not gone mainly into foreign lands. The United States itself is by far the largest recipient of its won foreign aid funds.

As suggested now by a spreading investigation into money mis-management and congressional influence-peddling involving the Agency for International Development, companies and consultants at home, rather than poor people abroad, receive most of AID's economic development funds.

These funds have spawned clusters of U.S. firms that depend partly, and in a few cases entirely, on American foreign aid. The proliferation of such firms in the metropolitan Washington suburbs has led government officials to coin an irreverent nickname for them: "the Beltway bandits."

In fiscal 1977, about three dollars out of four earmarked for bilateral economic assistance were spent for technical knowhow, services, products and commodities in this country. Some $1.6 billion in all went to private companies, universities and private volunteer groups.

The names of some of the firms receiving AID contracts or grants suggest their specialized function: Appropriate Technology Inc.; Private Agencies Collaborating Together Inc. (PACT): American Freedom From Hunger Foundation; Haiti-Consult.

AID officials say the money spent at home ultimately benefits countries abroad. They cite small irrigation projects, aid to small businesses, and transfers of "knowhow" as basic and inexpensive as teaching modern birth control methods to healer-midwives in Indonesian villages.

Nevertheless, it is this pool of money, drawn on by Americans rather than poor people abroad, that is now the subject of investigation by the FBI and AID's auditors.

There is documentary evidence that some members of Congress - the most indignant critic of waste in foreign aid - pressured AID to approve favorite projects.

FBI investigators have begun combing through contracts worth more than $16 million paid by AID to the Airlie Foundation in Warrenton, Va., and to a George Washington University Medical Center group associated with Airlie.

According to an affidavit recorded in U.S. District Court in Los Angeles, a government witness has testified that Airlie Foundation's executive director, Murdoch Head, was the source of $87,000 in payments between 1971 and 1973 to Rep. Daniel J. Flood (D-Pa.) and former Rep. Otto E. Passman (D-La.).

No connection between the allegations in the affidavit and the federal inquiry has been made. However, AID documents show that Flood did convey his interest in AID funding for Airlie to Passman, whose House Appropriations subcommittee controlled the foreign aid budget at the time.

Passman and Flood both have denied receiving payments, and the Airlie Foundation has denied making any contributions to any elected official, political party or campaign.

Since taking office last May, AID administrator John J. Gilligan has taken a number of steps totighten control over money and contracts.

Last week he dismissed the AID chief of mission in Kenya, charles J. Nelson. He said in an interview that he based the dimissal on a General Accounting Office report that the mission exceeded its budget for relocating and refurnishing the Nairobi office by $66,000.

Gilligan said he also replaced the agency's auditor general with a "more vigorous auditor" after finding "general incompetence" in that office's procedures.

Gilligan, a former governor of Ohio still widely referred to by his previous title, was sharply critical of his agency's previous procedure for reviewing and evaluating contracts, such as those for the Airlie Foundation.

But he asserted that there was no more corruption in the awarding of AID contracts than there is in other government programs.

"Compared with what goes on the the housing program or with defense contracts, it's very minor stuff," he said "Anytime there are quantities of money being moved around it attracts all kinds of people who want to make a buck."

Only a small amount of foreign aid money actually is handed out as cash to countries and organizations overseas.The agency does make cash grants for development purposes totaling $324 million to Israel, Jordan, Pakistan, Mozabique and Malta. And it hands out another $300 million in cash to Israel under a special "security supporting assistance" arrangement intended to help that country's financial situation.

But larger amounts of AID funds are channeled directly to congressional districts in the United States.

As of last Sept. 30, for instance, 159 U.S. organizations, or consulting firms in the District of Columbia, were under contract to AID for $151.2 million to provide research or services in the fields of health, agriculture, nutrition, family planning and many others. Receiving AID money were little known organizations such as Multinational Agribusiness Systems Inc. ($428,696) and Experience Inc. ($2.2 million) and more familiar ones such as Planned Parenthood Association ($466,833) and the American Institute for free Labor Developments ($26.2 million).

In addition to these suppliers of "software" and knowhow, hundreds of American manufacturers and other companies get business from countries receiving AID money. In most cases, AID insists that commodities and equipment needed for projects abroad be bought here.

Among recipients of such business: Hughes Aircraft Co., Dow Chemical Co., Continental Grain Co., Kaiser Aluminum Inc., General Motors Corp., General Electric Co., ITT Communications and International Paper Co.

AID officials say the most difficult contracts to review and evaluate are those involving research or knowhow. Value judgments of a program's worth are involved - and in some case only one consultancy is equipped to provide the service, they say.

Gilligan said that when he came to office he found "a notable absence of competitive bidding," as well as contracts that had been reissued year after year so that "the original contract amount turned out to be a small fraction of what was originally paid."

U.S. universities have been a prime recipient of AID funds and records show many contracts are repeated.

Some private, nonprofit companies have grown directly out of legislation proposed by congressional committees or individual members of Congress.

In 1975, the House International Relations Committee authorized an AID program to disseminate "appropriate technology" to countries abroad. Grants up to $20 million were authorized through 1978.The plan was supported by Rep. Clement J. Zablocki (D-Wis.), who is now the chairman, and by other committee members staffers and AID officials.

Last year, a private nonprofit company named Appropriate Technology Inc. was established in Washington to carry out Congress' intent. Its director, Jordan Lewis, formerly with the National Bureau of Standards, receives a salary of $47,000 a year, the government maximum. The development officer, retired AID official Edgar L. Owens, receives $24,000 (as well as his government pension).

ATI's board, headed by Koppers Co. chairman Fletcher L. Byrom, last year paid the executive search firm Canny Bowen Inc. to locate candidates for director.

Lewis said last week that morethan half the AID money channeled through ATI will be spent abroad. He said the first project involves helping a Brazilian-American organization in northeast Brazil which channels small amounts of capital to small businessmen.

Two other U.S. organizations called AITEC and Emerging Economies Corp. also are involved, Lewis said.

AID Administrator Gilligan said last week that he did "not agree with the way ATI was set up."