diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index c0b0d72d9bd927fdd317a90f6229c938b5db0a0b..4836d41fb31b7cdd1ad917a68514e435b59461a5 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -286,6 +286,7 @@ const U8 UPD_UNIFORM 		= 0x10;	// used with UPD_SCALE
 // Agent Update Flags (U8)
 const U8 AU_FLAGS_NONE      		= 0x00;
 const U8 AU_FLAGS_HIDETITLE      	= 0x01;
+const U8 AU_FLAGS_CLIENT_AUTOPILOT	= 0x02;
 
 // start location constants
 const U32 START_LOCATION_ID_LAST 		= 0;
diff --git a/indra/llcommon/lllslconstants.h b/indra/llcommon/lllslconstants.h
index 7cd854febd0029460563ae64b960a7df3973347b..a626e3f085540b25044bf8596a43dba4c830c499 100644
--- a/indra/llcommon/lllslconstants.h
+++ b/indra/llcommon/lllslconstants.h
@@ -48,6 +48,7 @@ const U32 AGENT_TYPING		= 0x0200;
 const U32 AGENT_CROUCHING	= 0x0400;
 const U32 AGENT_BUSY		= 0x0800;
 const U32 AGENT_ALWAYS_RUN	= 0x1000;
+const U32 AGENT_AUTOPILOT	= 0x2000;
 
 const S32 LSL_REMOTE_DATA_CHANNEL		= 1;
 const S32 LSL_REMOTE_DATA_REQUEST		= 2;
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index ac524326fcd463c5097f67723d50c84959c4ad46..9cc2841e8c932387deb80f7b597869ddddf0ea3a 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -150,6 +150,7 @@ extern "C" { int yyerror(const char *fmt, ...); }
 "AGENT_CROUCHING"		{ count(); yylval.ival = AGENT_CROUCHING; return(INTEGER_CONSTANT); }
 "AGENT_BUSY"			{ count(); yylval.ival = AGENT_BUSY; return(INTEGER_CONSTANT); }
 "AGENT_ALWAYS_RUN"		{ count(); yylval.ival = AGENT_ALWAYS_RUN; return(INTEGER_CONSTANT); }
+"AGENT_AUTOPILOT"		{ count(); yylval.ival = AGENT_AUTOPILOT; return(INTEGER_CONSTANT); }
 
 "CAMERA_PITCH"				{ count(); yylval.ival = FOLLOWCAM_PITCH; return(INTEGER_CONSTANT); }
 "CAMERA_FOCUS_OFFSET"		{ count(); yylval.ival = FOLLOWCAM_FOCUS_OFFSET; return (INTEGER_CONSTANT); }
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index cd7b533e7a75d107b25527ec520c3031f4062fb7..eaf5213985dac4e861ac3aa62cc0bc9ebc791ada 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -108,6 +108,7 @@ AGENT_TYPING		Returned by llGetAgentInfo if the Agent is typing
 AGENT_CROUCHING		Returned by llGetAgentInfo if the Agent is crouching
 AGENT_BUSY			Returned by llGetAgentInfo if the Agent is busy
 AGENT_ALWAYS_RUN	Returned by llGetAgentInfo if the Agent has 'Always Run' enabled
+AGENT_AUTOPILOT		Returned by llGetAgentInfo if the Agent is under autopilot control
 
 PSYS_PART_FLAGS
 PSYS_PART_START_COLOR
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 177c987bc091cb657da7faf08385f4f8f56c0120..7e2183f1f394b781f598edb661efdf72e8d362c1 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3111,6 +3111,10 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
 	{
 		flags |= AU_FLAGS_HIDETITLE;
 	}
+	if (gAgent.getAutoPilot())
+	{
+		flags |= AU_FLAGS_CLIENT_AUTOPILOT;
+	}
 
 	flag_change = last_flags ^ flags;
 
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 4206b87c2b3a6a42fd3ddcafbd13504555448ee9..530c3816c8338ad20e8dcf9c241c7492e2ce675a 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1137,7 +1137,7 @@ Checks to see whether the border hit by dir from pos is the edge of the world (h
 	<string name="LSLTipText_llGetAgentInfo">
 integer llGetAgentInfo(key id)
 Gets information about agent ID.
-Returns AGENT_FLYING, AGENT_ATTACHMENTS, AGENT_SCRIPTED, AGENT_SITTING, AGENT_ON_OBJECT, AGENT_MOUSELOOK, AGENT_AWAY, AGENT_BUSY, AGENT_TYPING, AGENT_CROUCHING, AGENT_ALWAYS_RUN, AGENT_WALKING and/or AGENT_IN_AIR.
+Returns AGENT_FLYING, AGENT_ATTACHMENTS, AGENT_SCRIPTED, AGENT_SITTING, AGENT_ON_OBJECT, AGENT_MOUSELOOK, AGENT_AWAY, AGENT_BUSY, AGENT_TYPING, AGENT_CROUCHING, AGENT_ALWAYS_RUN, AGENT_WALKING, AGENT_IN_AIR and/or AGENT_AUTOPILOT.
 	</string>
 	<string name="LSLTipText_llAdjustSoundVolume">
 llAdjustSoundVolume(float volume)