Claims of spying by the Australian Government have been heard in court for the first time.

Former spy 'Witness K' and his co-accused, lawyer and former ACT attorney-general Bernard Collaery, were charged earlier this year with conspiring to reveal secret information.

The charges relate to an incident in which Australian Government agents allegedly bugged the cabinet room of East Timor during negotiations between the countries on oil and gas.

Witness K and Mr Collaery were charged under section 39 of the Intelligence Services Act, which covers secrecy and the unauthorised communication of information, and carries jail terms of up to two years.

It is illegal for reporters to reveal details of the spying operation or reveal Witness K's identity.

Additionally, Mr Collaery has reportedly been served with a national security order, preventing him from discussing the case or court proceedings.

The court this week was open to the public, but many expect future evidence will be heard in secret.

The proceedings so far have focused on how national security information could be handled during the case. Both parties agreed to seek agreement on the matter before the charges are next heard in October.

Crowd of protestors outside the courts included independent and minor party MPs Andrew Wilkie, Nick McKim and Rebekah Sharkie.

“It is outrageous that we are doing this, that our government is doing this in our name and not looking deeply at who in the previous Howard government was involved in the spying,” Ms Sharkie said.

Mr Wilkie said the men should be cleared by the court.

“Let's just hope now that the justice system in the ACT gives these two men a fair hearing and comes up with the outcome that we would all hope for,” he said.