Like with player you need 2 directions: where you go and where you look. For example if you look north and you walk north then you walk forward, but if you look north but you walk south then you walk backward. You make difference between those two and feed it to the blendspace. For example, for player character you can take camera direction from mouse and walk direction from kb and use that. For AI you should also give some direction where it looks which is different from the direction where it wants to walk and use that.