The way I would handle it is to have each agent have variables for a parent and children. When the parent is None, the agent runs as usual; when the parent is another agent, that is the group agent -- when the child is activated, it is either skipped or the parent is activated instead (depending on how you're handling the timing). Then when an agent with child agents is activated, it acts collectively on behalf of the entire group. When a new edge is added, the new member takes on the other's parent.
Without seeing the specific code / errors or issues you're having it's hard to provide more detailed troubleshooting, though. If the above doesn't help, you might need to share your code.