When I use Agent::is_mobiledevice(), it throws the following error. Fatal error: Class 'Cache' not found in /my directory/fuel/core/classes/agent.php on line 352.
Both caches /app/cache and core/classes/cache directories exists with 777 permission.
The Agent class uses the Cache class to cache browser identification data.
The error here doesn't refer to folders not being writeable, but to the fact that the Cache class can not be loaded. Since this class is part of the FuelPHP core, there's something very strange going on in your local installation.