From Bulbapedia, the community-driven Pokémon encyclopedia.
Lex is a Mission Guide from Pokémon Learning League. He assists students when they watch Language Arts lessons.
The Learning League Lab’s resident Language Artist, Lex is naturally an expert on all things related to writing, from simple grammar to writing complex essays. He's often seen practicing with his guitar, or writing songs. He's been described as a "down to earth" sort of person on his official bio.
It is revealed in the episode "Giving Back" that he sometimes holds fundraisers for the local community center. These mostly involved music playing competitions.
Lex's name may have come from "Lexicon", which is a language's inventory of vocabulary.