A former member of an agency devoted to helping homeless Calgarians has pleaded guilty to charges involving a number of incidents involving at-risk youth.

Robin Wortman, 64, entered guilty pleas on Friday in connection with four of the counts filed against him in connection with a series of incidents involving homeless boys while he worked at the Calgary Homeless Foundation.

According to an agreed statement of facts, Wortman plead guilty to communicating with a person under the age of 18 for the purpose to commit an offence, possession of child pornography, distribution of child pornography and trafficking of methamphetamine and cannabis.

The court document states the investigation began in fall 2016, when the Calgary Police Service was notified about an individual named 'Robin' who was allegedly providing drugs and sexually exploiting homeless youth in a Calgary shelter.

Detective Amy Spence of the CPS Child Abuse Unit was assigned to the case and spoke with a number of youth who lived at Avenue 15 and soon learned Wortman was the man referred to in the reports.

A search was conducted on Wortman's apartment in the Skygate Tower on 16 Avenue N.W. and a number of electronic devices were seized from the unit.

Through an analysis of those devices and interviews with a number of the complainants, Spence and a number of other members of the CPS discovered evidence of conversations between Wortman and the complainants as well as hundreds of images and videos that were pornographic in nature.

Wortman admitted to the court he knowingly communicated with individuals under the age of 18 over the phone, was the sole user of all the devices where child pornography was found and knew of their existence.

He also admitted to having youth in his apartment for the purposed of using illegal substances and gave and sold drugs to them as well.

The matter has been adjourned until November 1 to set a sentencing date.