Introduction
This article introduces an Automated Customer Onboarding & Verification Agent, a critical component in streamlining the customer onboarding process for businesses. This agent automates the collection of customer information, performs identity verification, checks for compliance with regulations (such as KYC—Know Your Customer), and ensures that customer data is properly processed and stored. The agent can issue a receipt for each completed action, ensuring transparency and security. By automating repetitive tasks, this agent improves efficiency and reduces human error.
The Use Case
Customer onboarding typically involves multiple stages: capturing basic information, verifying identity, checking for compliance with relevant policies, and setting up user accounts or subscriptions. The agent automates each of these steps, ensuring that the correct information is collected, verification checks are conducted according to the latest regulations, and compliance is assured. After completing these tasks, the agent either approves the onboarding or requests additional information or manual verification if required.
Prompt Contract (agent interface)
# file: contracts/onboarding_verification_v1.yaml
role: "CustomerOnboardingAgent"
scope: >
Collect customer details, verify identity, ensure compliance with regulatory requirements, and create customer accounts.
Ask once if critical fields are missing (customer_id, full_name, email, identity_document).
Propose tool calls; never assert success without a receipt.
output:
type: object
required: [summary, decision, customer_data, next_steps, tool_proposals]
properties:
summary: {type: string, maxWords: 100}
decision: {type: string, enum: ["approve", "reject", "need_approval", "need_more_info"]}
customer_data:
type: object
required: [customer_id, full_name, email, identity_verified]
properties:
customer_id: {type: string}
full_name: {type: string}
email: {type: string}
identity_verified: {type: boolean}
citations: {type: array, items: {type: string}}
next_steps: {type: array, items: {type: string}, maxItems: 6}
tool_proposals:
type: array
items:
type: object
required: [name, args, preconditions, idempotency_key]
properties:
name: {type: string, enum: [CollectCustomerData, VerifyIdentity, CheckCompliance, CreateAccount, RequestApproval]}
args: {type: object}
preconditions: {type: string}
idempotency_key: {type: string}
policy_id: "onboarding_policy_v4"
citation_rule: "1–2 minimal-span claim_ids per factual sentence"
decoding:
narrative: {top_p: 0.92, temperature: 0.72, stop: ["\n\n## "]}
bullets: {top_p: 0.82, temperature: 0.45}
Example claims (context provided to the model)
[
{"claim_id":"policy:kyc:identity_check","text":"All customers must complete an identity check before account creation.",
"effective_date":"2025-01-01","source_id":"doc:onboarding_policy_v4","span":"complete an identity check"},
{"claim_id":"policy:email:format","text":"Customer email must follow a valid format (e.g., [email protected]).",
"effective_date":"2025-01-01","source_id":"doc:onboarding_policy_v4","span":"valid email format"},
{"claim_id":"policy:compliance:customer_data","text":"Customer data must be stored securely and in compliance with GDPR.",
"effective_date":"2025-01-01","source_id":"doc:onboarding_policy_v4","span":"stored securely and in compliance with GDPR"}
]
Tool Interfaces (typed, with receipts)
# tools.py
from pydantic import BaseModel
from typing import Optional, List, Dict
from datetime import datetime
class CollectCustomerDataArgs(BaseModel):
customer_id: str
full_name: str
email: str
identity_document: str
class VerifyIdentityArgs(BaseModel):
customer_id: str
identity_document: str
class CheckComplianceArgs(BaseModel):
customer_id: str
data_compliance: bool
class CreateAccountArgs(BaseModel):
customer_id: str
full_name: str
email: str
class RequestApprovalArgs(BaseModel):
customer_id: str
approver_id: str
class ToolReceipt(BaseModel):
tool: str
ok: bool
ref: str
message: str = ""
data: Optional[Dict] = None
# adapters.py (demo logic)
from tools import *
from datetime import datetime
CUSTOMERS = {
"C001": {"full_name": "John Doe", "email": "[email protected]", "identity_document": "id12345", "identity_verified": False},
"C002": {"full_name": "Jane Smith", "email": "[email protected]", "identity_document": "id54321", "identity_verified": False}
}
def collect_customer_data(a: CollectCustomerDataArgs) -> ToolReceipt:
return ToolReceipt(tool="CollectCustomerData", ok=True, ref=f"data-{a.customer_id}",
message="Customer data collected", data={"customer_id": a.customer_id})
def verify_identity(a: VerifyIdentityArgs) -> ToolReceipt:
customer = CUSTOMERS.get(a.customer_id)
if not customer:
return ToolReceipt(tool="VerifyIdentity", ok=False, ref="customer-not-found", message="Customer not found")
customer["identity_verified"] = True
return ToolReceipt(tool="VerifyIdentity", ok=True, ref=f"identity-{a.customer_id}", message="Identity verified")
def check_compliance(a: CheckComplianceArgs) -> ToolReceipt:
if not a.data_compliance:
return ToolReceipt(tool="CheckCompliance", ok=False, ref="compliance-violation", message="Data compliance check failed")
return ToolReceipt(tool="CheckCompliance", ok=True, ref="compliance-ok", message="Data complies with regulations")
def create_account(a: CreateAccountArgs) -> ToolReceipt:
customer = CUSTOMERS.get(a.customer_id)
if not customer:
return ToolReceipt(tool="CreateAccount", ok=False, ref="customer-not-found", message="Customer not found")
customer["account_created"] = True
return ToolReceipt(tool="CreateAccount", ok=True, ref=f"account-{a.customer_id}", message="Account created")
def request_approval(a: RequestApprovalArgs) -> ToolReceipt:
return ToolReceipt(tool="RequestApproval", ok=True, ref=f"approval-{a.customer_id}",
message=f"Approval requested for {a.customer_id}'s account.", data={"approver_id": a.approver_id})

Join the conversation! Your thoughts help the community grow.