AI로 환불 요청 답변 초안 작성, 전송은 하지 않음

에이전트가 환불 요청을 정책에 비추어 확인하고 사람이 승인할 답변 초안을 작성합니다. 환불을 직접 처리할 수는 없습니다.

  • 파일
  • 읽기 전용 연결
  • 콜백
  • 예산 상한

실제 실행 보기

2026년 10월 7일에 기록된 실제 실행을 다시 재생합니다. 모델: openai/gpt-6-luna.

입력
{
  "ticket_id": "tkt_1001",
  "today": "2026-10-06"
}
성공run_3602104e2ab91b251b1b9eac8516ac97$0.03 중 $0.002782
  1. 대기 중예산 $0.03 예약됨
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell off · web off
  4. 파일read refund-policy.md
  5. 연결helpdesk GET /tickets/tkt_1001
  6. 결과helpdesk GET → 200
  7. MicroVMmicroVM destroyed
  8. 성공모델 호출 3회, 토큰 4,442개기록된 출력 (영어)

    Decision: Eligible

    Reason: Policy clause 1 allows a full refund within 14 days for an annual plan if no project was created and no API call was made. The ticket shows purchase on 2026-09-28, zero projects, and zero API calls; the request is dated 2026-10-06, within 14 days.

    Draft reply: Hi Maria, your annual plan meets the refund criteria. The billing team will process the refund to your original payment method. Best, Support

  9. 워커 폐기됨$0.002782 청구, $0.027218 반환
모델 $0.000382 · 웹 $0.00 · 컴퓨팅 $0.0024

직접 실행하기

요청이 모두 채워진 상태로 플레이그라운드에서 샘플을 엽니다. 내 계정에서 표시된 예산 안에서, 같은 읽기 전용 샘플 시스템을 대상으로 실행됩니다.

이 샘플의 예산: $0.03

작동 방식

정책은 파일이고 티켓은 읽기 전용 헬프데스크 연결에서 가져옵니다. 에이전트는 요청이 환불 대상인지 판단하고, 근거로 삼은 조항을 인용하여 초안을 씁니다. 승인은 사람이 하고 나머지는 결제 시스템이 처리합니다.

에이전트가 할 수 있는 일과 할 수 없는 일

권한은 요청의 일부입니다. 여기에 나열되지 않은 것은 실행에서 사용할 수 없습니다.

설정허용 범위
연결
helpdesk: ephemer.al/api/samples/support-api에서 GET만 허용
웹꺼짐
셸꺼짐
파일refund-policy.md (읽기 전용)
데이터 무보존꺼짐: 기록이 30일간 보관됩니다
예산$0.03, 하드 캡
시간 제한60초

자격 증명은 머신 안으로 들어가지 않습니다. 브로커가 각 호출에 자격 증명을 추가하고 위의 메서드를 강제합니다.

코드

샘플이 보내는 정확한 요청입니다. EPHEMERAL_API_KEY를 내 조직의 멤버 키로 설정하세요.

curl -X POST $EPHEMERAL_URL/v1/runs \
  -H "Authorization: Bearer $EPHEMERAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d @request.json

요청에 포함된 파일

인라인으로 전달되므로 먼저 업로드할 필요가 없습니다. 에이전트는 각각을 읽기 전용 파일로 봅니다.

refund-policy.md
refund-policy.md
# Refund policy

1. Annual plans may be refunded in full within 14 days of purchase if no project has been created and no API call has been made.
2. After 14 days, or after any use, annual plans are refunded pro rata for the unused full months only, at our discretion.
3. Monthly plans are not refunded for the current month; cancelling stops the next charge.
4. A refund is issued by the billing team only, to the original payment method. Never promise a date.
5. Always be polite, concise and plain. Do not offer discounts.
전체 요청 본문 request.json

파일이 인라인으로 포함된 같은 본문입니다.

request.json
{
  "prompt": "Handle the refund request in the helpdesk ticket input.ticket_id (GET /tickets/{id}); today's date is input.today. Apply refund-policy.md. Reply in Markdown with: Decision (eligible, not eligible or needs a human, one line), Reason (cite the policy clause number and the ticket facts you used), and Draft reply (under 90 words, in the customer's language). The draft is for a human to review: never say a refund has been issued, only that the billing team will process it if the decision is eligible. Use only what the data returns and never guess; if a call fails or a field is missing, say so.",
  "input": {
    "ticket_id": "tkt_1001",
    "today": "2026-10-06"
  },
  "files": [
    {
      "path": "refund-policy.md",
      "content": "# Refund policy\n\n1. Annual plans may be refunded in full within 14 days of purchase if no project has been created and no API call has been made.\n2. After 14 days, or after any use, annual plans are refunded pro rata for the unused full months only, at our discretion.\n3. Monthly plans are not refunded for the current month; cancelling stops the next charge.\n4. A refund is issued by the billing team only, to the original payment method. Never promise a date.\n5. Always be polite, concise and plain. Do not offer discounts.\n"
    }
  ],
  "connections": {
    "helpdesk": {
      "type": "http",
      "url": "https://ephemer.al/api/samples/support-api",
      "auth": {
        "type": "bearer",
        "token": "sample_read_key"
      },
      "allowed_methods": [
        "GET"
      ],
      "instructions": "A helpdesk. GET /tickets lists tickets (id, subject, status, language). GET /tickets/{id} returns one ticket with customer, context (order or invoice facts) and the full message thread. Amounts are in cents."
    }
  },
  "shell": false,
  "timeout_seconds": 60,
  "max_cost_micros": 30000
}

더 알아보기

관련 샘플

esc

“”와(과) 일치하는 항목이 없습니다.