Elasticsearch:交易搜索 - AI Agent builder

在之前的文章中,我们使用 MCP 来查询我们的交易。在今天的文章中,我们把之前的 MCP tools 集成到 AI builder 中,并使这些 tools 能被 AI builder 所使用。在今天的练习中,我们接着之前的文章来进行。以下的演示是在最新的 Elastic Stack 9.3 上进行的。

运行 MCP 服务器

我们按照如下的方式来运行我们的 MCP 服务器:

复制代码
fastmcp run src/server/server.py:mcp --transport http --port 9000

如上所示,我们的 MCP 服务器运行于 http://localhost:9000 端口。

导入 MCP 所提供的 tools

我们可以安装入下的方式来导入 MCP 所提供的 tools:

如果我们的 MCP 服务器地址有错误,那么就会弹出错误的信息。我们在完成正确的配置后,点击上面的 Bulk import MCP Tools

这样我们就可以发现我们已经导入的 3 个 tools:

创建 agents

我们接下来创建一个叫做 transactions 的 agent:

我们的 transactions agent 配置如下:

复制代码
You are a helpful banking transaction agent. You help users search and analyze their banking transactions.

Current date: {current_date}

When users ask about transactions, use the appropriate tools:
- Use trans-search for finding specific transactions

For date references:
- "last month" = past 30 days from today
- "this month" = current month from 1st to today
- "last week" = past 7 days
- "this year" = January 1st of current year to today

By default set the make the to date today and the from date 1 year ago
Common categories: groceries, dining, gas, shopping, entertainment, utilities, healthcare, transportation, travel, subscriptions, insurance, phone, internet

使用 transactions agent

我们接下来使用刚创建的 agent:

复制代码
Find all Amazon purchases between $20 and $50
复制代码
Find all transactions over $100 in San Francisco
复制代码
显示我所有加油站购买记录
相关推荐
只是甲7 小时前
Text2SQL 系列博客 02:技术原理深度剖析 - 从自然语言到 SQL 的完整链路
人工智能·text2sql·nl2sql·ai agent·自助数据分析·data agent·agentic 数据洞察
懷淰メ7 小时前
【AI赋能】基于PyQt+YOLO+DeepSeek水上漂浮物检测系统(详细介绍)
人工智能·yolo·目标检测·计算机视觉·pyqt·漂浮物·水上漂浮物
EQUINOX17 小时前
【论文精读】| CLIP精读
大数据·人工智能
PC2005-cloud7 小时前
博文已索引但不展示:一次 Bing SEO 问题排查记录
服务器·人工智能
weixin_408099677 小时前
2026 图片去文字 API 实战:AI一键去除图片文字(附 Python / Java / PHP / JS 完整代码)
人工智能·api接口·图片去水印·石榴智能·ai图像修复·图片去文字
greenbbLV8 小时前
2026节日慰问品政策解读:合规标准升级与福利行业新趋势
人工智能·节日
奈斯先生Vector8 小时前
告别工具碎片化:基于 Nano Banana 全模态 AI 聚合架构搭建“文本-图像-视频”自动化协同生产线
运维·数据库·人工智能·架构·自动化·aigc·音视频
领麦微红外8 小时前
国产MEMS红外测温传感器:传感器+算法+产品级出厂标定一站式交付模式深度解读
人工智能·硬件工程·产品经理
mingo_敏8 小时前
DeepAgents : 检索(Retrieval)
人工智能·深度学习·langchain
微三云 - 廖会灵 (私域系统开发)8 小时前
消费即资产:积分增值异业联盟商业模式完整拆解(附落地逻辑、合规方案与盈利模型)
大数据·人工智能