Skip to main content
Loading navigation
Back to prompt library

Implement Agentic Reasoning and Anomaly Detection

Linked challenge: Real-time Crypto Fraud Alert Agent with Claude Agents SDK

Prompt source

implementation6 lines2 sectionsNo variables4 checklist items
Enhance your Claude agent to perform multi-step reasoning. The agent should:
1.  Monitor a stream of incoming simulated transactions.
2.  For any large, outgoing transaction, use `get_transaction_details` to fetch more information.
3.  If the transaction involves a privacy coin (like XMR) or a known mixer address, or follows a large loss of other assets, use `search_crypto_news` to check for related scam reports.
4.  If a potential fraud pattern is detected, generate a detailed alert using a helper function `trigger_alert(alert_details: dict)`.

Demonstrate how the Claude agent uses its internal reasoning to decide when to call which tool and how to synthesize information for an alert. Include your Python `Agent` initialization and a simple `run` call with simulated input.