A teenager who allegedly used a taser during a home invasion at a public housing estate in Melbourne's inner north has told a magistrate that he was in the wrong place at the wrong time.

Firomsa Awal, 18, appeared before the Melbourne Magistrates Night Court charged with five offences including home invasion, aggravated burglary and assault.

Police are alleging Awal, along with a 17-year-old boy who cannot be named, broke into the housing commission flats in Carlton shortly before 3:00pm yesterday with the intention of assaulting someone.

The court heard Awal used a taser to attack one of three people at two different units inside the Drummond Street high-rise.

The pair's presence at the Carlton commission flats resulted in a manhunt that lasted four hours, with heavily armed police swarming the apartment block and locking down Carlton Primary School and a nearby childcare centre.

"I was at the wrong address at the wrong time," Awal told magistrate John Doherty in an after-hours hearing.

"I want to be a better person... and not repeat this mistake again," he said.

Specialist police officers stood outside a housing commission block in Carlton. ( ABC News )

Awal's co-accused also appeared at a children's court earlier today.

Court documents reveal the 17-year-old is alleged to have been armed with a sawn-off shotgun and a handgun.

He has also been charged with five offences, including home invasion while on bail.

The boy did not apply for bail and will return to court in a fortnight.

Awal was remanded in custody and will return to court tomorrow.