Complete Worked Example: Customer Support Workflow
Build a customer support agent from scratch, query it, and combine it with a triage agent into a team. Every YAML block here is validated against the Ark CRD schemas in CI.
Prerequisites
- Ark installed (see the Quickstart)
kubectlpointing at the cluster- A model named
default—ark models create defaultif missing jqfor the pretty-print steps
kubectl get pods -n ark-system
kubectl get modelsStep 1: Working Directory
mkdir -p customer-support-bot/{agents,queries,teams}
cd customer-support-botStep 2: Support Agent
cat > agents/support-agent.yaml <<'EOF'
apiVersion: ark.mckinsey.com/v1alpha1
kind: Agent
metadata:
name: support-agent
spec:
description: Handles customer support inquiries
modelRef:
name: default
prompt: |
You are a helpful customer support agent for a SaaS platform.
Answer politely, professionally, and concisely.
Common topics:
- Password resets
- Account access
- Billing questions
- Feature inquiries
EOFStep 3: Deploy
kubectl apply -f agents/support-agent.yaml
kubectl get agent support-agentExpect support-agent ready.
Step 4: Test Query
cat > queries/test-password-reset.yaml <<'EOF'
apiVersion: ark.mckinsey.com/v1alpha1
kind: Query
metadata:
name: test-password-reset
spec:
input: "How do I reset my password?"
target:
type: agent
name: support-agent
EOF
kubectl apply -f queries/test-password-reset.yamlStep 5: Watch It Run
kubectl get query test-password-reset -wPhase progression (lowercase per the CRD): pending → running → done. Ctrl+C to stop.
Step 6: View the Response
kubectl get query test-password-reset \
-o jsonpath='{.status.response.content}'Example:
To reset your password:
1. Go to the login page
2. Click "Forgot Password"
3. Enter your registered email
4. Open the reset link from the email
5. Set a new password
No email after 5 minutes? Check your spam folder.Step 7: Full Details
kubectl describe query test-password-resetShows phase, the response, token usage, and start/end times.
Step 8: Dashboard
ark dashboardOpens the dashboard in your browser. Navigate to Queries, open test-password-reset, and inspect input, response, timeline, tokens, and model.
Step 9: Another Scenario
cat > queries/test-billing.yaml <<'EOF'
apiVersion: ark.mckinsey.com/v1alpha1
kind: Query
metadata:
name: test-billing
spec:
input: "How can I upgrade my subscription plan?"
target:
type: agent
name: support-agent
EOF
kubectl apply -f queries/test-billing.yaml
kubectl get query test-billing \
-o jsonpath='{.status.response.content}'Step 10: Triage Agent
A second agent that classifies the request before support answers.
cat > agents/triage-agent.yaml <<'EOF'
apiVersion: ark.mckinsey.com/v1alpha1
kind: Agent
metadata:
name: triage-agent
spec:
description: Categorizes and routes customer inquiries
modelRef:
name: default
prompt: |
Categorize the inquiry into one of:
- technical: Password resets, login issues, bugs
- billing: Subscription, payment, invoices
- sales: Upgrades, new features, pricing
Respond with just the category name.
EOF
kubectl apply -f agents/triage-agent.yamlStep 11: Team
Triage first, then support — sequential strategy.
cat > teams/support-team.yaml <<'EOF'
apiVersion: ark.mckinsey.com/v1alpha1
kind: Team
metadata:
name: support-team
spec:
description: Triage then answer
strategy: sequential
members:
- type: agent
name: triage-agent
- type: agent
name: support-agent
EOF
kubectl apply -f teams/support-team.yaml
cat > queries/team-test.yaml <<'EOF'
apiVersion: ark.mckinsey.com/v1alpha1
kind: Query
metadata:
name: team-test
spec:
input: "I want to upgrade my plan and my payment failed"
target:
type: team
name: support-team
EOF
kubectl apply -f queries/team-test.yaml
kubectl get query team-test -o jsonpath='{.status.response}' | jqNext Steps
- Agents — deeper agent configuration
- Teams — graph, selector, round-robin strategies
- Tools — give agents external capabilities
- Tips on Building Agentic Use Cases
Last updated on