Two employees of the assembly were also hurt, witnesses said.
Venezuelan newspaper Tal Cual blamed the attack on militias known as "colectivos", and said the group fired rockets and bangers as they forced their way in.
Its report said some of the deputies attacked "fell to the ground and were kicked".
Photos and videos circulating on social media showed victims of the assault with bleeding head wounds. At least one, identified as deputy Americo De Grazia, was carried out on a stretcher.
AFP, whose journalists were at the scene, said reporters were ordered to leave by the attackers, one of whom had a gun.
The violence unfolded while President Nicolás Maduro was giving a speech at a government-planned Independence Day military parade elsewhere in the capital.
Before the intruders rushed the building, his Vice-President Tareck El Aissami had made an impromptu appearance in the congress with the head of the armed forces, Vladimir Padrino Lopez, and ministers.
Mr El Aissami gave a speech urging the president's supporters to come to the legislature to show support for him.
A crowd had been rallying outside the building for several hours before breaking into the grounds.
What's happening in Venezuela?
The country is in a deep economic crisis, made worse by the falling price of oil, which accounts for about 95% of its export revenues and was used to finance some of the government's generous social programmes. Forced to make cuts, Mr Maduro has seen his support fall among core backers
Also as a result of the crisis, parts of Venezuela face severe shortages of basic supplies such as medicine and food
The opposition accuses Mr Maduro of not only mismanaging the economy but also eroding the country's democratic institutions
In March, the Supreme Court decided it would take over the National Assembly. The decision was reversed, but Mr Maduro was accused by opponents of trying to stage a coup. That sparked almost daily protests calling for his resignation
Meanwhile, Mr Maduro says the opposition is trying to overthrow his government illegally, and blames the country's problems on an "economic war" being waged against him
Venezuela's National Assembly has been led by the opposition since elections in December 2015, and has become a focal point for critics of the president.
Anti-Maduro protesters have staged nationwide street protests against the government over the past three months which have seen violent clashes between demonstrators and the security forces.
At least 90 people have died in the bloodshed, with both political factions blaming each other.
The president called it a "terrorist attack" but the chief prosecutor said the country was suffering from "state terrorism".
While Venezuelan security forces later found the abandoned helicopter near the coast, opposition politician and parliamentary Speaker Julio Borges said there was a possibility that the incident was a hoax.
On Tuesday, the fugitive policeman who piloted the helicopter, Oscar Pérez, posted a video online saying he was still in Caracas.
He urged Venezuelans to stand firm in the streets in protests against President Maduro.