Ours were like pets more than just a wandering fowl.
Best advice if you want to give them a fulfilling happy life, give them an ideal environment because it has everything to do with their Mental / Physical health.
Here are some tips to help keep them happy and still keep them around without them wandering away.
I have had experience with these fowl for 6 and a half years before we donated them to the Buffalo reserve in Tupelo Mississippi in 2004.
#1 Caged or Contained guineas are generally not known to have long lives, they are free rang fowl who need the extra space at all times "unlike most chicken who seem not to care" They should be allowed to move around your property which should be a decent size as they love space, neighborhoods are not a good idea unless they like the morning call and them
wandering into their yards which they can and will do. Our neighbors loved them as it was extra company and they loved to eat bugs while the neighbors gardened which help them a lot to keep pests away.
#2 They are best in numbers between 3 - 8 if you raise them together.
Always have at least one male to keep an eye on the females and keep them together.
#3 Do not be distant to accompanying them when they are young, you want them to normalize a relationship with you also they need to get out and learn the area they will be raised and live in, also it helps to build a bond with the group, be careful though and always keep a close eye on them as they can wander and get lost, other things like a snake or hawk could get them since they are very small and an easy target at youth.
#4 They are ok with chickens but i do not recommend caging them together at all, and as i said before they need space at all times.
# 5 I prefered feeding them grains, as it was high in protein and they really liked it, crushed corn was
not a hot pick for them as they mostly neglected it seeing it was more of a filler than a fuel. They get a lot of their source nutrients from bugs and so forth. So do not use chems to repel bugs around the property.
"they have your back on that issue"
# 6 Do not expect the male to be sweet 24/7, if he does not want you close do not force it, let him come to you
"they are not cats or dogs" Females are the sweeter bunch, they are not as aggressive as the male and once they get used to you they are much more prone to getting close, and possibly influencing the male into lingering close as well. The whole relationship works like a pendulum with them in a weird way.
# 7 Yes they can fly but they prefer to run, at night they retreat up into a tree or on top of a roof. Good thing since they
do not see well at night and that is an easy target for predators.
# 8 They like fields but also need tree's and bushes to retreat from the sun and hide at night. A little pond never hurts as it attracts insects and provides constant drinking water. If you have one make sure it's not standing water, use a pump or fountain.