The name of this anime is Kiba. The boy Zed summons a spirit, I think its name is Amil Gaul. It's one of 6 key spirits and his friend is also transported with him.
Zed, a 15-year-old boy who lives in a city called "Calm", is frustrated by his current situation in life; he feels that somewhere out there is a place where he can live more fully. One day, at the invitation of a mysterious wind, he dives into a space-time crevasse (portal), seeking the answers that might be there. Riding on the wind, he is transported to a war-torn world where magic users called "Shard Casters" fight endlessly with each other, using spells in the form of marble-like "Shards". He is transported to a country known as Templar.
With the power of the Shards, the Shard Casters are able to use spells and control monsters called "Spirits". Fascinated by that power, Zed aims to become a Shard Caster. However, he still doesn't know that residing in his body is "Amil Gaoul", a mighty Spirit with the power to influence the world's future. Amil Gaoul is one of the "Key Spirits" that, when together with the other Key Spirits, can destroy or save the world. There are a total of six Key Spirits: Amil Gaoul, Pronimo, Sachura, Monadi, Dynamis and Shadin.
Zed undergoes countless trials in order to find out who he really is and what is most important to him.