Inspiration

Corporate finance teams drown in invoices. Fraud and waste — duplicate vendor payments, ghost vendors, off-hours transactions, policy-busting amounts, payments to sanctioned entities — hide in the noise, and a human can't eyeball tens of thousands of rows. But finance is also exactly where you cannot let an AI act on its own. We wanted an agent that does the exhausting investigative work at machine scale, yet never writes or flags anything without an auditor's explicit sign-off.

What it does

AIAuditFrauds automates the corporate finance-audit workflow end-to-end, with human-in-the-loop checkpoints at every critical decision. You give it an ambiguous, free-text mission ("find duplicate vendor payments this quarter"), and a team of specialist agents investigates:

  • The Mission Planning Agent (Qwen) drafts a short audit plan → Human Gate 1 (approve / edit / reject).

  • The Transaction Screening Agent runs semantic similarity over transaction embeddings (DashVector).

  • The Spend Analysis Agent aggregates spend by department/vendor/category (PostgreSQL).

  • The Risk Triage Agent runs deterministic detectors — exact/near duplicates, policy violations, ghost vendors, off-hours payments — and screens payees against the live US Treasury OFAC sanctions list.

  • The team proposes a ranked list of flagged invoices → Human Gate 2 (approve items one by one).

  • The Audit Trail Agent performs the gated, idempotent write; the Report Generation Agent (Qwen) writes the closing narrative; an Audit Assistant answers follow-up questions grounded in the evidence.

Every step streams to a live console with full attribution — which agent did what, with which tool.

How we built it

  • Agents: AgentScope multi-agent team (coordinator + 8 specialists), each reasoning with Qwen (qwen-max) via DashScope.

  • Embeddings & vector search: Qwen text-embedding-v4 (1024-dim) + DashVector, the Qwen-native managed vector DB.

  • Structured data: PostgreSQL (co-located container) — invoices, vendors, policies, SQL aggregation, idempotent gated writes + audit log.

  • Backend: FastAPI with a typed Server-Sent-Events AgentEvent stream; a two-gate approval state machine; deterministic detectors decide the audit outcome so a model outage never breaks a mission.

  • Storage: report exports land in Alibaba Cloud OSS with time-limited pre-signed URLs.

  • Deploy: Docker Compose on Alibaba Cloud ECS (Singapore) behind Caddy with automatic Let's Encrypt HTTPS — live at https://aiauditfrauds.flance.info.

  • Engineering: built test-first; a 124-test suite runs with zero cloud credentials; the SSE event sequence and agent-team shape are pinned by contract tests.

Why Track 4 (Autopilot Agent)

The track calls for an agent that automates a real-world business workflow end-to-end, handles ambiguous inputs, invokes external tools, and incorporates human-in-the-loop checkpoints — with production-readiness over toy demos. AIAuditFrauds delivers each one: a complete finance-audit workflow (mission → evidence → triage → gated write → report), free-text missions interpreted by Qwen, external tools (DashVector, PostgreSQL, live OFAC feed, OSS), two structural human gates at the critical decision points, and a production posture — deployed on Alibaba Cloud ECS behind auto-HTTPS with graceful fallbacks and idempotent writes.

Challenges we ran into

  • Keeping a complex multi-agent system evolvable — solved by anchoring everything to one typed SSE AgentEvent contract, so the frontend, API and tests stay invariant while the model/agent/data layers evolve underneath.

  • Building the data layer on DashVector + PostgreSQL behind one Repository interface, so detector behaviour is identical in tests (in-memory) and live.

  • Keeping the demo bulletproof: deterministic detectors decide the audit, the LLM plans and narrates — a model/quota hiccup degrades gracefully instead of failing the run.

Accomplishments we're proud of

  • A genuine human-in-the-loop system where AI never acts unilaterally on money.

  • End-to-end on the Qwen stack: Qwen reasoning, Qwen embeddings, DashVector, deployed on Alibaba Cloud.

  • Transparent, attributable agent activity — judges and auditors can see exactly who did what.

Significant updates during the submission period

The project concept existed previously; during the submission period it was significantly rebuilt end-to-end on the Qwen stack: Qwen (DashScope) reasoning + embeddings, a new AgentScope multi-agent runtime, DashVector vector search, a new PostgreSQL data layer, OSS exports, and deployment on Alibaba Cloud ECS.

What's next

Autonomous specialist tool-calling via AgentScope's ReAct loop; connectors to real ERPs/accounting systems; scheduled continuous auditing; richer OFAC + KYC; multi-tenant deployment with per-org isolation.

Built With

Share this project:

Updates