Context / Client / create_agent_context

create_agent_context

Context.Client.create_agent_context(**kwargs)

Creates an agent context over one or more connections. Creation is asynchronous. GetAgentContext returns its status.

See also: AWS API Documentation

Request Syntax

response = client.create_agent_context(
    clientToken='string',
    name='string',
    description='string',
    connectionMappings=[
        {
            'connectionId': 'string',
            'ontologyMappings': [
                {
                    'ontologyId': 'string'
                },
            ],
            'dataFilter': {
                'filters': [
                    {
                        'fileType': 'string',
                        'excludeTags': [
                            'string',
                        ],
                        'includeTags': [
                            'string',
                        ],
                        'updatedAfter': datetime(2015, 1, 1),
                        'createdAfter': datetime(2015, 1, 1),
                        'maxDocumentSizeBytes': 123
                    },
                ]
            },
            'extractionDepth': 'string',
            'pathSegments': [
                {
                    'level': 'string',
                    'id': 'string'
                },
            ],
            'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE'
        },
    ],
    traceAnalysisConfig={
        'status': 'ENABLED'|'DISABLED',
        'traceAnalysisRole': 'string',
        'includeContextAgentTraces': 'ENABLED'|'DISABLED'
    },
    workforceSignInConfig={
        'status': 'ENABLED'|'DISABLED',
        'signInUrl': 'string'
    },
    entityResolutionConfig={
        'status': 'ENABLED'|'DISABLED'
    },
    trustedIdentitySources=[
        {
            'identityStoreArn': 'string',
            'identityProviderArn': 'string'
        },
    ],
    tags={
        'string': 'string'
    },
    curationPolicyIds=[
        'string',
    ]
)
Parameters:
  • clientToken (string) –

    Client idempotency token. The AWS SDKs generate one when it is absent. An identical request with the same token returns the existing agent context. The same token with a different request returns ValidationException. trustedIdentitySources with the same entries in another order is the same request.

    This field is autopopulated if not provided.

  • name (string) – Optional. The name of the agent context. If you omit it, the name is default. You can change it later with UpdateAgentContext.

  • description (string) – Optional human-readable description of the agent context. An empty string is the same as none.

  • connectionMappings (list) –

    [REQUIRED]

    The connection mappings for this agent context, up to 20. CreateAgentContext requires at least one: an empty list returns ValidationException. Each entry binds a connection to one or more ontologies, optionally scoped by a data filter, extraction depth, and path segments. Each referenced connection must exist, be owned by your account, and be ACTIVE. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.

    • (dict) –

      A connection mapping entry on CreateAgentContext and UpdateAgentContext. Each entry binds a connection to one or more ontologies within the agent context, optionally scoped by a data filter, extraction depth, and path segments.

      • connectionId (string) – [REQUIRED]

        The connection, by its ID (which starts with conn-) or its full ARN. Required. AWS Context resolves an ID to an ARN in your account and the current Region.

      • ontologyMappings (list) – [REQUIRED]

        The ontology mappings for this connection mapping. Each entry identifies an ontology that this mapping targets. BEDROCK_KNOWLEDGE_BASE rejects the AWS managed Data ontology. GLUE_DATA_CATALOG rejects the AWS managed Enterprise and Business Process ontologies. AWS Context accepts a new or changed mapping to a customer-owned ontology only on BEDROCK_KNOWLEDGE_BASE. An incompatible mapping, or an ontology that isn’t PUBLISHED, fails with ValidationException.

        • (dict) –

          A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.

          • ontologyId (string) – [REQUIRED]

            The ontology that this mapping targets, by its ID or ARN.

      • dataFilter (dict) –

        Optional. The data filter for this connection mapping. A document matches if it matches any filter in the list. Within a filter, all conditions must match. If you omit it, every document matches.

        • filters (list) –

          The filters. An asset matches if it matches at least one filter in the list. If the list is absent or empty, every asset matches.

          • (dict) –

            A filter that selects documents in a connection mapping. All members are optional, and a document must match every condition in the filter. When a mapping has more than one filter, a document that matches any of them is selected. updatedAfter, includeTags, and excludeTags apply to all connection types. createdAfter applies only to BEDROCK_KNOWLEDGE_BASE connections; for other connection types it doesn’t exclude any document. fileType and maxDocumentSizeBytes apply only to BEDROCK_KNOWLEDGE_BASE connections, and specifying either for another connection type fails with ValidationException. You can’t specify both includeTags and excludeTags in one filter.

            • fileType (string) –

              The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.

            • excludeTags (list) –

              The tags to exclude: 1–25 strings, each 1–256 characters. Applies to all connection types. You can’t specify both excludeTags and includeTags in one filter.

              • (string) –

                A single tag value within a TagSet.

            • includeTags (list) –

              The tags to include: 1–25 strings, each 1–256 characters. Applies to all connection types. You can’t specify both includeTags and excludeTags in one filter.

              • (string) –

                A single tag value within a TagSet.

            • updatedAfter (datetime) –

              Documents updated after this time match. Applies to all connection types.

            • createdAfter (datetime) –

              Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn’t exclude any document.

            • maxDocumentSizeBytes (integer) –

              The maximum document size, in bytes. Applies only to BEDROCK_KNOWLEDGE_BASE connections. Documents larger than this are filtered out. If you omit it, there is no size limit. Range: 1 to 52,428,800 bytes (50 MiB).

      • extractionDepth (string) –

        Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.

      • pathSegments (list) –

        The path segments that scope ingestion within the data source, 0–100 segments. Optional. An empty list is the same as omitting the field and matches everything. The segments name levels from one branch of the connection type’s level hierarchy. The container levels form a contiguous prefix of that branch that starts at its root, and a link can also name the table level. AWS Context rejects a link that mixes branches. The branches are the following:

        • GLUE_DATA_CATALOG - The native branch ( glueDatabase, glueTable) and one branch for each federated AWS data source: redshiftNamespace, redshiftDatabase, redshiftSchema, redshiftTable, rdsInstance, rdsDatabase, rdsSchema, rdsTable, s3TableBucket, s3Namespace, s3Table, and sagemakerModelGroup.

        • SNOWFLAKE - snowflakeDatabase, snowflakeSchema, snowflakeTable.

        • DATABRICKS - databricksCatalog, databricksSchema, databricksTable.

        The connection holds the source’s identity, such as the account locator or metastore ID, so it isn’t a segment. AWS Context matches IDs as opaque strings against the source’s coordinate values.

        • (dict) –

          One segment of a resource hierarchy path: the hierarchy level, such as database or table, and the id of the resource at that level. Both are required.

          In a GLUE_DATA_CATALOG connection’s scope, the level glueService names a service instead of a resource. Its id is one of the following:

          • GLUE - AWS Glue databases and tables.

          • SAGEMAKER_AI - Amazon SageMaker AI resources.

          • REDSHIFT - Amazon Redshift resources.

          • RDS - Amazon RDS resources.

          • MSK - Amazon Managed Streaming for Apache Kafka (Amazon MSK) resources.

          • KINESIS - Amazon Kinesis Data Streams resources.

          • FIREHOSE - Amazon Data Firehose resources.

          • DYNAMODB - Amazon DynamoDB resources.

          • KEYSPACES - Amazon Keyspaces (for Apache Cassandra) resources.

          • ELASTICACHE - Amazon ElastiCache resources.

          • OPENSEARCH - Amazon OpenSearch Service resources.

          • NEPTUNE - Amazon Neptune resources.

          • TIMESTREAM - Amazon Timestream resources.

          • ATHENA - Amazon Athena resources.

          • GLUE_SCHEMA_REGISTRY - AWS Glue Schema Registry resources.

          • S3 - Amazon S3 resources.

          • S3_VECTORS - Amazon S3 Vectors resources.

          Every later segment of the selector must name a level of that service. Any other value, a second glueService segment, or a glueService segment in any other position returns ValidationException. A resource path never contains glueService.

          • level (string) – [REQUIRED]

            The hierarchy level name for this segment (for example, “database”, “table”). Non-blank, no whitespace.

          • id (string) – [REQUIRED]

            The ID of the resource at this level. Non-blank. Can contain spaces, backticks, and % (it is a resource name), but no control characters. AWS Context matches it exactly.

      • type (string) –

        The connection’s data source type. AWS Context sets it from the referenced connection’s data source type when you create or update the mapping. Read-only.

        Valid values:

        • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.

        • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.

        • DATABRICKS - A Databricks third-party catalog.

        • SNOWFLAKE - A Snowflake third-party catalog.

  • traceAnalysisConfig (dict) –

    The agent context’s trace analysis settings. Optional. You can change it with UpdateAgentContext.

    • status (string) –

      Specifies whether you allow AWS Context to use traceAnalysisRole to analyze this agent context’s agent traces, and to capture its own agents’ traces as includeContextAgentTraces specifies. Defaults to ENABLED when you set traceAnalysisConfig on CreateAgentContext. Setting it to ENABLED requires traceAnalysisRole. Setting it to DISABLED removes the role. An agent context that has never set it reads ENABLED when it has a traceAnalysisRole, and DISABLED otherwise.

    • traceAnalysisRole (string) –

      The IAM role that AWS Context assumes to access the agent context’s connected source data when it analyzes agent traces. The role must be in the same account as the agent context. Its trust policy must allow the AWS Context service principal, with aws:SourceArn set to the agent context’s ARN and aws:SourceAccount set to its account. You must have iam:PassRole permission on the role to pass it to AWS Context. Otherwise, the request fails with AccessDeniedException. Required to set status to ENABLED. You can’t set it while status is DISABLED.

    • includeContextAgentTraces (string) –

      Specifies whether trace analysis includes traces from the agents built into AWS Context, such as the retrieval agent. Uses traceAnalysisRole and takes effect only while status is ENABLED. An agent context that has never set it reads ENABLED.

  • workforceSignInConfig (dict) –

    Optional workforce sign-in settings. A config with signInUrl turns sign-in on ( status defaults to ENABLED). status ENABLED without signInUrl is a ValidationException. You can change it with UpdateAgentContext.

    • status (string) –

      Whether workforce sign-in is on. Reads ENABLED while a signInUrl is stored, DISABLED otherwise. On Create, a config with a signInUrl defaults to ENABLED. On Update, DISABLED removes the stored signInUrl. ENABLED requires a signInUrl, supplied in the same request or already stored on the resource.

    • signInUrl (string) –

      The URL that starts a sign-in to your AWS application at the identity provider. For example, an Okta application link, a Microsoft Entra My Apps link, or an IAM Identity Center access portal URL. HTTPS only, a single line with no whitespace, 9 to 2048 characters. Sent alone, it replaces the stored URL and turns sign-in ENABLED. It cannot be sent together with status DISABLED in the same request.

  • entityResolutionConfig (dict) –

    Optional entity resolution settings. When the config or its status is absent, status reads ENABLED. You can change it with UpdateAgentContext.

    • status (string) –

      Specifies whether entity resolution and AWS Glue Data Catalog grounding run. A resource that has never set it reads ENABLED. DISABLED stops new runs. A run already started finishes its current step, and a grounding pass that spans several steps stops at the next one.

  • trustedIdentitySources (list) –

    Optional identity sources to trust in addition to your account. At most 100 unique entries, each with exactly one member. Order is not significant. An empty list and an absent member are the same value: only your account is trusted. You can change it with UpdateAgentContext.

    • (dict) –

      An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: identityStoreArn, identityProviderArn.

      • identityStoreArn (string) –

        An IAM Identity Center identity store ARN, for example arn:aws:identitystore::111122223333:identitystore/d-1234567890. IAM Identity Center DescribeInstance returns it as IdentityStoreArn.

      • identityProviderArn (string) –

        An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.

  • tags (dict) –

    Tags to add to the agent context when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can’t start with aws:. To add tags, you also need context:TagResource permission on the new agent context. If you specify more than 50 user tags, the request fails with ServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with ValidationException.

    • (string) –

      A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.

      • (string) –

        A tag value. Leading and trailing whitespace is trimmed.

  • curationPolicyIds (list) –

    Curation policies to associate with the new agent context, as IDs or ARNs, instead of the default curation policies. If you omit it or the list is empty, AWS Context associates the default curation policies. Each policy must be ACTIVE and owned by your account, and you need context:AssociateCurationPolicy permission on each. AWS Context checks both again on a clientToken retry. If a policy doesn’t exist, the request fails with ResourceNotFoundException. If one has been deleted, it fails with ConflictException. Change the policies later with AssociateCurationPolicy and DisassociateCurationPolicy.

    • (string) –

      A curation policy, by ID or by its full curation-policy/ ARN. An ARN must name your account and the current Region. The ID is lowercase letters and digits in single-hyphen-separated runs ( ^[a-z0-9]+(-[a-z0-9]+)*$).

Return type:

dict

Returns:

Response Syntax

{
    'id': 'string',
    'arn': 'string',
    'name': 'string',
    'description': 'string',
    'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1),
    'connectionMappings': [
        {
            'connectionId': 'string',
            'ontologyMappings': [
                {
                    'ontologyId': 'string'
                },
            ],
            'dataFilter': {
                'filters': [
                    {
                        'fileType': 'string',
                        'excludeTags': [
                            'string',
                        ],
                        'includeTags': [
                            'string',
                        ],
                        'updatedAfter': datetime(2015, 1, 1),
                        'createdAfter': datetime(2015, 1, 1),
                        'maxDocumentSizeBytes': 123
                    },
                ]
            },
            'extractionDepth': 'string',
            'pathSegments': [
                {
                    'level': 'string',
                    'id': 'string'
                },
            ],
            'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE'
        },
    ],
    'encryptionConfig': {
        'encryptionMode': 'AWS_OWNED'|'CUSTOMER_MANAGED',
        'keyArn': 'string'
    },
    'traceAnalysisConfig': {
        'status': 'ENABLED'|'DISABLED',
        'traceAnalysisRole': 'string',
        'includeContextAgentTraces': 'ENABLED'|'DISABLED'
    },
    'workforceSignInConfig': {
        'status': 'ENABLED'|'DISABLED',
        'signInUrl': 'string'
    },
    'entityResolutionConfig': {
        'status': 'ENABLED'|'DISABLED'
    },
    'mcpServerUrl': 'string',
    'trustedIdentitySources': [
        {
            'identityStoreArn': 'string',
            'identityProviderArn': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    An agent context, as returned by CreateAgentContext, GetAgentContext, and UpdateAgentContext.

    • id (string) –

      The agent context’s opaque ID.

    • arn (string) –

      The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id>.

    • name (string) –

      The name of the agent context. If you didn’t specify a name when you created it, the name is default.

    • description (string) –

      A human-readable description, if one was set.

    • status (string) –

      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.

    • createdAt (datetime) –

      The date and time when the agent context was created.

    • updatedAt (datetime) –

      When the resource last changed. Equal to createdAt until the first update.

    • connectionMappings (list) –

      The agent context’s connection mappings.

      • (dict) –

        A connection mapping entry on CreateAgentContext and UpdateAgentContext. Each entry binds a connection to one or more ontologies within the agent context, optionally scoped by a data filter, extraction depth, and path segments.

        • connectionId (string) –

          The connection, by its ID (which starts with conn-) or its full ARN. Required. AWS Context resolves an ID to an ARN in your account and the current Region.

        • ontologyMappings (list) –

          The ontology mappings for this connection mapping. Each entry identifies an ontology that this mapping targets. BEDROCK_KNOWLEDGE_BASE rejects the AWS managed Data ontology. GLUE_DATA_CATALOG rejects the AWS managed Enterprise and Business Process ontologies. AWS Context accepts a new or changed mapping to a customer-owned ontology only on BEDROCK_KNOWLEDGE_BASE. An incompatible mapping, or an ontology that isn’t PUBLISHED, fails with ValidationException.

          • (dict) –

            A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.

            • ontologyId (string) –

              The ontology that this mapping targets, by its ID or ARN.

        • dataFilter (dict) –

          Optional. The data filter for this connection mapping. A document matches if it matches any filter in the list. Within a filter, all conditions must match. If you omit it, every document matches.

          • filters (list) –

            The filters. An asset matches if it matches at least one filter in the list. If the list is absent or empty, every asset matches.

            • (dict) –

              A filter that selects documents in a connection mapping. All members are optional, and a document must match every condition in the filter. When a mapping has more than one filter, a document that matches any of them is selected. updatedAfter, includeTags, and excludeTags apply to all connection types. createdAfter applies only to BEDROCK_KNOWLEDGE_BASE connections; for other connection types it doesn’t exclude any document. fileType and maxDocumentSizeBytes apply only to BEDROCK_KNOWLEDGE_BASE connections, and specifying either for another connection type fails with ValidationException. You can’t specify both includeTags and excludeTags in one filter.

              • fileType (string) –

                The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.

              • excludeTags (list) –

                The tags to exclude: 1–25 strings, each 1–256 characters. Applies to all connection types. You can’t specify both excludeTags and includeTags in one filter.

                • (string) –

                  A single tag value within a TagSet.

              • includeTags (list) –

                The tags to include: 1–25 strings, each 1–256 characters. Applies to all connection types. You can’t specify both includeTags and excludeTags in one filter.

                • (string) –

                  A single tag value within a TagSet.

              • updatedAfter (datetime) –

                Documents updated after this time match. Applies to all connection types.

              • createdAfter (datetime) –

                Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn’t exclude any document.

              • maxDocumentSizeBytes (integer) –

                The maximum document size, in bytes. Applies only to BEDROCK_KNOWLEDGE_BASE connections. Documents larger than this are filtered out. If you omit it, there is no size limit. Range: 1 to 52,428,800 bytes (50 MiB).

        • extractionDepth (string) –

          Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.

        • pathSegments (list) –

          The path segments that scope ingestion within the data source, 0–100 segments. Optional. An empty list is the same as omitting the field and matches everything. The segments name levels from one branch of the connection type’s level hierarchy. The container levels form a contiguous prefix of that branch that starts at its root, and a link can also name the table level. AWS Context rejects a link that mixes branches. The branches are the following:

          • GLUE_DATA_CATALOG - The native branch ( glueDatabase, glueTable) and one branch for each federated AWS data source: redshiftNamespace, redshiftDatabase, redshiftSchema, redshiftTable, rdsInstance, rdsDatabase, rdsSchema, rdsTable, s3TableBucket, s3Namespace, s3Table, and sagemakerModelGroup.

          • SNOWFLAKE - snowflakeDatabase, snowflakeSchema, snowflakeTable.

          • DATABRICKS - databricksCatalog, databricksSchema, databricksTable.

          The connection holds the source’s identity, such as the account locator or metastore ID, so it isn’t a segment. AWS Context matches IDs as opaque strings against the source’s coordinate values.

          • (dict) –

            One segment of a resource hierarchy path: the hierarchy level, such as database or table, and the id of the resource at that level. Both are required.

            In a GLUE_DATA_CATALOG connection’s scope, the level glueService names a service instead of a resource. Its id is one of the following:

            • GLUE - AWS Glue databases and tables.

            • SAGEMAKER_AI - Amazon SageMaker AI resources.

            • REDSHIFT - Amazon Redshift resources.

            • RDS - Amazon RDS resources.

            • MSK - Amazon Managed Streaming for Apache Kafka (Amazon MSK) resources.

            • KINESIS - Amazon Kinesis Data Streams resources.

            • FIREHOSE - Amazon Data Firehose resources.

            • DYNAMODB - Amazon DynamoDB resources.

            • KEYSPACES - Amazon Keyspaces (for Apache Cassandra) resources.

            • ELASTICACHE - Amazon ElastiCache resources.

            • OPENSEARCH - Amazon OpenSearch Service resources.

            • NEPTUNE - Amazon Neptune resources.

            • TIMESTREAM - Amazon Timestream resources.

            • ATHENA - Amazon Athena resources.

            • GLUE_SCHEMA_REGISTRY - AWS Glue Schema Registry resources.

            • S3 - Amazon S3 resources.

            • S3_VECTORS - Amazon S3 Vectors resources.

            Every later segment of the selector must name a level of that service. Any other value, a second glueService segment, or a glueService segment in any other position returns ValidationException. A resource path never contains glueService.

            • level (string) –

              The hierarchy level name for this segment (for example, “database”, “table”). Non-blank, no whitespace.

            • id (string) –

              The ID of the resource at this level. Non-blank. Can contain spaces, backticks, and % (it is a resource name), but no control characters. AWS Context matches it exactly.

        • type (string) –

          The connection’s data source type. AWS Context sets it from the referenced connection’s data source type when you create or update the mapping. Read-only.

          Valid values:

          • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.

          • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.

          • DATABRICKS - A Databricks third-party catalog.

          • SNOWFLAKE - A Snowflake third-party catalog.

    • encryptionConfig (dict) –

      The agent context’s encryption settings.

      • encryptionMode (string) –

        How the agent context’s stored data is encrypted. Always present on the resource.

        Valid values:

        • AWS_OWNED - Encrypted with an AWS owned key.

        • CUSTOMER_MANAGED - Encrypted with the AWS KMS customer managed key that keyArn specifies.

      • keyArn (string) –

        The ARN of the AWS KMS customer managed key that encrypts the agent context when encryptionMode is CUSTOMER_MANAGED. Absent for AWS_OWNED.

    • traceAnalysisConfig (dict) –

      The agent context’s trace analysis settings.

      • status (string) –

        Specifies whether you allow AWS Context to use traceAnalysisRole to analyze this agent context’s agent traces, and to capture its own agents’ traces as includeContextAgentTraces specifies. Defaults to ENABLED when you set traceAnalysisConfig on CreateAgentContext. Setting it to ENABLED requires traceAnalysisRole. Setting it to DISABLED removes the role. An agent context that has never set it reads ENABLED when it has a traceAnalysisRole, and DISABLED otherwise.

      • traceAnalysisRole (string) –

        The IAM role that AWS Context assumes to access the agent context’s connected source data when it analyzes agent traces. The role must be in the same account as the agent context. Its trust policy must allow the AWS Context service principal, with aws:SourceArn set to the agent context’s ARN and aws:SourceAccount set to its account. You must have iam:PassRole permission on the role to pass it to AWS Context. Otherwise, the request fails with AccessDeniedException. Required to set status to ENABLED. You can’t set it while status is DISABLED.

      • includeContextAgentTraces (string) –

        Specifies whether trace analysis includes traces from the agents built into AWS Context, such as the retrieval agent. Uses traceAnalysisRole and takes effect only while status is ENABLED. An agent context that has never set it reads ENABLED.

    • workforceSignInConfig (dict) –

      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.

      • status (string) –

        Whether workforce sign-in is on. Reads ENABLED while a signInUrl is stored, DISABLED otherwise. On Create, a config with a signInUrl defaults to ENABLED. On Update, DISABLED removes the stored signInUrl. ENABLED requires a signInUrl, supplied in the same request or already stored on the resource.

      • signInUrl (string) –

        The URL that starts a sign-in to your AWS application at the identity provider. For example, an Okta application link, a Microsoft Entra My Apps link, or an IAM Identity Center access portal URL. HTTPS only, a single line with no whitespace, 9 to 2048 characters. Sent alone, it replaces the stored URL and turns sign-in ENABLED. It cannot be sent together with status DISABLED in the same request.

    • entityResolutionConfig (dict) –

      The agent context’s entity resolution settings. Populated on every response path that returns the resource.

      • status (string) –

        Specifies whether entity resolution and AWS Glue Data Catalog grounding run. A resource that has never set it reads ENABLED. DISABLED stops new runs. A run already started finishes its current step, and a grounding pass that spans several steps stops at the next one.

    • mcpServerUrl (string) –

      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.

    • trustedIdentitySources (list) –

      Identity sources this agent context trusts in addition to its owner’s account. Absent or empty: only the owner’s account is trusted.

      • (dict) –

        An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: identityStoreArn, identityProviderArn. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • identityStoreArn (string) –

          An IAM Identity Center identity store ARN, for example arn:aws:identitystore::111122223333:identitystore/d-1234567890. IAM Identity Center DescribeInstance returns it as IdentityStoreArn.

        • identityProviderArn (string) –

          An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.

Exceptions