Cloud Blog: Build a multi-agent KYC workflow in three steps using Google’s Agent Development Kit and Gemini

Source URL: https://cloud.google.com/blog/products/ai-machine-learning/build-kyc-agentic-workflows-with-googles-adk/
Source: Cloud Blog
Title: Build a multi-agent KYC workflow in three steps using Google’s Agent Development Kit and Gemini

Feedly Summary: Know Your Customer (KYC) processes are foundational to any Financial Services Institution’s (FSI) regulatory compliance practices and risk mitigation strategies. KYC is how financial institutions verify the identity of their customers and assess associated risks. But as customers expect instant approvals, FSIs face pressure to streamline their manual, time-consuming and error-prone KYC processes. 
The good news: As LLMs get more capable and gain access to more tools to perform useful actions, employing a robust ‘agentic’ architecture to bolster the KYC process is just what FSIs need. The challenge? Building robust AI agents is complex. Google’s Agent Development Kit (ADK) gives you essential tooling to build multi-agent workflows. Plus, combining ADK with Search Grounding via Gemini can help give you higher fidelity and trustworthiness for tasks requiring external knowledge. Together, this can give FSIs:

Improved efficiency: Automate large portions of the KYC workflow, reducing manual effort and turnaround times.

Enhanced accuracy: Leverage AI for consistent document analysis and comprehensive external checks.

Strengthened compliance: Improve auditability through clear reporting and source attribution (via grounding).

To that end, this post illustrates how Google Cloud’s cutting-edge AI technologies – the Agent Development Kit (ADK), Vertex AI Gemini models, Search Grounding, and BigQuery – can be leveraged to build such a multi-agent KYC solution.

aside_block
), (‘btn_text’, ‘Start building for free’), (‘href’, ‘http://console.cloud.google.com/freetrial?redirectPath=/vertex-ai/’), (‘image’, None)])]>

Tech stack from Google Cloud
This multi-agent architecture we’ll show you today effectively utilizes several key Google Cloud services:

Agent Development Kit (ADK): Simplifies the creation and orchestration of agents. ADK handles agent definition, tool integration, state management, and inter-agent communication. It’s a platform and model-agnostic agentic framework which provides the scaffolding upon which complex agentic workflows can be built.

Vertex AI & Gemini models: The agents are powered by Gemini models (like gemini-2.0-flash) hosted on Vertex AI. These models provide the core reasoning, instruction-following, and language understanding capabilities. Gemini’s potential for multimodal analysis (processing images in IDs or documents) and multilingual support further enhances the KYC process for diverse customer bases.

Search Grounding: The google_search tool, used by the Resume_Crosschecker and External_Search agents, leverages Gemini’s Google Search grounding capabilities. This connects the Gemini model’s responses to real-time information from Google Search, significantly reducing hallucinations and ensuring that external checks are based on up-to-date, verifiable public data. The agents are instructed to cite sources (URIs) provided by the grounding mechanism, enhancing transparency and auditability.

BigQuery: The search_internal_database custom tool demonstrates direct integration with BigQuery. The KYC_Agent uses this tool early in the workflow to check if a customer profile already exists within the institution’s internal data warehouse, preventing duplicate entries and leveraging existing information. This showcases how agents can securely interact with internal, structured datasets.

Deep dive: How to build a KYC agent in three steps 
Our example KYC solution utilizes a root agent (KYC Agent) that orchestrates several specialized sub-agents:

Document Checker: Analyzes uploaded documents (ID, proof of address, bank statements, etc.) for consistency, validity, and potential discrepancies across documents.

Resume Crosschecker: Verifies information on a customer’s resume against public sources like LinkedIn and company websites using grounded web searches.

External Search: Conducts external due diligence, searching for adverse media, Politically Exposed Person (PEP) status, and sanctions list appearances using grounded web searches.

Wealth Calculator: Assesses the client’s financial position by analyzing financial documents, calculating net worth, and verifying the source of wealth legitimacy.

The root KYC_Agent manages the overall workflow, calling these child agents sequentially and handling tasks like checking if the customer is already present in internal databases and generating unique case IDs to track KYC requests.

Diagram showing the KYC Agent’s structure with sub-agents and tools

Step 1: Define your root agent (which receives the initial request from the user) and the child agents which handle the specialised tasks involved in the KYC process.

code_block
<ListValue: [StructValue([(‘code’, ‘# kyc_agent/agent.py (Illustrative Snippet)\r\n\r\n# Child Agents Definitions (Simplified)\r\ndocument_checker_agent = Agent(\r\n model=MODEL, # e.g. gemini-2.0-flash-001\r\n name=”Document_Checker",\r\n description=\’Analyses documents and finds discrepancies…\’,\r\n instruction=instructions_dict[\’Document_Checker\’],\r\ngenerate_content_config=GenerateContentConfig(temperature=0.27),\r\n)\r\n\r\nresume_crosschecker = Agent(\r\n model=MODEL,\r\n name=\’Resume_Crosschecker\’,\r\n description=\’Uses `google_search` tool for verifying resume…\’,\r\n instruction=instructions_dict[\’Resume_Crosschecker\’],\r\n tools=[google_search], # Leverages Search Grounding\r\n generate_content_config=GenerateContentConfig(temperature=0.27),\r\n)\r\n\r\nexternal_search_agent = Agent(\r\n model=MODEL,\r\n name="External_Search",\r\n description=\’Uses `google_search` tool to find negative news…\’,\r\n instruction=instructions_dict[\’External_Search\’],\r\n tools=[google_search], # Leverages Search Grounding\r\n generate_content_config=GenerateContentConfig(temperature=0.27),\r\n)\r\n\r\nwealth_calculator_agent = Agent(\r\n model=MODEL,\r\n name="Wealth_Calculator",\r\n description="Assesses the client\’s financial position…",\r\n instruction=instructions_dict[\’Wealth_Calculator\’],\r\n generate_content_config=GenerateContentConfig(temperature=0.27),\r\n)\r\n\r\n# Wrap Resume_Crosschecker Agent\r\nresume_crosschecker_tool = AgentTool(agent=resume_crosschecker_agent)\r\n\r\n# Wrap External_Search Agent\r\nexternal_search_tool = AgentTool(agent=external_search_agent)\r\n\r\n# Root KYC Agent orchestrating the workflow\r\nroot_agent = Agent(\r\n model=MODEL,\r\n name="KYC_Agent",\r\n description="KYC Onboarding Assistant",\r\n # Add the AgentTool wrappers to the tools list, alongside the original tools\r\n tools=[\r\n generate_case_id,\r\n search_internal_database,\r\n resume_crosschecker_tool, # AgentTool\r\n external_search_tool # AgentTool\r\n ],\r\n sub_agents=[\r\n document_checker_agent,\r\n wealth_calculator_agent\r\n ],\r\n generate_content_config=GenerateContentConfig(temperature=0.27),\r\n instruction=instructions_dict[\’KYC_Agent\’], # Instructions should still guide the LLM to call the tools by name\r\n global_instruction=\’You will always give detailed responses and follow instructions\’\r\n)’), (‘language’, ‘lang-py’), (‘caption’, <wagtail.rich_text.RichText object at 0x3ee47d35eaf0>)])]>

Step 2: Define the tools needed by your agents in order to perform their respective tasks

code_block
<ListValue: [StructValue([(‘code’, ‘# kyc_agent/custom_tools.py (Illustrative Snippet)\r\n\r\ndef search_internal_database(input_name: str) -> Dict[str, Any]:\r\n """\r\n Finds names in an internal BigQuery table…\r\n """\r\n try:\r\n client = bigquery.Client(project=PROJECT_ID)\r\n query = f"""\r\n SELECT `Full Name`, `UID`, `Risk Level`, `Citizenship`, `Networth`\r\n FROM `{TABLE_NAME}` # Defined in constants.py\r\n WHERE LOWER(`Full Name`) LIKE LOWER(\’%{input_name}%\’)\r\n """\r\n query_job = client.query(query)\r\n results = query_job.result()\r\n df = results.to_dataframe()\r\n return df.to_dict(\’records\’)\r\n except Exception as e:\r\n error_message = f"An error occurred with BigQuery: {e}"\r\n # Handle errors, potentially fallback to alternate data source\r\n # Fallback logic would go here if needed\r\n return {"error": error_message}’), (‘language’, ‘lang-py’), (‘caption’, <wagtail.rich_text.RichText object at 0x3ee47d35ed30>)])]>

Step 3: Run your agent locally using the command “adk web”. ADK provides a built-in UI for developers to visualise and debug the agent during the development process:

Screenshot of the ADK Dev UI used for developing agents

Start building now 
This multi-agent KYC architecture demonstrates the power of combining ADK, Gemini, Search Grounding, and BigQuery. It provides a blueprint for building intelligent, automated solutions for complex business processes.

Learn more: Dive deeper into the technologies used:

Google Agent Development Kit (ADK)

Vertex AI Gemini Models

Grounding on Vertex AI

BigQuery

Build your own: Adapt this pattern to your specific KYC requirements and integrate it with your existing systems on Google Cloud using services like Cloud Run for deployment.

Contact us: Reach out to Google Cloud Sales for a deeper discussion on implementing AI-driven KYC solutions tailored to your organization.

By embracing a multi-agent approach powered by Google Cloud’s AI stack, FSIs can transform their KYC processes, achieving greater efficiency, accuracy, and compliance in an increasingly digital world.

AI Summary and Description: Yes

Summary: The text discusses the integration of Google Cloud’s advanced AI technologies, specifically the Agent Development Kit (ADK) and Gemini models, into Know Your Customer (KYC) processes for Financial Services Institutions (FSIs). It highlights how a multi-agent architecture can enhance efficiency, accuracy, and compliance in KYC tasks by leveraging AI capabilities.

Detailed Description:

The provided text focuses on the application of AI to improve KYC processes within FSIs, addressing a significant challenge in the financial sector. As customer demands for rapid service increase, institutions are pressured to modernize their compliance practices without sacrificing security and regulatory standards. Here are the key points highlighting the significance of this text:

– **KYC Processes Overview**:
– KYC is critical for regulatory compliance and risk assessment in financial institutions.
– Traditional KYC methods are often manual, time-consuming, and prone to errors.

– **AI-Powered Solutions**:
– Advancement in Large Language Models (LLMs) allows for the creation of ‘agentic’ systems that automate KYC workflows.
– The integration of Google’s Agent Development Kit (ADK) is crucial, providing tools to create multi-agent workflows.

– **Enhanced Capabilities through AI**:
– **Improved Efficiency**: Automation of KYC processes can significantly reduce manual input and speed up approvals.
– **Enhanced Accuracy**: AI assists in detailed document analysis and external checks ensuring consistent outcomes.
– **Strengthened Compliance**: The structured reporting facilitated by AI tools improves audit trails and source attribution.

– **Technological Framework**:
– **Agent Development Kit (ADK)**: Facilitates the creation and orchestration of various agents for performing specific KYC tasks.
– **Vertex AI & Gemini Models**: Provide the core capabilities of reasoning, instruction-following, and handling multimodal data.
– **Search Grounding**: Integrates real-time data from Google Search, ensuring the relevance and accuracy of external checks.
– **BigQuery**: Allows for efficient handling of internal data, minimizing duplicates and utilizing existing information for KYC processes.

– **Multi-Agent KYC Solution**:
– The architecture includes a root agent (KYC Agent) that orchestrates several child agents, each specialized in different aspects of KYC:
– **Document Checker**: Scrutinizes uploaded identification and financial documents.
– **Resume Crosschecker**: Validates personal information against public records.
– **External Search Agent**: Performs due diligence searching for sanctions or adverse media.
– **Wealth Calculator**: Evaluates a client’s financial legitimacy and net worth.

– **Practical Implications**:
– The proposed multi-agent system enhances KYC processes for FSIs making them more adept in an evolving digital environment.
– Given the increasing regulations, deploying such innovative solutions can give institutions a competitive edge in compliance and customer service.

Overall, the text illustrates how leveraging Google Cloud’s advanced AI technologies can help financial institutions modernize their KYC practices, thus enhancing operational efficiency and meeting compliance requirements in a rapidly changing landscape. This is particularly relevant in discussions around cloud computing security and AI security, making it essential for professionals in compliance and regulatory practices in the financial sector to understand and adopt these strategies.