I can only connect the node immediately to the surface otherwise i don't get any AO effect. I cant use for example as the vray dirt map. So what the purpose of it?
thanks in advance :)
The purpose is that you can control how much AO each object has.
The ambient occlusion node gives per-material control for the amount of AO. When AO is enabled in the world, it affects all diffuse BSDFs in the scene. With this option it's possible to let only some materials be affected by AO, or to let it influence some materials more or less than others.
Quote from the Blender Wiki.
I can only connect the node immediately to the surface otherwise i don't get any AO effect.
It's a shader, you can combine it with other shades before reaching your material output using a Mix Shader just like you would a Diffuse Shader.