

# Auto-detecting resources in AWS Agent Registry

**Migration Now Open**  
 AWS Agent Registry has launched under the new `agent-registry` namespace. Support for the public preview `bedrock-agentcore` namespace will be discontinued on October 30, 2026. For migration instructions, see [Comprehensive registry migration guide](registry-faq.md).

When you turn on **auto-detection** for a registry, AWS Agent Registry finds the agents, Model Context Protocol (MCP) servers, and gateways that run in your AWS environment, creates a registry record for each one, and keeps the records in sync as the resources change.

You choose which accounts auto-detection covers by setting the registry’s auto-detection **scope**:
+ An **organization-scoped registry** detects supported resources from every member account and the management account of your organization in AWS Organizations. For setup, see [Using AWS Agent Registry with AWS Organizations](registry-organizations.md).
+ An **account-scoped registry** detects supported resources from the account that owns the registry.

For the resource types that auto-detection discovers and the fields each one fills in, see [Supported resource types for auto-detection](registry-auto-detection-resource-types.md).

**Note**  
Auto-detection populates a registry from resources it discovers. You can still create and manage records yourself in the same registry. Auto-detected records have `createdByAutoDetection` set to `true` and a provenance entry that names the source resource. For details, see [Identifying auto-detected records](#registry-auto-detection-identifying).

**How auto-detection works with Amazon EKS**  
When you turn on auto-detection, AWS Agent Registry inspects the Deployments you label as agents or MCP servers in the covered accounts. AWS Agent Registry processes only metadata that describes those Deployment objects, such as cluster, namespace, Deployment name, and the `kubernetes.io/description` annotation, and uses it only to create, update, and remove their registry records. This integration operates within the Amazon EKS zero operator access design. For more information, see [Amazon Elastic Kubernetes Service gets independent affirmation of its zero operator access design](https://aws.amazon.com/blogs/security/amazon-elastic-kubernetes-service-gets-independent-affirmation-of-its-zero-operator-access-design/) on the * AWS Security Blog*. When you turn off auto-detection, AWS Agent Registry unsubscribes and stops receiving this information.

**Topics**
+ [Organization scope and account scope](#registry-auto-detection-scopes)
+ [Turning on auto-detection for your account](#registry-auto-detection-account)
+ [How auto-detected records stay in sync](#registry-auto-detection-sync)
+ [Working with auto-detected records](#registry-auto-detection-working-with-records)
+ [Turning off auto-detection](#registry-auto-detection-turning-off)
+ [Using AWS Agent Registry with AWS Organizations](registry-organizations.md)
+ [Supported resource types for auto-detection](registry-auto-detection-resource-types.md)

## Organization scope and account scope
<a name="registry-auto-detection-scopes"></a>

The following table compares the two scopes.


|  | Organization scope (`ORGANIZATION`) | Account scope (`ACCOUNT`) | 
| --- | --- | --- | 
| Where resources come from | All member accounts of the organization and the management account, in the registry’s Region | The account that owns the registry, in the registry’s Region | 
| Who can create the registry | The management account or a registered delegated administrator. We recommend the delegated administrator. | Any account | 
| Requires AWS Organizations | Yes. Trusted access for AWS Agent Registry must be enabled. | No | 
| Limit per Region | Two limits apply. An account can configure only one organization-scoped registry. To configure another one in the same account, remove the existing registry’s auto-detection configuration; turning auto-detection off isn’t enough. Across the organization, only one organization-scoped registry can have active auto-detection at a time, whichever account owns it. Turning auto-detection off releases that, so another account’s registry can become active. | One account-scoped registry per account. A registry with auto-detection turned off still counts toward this limit. | 
| When an account leaves the organization | Auto-detection removes the account’s records from the registry. | No effect. The registry keeps its records. | 

The two scopes are independent. An account in your organization can also own an account-scoped registry. In that case, a resource in that account gets a record in each registry. Each registry manages its own record.

Auto-detection runs in the registry’s Region only. To detect resources in more Regions, create a registry with auto-detection in each Region.

Within your account, a registry holds its scope for as long as it has an auto-detection configuration, whether auto-detection is on or off. Turning auto-detection off doesn’t release that scope for another registry in the account. To release it, remove the registry’s auto-detection configuration — turn auto-detection off first, because you can’t remove the configuration while `enabled` is `true`. The organization-wide limit behaves differently: turning auto-detection off frees the organization’s active slot, so another account’s organization-scoped registry can become active.

 **Console** 

To see which scope a registry uses:
+  **Registry details page** – The **Registry details** section shows a **Scope** field.
+  **Registries table** – A **Scope** column is available in the table’s preferences. It’s hidden by default.
+  **Property filter** – Filter the registries table by **Auto-detection scope = Organization** or **Auto-detection scope = Account**.

### Configuration rules
<a name="registry-auto-detection-configuration-rules"></a>

The following rules apply to the scope you choose:
+ You set the scope when you first add auto-detection to a registry, either in `CreateRegistry` or in `UpdateRegistry`. You can’t change the scope of an existing auto-detection configuration. In the console, **Scope** on the registry’s edit page is read-only once the registry has an auto-detection configuration.
+ An organization-scoped registry belongs to the organization it was created for. If the owner account moves to another organization, it can’t turn auto-detection back on for that registry.
+ You can’t remove the auto-detection configuration, delete the registry, or delete an auto-detected record while `enabled` is `true`. Turn auto-detection off first.
+ You can’t modify an organization-scoped auto-detection registry to be account-scoped, or an account-scoped registry to be organization-scoped.

### Auto-detection status
<a name="registry-auto-detection-status"></a>

After you turn on auto-detection, the registry’s auto-detection status shows whether auto-detection is running. The status is `ACTIVE` when the conditions for the registry’s scope are met:
+  **Organization scope** – Trusted access for AWS Agent Registry is enabled in the organization, and the management account or a registered delegated administrator owns the registry.
+  **Account scope** – AWS Agent Registry can use its service-linked role in the account that owns the registry.

Otherwise, the status is `INACTIVE`, and the status reason explains why. Turning on auto-detection doesn’t by itself make the status `ACTIVE`. For example, it stays `INACTIVE` until trusted access is enabled for your organization.

## Turning on auto-detection for your account
<a name="registry-auto-detection-account"></a>

To detect the supported resources in your own account, create a registry with an account-scoped auto-detection configuration. AWS Agent Registry creates its service-linked role in your account if it doesn’t exist yet. If you encrypt the registry with a customer managed key, the key policy must allow the service-linked role. For more information, see [Policy statement for the service-linked role](registry-kms-key-policy.md#registry-encryption-key-policy-slr).

<a name="registry-auto-detection-account-console"></a> **To turn on auto-detection for your account (console)** 

Each account can configure one account-scoped registry in each Region. To create that registry, complete the following steps:

1. Open the [AWS Agent Registry console — Registry](https://console.aws.amazon.com/agent-registry/home?region=us-east-1#/registries).

1. Choose **Create registry**.

1. Complete the required fields (**Name**, and optionally **Description**, **Discovery Authorization**, **Record approval**, **KMS key**, and **Tags**).

1. Expand the **Auto-detection** section.

1. Turn on the **Enable auto-detection** toggle. The **Scope** options appear.

1. For **Scope**, select **Account**. The console shows the service access permissions that AWS Agent Registry needs in this account.

1. Choose **Create registry**.

The console preselects a scope for you, and you can change it:
+  **Organization** is preselected when your account can use organization scope.
+  **Account** is preselected when your account belongs to no organization, when your organization membership can’t be verified, or when your account is neither the management account nor a registered delegated administrator.
+  **Organization** is unavailable when your account belongs to no organization.

In every other case, both options stay selectable, and AWS Agent Registry validates your choice when you submit.

To use account scope, make sure no other registry in this account and Region already has an account-scoped auto-detection configuration. If one does, the **Scope** field names that registry and **Create registry** doesn’t submit.

To free the scope, remove the auto-detection configuration from the other registry. Turning auto-detection off on that registry keeps the scope reserved. For more information, see [the scope conflict error](registry-troubleshooting.md#registry-troubleshooting-auto-detection-scope-taken) in [Troubleshooting](registry-troubleshooting.md).

To add auto-detection to a registry that doesn’t have it yet, open the registry and choose **Edit**. Complete steps 4 through 6 of [To turn on auto-detection for your account (console)](#registry-auto-detection-account-console), and then choose **Save changes**. If the registry already has an auto-detection configuration, **Scope** is read-only.

 **To turn on auto-detection for your account (AWS CLI)** 

1. Create a registry with account-scoped auto-detection:

   ```bash
   aws agent-registry-control create-registry \
     --name "my-account-registry" \
     --description "Auto-detected resources in my account" \
     --auto-detection-configuration '{"scope":"ACCOUNT","enabled":true}' \
     --region us-west-2
   ```

   To add auto-detection to an existing registry that has none, update the registry instead:

   ```bash
   aws agent-registry-control update-registry \
     --registry-id <registry-id-or-arn> \
     --auto-detection-configuration '{"optionalValue":{"scope":"ACCOUNT","enabled":true}}' \
     --region us-west-2
   ```

1. Run `get-registry` until the registry’s status is `READY` and its auto-detection status is `ACTIVE`:

   ```bash
   aws agent-registry-control get-registry \
     --registry-id <registry-id-or-arn> \
     --region us-west-2
   ```

Auto-detection then creates records for the supported resources that already exist in your account, and for resources you create afterward.

## How auto-detected records stay in sync
<a name="registry-auto-detection-sync"></a>

When auto-detection becomes active, it creates a record for each supported resource that already exists, and then for each supported resource you create. When a resource changes, auto-detection refreshes the information it took from the resource, such as the record’s provenance. It keeps the values you set yourself, such as `name` and `description`. For the fields each resource type fills in, see [Supported resource types for auto-detection](registry-auto-detection-resource-types.md).

If a resource change alters an approved record’s provenance, the record returns to `DRAFT` for you to approve again. Until you approve it, the content you approved earlier stays discoverable. A change that doesn’t alter the provenance leaves the record’s status unchanged.

Auto-detection also adds and removes records as accounts and resources come and go:


| When | Effect on the registry | 
| --- | --- | 
| A supported resource is deleted | Auto-detection removes its record. | 
| An account joins the organization (organization scope only) | Auto-detection adds records for its supported resources. | 
| An account leaves the organization (organization scope only) | Auto-detection removes all records from that account. | 

## Working with auto-detected records
<a name="registry-auto-detection-working-with-records"></a>

### Identifying auto-detected records
<a name="registry-auto-detection-identifying"></a>

An auto-detected record has `createdByAutoDetection` set to `true`, and a provenance entry with the relation `DETECTED_FROM`. The provenance’s `sourceId` identifies the source resource, and its `sourceType` is the resource type, such as `AWS::BedrockAgentCore::Runtime`. Its `name` is also auto-generated with the prefix `aws-autodetected-`, which you can use to filter for auto-detected records.

 **Console** 

In the console, auto-detected records appear in these places:
+  **Registry records table** – The table includes **Auto-detection** (Yes or No), **Source type**, and **Source ID** columns.
+  **Property filter** – Filter the table by **Auto-detection = Yes** or **Auto-detection = No**.
+  **Record details page** – An auto-detected record has an expandable **Provenance** section with the source fields for its resource type.

### Enriching auto-detected records
<a name="registry-auto-detection-enriching"></a>

You can add your own information to an auto-detected record with `UpdateRegistryRecord`. Auto-detection keeps your values when it refreshes the record.

```bash
aws agent-registry-control update-registry-record \
  --registry-id <registry-id-or-arn> \
  --record-id <record-id> \
  --description '{"optionalValue":"MCP server exposing the order-management API as agent tools"}' \
  --region us-west-2
```

The following table shows which fields you own on an auto-detected record.


| Field | Editable by you | Behavior | 
| --- | --- | --- | 
|  `name`, `description`, `recordVersion`  | Yes | Kept when auto-detection refreshes the record. | 
| Descriptor `data`  | Yes | You can enrich it. | 
|  `recordType`  | Limited | Depends on the resource type. See [Supported resource types for auto-detection](registry-auto-detection-resource-types.md). | 
|  `provenance`  | No | Links the record to its source resource. AWS Agent Registry rejects changes to it. | 

### Deleting auto-detected records
<a name="registry-auto-detection-delete-limitation"></a>

While auto-detection is on, it manages its records, and you can’t delete them. Auto-detection removes a record in these cases:
+ You delete the source resource.
+ The resource no longer meets the detection rules. For example, an Amazon EKS Deployment loses its label.
+ The source account leaves the organization (organization scope only).

To delete an auto-detected record yourself, first turn off auto-detection for the registry. You can then delete the record like any other record.

**Note**  
If you deprecate an auto-detected record (set its status to `DEPRECATED`), auto-detection stops syncing changes from the source resource to that record. Subsequent updates to the source resource are not applied to the deprecated record. Use deprecation when you want to freeze a specific auto-detected record while re-sync continues for the other auto-detected records in the registry.

### Approval
<a name="registry-auto-detection-approval"></a>

Auto-detected records follow the same approval workflow as records you create: a record must be `APPROVED` to be discoverable. If the registry uses auto-approval, records become discoverable without review. Otherwise, a curator approves them. For more information, see [Curating the registry](registry-curating.md).

You can’t submit or approve records detected from Quick agents, so they aren’t discoverable.

If the registry has a record visibility configuration, the configuration also decides which callers discover each approved auto-detected record, as for any other record. On an IAM-authorized registry, a configuration can test the caller’s organization ID to limit discovery to your organization. For an example, see [Allow callers from your organization](registry-record-visibility-examples.md#registry-record-visibility-examples-org).

When auto-detection refreshes a record you had already approved — for example, because the source resource’s provenance changed — the refreshed content is written as a new `DRAFT` and is not discoverable until it is approved. The content you previously approved stays discoverable in the meantime, so discovery is uninterrupted. Approve the refreshed `DRAFT` to publish it — if the registry uses auto-approval, submitting it for approval approves it immediately; otherwise a curator reviews and approves it. A refresh that doesn’t change the provenance leaves the record’s status as it is.

## Turning off auto-detection
<a name="registry-auto-detection-turning-off"></a>

To stop auto-detection, turn it off by setting `enabled` to `false`. Use the scope the registry already has.

```bash
aws agent-registry-control update-registry \
  --registry-id <registry-id-or-arn> \
  --auto-detection-configuration '{"optionalValue":{"scope":"ACCOUNT","enabled":false}}' \
  --region us-west-2
```

The update is asynchronous: the registry moves to `UPDATING` and returns to `READY` when the change takes effect.

To delete a registry that has auto-detection, complete these steps in order:

1. Turn off auto-detection.

1. Delete the registry’s records.

1. Delete the registry.

For organization-level teardown, such as deregistering the delegated administrator, see [Turning off auto-detection for your organization](registry-organizations.md#registry-organizations-turning-off).