

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 에이전트 정보 확인
<a name="agents-view"></a>

에이전트를 만든 후에는 필요에 따라 에이전트의 구성을 확인하거나 업데이트할 수 있습니다. 이러한 구성은 규격 초안에 적용됩니다. 에이전트가 더 이상 필요하지 않으면 삭제할 수 있습니다.

에이전트에 대한 정보를 확인하는 방법을 알아보려면 원하는 방법의 탭을 선택한 후 다음 단계를 따릅니다.

------
#### [ Console ]

**에이전트 정보를 확인하는 방법**

1. Amazon Bedrock 콘솔을 사용할 권한이 있는 IAM 자격 증명으로 AWS Management Console에 로그인합니다. 그 다음 [https://console.aws.amazon.com/bedrock](https://console.aws.amazon.com/bedrock)에서 Amazon Bedrock 콘솔을 엽니다.

1. 왼쪽 탐색 창에서 **에이전트**를 선택합니다. **에이전트** 섹션에서 에이전트를 선택합니다.

1. 에이전트 세부 정보 페이지에서 에이전트의 모든 버전, 연결된 태그, 해당 버전 및 별칭에 적용되는 구성을 확인할 수 있습니다.

1. 에이전트의 규격 초안에 대한 세부 정보를 보려면 **에이전트 빌더에서 편집**을 선택합니다.

------
#### [ API ]

에이전트에 대한 정보를 가져오려면 [Amazon Bedrock Agents 빌드 타임 엔드포인트](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt)를 사용하여 [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetAgent.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetAgent.html) 요청을 보내고 `agentId`를 지정합니다.

```
    def get_agent(self, agent_id, log_error=True):
        """
        Gets information about an agent.

        :param agent_id: The unique identifier of the agent.
        :param log_error: Whether to log any errors that occur when getting the agent.
                          If True, errors will be logged to the logger. If False, errors
                          will still be raised, but not logged.
        :return: The information about the requested agent.
        """

        try:
            response = self.client.get_agent(agentId=agent_id)
            agent = response["agent"]
        except ClientError as e:
            if log_error:
                logger.error(f"Couldn't get agent {agent_id}. {e}")
            raise
        else:
            return agent
```

자세한 내용은 [Amazon Bedrock Agents 시작](bedrock-agent_example_bedrock-agent_Hello_section.md) 섹션을 참조하세요.

에이전트 정보를 나열하려면 [Amazon Bedrock Agents 빌드 타임 엔드포인트](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt)를 사용하여 [ListAgents](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_ListAgents.html) 요청을 전송합니다. [코드 예시 보기](https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-agent_example_bedrock-agent_ListAgents_section.html) 필요한 경우 다음 파라미터를 지정할 수도 있습니다.


****  

| 필드 | 간단한 설명 | 
| --- | --- | 
| maxResults | 응답으로 반환할 최대 결과 수입니다. | 
| nextToken | maxResults 필드에 지정한 수보다 많은 결과가 있는 경우 응답은 nextToken 값을 반환합니다. 다음 결과 배치를 보려면 다른 요청에서 nextToken 값을 보냅니다. | 

에이전트의 모든 태그를 나열하려면 [Amazon Bedrock Agents 빌드 타임 엔드포인트](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt)를 사용하여 [ListTagsForResource](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_ListTagsForResource.html) 요청을 보내고 에이전트의 Amazon 리소스 이름(ARN)을 포함합니다.

```
    def list_agents(self):
        """
        List the available Amazon Bedrock Agents.

        :return: The list of available bedrock agents.
        """

        try:
            all_agents = []

            paginator = self.client.get_paginator("list_agents")
            for page in paginator.paginate(PaginationConfig={"PageSize": 10}):
                all_agents.extend(page["agentSummaries"])

        except ClientError as e:
            logger.error(f"Couldn't list agents. {e}")
            raise
        else:
            return all_agents
```

자세한 내용은 [Amazon Bedrock Agents 시작](bedrock-agent_example_bedrock-agent_Hello_section.md) 섹션을 참조하세요.

------