-
Notifications
You must be signed in to change notification settings - Fork 0
Add AML investigation agent #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…r_label and add new review labels
…nalyst prompt, and enhance case analysis workflow
…ns and improve code readability
…nd standardize LangFuse base URL variable
…lookback days and improve false negative case construction
… MAX_CONCURRENT_CASES constant
There was a problem hiding this 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.
aieng-eval-agents/aieng/agent_evals/aml_investigation/data/cases.py
Outdated
Show resolved
Hide resolved
…dels and utilities
…tic Field descriptions for improved clarity
…L investigation agent
…d access control measures
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
Changes Made
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).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).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).AML_DB__...) and Langfuse base URL naming (aieng-eval-agents/aieng/agent_evals/configs.py,.env.example).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.gitignoreto ignore.adkand*.db.Testing
uv run pytest tests/)uv run mypy <src_dir>)uv run ruff check src_dir/)Manual testing details:
pytest aieng-eval-agents/tests/aieng/agent_evals/tools/test_sql_database.pypytest aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_cases.pypytest aieng-eval-agents/tests/aieng/agent_evals/aml_investigation/data/test_utils.pyScreenshots/Recordings
N/A
Related Issues
N/A
Deployment Notes
AML_DB__DRIVER,AML_DB__DATABASE,AML_DB__QUERY__MODE(see.env.example)LANGFUSE_BASE_URLreplacesLANGFUSE_HOSTin config parsingChecklist