

# 에이전트 흐름 구축
<a name="speech-agentic"></a>

**참고**  
이 설명서는 Amazon Nova 버전 1용입니다. Amazon Nova 2 Sonic 가이드는 [도구 구성](https://docs.aws.amazon.com/nova/latest/nova2-userguide/sonic-tool-configuration.html)을 참조하세요.

더 복잡한 사용 사례의 경우 태스크를 완료하기 위해 함께 작동하는 여러 도구를 구성하여 에이전트 흐름을 구현할 수 있습니다. Amazon Nova Sonic은 사용자 요청에 따라 이러한 도구를 오케스트레이션할 수 있습니다.

## 지식 기반 구현 개요
<a name="speech-agentic-example"></a>

**호텔 예약 취소 에이전트 예**  
다음은 호텔 예약 취소 시스템의 구성 예제입니다.

```
toolConfiguration: {
    tools: [
      {
        toolSpec: {
          name: "getReservation",
          description: "Retrieves hotel reservation information based on the guest's name and check-in date",
          inputSchema: {
            json: JSON.stringify({
              type: "object",
              properties: {
                name: {
                  type: "string",
                  description: "Full name of the guest who made the reservation"
                },
                checkInDate: {
                  type: "string",
                  description: "The check-in date for the reservation in YYYY-MM-DD format"
                }
              },
              required: ["name", "checkInDate"]
            })
          }
        }
      },
      {
        toolSpec: {
          name: "cancelReservation",
          description: "Cancels a hotel reservation after confirming the cancellation policy with the guest",
          inputSchema: {
            json: JSON.stringify({
              type: "object",
              properties: {
                reservationId: {
                  type: "string",
                  description: "The unique identifier for the reservation to be cancelled"
                },
                confirmCancellation: {
                  type: "boolean",
                  description: "Confirmation from the guest that they understand the cancellation policy and want to proceed",
                  default: false
                }
              },
              required: ["reservationId", "confirmCancellation"]
            })
          }
        }
      }
    ]
  }
```

**호텔 검색 에이전트 예**  
다음은 호텔 검색 에이전트의 구성 예제입니다.

```
toolSpec: {
    name: "searchHotels",
    description: "Search for hotels by location, star rating, amenities and price range.",
    inputSchema: {
        json: JSON.stringify({
            type: "object",
            properties: {
                location: {
                    type: "string",
                    description: "City or area to search for hotels"
                },
                rating: {
                    type: "number",
                    minimum: 1,
                    maximum: 5,
                    description: "Minimum star rating (1-5)"
                },
                amenities: {
                    type: "array",
                    items: {
                        type: "string"
                    },
                    description: "List of desired amenities"
                },
                price_range: {
                    type: "object",
                    properties: {
                        min: {
                            type: "number",
                            minimum: 0
                        },
                        max: {
                            type: "number",
                            minimum: 0
                        }
                    },
                    description: "Price range per night"
                }
            },
            required: []
        })
    }
}
```