CrewAI 프로젝트 가져오기
이 안내에서는 CrewAI 프로젝트의 에이전트 및 태스크 선언(지원 플랜에 관한 고객 질문에 답하는 두 에이전트로 이루어진 크루)을 가져오고, 크루를 Docker Compose용으로 빌드합니다. 가져오기는 빌드가 읽는 모든 파일의 초안을 작성합니다. 두 에이전트와 그 모델, 각 에이전트가 변수 참조로 모델에 제시하는 키, 그리고 각각의 실현입니다. 어떤 선언에도 들어 있지 않은 유일한 값, 즉 크루의 프로그램이 실행되는 이미지는 한 번만 묻습니다. 아래의 모든 파일과 모든 출력 블록은 실제 실행에서 나온 것입니다. 선언과 안내의 각 단계는 import-crewai 예제에 있으며, 그곳의 검사 스크립트가 가져오기를 다시 실행하고, 그것이 쓰는 내용, 출력하는 내용, 이 페이지가 인용하는 블록을 그곳에 보관된 파일과 비교하며, 가져오기가 쓴 것을 검증하고 빌드합니다.
예제 생성하기
이 페이지의 명령으로 이 가져오기를 실행하거나, AI 어시스턴트가 대신 실행하게 할 수 있습니다.
예제 이름을 딴 새 폴더에 예제를 씁니다:
aggrega scaffold --example import-crewai그런 다음 이어서 실행할 명령을 출력합니다. 첫 번째 명령은 새 폴더로 이동합니다. 그 뒤의 명령은 아래와 같으며, 새 폴더 안의 source 폴더로 이동합니다. 이 폴더에는 이 페이지가 가져오는 내용이 들어 있으며, 가져오기는 여기서 실행됩니다:
cd import-crewai
프로젝트
CrewAI 프로젝트는 크루의 동작을 프로그램에 담고, 에이전트와 태스크를 구성 파일에 선언합니다. 이 안내를 위해 작성된 이 프로젝트는 CrewAI의 클래식 레이아웃을 따르며, 가져오기는 src/support_brief/config/ 아래의 두 선언 파일을 읽습니다. 프로그램(클래식 프로젝트의 crew.py와 그것이 정의하는 도구)은 전혀 읽지 않으므로, 예제에는 선언만 들어 있습니다.
agents.yaml은 두 에이전트를 선언하며, 둘 다 OpenAI의 gpt-4o-mini를 사용합니다:
researcher: role: > Support plan researcher goal: > Find what each support plan of the company covers, and what it costs backstory: > You keep the company's support plans at your fingertips and answer from them alone. llm: openai/gpt-4o-mini verbose: true
writer: role: > Support reply writer goal: > Turn the researcher's findings into a short, friendly reply to the customer backstory: > You write replies customers can act on, in plain words. llm: openai/gpt-4o-minitasks.yaml은 각 에이전트에 태스크를 하나씩 할당합니다:
research_task: description: > Find the support plans that answer the customer's question: {question} expected_output: > The plans that apply, each with what it covers and what it costs agent: researcher
reply_task: description: > Write a reply to the customer's question from the researcher's findings expected_output: > A reply of at most five sentences agent: writer프로젝트 루트에 있는 .aggrega-config.yaml이 폴더를 작업 공간으로 만듭니다:
# The workspace key marks this directory as the workspace root, so an import run# here writes its drafts beside src/.workspace: {}# The registry the importer is fetched from the first time an import needs it.default_registry: hub.aggrega.ai가져오기는 카탈로그의 에이전트 및 모델 Components를 참조하고, --target은 카탈로그의 Recipes로부터 Manifest 초안을 작성합니다. 작업 공간이 카탈로그 폴더를 지정하지 않으므로, 가져오기는 임포터를 받아 오는 레지스트리에서 표준 라이브러리 카탈로그를 읽습니다. 이는 게시된 카탈로그의 서명된 스냅샷으로, 첫 번째 가져오기가 받아 와서 검증한 뒤 작업 공간의 콘텐츠 캐시에 보관하며, 가져오기가 초안 옆에 작성하는 기록에 그 다이제스트로 지정됩니다. AGGREGA_CATALOG_DIRS에서 또는 workspace.catalog_dirs 아래에서 자체 카탈로그 폴더를 지정하는 작업 공간은 대신 그 폴더들을 기준으로 가져옵니다.
가져오기가 묻는 항목
선언은 각 에이전트의 모델을 지정할 뿐, crew의 프로그램이 실행되는 이미지는 지정하지 않습니다. 그 이미지는 프로젝트에서 빌드합니다. 그래서 가져오기는 에이전트마다 한 번씩 이미지를 묻습니다. 터미널에서는 에이전트마다 질문을 하고, 답변을 초안과, 가져오는 디렉터리 src/support_brief/ 안의 답변 파일 import-answers.yaml에 기록하므로, 다음 가져오기는 거기서 답변을 읽고 아무것도 묻지 않습니다. 터미널이 없으면(지속적 통합에서나 파이프를 통할 때) 아무것도 묻지 않습니다. 키가 비어 있는 파일을 작성하고, 그 파일을 알려 주며 멈춥니다. 예제에는 이미 이 파일이 있으며, 두 에이전트 모두 같은 이미지 ghcr.io/example/support-brief:1.0.0을 사용합니다. 이 이미지는 직접 빌드하는 이미지를 나타냅니다:
# Values the import could not draft from the source, keyed by the drafted file and the key path inside# it. Write each one beside its key; an import of the same source, and a sync, read them from here and# ask nothing. A secret is never written here: its key asks where the secret comes from — a variable# name, ${NAME}, or the name of a Kubernetes Secret.release.yaml: # Container image running the CrewAI application code. spec.components.researcher.infra.image: "ghcr.io/example/support-brief:1.0.0" # The origin of the secret value, written by the operator in the Release. Read exactly as # values.origin is. Write it here or in values.origin, never in both. A secret: name where it comes # from, never the value. spec.components.researcher.uses.model.gpt-4o-mini.features.credential.infra.origin: "openai-api-key" # Container image running the CrewAI application code. spec.components.writer.infra.image: "ghcr.io/example/support-brief:1.0.0" # The origin of the secret value, written by the operator in the Release. Read exactly as # values.origin is. Write it here or in values.origin, never in both. A secret: name where it comes # from, never the value. spec.components.writer.uses.model.gpt-4o-mini.features.credential.infra.origin: "openai-api-key"두 origin 답변은 --target helm을 사용하는 Kubernetes용 빌드를 위한 것입니다. 거기서 각 에이전트는 Kubernetes Secret에서 OpenAI 키를 읽으며, 답변은 키가 아니라 Secret의 이름 openai-api-key입니다. Docker Compose용 빌드는 대신 셸에서 키를 읽으므로, 이 가져오기는 그 답변들을 사용하지 않습니다. 가져오기 답변 파일은 파일, 질문, 시크릿 답변에 대한 규칙을 설명합니다.
aggrega import에는 다른 곳에 보관된 응답 파일을 지정하는 --answers를 비롯하여 이 명령이 받는 모든 플래그가 나열되어 있습니다.
source로 이동합니다:
cd source가져오기 실행
크루의 디렉터리를 지정합니다. 가져오기는 그 안의 선언만 읽고 다른 것은 읽지 않습니다:
aggrega import src/support_brief --target compose표준 출력에는 작성한 것을 나열합니다:
wrote aggregate.yamlwrote release.yamlwrote manifest.yamlwrote .aggrega-import.json표준 오류에는 다음과 같이 출력합니다. 여기서 <workspace>는 명령을 실행한 폴더를 나타냅니다:
[… omitted: a warning that the importer runs unverified, printed where its module is read from beside its Plugin entity in a catalog folder rather than fetched]read as the crewai format, with drafted paths relative to <workspace>info: the answers file <workspace>/src/support_brief/import-answers.yaml also answers spec.components.researcher.uses.model.gpt-4o-mini.features.credential.infra.origin in release.yaml, spec.components.writer.uses.model.gpt-4o-mini.features.credential.infra.origin in release.yaml, which these drafts do not leave empty; those answers are kept there and not appliedmapped researcher (agent) to core/ai-agent/crewai as a reference, NONEmapped openai/gpt-4o-mini (llm) to core/ai-model/openai as a reference, NONEmapped writer (agent) to core/ai-agent/crewai as a reference, NONEmade no choice for research_task (task)made no choice for reply_task (task)Pull complete: <workspace>/release.lock (entities=8, source_artifacts=0, external_inputs=0)
info줄은 Docker Compose 초안이 사용하지 않고 Kubernetes용 빌드를 위해 답변 파일에 보관된 답변을 알려 줍니다.mapped줄은 각 에이전트가 표준 라이브러리의 CrewAI 에이전트인core/ai-agent/crewai의 인스턴스이고, 두 에이전트가 모두 지정하는 모델openai/gpt-4o-mini가core/ai-model/openai의 인스턴스임을 알려 줍니다. 등급은NONE으로 표시됩니다. CrewAI 가져오기는 각 항목을 카탈로그와 비교하는 대신, 선언이 지정하는 것, 즉 에이전트와 모델 공급자를 기준으로 이 Components를 참조하기 때문입니다.made no choice줄은 태스크가 아무것으로도 초안 작성되지 않음을 알려 줍니다. 태스크는 크루의 프로그램이 실행하는 로직입니다.Pull complete줄은 가져오기가 초안으로 작성된 Release가 의존하는 것을aggrega pull처럼release.lock으로 가져오는 것으로, 초안을 즉시 검증하고 빌드할 수 있게 합니다.--offline에서는 가져오기가 아무것도 가져오지 않고 실행할aggrega pull을 알려 줍니다.
작성하는 내용
Aggregate, Release, Manifest의 이름은 imported/support-brief입니다. 프로젝트의 config/agents.yaml과 config/tasks.yaml은 크루의 이름을 정하지 않습니다. 크루의 이름은 프로그램 안에 있고, 가져오기는 프로그램을 읽지 않기 때문입니다. 따라서 이 파일들을 디렉터리로 가져오면 디렉터리 이름 support_brief를 이름 세그먼트 형태로 쓴 것이 이름이 됩니다. 네임스페이스는 임포터의 target_namespace 설정이 정하며, 다른 값을 설정하지 않으면 imported입니다(설정).
aggregate.yaml — 에이전트마다 인스턴스 하나(각각 지정한 모델에 연결되며, 제시하는 키가 연결에 선언됨)와 그 모델이 있으며, 무엇을 읽었고 무엇을 읽지 않았는지 알려 주는 주석으로 시작합니다:
# CrewAI declarations read:# - config/agents.yaml# - config/tasks.yaml# Not read: the crew's program, which runs its agents and its tasks and defines its tools; it runs in the image the Release names for each agent.# Tasks the crew's program runs, drafted as no Component:# - research_task, assigned to researcher# - reply_task, assigned to writerapiVersion: aggrega.ai/v1beta1kind: Aggregatemetadata: name: imported/support-brief version: 0.1.0 description: Draft Aggregate imported from a source in the crewai format.spec: components: researcher: type: core/ai-agent/crewai values: role: "Support plan researcher\u000A" goal: "Find what each support plan of the company covers, and what it costs\u000A" backstory: "You keep the company's support plans at your fingertips and answer from them alone.\u000A" allow_delegation: false log_level: DEBUG uses: model: gpt-4o-mini: target: gpt-4o-mini # For the compose target, the lines below declare credential on gpt-4o-mini: a secret the Release alone attaches arrives under the key value, so each is declared with a key of its own and no two arrive under one; the Release attaches its origin, naming this type or none. features: credential: type: core/secret-value values: key: OPENAI_API_KEY writer: type: core/ai-agent/crewai values: role: "Support reply writer\u000A" goal: "Turn the researcher's findings into a short, friendly reply to the customer\u000A" backstory: "You write replies customers can act on, in plain words.\u000A" allow_delegation: false log_level: INFO uses: model: gpt-4o-mini: target: gpt-4o-mini # For the compose target, the lines below declare credential on gpt-4o-mini: a secret the Release alone attaches arrives under the key value, so each is declared with a key of its own and no two arrive under one; the Release attaches its origin, naming this type or none. features: credential: type: core/secret-value values: key: OPENAI_API_KEY # The model openai/gpt-4o-mini. gpt-4o-mini: type: core/ai-model/openai values: model: "gpt-4o-mini"role, goal, backstory는 각 접힌 블록 끝의 줄 바꿈까지 포함해 선언된 그대로 옮겨집니다. log_level은 verbose를 선언한 리서처에서는 DEBUG이고, 선언하지 않은 작성자에서는 INFO입니다. allow_delegation을 선언하지 않은 에이전트는 false로 초안이 작성됩니다. 모델은 호스팅 서비스이므로, 에이전트의 Component는 자격 증명을 담지 않은 모델 연결을 거부합니다. 각 연결은 키 OPENAI_API_KEY 아래에 자격 증명을 하나 선언합니다.
release.yaml — 환경, 각 에이전트의 이미지와 게시된 포트, 각 키의 출처:
apiVersion: aggrega.ai/v1beta1kind: Releasemetadata: name: imported/support-brief # environment is a drafted default, since no source names the environment this Release deploys to; change it to name the one it deploys to. environment: development version: 0.1.0 description: Draft Release imported from a source in the crewai format.spec: aggregate: imported/support-brief manifest: imported/support-brief components: researcher: infra: # Left for the Release, since the source cannot supply it: infra.image, the container image running the crew's program image: "ghcr.io/example/support-brief:1.0.0" # Published on this machine's loopback address, 127.0.0.1: reachable from this machine only, by any process running on it. Delete this line to keep the service internal. published_port: 8000 uses: model: gpt-4o-mini: features: credential: type: core/secret-value infra: # Attached by reference, never as a value: the credential researcher presents to gpt-4o-mini on its model connection (the source names no variable for it, so it is read from the one OpenAI's client libraries read the API key from), read from the variable OPENAI_API_KEY, which a target substituting variable references, as Docker Compose does when the stack starts, reads from the environment, so no file carries the value. origin: "${OPENAI_API_KEY}" writer: infra: # Left for the Release, since the source cannot supply it: infra.image, the container image running the crew's program image: "ghcr.io/example/support-brief:1.0.0" # Published on this machine's loopback address, 127.0.0.1: reachable from this machine only, by any process running on it. Delete this line to keep the service internal. published_port: 8001 uses: model: gpt-4o-mini: features: credential: type: core/secret-value infra: # Attached by reference, never as a value: the credential writer presents to gpt-4o-mini on its model connection (the source names no variable for it, so it is read from the one OpenAI's client libraries read the API key from), read from the variable OPENAI_API_KEY, which a target substituting variable references, as Docker Compose does when the stack starts, reads from the environment, so no file carries the value. origin: "${OPENAI_API_KEY}" gpt-4o-mini: {}환경 development는 어떤 선언도 환경을 지정하지 않기 때문에 가져오기가 기록하는 기본값입니다. Release를 다른 곳에 배포할 때는 변경하십시오. 각 이미지는 가져오기가 import-answers.yaml에서 읽은 답변입니다. 각 에이전트는 머신의 루프백 주소에 게시되며, 프로그램이 수신 대기하는 포트인 infra.port(설정하지 않으면 8000)로 전달됩니다. 리서처는 8000, 라이터는 8001에 게시되는데, 한 Release의 두 서비스가 같은 포트를 게시할 수 없기 때문입니다. 선언이 키에 대한 변수를 지정하지 않으므로, 각 연결은 OpenAI 클라이언트 라이브러리가 읽는 변수인 ${OPENAI_API_KEY}에서 키를 값이 아닌 변수 참조로 읽습니다.
manifest.yaml — 각 유형의 Compose Recipe와, 키의 변수 참조를 작성된 그대로 Compose 파일에 기록하는 실현:
apiVersion: aggrega.ai/v1beta1kind: Manifestmetadata: name: imported/support-brief version: 0.1.0spec: mappings: components: type: core/ai-agent/crewai: compose/crewai core/ai-model/openai: compose/openai features: type: core/secret-value: compose/dotenv-secretrelease.lock은 Release가 해석된 카탈로그 엔터티를 다이제스트로 기록하며, .aggrega-import.json은 가져오기가 작성한 내용의 기록으로, 이후의 aggrega import --sync가 이를 읽습니다.
검증 및 빌드
aggrega validate --release release.yamlaggrega build --release release.yaml

검증 결과는 다음과 같습니다:
notice: LINT: Feature "core/secret-value" at core/secret-value:1.0.0 declares property "origin" in both values: and infra: pillars (path: origin)release dependency validation passed: release.yaml (schema-pillar + dependency pillars)그리고 빌드는 다음과 같습니다. 여기서 <workspace>는 실행한 폴더를 나타냅니다:
notice: LINT: Feature "core/secret-value" at core/secret-value:1.0.0 declares property "origin" in both values: and infra: pillars (path: origin)[… omitted: a total build time, which differs per run]Build completed: 1 file written to <workspace>/distnotice 줄은 권고 사항입니다. 시크릿 Feature는 origin을 Aggregate의 values 또는 Release의 infra에서 받으며, 이 알림은 한 리프가 양쪽에 모두 선언되어 있음을 보고합니다. 어떤 판정도 바꾸지 않습니다.
dist/compose/docker-compose.yaml에 있는 리서처의 서비스입니다. 라이터의 서비스는 이름, 자체 변수가 담는 값, 게시하는 포트만 다릅니다:
services: researcher: image: ghcr.io/example/support-brief:1.0.0 environment: OPENAI_BASE_URL: https://api.openai.com/v1 MODEL: gpt-4o-mini CREWAI_ALLOW_DELEGATION: "false" CREWAI_BACKSTORY: | You keep the company's support plans at your fingertips and answer from them alone. CREWAI_GOAL: | Find what each support plan of the company covers, and what it costs CREWAI_LOG_LEVEL: DEBUG CREWAI_ROLE: | Support plan researcher OPENAI_API_KEY: ${OPENAI_API_KEY} ports: - 127.0.0.1:8000:8000 [… omitted: the labels the build writes on every service, naming the Aggregate, the component, the environment and the compiler's version] networks: - compose에이전트는 모델의 주소와 이름을 CrewAI가 읽는 변수인 OPENAI_BASE_URL과 MODEL로 받고, 키는 OPENAI_API_KEY로 받습니다. 역할, 목표, 배경 이야기, 위임 스위치, 로그 수준은 크루의 프로그램이 읽을 수 있도록 CrewAI Component가 기본으로 부여하는 이름으로 전달됩니다. 컴포넌트 자체에 있는 inject: 블록은 그중 어느 것이든 프로그램이 읽는 이름으로 대신 전달합니다. 가져오기가 작성한 각 값은 선언이 끝날 때의 줄 바꿈을 유지하므로, 파일은 이를 블록으로 씁니다. 모델에는 자체 서비스가 없습니다. 에이전트는 OpenAI API 자체의 주소로 접근합니다. 키는 변수 참조이며, 스택이 시작될 때 셸에서 채워집니다. 각 서비스는 포트를 127.0.0.1에만 게시합니다. 리서처는 8000, 라이터는 8001이며, 각각 컨테이너 안에 있는 프로그램의 포트 8000으로 전달됩니다.
AI 어시스턴트 사용
Aggrega의 도구로 설정된 AI 어시스턴트도 같은 일을 할 수 있습니다. 다음 프롬프트를 붙여 넣으십시오.
Aggrega 도구만 사용하고 폴더는 직접 만들지 마십시오. Workspace 폴더에 아직 `import-crewai` 폴더가 없으면 `example`을 `import-crewai`로 설정하고 `dir` 없이 `scaffold` 도구를 한 번 호출하십시오. 이 도구는 예제를 새 `import-crewai` 폴더에 작성하며, 그 `source` 폴더에 이 페이지가 가져오는 내용이 들어 있습니다. 그런 다음 `workspace_root`를 `import-crewai/source`로, `source`를 `src/support_brief`로, `target`을 `compose`로 설정하여 `import` 도구를 호출하십시오. 이 도구는 필요한 답변을 `src/support_brief` 폴더 안의 `import-answers.yaml`에서 읽고, 초안을 `import-crewai/source`에 작성하며, 초안에 필요한 것을 가져옵니다. 그런 다음 `workspace_root`를 `import-crewai/source`로, `release`를 `release.yaml`로 설정하여 `validate` 도구를 호출하고, `workspace_root`를 `import-crewai/source`로, `release`를 `release.yaml`로, `write`를 true로 설정하여 `build` 도구를 호출하십시오. 빌드가 작성한 파일이 무엇인지 알려 주십시오. 파일은 `import-crewai/source/dist/` 아래에 있습니다.VS Code에서 열기
Visual Studio Code용 Aggrega 확장을 설치한 상태에서, 가져오기가 초안을 작성한 폴더 import-crewai/source를 VS Code에서 엽니다. 이 폴더에는 Release가 하나, 즉 초안 release.yaml만 있으므로 편집기가 이를 자동으로 선택하고, 초안을 편집하는 동안 그 Release에 대해 검사하여 발견한 내용을 파일과 문제 패널에 표시합니다. 명령 팔레트의 Aggrega: Show topology graph는 Release의 구성 요소와 그 사이의 연결을 그립니다. Aggrega: Build, Aggrega: Preview build, Aggrega: Pull은 같은 Release에 대해 작동하며, 각각은 작업 표시줄에 있는 Aggrega 뷰의 Commands 패널 버튼이기도 합니다. Build는 파일을 폴더의 dist/에 작성합니다. 나머지는 Visual Studio Code에서 Aggrega 사용하기에서 다룹니다.
실행하기
이미지는 자체 Dockerfile을 사용해 프로젝트에서 직접 빌드합니다. Recipe가 명령을 설정하지 않으므로 Docker Compose는 이미지 자체의 명령을 각 에이전트의 서비스로 실행합니다. 따라서 이 명령은 계속 실행되어야 하며, crew에 접근하려면 요청도 처리해야 합니다. 주소, 경로, 응답은 프로그램이 결정합니다.
아래 실행에서는 이러한 이미지를 사용했습니다. CrewAI의 클래식 레이아웃으로 된 crew 프로그램(가져오기가 읽은 그대로의 두 선언 파일에서 crew를 구성하는 crew.py)과, 이미지의 명령으로서 포트 8000에서 동작하는 프로그램 자체의 작은 HTTP 서버로, 이 서버는 POST /kickoff마다 crew를 한 번 실행합니다. 프로젝트 루트에서 이미지를 빌드하고, src/support_brief/import-answers.yaml의 두 에이전트에 대해 ghcr.io/example/support-brief:1.0.0 대신 그 이미지 이름을 쓴 뒤, --sync로 다시 가져옵니다. 이 옵션은 새 답변을 초안에 쓰고 다시 풀합니다. 그런 다음 빌드합니다:
docker build -t support-brief:local .aggrega import src/support_brief --syncaggrega build --release release.yaml두 답변을 모두 support-brief:local로 하면, 동기화는 출력하는 줄 가운데에서 자신이 변경한 두 값을 알려 줍니다:
changed spec.components.researcher.infra.image in release.yamlchanged spec.components.writer.infra.image in release.yaml그런 다음 셸에서 키를 설정하고 스택을 시작합니다:
export OPENAI_API_KEY='your OpenAI key'docker compose -p support-brief -f dist/compose/docker-compose.yaml up -d --wait-p는 프로젝트의 이름을 지정합니다. 자세한 내용은 가져오기 실행 방식의 실행 단계에서 설명합니다.
테스트하기
아래 요청은 이 안내의 이미지가 실행하는 프로그램에 도달합니다. 포트 8000의 작은 HTTP 서버 뒤에 있는 crew로, POST /kickoff에 응답합니다. 직접 만든 프로그램이라면 경로와 응답을 그 프로그램이 스스로 정합니다. 프로그램이 수신 대기를 시작한 뒤, 즉 스택이 시작되고 몇 초 뒤에 published_port가 게시하는 주소인 http://127.0.0.1:8000의 리서처에게 보냅니다:
curl -sS -X POST http://127.0.0.1:8000/kickoff -H 'Content-Type: application/json' \ -d '{"question": "Which support plan covers a weekend outage, and what does it cost?"}'{ "error": "the crew failed: AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-place************-key. [… omitted: where to find an API key, and the error's type and code]"}이 실행은 OPENAI_API_KEY를 자리 표시자 값으로 설정했으므로, 응답은 그 값에 대한 OpenAI의 거부이며 프로그램이 그대로 전달한 것입니다. crew의 요청은 빌드가 전달한 키를 가지고 OpenAI API에 도달했습니다. 두 에이전트가 같은 이미지를 실행하므로 요청은 어느 쪽으로든 보낼 수 있었습니다. 라이터도 http://127.0.0.1:8001에서 같은 방식으로 응답합니다.
다음 명령으로 스택을 중지합니다:
docker compose -p support-brief -f dist/compose/docker-compose.yaml downKubernetes에서는 --target helm으로 가져오고, 클러스터가 이미지를 가져올 수 있는 레지스트리로 이미지를 푸시한 뒤 그 이름을 src/support_brief/import-answers.yaml에 적습니다. 그런 다음 가져오기 실행 방식의 실행 단계에서 설명하는 대로 Secret openai-api-key를 만들고 빌드를 적용합니다. 각 에이전트의 Deployment에는 Service가 없으므로, 로컬 포트를 researcher의 포트로 포워딩합니다. 이 명령은 중지할 때까지 실행됩니다:
kubectl port-forward deploy/researcher 8000:8000Forwarding from 127.0.0.1:8000 -> 8000Forwarding from [::1]:8000 -> 8000다른 터미널에서 포워딩된 포트로 같은 요청을 보냅니다.
curl -sS -X POST http://127.0.0.1:8000/kickoff -H 'Content-Type: application/json' \ -d '{"question": "Which support plan covers a weekend outage, and what does it cost?"}'{ "error": "the crew failed: AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-place************-key. [… omitted: where to find an API key, and the error's type and code]"}