Skip to content

[FEATURE] Add Comply54ComplianceTool: pre-execution African regulatory enforcement for CrewAI agents #6392

Description

@kingztech2019

Feature Area

Integration with external tools

Is your feature request related to an existing bug?

NA

Describe the solution you'd like

A Comply54ComplianceTool (and companion Comply54GuardedTool) that lets CrewAI agents enforce African financial regulations — CBN, NDPA 2023, POPIA, KDPA, NFIU AML, and 18 other jurisdiction packs — before a tool call executes.

Why this matters now: Nigeria's CBN issued an AI-in-AML mandate in March 2026 requiring banks and fintechs to enforce compliance controls on AI agent actions. There is currently no crewAI tool that addresses African regulatory requirements, which represent a fast-growing developer market.

The tool in practice:

from crewai import Agent
from crewai_tools import Comply54ComplianceTool
from comply54.sectors import NigeriaFintechCompliance

compliance_tool = Comply54ComplianceTool(
    compliance=NigeriaFintechCompliance(),
    context={"kyc_tier": 3, "customer_verified": True},
)

agent = Agent(
    role="Fintech Payment Agent",
    tools=[transfer_funds_tool, compliance_tool],
    ...
)

The agent calls Comply54ComplianceTool before executing regulated actions. It returns a structured JSON decision (allow / deny / escalate / audit) with the exact regulatory citation (e.g. "CBN NIP Framework: Transaction of ₦15,000,000 exceeds ₦10M cap").

A Comply54GuardedTool variant wraps any existing BaseTool and enforces compliance automatically without requiring the agent to self-check:

guarded_tools = comply54_guard_tools(
    NigeriaFintechCompliance(),
    [transfer_funds_tool, approve_payment_tool],
    context={"kyc_tier": 3},
)

Implementation is ready. The tool is already implemented and published as part of comply54 (Apache 2.0, 0 runtime dependencies beyond regopy for in-process Rego evaluation — no OPA binary, no API calls). The crewAI contribution would be a clean extraction following the exact BaseTool pattern used by existing tools in lib/crewai-tools/.

Jurisdiction coverage: Nigeria (CBN, NDPA 2023, NIIRA 2025, NFIU AML, BVN/NIN), Kenya (KDPA), South Africa (POPIA), Ghana, Rwanda, Egypt, Tanzania, Uganda, Ethiopia, Mauritius — 21 policy packs across 12 African jurisdictions.

Additional context

  • comply54 repo: https://github.com/kingztech2019/comply54
  • comply54 docs: https://comply54.io
  • The tool uses regopy for in-process OPA/Rego evaluation — no subprocess, no network call, works fully offline
  • Optional dependency: pip install crewai-tools[comply54]
  • Happy to contribute as a PR to lib/crewai-tools/ or as a standalone package — whichever fits the project's direction better

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions