Skip to content

Conversation

@fcogidi
Copy link
Collaborator

@fcogidi fcogidi commented Jan 30, 2026

Summary

Adds an AML Investigation workflow (case generation + agent runner) and a read-only SQL query tool with strong safety checks, plus a focused test suite for the new functionality.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test improvements
  • 🔒 Security fix

Changes Made

  • Added AML case parsing/generation utilities (aieng-eval-agents/aieng/agent_evals/aml_investigation/data/cases.py) and shared dataset helpers (aieng-eval-agents/aieng/agent_evals/aml_investigation/data/utils.py).
  • Added a read-only SQL database tool with an explicit policy object and safety enforcement (aieng-eval-agents/aieng/agent_evals/tools/sql_database.py) and comprehensive tests (aieng-eval-agents/tests/aieng/agent_evals/tools/test_sql_database.py).
  • Added an AML investigation implementation with an ADK-discoverable root_agent, lazy DB initialization, and a CLI for dataset/db/case generation (implementations/aml_investigation/agent.py, implementations/aml_investigation/data/cli.py, implementations/aml_investigation/data/schema.ddl).
  • Updated configuration plumbing to support nested env vars (e.g., AML_DB__...) and Langfuse base URL naming (aieng-eval-agents/aieng/agent_evals/configs.py, .env.example).
  • Added tests for AML cases + utilities (aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_cases.py, aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_utils.py) and updated .gitignore to ignore .adk and *.db.

Testing

  • Tests pass locally (uv run pytest tests/)
  • Type checking passes (uv run mypy <src_dir>)
  • Linting passes (uv run ruff check src_dir/)
  • Manual testing performed (describe below)

Manual testing details:

  • Ran targeted pytest suites:
    • pytest aieng-eval-agents/tests/aieng/agent_evals/tools/test_sql_database.py
    • pytest aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_cases.py
    • pytest aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_utils.py

Screenshots/Recordings

N/A

Related Issues

N/A

Deployment Notes

  • New env vars:
    • AML_DB__DRIVER, AML_DB__DATABASE, AML_DB__QUERY__MODE (see .env.example)
    • LANGFUSE_BASE_URL replaces LANGFUSE_HOST in config parsing

Checklist

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Documentation updated (if applicable)
  • No sensitive information (API keys, credentials) exposed

@fcogidi fcogidi requested review from amrit110, Copilot and lotif January 30, 2026 22:00
@fcogidi fcogidi self-assigned this Jan 30, 2026
@fcogidi fcogidi added the enhancement New feature or request label Jan 30, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an AML Investigation workflow that enables agents to analyze financial transactions for money laundering patterns. The implementation includes database tooling with strong read-only safety enforcement, case generation utilities, and a complete agent runner with evaluation metrics.

Changes:

  • Added AML case generation and dataset utilities with Kaggle integration
  • Implemented a read-only SQL database tool with AST-based query validation
  • Created an AML investigation agent using Google ADK with database query capabilities

Reviewed changes

Copilot reviewed 20 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pyproject.toml Removed unused dependencies and added google-adk
implementations/aml_investigation/data/schema.ddl Database schema for accounts, transactions, and views
implementations/aml_investigation/data/cli.py CLI commands for database and case file generation
implementations/aml_investigation/agent.py AML investigation agent implementation with ADK
implementations/aml_investigation/README.md Template documentation for the implementation
aieng-eval-agents/tests/aieng/agent_evals/tools/test_sql_database.py Comprehensive tests for SQL database tool
aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_utils.py Tests for AML dataset utilities
aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_cases.py Tests for case generation and parsing
aieng-eval-agents/pyproject.toml Added sqlalchemy and sqlglot dependencies
aieng-eval-agents/aieng/agent_evals/tools/sql_database.py Read-only SQL database tool implementation
aieng-eval-agents/aieng/agent_evals/tools/init.py Tools module initialization
aieng-eval-agents/aieng/agent_evals/knowledge_agent/tracing.py Updated to use SecretStr for credentials
aieng-eval-agents/aieng/agent_evals/configs.py Added database config and SecretStr for sensitive fields
aieng-eval-agents/aieng/agent_evals/async_utils.py Async utilities for rate limiting and progress tracking
aieng-eval-agents/aieng/agent_evals/async_client_manager.py Updated to handle SecretStr fields
aieng-eval-agents/aieng/agent_evals/aml_investigation/data/utils.py Dataset download and normalization utilities
aieng-eval-agents/aieng/agent_evals/aml_investigation/data/cases.py Case generation and parsing logic
aieng-eval-agents/aieng/agent_evals/aml_investigation/data/init.py Data module initialization
aieng-eval-agents/aieng/agent_evals/aml_investigation/init.py AML investigation module initialization
.env.example Added AML database configuration examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fcogidi fcogidi requested a review from lotif February 3, 2026 14:45
Copy link
Member

@amrit110 amrit110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, no changes from my side. The placement of the agent.py is the only thing needing some clarity.

@fcogidi fcogidi merged commit d8b1322 into main Feb 3, 2026
3 checks passed
@fcogidi fcogidi deleted the fco/aml_investigator branch February 3, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants