배포된 상담사 관리
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에서는 Agent Engine 관리 런타임에 배포된 에이전트를 관리하는 방법을 설명합니다. 배포된 에이전트는 Vertex AI에서 reasoningEngine
유형의 리소스입니다.
배포된 에이전트 나열
특정 프로젝트 및 위치에 배포된 모든 상담사를 나열합니다.
Python용 Vertex AI SDK
from vertexai import agent_engines
agent_engines.list()
display_name
로 목록을 필터링하는 방법은 다음과 같습니다.
from vertexai import agent_engines
agent_engines.list(filter='display_name="Demo Langchain Agent"')
REST
reasoningEngines.list
메서드를 호출합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_ID
: GCP 프로젝트 ID
LOCATION
: 지원되는 리전
HTTP 메서드 및 URL:
GET https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines" | Select-Object -Expand Content
성공 상태 코드(2xx)와 빈 응답을 받게 됩니다.
배포된 에이전트 가져오기
배포된 각 상담사에는 고유한 RESOURCE_ID
식별자가 있습니다.
자세한 내용은 에이전트 배포를 참고하세요.
Python용 Vertex AI SDK
다음 코드를 사용하면 특정 배포된 에이전트를 가져올 수 있습니다.
from vertexai import agent_engines
remote_agent = agent_engines.get("RESOURCE_ID")
또는 정규화된 리소스 이름을 제공할 수 있습니다.
from vertexai import agent_engines
remote_agent = agent_engines.get(
"projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID"
)
REST
reasoningEngines.get
메서드를 호출합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_ID
: GCP 프로젝트 ID
LOCATION
: 지원되는 리전
RESOURCE_ID
: 배포된 에이전트의 리소스 ID입니다.
HTTP 메서드 및 URL:
GET https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID" | Select-Object -Expand Content
성공 상태 코드(2xx)와 빈 응답을 받게 됩니다.
배포된 에이전트 업데이트
배포된 상담사의 하나 이상의 필드를 동시에 업데이트할 수 있지만 업데이트할 필드 중 하나 이상을 지정해야 합니다. 배포된 상담사를 업데이트하는 데 걸리는 시간은 실행되는 업데이트에 따라 다르지만 일반적으로 몇 초에서 몇 분 정도 걸립니다.
Python용 Vertex AI SDK
배포된 에이전트 (RESOURCE_NAME
에 해당)를 업데이트된 에이전트 (UPDATED_AGENT
에 해당)로 업데이트하려면 다음 단계를 따르세요.
from vertexai import agent_engines
agent_engines.update(
resource_name=RESOURCE_NAME, # Required.
agent_engine=UPDATED_AGENT, # Optional.
requirements=REQUIREMENTS, # Optional.
display_name="DISPLAY_NAME", # Optional.
description="DESCRIPTION", # Optional.
extra_packages=EXTRA_PACKAGES, # Optional.
)
인수는 상담사를 배포할 때와 동일합니다.
자세한 내용은 API 참조를 참고하세요.
REST
reasoningEngines.patch
메서드를 호출하고 update_mask
를 제공하여 업데이트할 필드를 지정합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_ID
: GCP 프로젝트 ID
LOCATION
: 지원되는 리전
RESOURCE_ID
: 배포된 에이전트의 리소스 ID
update_mask
: 업데이트할 필드의 쉼표로 구분된 목록
HTTP 메서드 및 URL:
PATCH https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID?update_mask="display_name,description"
JSON 요청 본문:
{
"displayName": "DISPLAY_NAME",
"description": "DESCRIPTION"
}
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
요청 본문을 request.json
파일에 저장하고 다음 명령어를 실행합니다.
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID?update_mask="display_name,description""
PowerShell(Windows)
요청 본문을 request.json
파일에 저장하고 다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID?update_mask="display_name,description"" | Select-Object -Expand Content
성공 상태 코드(2xx)와 빈 응답을 받게 됩니다.
배포된 에이전트 삭제
Python용 Vertex AI SDK
이미 배포된 에이전트의 기존 인스턴스(remote_agent
)가 있는 경우 다음 명령어를 실행할 수 있습니다.
remote_agent.delete()
또는 다음과 같이 agent_engines.delete()
를 호출하여 RESOURCE_NAME
에 해당하는 배포된 에이전트를 삭제할 수 있습니다.
from vertexai import agent_engines
agent_engines.delete(RESOURCE_NAME)
REST
reasoningEngines.delete
메서드를 호출합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_ID
: GCP 프로젝트 ID
LOCATION
: 지원되는 리전
RESOURCE_ID
: 배포된 에이전트의 리소스 ID입니다.
HTTP 메서드 및 URL:
DELETE https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID
JSON 요청 본문:
{
"displayName": "DISPLAY_NAME",
"description": "DESCRIPTION"
}
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
요청 본문을 request.json
파일에 저장하고 다음 명령어를 실행합니다.
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID"
PowerShell(Windows)
요청 본문을 request.json
파일에 저장하고 다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID" | Select-Object -Expand Content
성공 상태 코드(2xx)와 빈 응답을 받게 됩니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-03-04(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-04(UTC)"],[],[]]