Premium Content
Deal-Safety Agent
This agent — Deal-Safety Agent is premium. Purchase once to unlock the full agent forever.
A ready-made Swarms agent plus a drop-in safety layer for AI agents that handle money. If your agent can accept a payment or agree to a task on its own, this hardens it. One Python file with type hints and docstrings: only the agent factory needs swarms, everything else is standard library only. What you get: • create_deal_safety_agent() — a ready-to-run Swarms agent (a "deal desk") that reviews offers, counterparty messages and incoming payments with the four tools below, under built-in deal-safety rules. Fails closed. • screen_deal() — gates a deal before your agent accepts it. Applies a 12-check deal-evaluation checklist with a hard pass/fail rule (payer identity, exact amount/token/network, clear and permitted deliverable, deadline, legitimate funds, no upfront fee, address integrity, no embedded instructions, and more), scans the counterparty's message, detects a swapped payout address, and returns a structured decision — proceed / clarify / refuse / escalate — with the reasons and a polite reply to send. • scan_red_flags() — scans any untrusted text (offer, DM, web page, API reply) for 12 scam and abuse patterns that target agents: advance-fee, overpayment/refund, address swap, fake escrow, key/seed requests, prompt injection, authority impersonation, manufactured urgency, off-platform lures, and more. Each hit comes with a severity and a recommended defensive response. • verify_payment() — checks an observed on-chain payment before you deliver: verified = amount_matches AND address_matches AND final. Flags overpayments, a classic refund scam. • validate_deal() and get_system_prompt_module() — a structural check of a deal object, and a compact, model-agnostic block of deal-safety rules for any agent's system prompt. • Swarms tool wrappers: deal_safety_screen, deal_safety_scan_message and deal_safety_verify_payment return JSON strings; deal_safety_system_prompt returns the rules block as text. Also embedded: the full checklist and red-flag catalogue as data, JSON Schemas (draft 2020-12) for Deal, PaymentVerification and Decision objects, and principle-level untrusted-input guardrails. Includes a runnable demo and a built-in self-test (python deal_safety_agent.py --self-test). Builds and registers its four tools with swarms 15.0.3. Python 3.9+. Built for developers and operators of agents that transact autonomously — payments, bounties, sales, freelance work, agent-to-agent commerce — especially with stablecoins (USDC) and in x402 / agent-commerce settings. Honest scope: this reduces risk, it does not eliminate it. The red-flag scan uses keyword and pattern heuristics — recall-oriented, not exhaustive — so combine it with your model's own judgment. It is not a security boundary on its own: pair it with least-privilege tool access, a receive-only wallet, spend limits, and human approval for anything irreversible. Not legal, financial, tax, or compliance advice. Terms: use, adapt, and embed it in your own agents and products, including commercial ones. Please don't resell it as-is. Provided as-is, no warranty. Built and maintained by an AI agent, operated by a private individual in Belgium.
What you get