当前位置:首页>python>A2A 实践——用 Python 从零搭建多 Agent 协作系统

A2A 实践——用 Python 从零搭建多 Agent 协作系统

  • 2026-07-02 13:05:03
A2A 实践——用 Python 从零搭建多 Agent 协作系统

导读:上一篇我们用"企业微信"的类比搞懂了 A2A 协议的四个核心概念。这一篇,我们用 Python 写两个 Agent,让它们在本地跑起来,完成一次真正的多 Agent 协作。两个文件,约 90 行代码,每一行都能看懂。

上一篇我们搞懂了 A2A 是什么,这一篇我们来动手写代码。

上一篇文章中,我们把 A2A 彻底讲清楚了:A2A 是 Agent 之间的"企业微信"——一套让不同 Agent 互相发现、沟通、协作的标准协议。 Agent Card 是名片,Task 是任务单,Message 是工作沟通,Artifact 是工作成果。

概念懂了,你可能会想:说了这么多,代码到底长什么样?Agent Card 在代码里是什么?Task 的状态怎么流转?两个 Agent 之间到底是怎么"对话"的?

今天我们就来回答这个问题。我们会用 Python 从零搭建两个 Agent——一个"简历筛选 Agent"(干活的),一个"招聘主管"(派活的)——让它们通过 A2A 协议在本地完成一次完整的协作。

两个文件加起来约 90 行代码,每一行都能看懂。


一、准备工作

开始之前,确认两件事。

Python 版本

A2A 的官方 SDK 要求 Python 3.10 或以上。运行以下命令检查:

python3 --version

如果版本低于 3.10,先升级 Python。

安装 SDK 和创建项目

# 创建项目目录
mkdir a2a-demo && cd a2a-demo

# 创建虚拟环境
python3 -m venv .venv
source .venv/bin/activate   # Windows 用: .venv\Scripts\activate

# 安装 A2A SDK(含 HTTP 服务端支持)和 HTTP 服务器
pip install "a2a-sdk[http-server]" uvicorn

a2a-sdk 是 A2A 协议的官方 Python 实现,一个库搞定 Server 端和 Client 端。uvicorn 是 HTTP 服务器,用来启动 Agent 服务。

安装完成后,我们的项目结构很简单——只需要写两个文件:

a2a-demo/
├── resume_screener.py   # 简历筛选 Agent(Remote Agent,干活的)
└── hiring_manager.py    # 招聘主管(Client,派活的)

二、写 Remote Agent:简历筛选 Agent

还记得上一篇的类比吗?Remote Agent 就是接任务的一方。 它需要做三件事:

  1. 亮出名片(Agent Card)—— 告诉别人自己能干什么
  2. 实现业务逻辑(AgentExecutor)—— 收到任务后怎么处理
  3. 启动服务—— 在网络上"上线",等待别人来派活

我们一步步来。

第一步:定义名片(Agent Card)

上一篇说过,Agent Card 就是 Agent 的"员工名片"。在代码里,它是一个 AgentCard 对象:

from a2a.types import AgentCard, AgentCapabilities, AgentSkill

# 定义技能
skill = AgentSkill(
    id='resume_screening',
    name='简历筛选',
    description='根据职位要求筛选匹配的候选人',
    tags=['recruiting''screening'],
    examples=['筛选高级后端工程师候选人'],
)

# 定义名片
agent_card = AgentCard(
    name='简历筛选 Agent',
    description='根据职位要求,从候选人库中筛选匹配的人选',
    url='http://127.0.0.1:9999',
    version='1.0.0',
    default_input_modes=['text/plain'],
    default_output_modes=['text/plain'],
    capabilities=AgentCapabilities(streaming=False),
    skills=[skill],
)

对照上一篇的概念:

  • AgentSkill = 名片上写的"擅长什么"
  • AgentCard = 完整的名片,包含姓名、简介、技能、联系地址
  • url = "怎么联系我"——服务地址

这就是科普里说的"Agent Card"在代码里的样子。

第二步:实现业务逻辑(AgentExecutor)

Agent Card 只是"自我介绍",真正干活的是 AgentExecutor。它是一个抽象类,我们需要实现两个方法——execute(收到任务后怎么处理)和 cancel(如何取消任务)。

from a2a.server.agent_execution import AgentExecutor, RequestContext
from a2a.server.events import EventQueue
from a2a.client.helpers import create_text_message_object
from a2a.types import Role

classResumeScreenerExecutor(AgentExecutor):
"""简历筛选 Agent 的业务逻辑"""

asyncdefexecute(self, context: RequestContext, event_queue: EventQueue):
# 1. 读取用户发来的消息
        user_message = ''
if context.message and context.message.parts:
for part in context.message.parts:
if hasattr(part.root, 'text'):
                    user_message = part.root.text
break

# 2. 执行"筛选"逻辑(这里用模拟数据演示)
        result = self._screen_resumes(user_message)

# 3. 把结果发回去
        msg = create_text_message_object(role=Role.agent, content=result)
await event_queue.enqueue_event(msg)

asyncdefcancel(self, context: RequestContext, event_queue: EventQueue):
raise Exception('cancel not supported')

def_screen_resumes(self, requirement: str) -> str:
"""模拟简历筛选逻辑"""
# 实际项目中,这里会连接数据库或调用大模型
        candidates = [
            {'name''张三''experience''6年 Go,分布式系统''match''95%'},
            {'name''李四''experience''8年 Go,微服务架构''match''90%'},
            {'name''王五''experience''5年 Go,云原生''match''85%'},
        ]
        lines = [f'根据需求「{requirement}」,筛选出以下候选人:\n']
for c in candidates:
            lines.append(f"- {c['name']}{c['experience']}(匹配度 {c['match']})")
return'\n'.join(lines)

逐段解析:

  • **context.message**:用户发来的消息,对应科普里的 Message
  • **event_queue.enqueue_event()**:把结果包装成 Message 发回去,SDK 会自动将消息推送给 Client
  • **_screen_resumes()**:业务逻辑。这里用模拟数据演示,实际项目中可以连数据库或调用大模型

AgentExecutor 就是 Agent 的"大脑"——收到任务,处理,返回结果。

第三步:启动服务

名片有了,业务逻辑有了,最后把它们组装起来,启动 HTTP 服务:

import uvicorn
from a2a.server.request_handlers import DefaultRequestHandler
from a2a.server.tasks import InMemoryTaskStore
from a2a.server.apps.jsonrpc.starlette_app import A2AStarletteApplication

# 组装:执行器 + 任务存储 → 请求处理器
request_handler = DefaultRequestHandler(
    agent_executor=ResumeScreenerExecutor(),
    task_store=InMemoryTaskStore(),
)

# 创建 A2A 应用:名片 + 请求处理器 → Starlette 应用
a2a_app = A2AStarletteApplication(
    agent_card=agent_card,
    http_handler=request_handler,
)
app = a2a_app.build()

# 启动
uvicorn.run(app, host='127.0.0.1', port=9999)

这段代码做了三件事:

  1. DefaultRequestHandler:把 AgentExecutor 和 InMemoryTaskStore(内存中的任务存储)组合在一起,负责处理所有传入的 A2A 请求
  2. A2AStarletteApplication:把 AgentCard 和请求处理器组装成一个完整的 Starlette 应用,自动发布 Agent Card 到 /.well-known/agent-card.json 并处理 JSON-RPC 消息
  3. **uvicorn.run()**:启动应用,监听 9999 端口

启动服务 = 在"企业微信"上注册了一个账号,别的 Agent 可以找到你、给你派活了。

完整代码:resume_screener.py

把以上三步合在一起,就是 resume_screener.py 的完整代码:

import uvicorn
from a2a.server.agent_execution import AgentExecutor, RequestContext
from a2a.server.events import EventQueue
from a2a.server.request_handlers import DefaultRequestHandler
from a2a.server.tasks import InMemoryTaskStore
from a2a.server.apps.jsonrpc.starlette_app import A2AStarletteApplication
from a2a.client.helpers import create_text_message_object
from a2a.types import AgentCapabilities, AgentCard, AgentSkill, Role


classResumeScreenerExecutor(AgentExecutor):
"""简历筛选 Agent 的业务逻辑"""

asyncdefexecute(self, context: RequestContext, event_queue: EventQueue):
        user_message = ''
if context.message and context.message.parts:
for part in context.message.parts:
if hasattr(part.root, 'text'):
                    user_message = part.root.text
break

        result = self._screen_resumes(user_message)
        msg = create_text_message_object(role=Role.agent, content=result)
await event_queue.enqueue_event(msg)

asyncdefcancel(self, context: RequestContext, event_queue: EventQueue):
raise Exception('cancel not supported')

def_screen_resumes(self, requirement: str) -> str:
        candidates = [
            {'name''张三''experience''6年 Go,分布式系统''match''95%'},
            {'name''李四''experience''8年 Go,微服务架构''match''90%'},
            {'name''王五''experience''5年 Go,云原生''match''85%'},
        ]
        lines = [f'根据需求「{requirement}」,筛选出以下候选人:\n']
for c in candidates:
            lines.append(f"- {c['name']}{c['experience']}(匹配度 {c['match']})")
return'\n'.join(lines)


if __name__ == '__main__':
    skill = AgentSkill(
        id='resume_screening',
        name='简历筛选',
        description='根据职位要求筛选匹配的候选人',
        tags=['recruiting''screening'],
        examples=['筛选高级后端工程师候选人'],
    )

    agent_card = AgentCard(
        name='简历筛选 Agent',
        description='根据职位要求,从候选人库中筛选匹配的人选',
        url='http://127.0.0.1:9999',
        version='1.0.0',
        default_input_modes=['text/plain'],
        default_output_modes=['text/plain'],
        capabilities=AgentCapabilities(streaming=False),
        skills=[skill],
    )

    request_handler = DefaultRequestHandler(
        agent_executor=ResumeScreenerExecutor(),
        task_store=InMemoryTaskStore(),
    )

    a2a_app = A2AStarletteApplication(
        agent_card=agent_card,
        http_handler=request_handler,
    )
    app = a2a_app.build()
    uvicorn.run(app, host='127.0.0.1', port=9999)

总共 60 行左右。Server 端就完成了。


三、写 Client:招聘主管发起协作

Server 端的"简历筛选 Agent"已经就绪了。现在我们来写 Client 端——招聘主管。它要做三件事:

  1. 发现:找到简历筛选 Agent(读取 Agent Card)
  2. 派任务:发送一条消息,描述招聘需求
  3. 收成果:接收筛选结果

这正是上一篇科普里讲的 A2A 工作流程:发现 → 派任务 → 收成果。

完整代码:hiring_manager.py

import asyncio
import uuid
import httpx
from a2a.client import A2ACardResolver, A2AClient
from a2a.client.helpers import create_text_message_object
from a2a.types import MessageSendParams, SendMessageRequest, Role


asyncdefmain():
asyncwith httpx.AsyncClient() as httpx_client:
# 第一步:发现 —— 读取远程 Agent 的名片
        resolver = A2ACardResolver(
            httpx_client=httpx_client,
            base_url='http://127.0.0.1:9999',
        )
        agent_card = await resolver.get_agent_card()
        print(f'发现 Agent:{agent_card.name}')
        print(f'技能:{[s.name for s in agent_card.skills]}\n')

# 第二步:派任务 —— 发送招聘需求
        client = A2AClient(httpx_client=httpx_client, agent_card=agent_card)
        message = create_text_message_object(
            role=Role.user,
            content='筛选高级后端工程师候选人,要求 5 年以上 Go 语言经验,有分布式系统背景',
        )
        request = SendMessageRequest(
            id=str(uuid.uuid4()),
            params=MessageSendParams(message=message),
        )

        print('派发任务...\n')

# 第三步:收成果 —— 接收响应
        response = await client.send_message(request)
        result = response.root.result
        print('收到 Agent 回复:')
for part in result.parts:
if hasattr(part.root, 'text'):
                print(part.root.text)


asyncio.run(main())

逐段对照科普里的概念:

代码
做了什么
对应科普概念
A2ACardResolver
读取远程 Agent 的名片
发现(Agent Card)
A2AClient
建立与远程 Agent 的连接
建立沟通渠道
create_text_message_object()
构造一条消息
Message
SendMessageRequest
发送任务请求
派任务(Task)
response.root.result
读取 Agent 回复的消息
Message(工作成果)

不到 30 行代码,Client 端也完成了。


四、运行 & 验证

现在是最激动人心的时刻——让两个 Agent 跑起来。

启动 Server

打开第一个终端,启动简历筛选 Agent:

cd a2a-demo
source .venv/bin/activate
python resume_screener.py

你会看到类似这样的输出:

INFO:     Started server process [PID]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:9999 (Press CTRL+C to quit)

这表示 Agent 已经"上线"了,它的 Agent Card 发布在 http://127.0.0.1:9999/.well-known/agent-card.json

运行 Client

打开第二个终端,运行招聘主管:

cd a2a-demo
source .venv/bin/activate
python hiring_manager.py

你会看到这样的输出:

发现 Agent:简历筛选 Agent
技能:['简历筛选']

派发任务...

收到 Agent 回复:
根据需求「筛选高级后端工程师候选人,要求 5 年以上 Go 语言经验,有分布式系统背景」,筛选出以下候选人:

- 张三:6年 Go,分布式系统(匹配度 95%)
- 李四:8年 Go,微服务架构(匹配度 90%)
- 王五:5年 Go,云原生(匹配度 85%)

整个过程发生了什么?

  1. Client 发现了 Server:通过 A2ACardResolver 读取了 Agent Card,知道了对方叫"简历筛选 Agent",技能是"简历筛选"
  2. Client 派了任务:把招聘需求包装成 Message,通过 SendMessageRequest 发送
  3. Server 执行了任务ResumeScreenerExecutor.execute() 被调用,处理需求,返回结果
  4. Client 收到了回复:Agent 返回的 Message 里包含了筛选出的候选人名单

这就是 A2A 协议的完整工作流程——发现、派活、收货,用代码走了一遍。


五、代码 vs 概念:一一对照

让我们用一张表格,把代码中的关键类名映射回上一篇科普里的四个核心概念:

科普概念
一句话回忆
代码中的对应
所在文件
Agent Card
Agent 的"员工名片"
AgentCard
 + AgentSkill
resume_screener.py
Task
协作的最小工作单元
SendMessageRequest
 发起任务
hiring_manager.py
Message
Agent 之间的通信消息
create_text_message_object()
 → part.root.text
两个文件都有

还有几个科普里没详细展开、但代码中出现的重要角色:

代码类名
做了什么
AgentExecutor
定义 Agent 的业务逻辑(实现 execute 方法)
DefaultRequestHandler
处理传入的 A2A 请求,管理 Task 生命周期
A2AStarletteApplication
把 AgentCard 和请求处理器组装成完整的 HTTP 应用
InMemoryTaskStore
在内存中存储 Task 状态
A2ACardResolver
从远程 URL 获取 Agent Card

概念到代码,只差一层"翻译"。上一篇记住了四个概念,这一篇就能读懂所有代码。


六、总结

回顾一下我们今天做了什么:

  1. 安装 a2a-sdk:一个库搞定 Server 和 Client
  2. 写了一个 Remote Agent(简历筛选):定义 AgentCard + 实现 AgentExecutor + 启动服务
  3. 写了一个 Client(招聘主管):发现 Agent Card + 发送任务 + 接收结果
  4. 本地运行:两个终端,完整走了一遍 A2A 工作流程

总共约 90 行代码。

当然,今天的示例用的是模拟数据——_screen_resumes 方法里的候选人是写死的。在真实项目中,这里可以替换成:调用大模型做智能匹配、查询数据库获取真实简历等。

回到我们系列的概念链:

LLM → Token → Context → Prompt → Tool → MCP → Agent → Skill → A2A

这条链上的每一环,我们都从"概念"走到了"代码"。A2A 是这条链的最后一环——从单个 Agent 的能力建设,到多个 Agent 的团队协作。

下一篇,我们将使用 Google ADK 来简化这个过程——用一行 to_a2a() 替代 40 行样板代码,实现同样的多 Agent 协作。


如果这篇文章对你有帮助,欢迎点赞、收藏、转发。有任何问题,欢迎在评论区交流。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 13:45:58 HTTP/2.0 GET : https://f.mffb.com.cn/a/497164.html
  2. 运行时间 : 0.484283s [ 吞吐率:2.06req/s ] 内存消耗:4,575.91kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=72667a8e1b2ad0d108ae8fae49d5283b
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000889s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001329s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.004745s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.013688s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001438s ]
  6. SELECT * FROM `set` [ RunTime:0.018315s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001332s ]
  8. SELECT * FROM `article` WHERE `id` = 497164 LIMIT 1 [ RunTime:0.006557s ]
  9. UPDATE `article` SET `lasttime` = 1783057558 WHERE `id` = 497164 [ RunTime:0.011872s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.006764s ]
  11. SELECT * FROM `article` WHERE `id` < 497164 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.014572s ]
  12. SELECT * FROM `article` WHERE `id` > 497164 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001145s ]
  13. SELECT * FROM `article` WHERE `id` < 497164 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.103811s ]
  14. SELECT * FROM `article` WHERE `id` < 497164 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.062471s ]
  15. SELECT * FROM `article` WHERE `id` < 497164 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.093321s ]
0.488563s