Normally if you run Cruise Agent on Mac by double clicking the application, it doesn't inherit environment variables from /etc/profile, ~/.profile etc. You need to use the ~/.MacOSX/environment.plist to specify environment variables.
For example, if you want to specify ANT_OPTS environment variable for using Ant in Cruise Agent, the content of environment.plist may look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANT_OPTS</key>
<string>-Xmx2048m</string>
</dict>
</plist>
And if you change the environment.plist please make sure you logout and login again to make it take effect.
More information can be found here: http://developer.apple.com/qa/qa2001/qa1067.html