tell application "Contacts"
activate
set {P, G} to {person 1, group 1}
add P to G
save -- saves changes and shows them
end tell
NOTE 1: “All Contacts” isn’t a group, so you should have at least 1 group in Contacts to get working of script. The error message above most likely is related with fact, that you have not groups in your Contacts yet. To add person (new) to “All Contacts” is only creating person command.
NOTE 2: If you use Script Debugger or if you use this script as applet, then appropriate flag to access your Contacts will be set on in Security & Privacy of System Preferences. If you use this script as applet (or Script Debugger) with Contacts for first time, then appears dialog box to allow your applet (or Script Debugger) access your Contacts. Click “Allow”. More secure is allow for applet.