I think that Keika is supposed to be a villain- not in the beginning, but maybe in the aftermath.
Keika was destined to be the keeper of the library. That was where his path lay, in the heart of a non-existent town surrounded by thousands of shelves and hundreds of years worth of knowledge and magic. And then he was dragged into someone else's destiny. Atlas'.
Because Atlas was destined for greatness- he was always supposed to fix what was broken, he was always meant to go on a quest and save the world.
Keika was not. He was simply supposed to be a stepping stone in Atlas' story, a way to get from A to B.
And then his sister died. And his town burned. And the library was the only thing that came out of it unscathed and he was so angry. Angry that his sister was dead while some stupid building was left standing, angry that he wasn't there to stop it, angry at Atlas for being the reason he wasn't there to stop it.
So he left. Bitter and mourning and unable to get the smell of burnt feathers out of his nose, he marched all the way to Bruasse and latched onto the only familiar thing left: Atlas and his companions.
After ripping into them, after demanding what was so fucking important that they had to drag their problems all the way to the edge of the map and destroy Keika's life, he just. Joins them. Because they're all he really has left, because he can't even think of his library without wanting to burn it down along with everything else.
And then, with every step taken on a journey he was never supposed to be on, he loses more of himself. Pieces of who he used to be scattered behind him like a breadcrumb trail leading him back home, back to the hill he buried his sister on, back to a town full of memories of when he used to be safe. When he used to be something that might've been happy.
The first time he sees Ahria swing her sword at a living breathing person, Keika throws up. His own magic is capable of levelling cities, of twisting minds and turning brothers against one another, but he's never used it that way, can't stand the sight of blood or the idea of violence.
The first time Keika uses his magic for violence, he has a panic attack because it was so easy to use it that way. He doesn't touch his flute for a week.
He was destined to be the keeper of the library. He wasn't made for this.
He falls in love, and he learns that dealing death blows is easier when there's someone you want to protect. He doesn't let himself think about what happens if that "someone" is yourself.
And then he kills a woman whose last words are the same as his sisters. He stands alone in a darkened cavern, blood soaking into the sandy floor, the smell of ash in his nose; and wonders...
I think that maybe Keika is meant to be a villain. Not because he is inherently evil, but because he is scared and angry and tired.
He lands the killing blow that is supposed to save the world and he runs.