SANTA CLARA – DeMeco Ryans last played in an NFL game in 2015. After just one season as an entry-level coach with the 49ers, he is now the team’s inside linebackers coach.

Ryans, 33, is one of the central figures in the 49ers’ organization who will be counted upon to serve as a mentor to second-year linebacker Reuben Foster. He missed 5 ½ weeks of the offseason program this year while he faces criminal charges.

Foster returned to the team last week, one day after a judge dismissed two felony domestic violence charges against him when his accuser recanted her initial statements to police.

“I’ve been through what they’re going through right now,” Ryans said on Wednesday during Week 2 of the 49ers’ organized team activities. “So it’s easy for me to relate and help those guys. We have a good relationship, and I’m here to help him on and off the field, however I can.

“For Reuben, just being a shoulder there for him to lean on, anyway I can help, not only Reuben, but any of the guys in my room.”

Ryans was a two-time Pro Bowl player during his 10-year career with Houston and Philadelphia. He described Foster, a first-round pick in last year’s draft, as a “much better” player.

“For Reuben, it’s just being there and being able to practice and get on the field,” Ryans said.

The 49ers are making sure to bring him along slowly. He spent most of Wednesday’s practice working with strength and conditioning coach Ray Wright. Defensive coordinator Robert Saleh said he is thrilled to have Foster back with the team.

“We’re all excited,” Saleh said. “It’s not just because of Reuben the player. Reuben the person -- for people who don’t know him or who don’t have the privilege to know him -- really don’t understand what a great human being he actually is.”