Kafka Fraud Detector
Score transactions for fraud in real-time on Kafka streams. Uses velocity analysis, geo-anomaly detection, and pattern matching per customer.
connic init my-project --templates=kafka-fraud-detectorOverview
Consumes transactions from a Kafka topic and scores each for fraud risk using velocity analysis, geo-anomaly detection, and retrieval pattern matching. Conditional tools restrict admin_override access based on context. Concurrency control queues transactions by customer_id to prevent race conditions. High-risk alerts are formatted by a tool agent and published to a Kafka outbound topic.
Use cases
Payment fraud detection
Score every transaction in real-time for fraud signals like impossible travel, velocity spikes, and known patterns.
Risk-based routing
Route transactions to different review queues based on risk level: auto-approve, flag, hold, or block.
Pattern learning
Store novel fraud patterns in the retrieval so detection improves over time.
Architecture
Main template files
Install these files with connic init my-project --templates=kafka-fraud-detector. The CLI places agent definitions in a folder named after the template under agents/.
kafka-fraud-detector/
agents/
fraud-scorer.yaml
fraud-escalator.yaml
tools/
fraud_tools.py
middleware/
fraud-scorer.py
schemas/
fraud-assessment.json
requirements.txt
README.mdGet started
Install the template, create a Connic project, and deploy through a connected Git repository or the CLI.
Prerequisites
- Python 3.10+
- A Connic account (create a project first)
- Project credit for a connic/* model, or credentials for a BYOK provider
Install and scaffold
Install the SDK and create a project from this template.
terminalpip install connic-composer-sdk connic init my-project --templates=kafka-fraud-detectorThen cd my-project
Deploy
Choose a deployment method. A connected Git repository deploys on push; use the CLI for projects without a connected Git repository.
Git integration
In Connic: Project Settings → Git & Environments, connect the GitHub repository
On the same page, map a branch (e.g. main) to the Production environment
Push the scaffolded project to that repository
terminalgit add . git commit -m "Add Kafka Fraud Detector template" git push origin mainCLI deploy
In Connic: Project Settings → API Keys & MCP Auth, create an API key and copy project ID
Run connic login in the project folder
Use connic dev to try with hot-reload, connic test to run suites, or connic deploy for production
terminalconnic login connic dev # Ephemeral dev env with hot-reload connic test # Run declarative test suites connic deploy # Deploy to productionConnect and configure
Add a Kafka inbound connector for the transactions topic and a Kafka outbound connector for fraud alerts. Configure bootstrap servers and optional SASL authentication. Use a connic/* model, or add BYOK credentials under Project Settings → LLM Provider.
Template source
Browse the full template, contribute improvements, or fork it for another use case.
connic-org/connic-awesome-agents/tree/main/kafka-fraud-detectorInformation
- Publisher
- By Connic
- Category
- Agent Templates
- Difficulty
- Advanced
- Works with
- Kafka
- Source
- GitHub
More agent templates
Browse the marketplaceCompliance Auditor
Scheduled compliance scanning combining web search for regulatory updates, MCP docs, and retrieval history. Produces scored summaries.
Browser Automation Demo
Ask for a Connic email, password, and project title, then sign in and create the project through the dashboard.
Telegram Personal Assistant
Multimodal Telegram assistant that processes text, images, voice, video, and documents. Searches the web, saves notes and knowledge, and schedules follow-up reminders with persistent sessions.
Customer Support
AI ticket triage with sentiment analysis and RAG-powered response drafting. Classifies by priority, blocks spam, and stores new solutions.
Research Assistant
Break complex research questions into sub-tasks, dispatch specialist agents in parallel, and synthesize web and internal data into structured, scored reports.
Lead Enricher
Enrich and qualify new signups by researching their company and scoring fit against the ideal customer profile. Saves qualified leads.