Home > Blog > Artificial Intelligence
Subscribe to Our Blog
Get the latest trends, solutions, and insights into the event-driven future every week.
Thanks for subscribing.
Note: This article assumes you’re already familiar with Solace Agent Mesh – our agentic AI framework that makes it easy to you integrate and orchestrate AI agents. If not, please take a few minutes to get acquainted with it.
So, you want to build AI agents and deploy them. Not just define static flows. Not just wire things up and hope they work. Real agents—with skills, memory, tools, APIs, and the ability to collaborate and scale.
I’ve been through the maze. I’ve tried the highly structured world of Google ADK, the verbose flows of Vanilla A2A, the teamwork-heavy setups in CrewAI, the node-by-node choreography of LangGraph, and finally—the “just run it” simplicity of Solace Agent Mesh. But Agent Mesh isn’t just easy. It’s event-driven, which means agents don’t wait around for calls. They react. They’re loosely coupled, independently deployable, and natively scalable.
Building a risk agent for banking transactions shouldn’t feel like a survival mission. Yet with some frameworks, you’ll spend more time wiring configs and orchestrating services than stopping fraud.
In this article, I’ll show you how to create AI agents and run them with Solace Agent Mesh—fast to build, easy to scale, and ready for real-world use.
The Conversations
To show you what I mean, here’s how the exact same request plays out across four different approaches — and why only one might let you finish before the fraudsters cash out.
Panel: Google ADK
- Me: “I want to build a Risk Agent for banking transactions.”
- Google ADK: “Perfect! Step 1: Define your `.proto`… Step 2: Register in the tool registry… Step 3: Write handler classes… Step 4: Configure YAML… Step 5: Orchestration wiring… Step 6: Mock transaction feed…”
- Me: “By the time I finish all that, the fraudsters will be retired in a quiet cabin in the mountains.”
Panel: Vanilla A2A
- Me: “I just want to check transactions for fraud.”
- Vanilla A2A: “Cool! Define your schema, build the workflow, implement routing, add retries, logging, persistence…”
- Me: “At this pace, the fraudsters will have retired to a cabin and started a side business in fly-fishing.”
Panel: CrewAI
- Me: “I want to build a banking Risk Agent.”
- CrewAI: “Great! Start by defining your fraud detection steps, map out the workflow, create connectors for your bank’s APIs, and configure the inputs and outputs for each step. Then, set up logging, retries, and deployment.”
- Me: “So, it’s all pretty much a fixed, pre-defined flow?”
- CrewAI: “Yes, it’s perfect for tasks that don’t change.”
- Me: “Using me is like building a house from scratch every time fraud patterns change—everything is static, and you’ll need to manually rewire workflows. Adapting to new fraud tactics? Not so easy, you’ll have to stop, rewrite, and restart.”
Panel: LangGraph
- Me: “I want a banking Risk Agent.”
- LangGraph: “Awesome! Make each risk-check step a node, pass state between them, add connectors for your bank API, build ingestion, define output nodes, handle retries, logging, deployment…”
- Me: “If I do all that, the fraudsters will be retired and mentoring the next generation… from a cabin with a mountain view.”
Panel: Solace Agent Mesh
- Me: “I need something faster.”
- Solace Agent Mesh: “Done. Just write `fun_assess_fraud_risk()`, connect to your transaction feed, and run in one command. I’ll handle routing, retries, and plumbing.”
- Me: “Wait… so I can have it working today?”
- Solace Agent Mesh: “Exactly.”
Why Solace Agent Mesh Feels Different
If your agents are already speaking A2A, just plug them in Agent Mesh and let it work its orchestration magic. If not, you can easily use Solace Agent Mesh’s plugin framework to build your agents. With Solace Agent Mesh, you can create teams of AI agents, each with distinct skills and access to specific tools.
The secret? Agent Mesh isn’t reinventing the wheel—it still calls on Google ADK and A2A behind the scenes. The difference is, Agent Mesh handles all the complexity for you, so you don’t have to deal with it directly. No. protodefinitions, no orchestration wiring, no schema boilerplate—just focus on your business logic and run it with a single command.
Building Two Agents in Solace Agent Mesh
We’ll build two agents:
- risk-agent-bank – Uses Large Language Models (LLMs) to evaluate the risk score for a banking transaction, analyzing customer history, including logins and past transactions, to detect unusual or high-risk activity.
- high-risk-email-agent – Sends an email alert whenever a high-risk transaction is detected by the risk-agent-bank. Think of it as the messenger, but with a bit more urgency.
In this setup, the orchestrator is the control plane managing the agents, routing tasks, and making sure everything runs smoothly. It is like the conductor of an orchestra, ensuring all agents play in harmony and at the right time.
Prerequisites
This tutorial assumes you already have Agent Mesh installed and an Agent Mesh directory set up. (If you don’t check out the quick start guide.) We’ll use that same working directory to create both agents.
- LLM for calculating risk-score. You can either use locally available LLMS or the publicly hosted LLMS.
- MYSQL installation for storing customer logins and transactional data.
- SMTP credentials for sending email alert.
- Python basics.
Before we jump into creating the agent, let’s quickly align on how Agent Mesh thinks about agents and their parts — because once you get these basics, the rest of the build will make a lot more sense. If you’ve taken a crash course with the Google ADK, you’re already familiar with these concepts.
Understanding the Basics
- AgentCards — the agent’s business card
Tells orchestrator who it is, what it can do, and how to talk to it.
Example: “I’m the Bank Fraud Agent. I check transactions, score fraud risk, and find unusual locations. - Tools — the agent’s skills
Each tool performs a specific task well.
Example: Risk Score Tool → Gives a probability of fraud. - Session Service — the agent’s memory
Remembers past interactions so the conversation flows naturally.
Example: “I’m the Session Service. I remember your last question about the $500 withdrawal, so I can give you the details right away.”
Creating risk-agent-bank
I’ll now explain how to create the risk-agent-bank agent using Solace Agent Mesh’s plugin framework.
You will be prompted for inputs to setup the agent.
This creates a boilerplate code along with comprehensive configurations, ready to be customized and deployed for real-world use cases.
Configuring risk-agent-bank
- Update config.yaml:
log/log_file: risk_agent_bank.log apps/name: risk_agent_bank-app app/app_config/agent_name: risk_agent_bank app/app_config/display_name: risk_agent_bank app/app_config/instruction: | Analyze customer history and transactions to detect possible fraud.
- Define the tool in apps/appconfig/tools: the tools section is where you declare each skill your agent can perform.
This is essentially saying: “Here’s the function that does the work, and here’s how other agents can call it.”- tool_type: python component_module: risk_agent_bank.tools component_base_path: . function_name: fun_assess_fraud_risk tool_name: tool_assess_fraud_risk tool_config: {}
- Update the apps/appconfig/agentcard and apps/appconfig/agentcard section. The id in the skills list must match exactly the tool_name you defined in the tools section — that’s how the agent knows which function belongs to which skill. This tells the Orchestrator (and other agents) who the agent is, what it can do, and which skills (tools) it has.
agent_card: description: "Analyzes customer history and transactions to detect possible fraud." defaultInputModes: ["text"] defaultOutputModes: ["text"] skills: - id: "tool_assess_fraud_risk" name: "Example Tool" description: "An example tool provided by the RiskAgentBank plugin."
The apps section should look something like this:
- The Agent uses the default LLM and Broker configured while setting up Agent Mesh. Session Service by default is in-memory, but if you need to use a different one, change below values:
- Implement fun_assess_fraud_risk() in risk_agent_bank/tools.py:
– Fetch customer history (logins, transactions, past fraud flags).
- Call the LLM with a prompt to compute a risk score, reasons, and recommendation.
Prompt example:
system_prompt = ( "You are a banking fraud detection assistant. Fetch customer history from tables in JSON format and return the risk for the customer " "with keys: risk_score (0-100), " "anomaly_reasons (list of strings), recommendation (ALLOW/REVIEW/BLOCK)." ) user_prompt = ( f"Customer History: {data}\n" f"Transaction Details: {user_msg}\n" "Risk Assessment:" )
Run the Agent
Verify Orchestrator
Next you’ll verify that the orchestrator can detect Agents. and agent cards are displayed in Agents section:
Creating high-risk-email-agent
Similar setup. Follow the instructions above to create the agent , update config.yaml and tools.py. Update the instruction in config.yaml so that the agent should trigger only when a high-risk score is detected:
instruction: |
This is an alert agent to send emails for high-risk transactions.
Always invoke if the transaction risk score is high.
Implement a tool to send the alert email. Refer to the github links for the sample code.
Test the Flow
- In the Agent Mesh prompt, execute a test transaction:
“Customer id 10001 wants to perform a transaction of 10,000,000 Rs from Somalia.”
- The orchestrator agent will:
– Call risk-agent-bank → Get risk score.
– If high → Call high-risk-email-agent → Send alert. Check your email inbox. - Check the Agent Mesh dashboard or visualizer to confirm the agent and tool execution order.
Source Code Github Links:
- https://github.com/sharmaabhi-009/risk-agent-bank.git
- https://github.com/sharmaabhi-009/high-risk-email-agent.git
Wrapping Up
Building a banking risk agent for real-time transactions doesn’t have to be a months-long IT project. With frameworks like Google ADK, Vanilla A2A, CrewAI and LangGraph, you have powerful options — but they can come with steep setup costs and a lot of moving parts.
Solace Agent Mesh changes that equation. It keeps the robustness of those underlying systems but shields you from their boilerplate, letting you focus on your actual business logic.
Next Step
Got questions? Curious how Agent Mesh fits into your workflow? Let’s sit down for a coffee and talk it through — preferably before the fraudsters retire to a cabin in the mountains.
Explore other posts from category: Artificial Intelligence

As a solution architect for Solace, Abhishek is keen on technology and software impacts on businesses and societies. His background is in the integration space and EDA with diverse knowledge in both on-premises and cloud infrastructures. He has helped enterprises in the airline, telecommunications and transportation and logistic industries. In his spare time, Abhishek enjoys spending time with his kid and having a go at his cricket bat and reading.
Subscribe to Our Blog
Get the latest trends, solutions, and insights into the event-driven future every week.
Thanks for subscribing.