I walk my beagles in the road instead of lawns and keep the leash short. I reward them with little treats as we walk when they stay right by my side. They learn to focus on the treats instead of sniffing and pulling.
First, you have to look for something that motivates your dog. Secondly, keep your agility training sessions short and straightforward. You also need to balance your agility training sessions to keep the dog interested.