

# GetAgentContext

Returns an agent context's configuration and status.

## Request Parameters
<a name="API_GetAgentContext_RequestParameters"></a>

 ** agentContextId **   
The agent context to return, by its ID or ARN.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 180.  
Pattern: `(arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:agent-context/)?[a-z0-9]+(-[a-z0-9]+)*`   
Required: Yes

## Response Elements
<a name="API_GetAgentContext_ResponseElements"></a>

The following elements are returned by the service.

 ** arn **   
The ARN of the agent context, in the form `arn:<partition>:context:<region>:<account-id>:agent-context/<id>`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 180.  
Pattern: `arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:agent-context/[a-z0-9]+(-[a-z0-9]+)*` 

 ** connectionMappings **   
The agent context's connection mappings.  
Type: Array of [ConnectionMapping](API_ConnectionMapping.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 20 items.

 ** createdAt **   
The date and time when the agent context was created.  
Type: Timestamp

 ** description **   
A human-readable description, if one was set.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 1024.  
Pattern: `\P{Cc}*` 

 ** encryptionConfig **   
The agent context's encryption settings.  
Type: [EncryptionConfig](API_EncryptionConfig.md) object

 ** entityResolutionConfig **   
The agent context's entity resolution settings. Populated on every response path that returns the resource.  
Type: [EntityResolutionConfig](API_EntityResolutionConfig.md) object

 ** id **   
The agent context's opaque ID.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-z0-9]+(-[a-z0-9]+)*` 

 ** mcpServerUrl **   
The Model Context Protocol (MCP) server URL to give your employees while workforce sign-in is `ENABLED`. The URL is the agent context's MCP endpoint, with `workforceSignInConfig.signInUrl` as its `login_hint` query parameter and the ID that AWS Context assigns to that sign-in URL as its `tenantId` query parameter. Absent while workforce sign-in is `DISABLED`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 4096.

 ** name **   
The name of the agent context. If you didn't specify a name when you created it, the name is `default`.  
Type: String  
Length Constraints: Minimum length of 3. Maximum length of 63.  
Pattern: `[a-zA-Z][a-zA-Z0-9-]*` 

 ** status **   
The agent context's lifecycle status.  
Valid values:  
+  `CREATING` - The agent context is being created.
+  `ACTIVE` - The agent context is ready to use.
+  `UPDATING` - The agent context is being updated.
+  `DELETING` - The agent context is being deleted.
+  `FAILED` - The agent context failed.
Type: String  
Valid Values: `CREATING | ACTIVE | UPDATING | DELETING | FAILED` 

 ** traceAnalysisConfig **   
The agent context's trace analysis settings.  
Type: [TraceAnalysisConfig](API_TraceAnalysisConfig.md) object

 ** trustedIdentitySources **   
Identity sources this agent context trusts in addition to its owner's account. Absent or empty: only the owner's account is trusted.  
Type: Array of [TrustedIdentitySource](API_TrustedIdentitySource.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 100 items.

 ** updatedAt **   
When the resource last changed. Equal to `createdAt` until the first update.  
Type: Timestamp

 ** workforceSignInConfig **   
How your employees sign in to this agent context's MCP server through your identity provider (workforce sign-in). `status` reads ENABLED while a sign-in URL is stored, DISABLED otherwise.  
Type: [WorkforceSignInConfig](API_WorkforceSignInConfig.md) object

## Errors
<a name="API_GetAgentContext_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.    
 ** message **   
A message that describes the error.
HTTP Status Code: 403

 ** InternalServerException **   
The request failed because of an internal error. Retry the request.    
 ** message **   
A message that describes the error.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.    
 ** message **   
A message that describes the error.  
 ** resourceId **   
The ID of the resource that was not found.  
 ** resourceType **   
The type of the resource that wasn't found.  
Valid values:  
+  `agent-context` - An agent context.
+  `connection` - A connection.
+  `curation-policy` - A curation policy.
+  `evaluation` - Reserved for future use.
+  `ontology` - An ontology.
+  `ontology-induction` - An ontology induction.
+  `resource-policy` - A resource-based policy.
HTTP Status Code: 404

 ** ThrottlingException **   
The request was denied because it exceeded a request rate quota. Wait, then retry the request.    
 ** message **   
A message that describes the error.  
 ** quotaCode **   
The code of the quota that throttled the request.  
 ** retryAfterSeconds **   
The number of seconds to wait before you retry the request, if AWS Context provides one.  
 ** serviceCode **   
The code of the service whose quota throttled the request.
HTTP Status Code: 429

 ** ValidationException **   
The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.    
 ** fieldList **   
The fields that failed validation, each with a message that describes why.  
 ** message **   
A message that describes the error.  
 ** reason **   
The reason that the input failed validation. Valid values:  
+  `unknownOperation` - The operation isn't recognized.
+  `cannotParse` - The request couldn't be parsed.
+  `fieldValidationFailed` - One or more fields failed validation. `fieldList` describes them.
+  `other` - Another reason. `message` describes it.
HTTP Status Code: 400

## See Also
<a name="API_GetAgentContext_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/context-2022-07-26/GetAgentContext) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/context-2022-07-26/GetAgentContext) 