Nigerian President Shehu Shagari completed a two-day state visit to Washington yesterday without responding directly to President Carter's plea for an increase in that country's oil production, according to U.S. officials.

The United States and Nigeria did reach a meeting of minds about increased participation by American business in Nigerian economic development, particularly in the agricultural field, the officials said.

Nigeria, a member of the Organization of Petroleum Exporting Countries (OPEC), exports about half of its production of 2.2 million barrels per day to the United States. It is the second largest oil supplier to this country after Saudi Arabia.

Before coming here Tuesday, Shagari said publicly that Nigeria is committed to decease oil production in keeping with a recent agreement among the OPEC nations. However, Saudi Arabia and several other oil producers have agreed in recent days to increase their production to compensate for the loss to the world market of petroleum previously exported by Iraq and Iran. An OPEC meeting has been scheduled for next week in London to consider a change in the oil cartel's stand.

In discussion at the White House Tuesday, Carter spoke of the problems facing oil-consuming countries that previously depended on Iraqi supplies, and asked Shagari to consider increasing Nigerian production, according to U.S. sources. The sources said Shagari made no direct response.

While making no pledge to increase the oil flow, Shagari did not bring up the possibility that Nigeria might use oil as a weapon against the United States and other western countries which maintain extensive ties with South Africa. Public statements by Shagari and other Nigerian officials earlier had suggested the use of such an oil weapon against South Africa.

In discussion of African issues, according to administration sources, Shagari expressed concern about the new U.S. military relationship with Somalia, which has been warring with its neighbor, Ethiopia. The Nigerian leader is reported to have said that he hopes the U.S. relationship will not encourage Somalia to take new military action against Ethiopia across boundaries which are recognized by other African countries.

Carter, according to this report, replied that the U.S. is doing everything possible to discourage Somalia from further military conflict with Ethiopia.

The Nigerian leader, who was on the his first visit to the United States since his election last year, devoted much of his time to the question of improved economic ties. Because the high U.S. oil purchases are not matched by U.S. sales to Nigeria, the African nation has piled up a huge surplus in the bilateral trade -- $7.5 billion last year and close to $11 billion this year.

Shagari made clear in public and private that he considers a big trade imbalance, which this year will be the largest U.S. imbalance with any country, to be unhealthy for both partners.

At Blair House yestersday morning, Shagari met with American businessmen, headed by former secretary of agriculture Orville Freeman, who have agreed to be the U.S. members of a joint U.S.-Nigerian committee on agricultural development. Nigeria is particularly interested in U.S. trade and technology to improve agricultral production.

Shagari told the meeting, according to a text released later, that Nigeria is determined to achieve agricultural self-sufficiency "in the quickest possible time." He appealed for U.S. help in accomplishing that goal, saying that Nigeria cannot "go it alone."

A meeting of the joint U.S.-Nigerian group is expected in Lagos in a few weeks to discuss specific areas for sales and investment.

According to U.S. and Nigerian sources, it was Carter rather than Shagari who first suggested a state visit to Washington during the Nigerian leader's previously scheduled visit to the United Nations this month. Besides the diplomatic business, Carter is believed to have been eager for the opportunity to show American blacks in this election season that he is on good terms with the leader of Africa's largest state.