TalentPerformer

Compliance Audit Agent

You are a Compliance Audit Agent responsible for performing in-depth checks on validated accounting transactions to ensure compliance with accounting and regulatory standards. You receive pre-validated transactions from the Accounting Entry Validator and perform advanced compliance analysis. Your primary responsibilities include: - Reading validated transaction data from the Accounting Entry Validator's output file - Performing statistical anomaly detection on transaction amounts and patterns - Identifying recurring transaction patterns that may indicate compliance risks - Cross-referencing transactions against regulatory databases and compliance rules - Analyzing historical compliance trends to identify risk patterns - Generating comprehensive compliance reports with actionable recommendations You are the second line of defense in the accounting workflow, focusing on regulatory compliance, fraud detection, and risk assessment after basic validation is complete.

LIVE

Instructions

When performing compliance audits:

1. **Input Processing**: Read the validated transactions from "validated_transactions.json"
   (output from Accounting Entry Validator) using FileTools. This file contains pre-validated
   transactions ready for compliance analysis.

2. **Anomaly Detection**: Use detect_anomalies() to identify statistical outliers in transaction
   amounts that may indicate unusual activity or potential fraud.

3. **Pattern Analysis**: Apply identify_patterns() to detect recurring transaction patterns,
   frequent amounts, and account usage that could signal compliance risks.

4. **Compliance Checking**: Use check_compliance() to validate transactions against established
   compliance rules, amount limits, and prohibited account codes.

5. **Regulatory Cross-Reference**: Apply cross_reference_regulatory_database() to check
   transactions against external regulatory requirements and identify suspicious patterns.

6. **Historical Trend Analysis**: Use analyze_historical_compliance_trends() to examine
   compliance patterns over time and identify emerging risks or seasonal factors.

7. **Report Generation**: Create a comprehensive compliance audit report using
   generate_compliance_report() that includes:
   - Summary of all compliance violations found
   - Risk assessment and trend analysis
   - Regulatory findings and cross-references
   - Recommendations for compliance improvements
   - Action items for follow-up

8. **Output**: Save your compliance audit report to "compliance_audit_report.json" and
   generate a human-readable summary in "compliance_summary.md".

9. **Risk Escalation**: For high-risk findings, clearly mark them for immediate attention
   and provide specific action steps for resolution.

Always maintain audit trails and ensure your findings are actionable and compliance-focused.

Knowledge Base (.md)

Business reference guide

Drag & Drop or Click

.md, .txt, .pdf

Data Files

Upload data for analysis (CSV, JSON, Excel, PDF)

Drag & Drop or Click

Multiple files: .json, .csv, .xlsx, .xls, .pdf, .docx, .pptx, .txt

Tools 11

file_tools

FileTools from agno framework

reasoning_tools

ReasoningTools from agno framework

calculator

CalculatorTools from agno framework

websearch

DuckDuckGoTools is a convenience wrapper around WebSearchTools with the backend defaulting to "duckduckgo". Args: enable_search (bool): Enable web search function. enable_news (bool): Enable news search function. modifier (Optional[str]): A modifier to be prepended to search queries. fixed_max_results (Optional[int]): A fixed number of maximum results. proxy (Optional[str]): Proxy to be used for requests. timeout (Optional[int]): The maximum number of seconds to wait for a response. verify_ssl (bool): Whether to verify SSL certificates. timelimit (Optional[str]): Time limit for search results. Valid values: "d" (day), "w" (week), "m" (month), "y" (year). region (Optional[str]): Region for search results (e.g., "us-en", "uk-en", "ru-ru"). backend (Optional[str]): Backend to use for searching (e.g., "api", "html", "lite"). Defaults to "duckduckgo".

detect_anomalies

Detect statistical anomalies based on transaction amounts. Returns list of (transaction, reason) for anomalies.

def detect_anomalies(transactions):
    """
    Detect statistical anomalies based on transaction amounts.
    Returns list of(transaction, reason) for anomalies.
    """
    anomalies = []
    amounts = [t["amount"] for t in transactions if isinstance(t.get("amount"), (int, float))]
    if not amounts:
        return anomalies
    mean_val = statistics.mean(amounts)
    stdev_val = statistics.stdev(amounts) if len(amounts) > 1 else 0
    for t in transactions:
        if isinstance(t.get("amount"), (int, float)) and stdev_val > 0:
            z_score = abs((t["amount"] - mean_val) / stdev_val)
            if z_score > 3:
                anomalies.append((t, f"Amount anomaly(z-score {z_score:.2f})"))
    return anomalies

identify_patterns

Identify recurring patterns (e.g., frequent same amount, repeated account codes). Returns dict of detected patterns.

def identify_patterns(transactions):
    """
    Identify recurring patterns(e.g., frequent same amount, repeated account codes).
    Returns dict of detected patterns.
    """
    patterns = {"frequent_amounts": {}, "frequent_accounts": {}}
    for t in transactions:
        amt = t.get("amount")
        acc = t.get("account_code")
        if amt:
            patterns["frequent_amounts"][amt] = patterns["frequent_amounts"].get(amt, 0) + 1
        if acc:
            patterns["frequent_accounts"][acc] = patterns["frequent_accounts"].get(acc, 0) + 1
    patterns["frequent_amounts"] = {k: v for k, v in patterns["frequent_amounts"].items() if v >= 3}
    patterns["frequent_accounts"] = {k: v for k, v in patterns["frequent_accounts"].items() if v >= 3}
    return patterns

check_compliance

Check transaction against a set of compliance rules. Returns list of violations.

def check_compliance(transaction, standards):
    """
    Check transaction against a set of compliance rules.
    Returns list of violations.
    """
    violations = []
    if "max_amount" in standards and transaction.get("amount") > standards["max_amount"]:
        violations.append(f"Amount exceeds maximum allowed({standards['max_amount']})")
    if "prohibited_accounts" in standards and transaction.get("account_code") in standards["prohibited_accounts"]:
        violations.append(f"Use of prohibited account code: {transaction.get('account_code')}")
    return violations

generate_compliance_report

Generate a compliance report for all transactions. Returns dict with summary and violations.

def generate_compliance_report(transactions):
    """
    Generate a compliance report for all transactions.
    Returns dict with summary and violations.
    """
    report = {"total_transactions": len(transactions), "violations": [], "summary": ""}
    compliance_rules = {"max_amount": 100000, "prohibited_accounts": ["9999"]}
    for t in transactions:
        violations = check_compliance(t, compliance_rules)
        if violations:
            report["violations"].append({"transaction": t, "violations": violations})
    report["summary"] = f"Found {len(report['violations'])} transactions with compliance issues."
    return report

cross_reference_regulatory_database

Cross-reference transaction with external regulatory database for compliance. Returns list of regulatory findings.

def cross_reference_regulatory_database(transaction, regulatory_db=None):
    """
    Cross-reference transaction with external regulatory database for compliance.
    Returns list of regulatory findings.
    """
    if regulatory_db is None:
        regulatory_db = {
            "suspicious_patterns": [
                {"pattern": "round_amounts", "threshold": 10000, "risk": "medium"},
                {"pattern": "frequent_small_amounts", "threshold": 100, "risk": "high"},
            ],
            "regulated_entities": ["12345", "67890"],
            "restricted_transactions": ["gambling", "cryptocurrency"],
        }
    findings = []
    amount = transaction.get("amount", 0)
    if amount >= 10000 and amount % 1000 == 0:
        findings.append("Large round amount detected - may require additional scrutiny")
    if amount <= 100:
        findings.append("Small amount transaction - monitor for structuring patterns")
    description = transaction.get("description", "").lower()
    for restricted in regulatory_db["restricted_transactions"]:
        if restricted in description:
            findings.append(f"Transaction description contains restricted term: {restricted}")
    return findings

analyze_historical_compliance_trends

Analyze historical compliance trends and patterns over time. Returns dict with trend analysis and risk indicators.

def analyze_historical_compliance_trends(transactions, historical_data=None):
    """
    Analyze historical compliance trends and patterns over time.
    Returns dict with trend analysis and risk indicators.
    """
    if historical_data is None:
        historical_data = {
            "monthly_violations": [5, 3, 7, 2, 4, 6, 3, 5, 4, 3, 6, 4],
            "common_violation_types": ["amount_limit", "account_code", "duplicate"],
            "seasonal_patterns": {"Q4": "high", "Q1": "low", "Q2": "medium", "Q3": "medium"},
        }
    analysis = {"trend_direction": "", "risk_level": "", "seasonal_factors": [], "recommendations": []}
    violations = historical_data["monthly_violations"]
    if len(violations) >= 2:
        recent_avg = sum(violations[-3:]) / 3
        older_avg = sum(violations[:-3]) / (len(violations) - 3) if len(violations) > 3 else violations[0]
        if recent_avg > older_avg * 1.2:
            analysis["trend_direction"] = "increasing"
            analysis["risk_level"] = "high"
            analysis["recommendations"].append("Implement stricter validation rules")
        elif recent_avg < older_avg * 0.8:
            analysis["trend_direction"] = "decreasing"
            analysis["risk_level"] = "low"
        else:
            analysis["trend_direction"] = "stable"
            analysis["risk_level"] = "medium"
    current_month = datetime.now().month
    if current_month in [10, 11, 12]:
        analysis["seasonal_factors"].append("Q4 typically shows higher violation rates")
        analysis["recommendations"].append("Increase monitoring during Q4")
    if "amount_limit" in historical_data["common_violation_types"]:
        analysis["recommendations"].append("Review and adjust amount limits")
    return analysis

exa

ExaTools is a toolkit for interfacing with the Exa web search engine, providing functionalities to perform categorized searches and retrieve structured results. Args: enable_search (bool): Enable search functionality. Default is True. enable_get_contents (bool): Enable get contents functionality. Default is True. enable_find_similar (bool): Enable find similar functionality. Default is True. enable_answer (bool): Enable answer generation. Default is True. enable_research (bool): Enable research tool functionality. Default is False. all (bool): Enable all tools. Overrides individual flags when True. Default is False. text (bool): Retrieve text content from results. Default is True. text_length_limit (int): Max length of text content per result. Default is 1000. api_key (Optional[str]): Exa API key. Retrieved from `EXA_API_KEY` env variable if not provided. num_results (Optional[int]): Default number of search results. Overrides individual searches if set. start_crawl_date (Optional[str]): Include results crawled on/after this date (`YYYY-MM-DD`). end_crawl_date (Optional[str]): Include results crawled on/before this date (`YYYY-MM-DD`). start_published_date (Optional[str]): Include results published on/after this date (`YYYY-MM-DD`). end_published_date (Optional[str]): Include results published on/before this date (`YYYY-MM-DD`). type (Optional[str]): Specify content type (e.g., article, blog, video). category (Optional[str]): Filter results by category. Options are "company", "research paper", "news", "pdf", "github", "tweet", "personal site", "linkedin profile", "financial report". include_domains (Optional[List[str]]): Restrict results to these domains. exclude_domains (Optional[List[str]]): Exclude results from these domains. show_results (bool): Log search results for debugging. Default is False. model (Optional[str]): The search model to use. Options are 'exa' or 'exa-pro'. timeout (int): Maximum time in seconds to wait for API responses. Default is 30 seconds.

Test Agent

Configure model settings at the top, then test the agent below

Enter your question or instruction for the agent