For Korean SaaS and e-commerce companies, customer support automation is one of the fastest ways to adopt AI. Handling everything with people costs tens of millions of won per month, but automating classification and response drafts with Claude can cut costs by more than 90%. This article shares production-ready code and costs.
Architecture
- Classify incoming tickets with Claude Haiku 4.5 (the cheapest option)
- Search for similar past cases (vector DB)
- Generate response drafts with Claude Sonnet 4.6
- An agent reviews and sends them (or auto-sends low-priority replies)
Step 1: Classification — Claude Haiku 4.5
Haiku 4.5 is very inexpensive for simple tasks such as classification. At Kunavo prices: input $0.40/1M, output $2.00/1M. A 200-character Korean ticket plus a 50-token JSON output costs about $0.00004 (KRW 0.06) per ticket.
import json
from openai import OpenAI
client = OpenAI(
api_key="sk-kn-...",
base_url="https://api.kunavo.com/v1",
)
# Claude는 json_schema로 지정한 response_format만 지킵니다 (json_object는 보장 안 됨).
TICKET = {
"type": "object",
"properties": {
"category": {"type": "string", "enum": ["결제", "배송", "반품", "기술", "기타"]},
"priority": {"type": "string", "enum": ["긴급", "보통", "낮음"]},
"summary": {"type": "string"},
},
"required": ["category", "priority", "summary"],
"additionalProperties": False,
}
def classify_ticket(text: str) -> dict:
"""들어온 고객 문의를 카테고리 + 우선순위로 분류."""
resp = client.chat.completions.create(
model="claude-haiku-4-5", # 가장 저렴, 분류엔 충분
messages=[
{
"role": "system",
"content": (
"당신은 한국어 고객 문의 분류기입니다. "
"다음 JSON 형식으로만 응답하세요: "
'{"category": "결제|배송|반품|기술|기타", '
'"priority": "긴급|보통|낮음", '
'"summary": "한 문장 요약"}'
),
},
{"role": "user", "content": text},
],
response_format={"type": "json_schema",
"json_schema": {"name": "ticket", "schema": TICKET}},
max_tokens=200,
)
return json.loads(resp.choices[0].message.content)Step 2: Search for similar cases
Store successful past responses as embeddings in pgvector, then search for the top 5 by cosine similarity to the new ticket’s embedding. Kunavo does not provide embeddings, so this step alone calls OpenAI directly and is billed directly by OpenAI —— check OpenAI’s pricing page for the rate. Use Kunavo for the generation step only.
Step 3: Generate response drafts — Claude Sonnet 4.6 + prompt caching
def generate_reply(ticket: dict, context: list[str]) -> str:
"""과거 유사 사례 5건을 참조해 응답 초안 생성."""
references = "\n\n".join(context)
resp = client.chat.completions.create(
model="claude-sonnet-4-6", # 응답 품질은 Sonnet
messages=[
{
"role": "system",
"content": [
{
"type": "text",
"text": COMPANY_GUIDELINES, # 회사 톤 & 정책
"cache_control": {"type": "ephemeral"},
},
],
},
{
"role": "user",
"content": (
f"## 고객 문의\n{ticket['original_text']}\n\n"
f"## 분류\n{ticket['category']} / {ticket['priority']}\n\n"
f"## 참고할 과거 응답 (5건)\n{references}\n\n"
"## 작성 지침\n"
"1. 정중한 격식체 (~습니다)\n"
"2. 3문단 이내\n"
"3. 다음 단계가 무엇인지 명확히 안내\n"
),
},
],
max_tokens=600,
)
return resp.choices[0].message.contentSince the company guidelines (3,000 tokens) are the same every time, cache them with cache_control. From the second call onward, that portion is charged at only 10% of the input price.
Estimated cost per ticket (with caching):
- Classification (Haiku 4.5): $0.00006
- Search embedding: $0.0000025
- Response generation (Sonnet 4.6, cache hit): about 1K input tokens + 500 output tokens = $0.0042
- Total: about $0.004 (about KRW 6)
Monthly cost examples
- 100 tickets/day: $13/month (about KRW 18,000)
- 1,000 tickets/day: $130/month (about KRW 180,000)
- 10,000 tickets/day: $1,300/month (about KRW 1,800,000)
Comparison: one support agent costs about KRW 2.5 million/month and can handle up to 100 tickets/day. Handling 1,000 tickets/day requires 10 agents, or KRW 25 million/month. AI automation costs more than 100 times less.
Considerations specific to Korea
- Consistent honorifics: Repeatedly specify “polite formal style (~습니다)” in the system prompt. Before changing it, sample 100 responses and assess them as an interviewer would
- Korean token usage: Korean uses 1.5-2 times as many tokens as English. The cost estimates above are based on Korean
- Compliance with the Personal Information Protection Act: Never include customer PII (name, phone number, address) in the system prompt. Mask it before sending it to the LLM
- Payment methods: international cards, Apple Pay, Google Pay, and, when checkout is displayed in KRW, KakaoPay, Naver Pay, PAYCO, Samsung Pay, and domestic cards can be used to top up your Kunavo balance (Toss is not supported). No tax invoices or invoices are issued — the only usable proof is the payment record on the card or mobile-payment statement and the top-up and usage records at /app/billing.
Implementation checklist
- Have an agent review the first 100 tickets in full → automate gradually after confirming 90%+ accuracy
- Always have a person review urgent categories (errors are costly)
- Add misclassified cases to the guidelines each week (iterative learning)
- Track monthly usage at /app/usage and set daily caps at /app/keys (to prevent accidental spikes)
To get started, sign up for free and top up from $10 to pay as you go. Check per-model rates and payment methods in Claude API Pricing and Payments Overview and the pricing page, and see OpenRouter Alternatives Comparison for a comparison with OpenRouter. Full documentation: /docs/quickstart; prompt caching guide: prompt caching deep dive.