惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
量子位
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
V
Visual Studio Blog
雷峰网
雷峰网
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
T
The Blog of Author Tim Ferriss
U
Unit 42
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
Y
Y Combinator Blog

博客园 - 荣锋亮

just-git 纯js 的git 实现 阿里开源的UnifiedModel agno agentos interfaces 简单说明 agno agentos ag-ui 协议 agno agentos 暴露a2a 协议 agno gateway模式 agno 多agent 框架集成能力 agno agentos 简单说明 agno workflow 模式简单说明 agno team agent 简单说明 agno remote agent 简单说明 agno agent 使用 agno agent 平台 sshpiper 简单试用 sshpiper ssh 的反向代理服务 context-propagation spring reactor 的上下文传递包 nginx 发布1.31.2 了 reductstore 的一些部署模式 reductstore 数据写入模式 reductstore bridge 方便reductstore数据bridge 扩展 reductstore zenoh 集成 zenoh 1.9.x 一些新特性 ladybugdb嵌入式图数据库 BlockHound 检测 reactor阻塞调用的agent reductstore 高性能面向机器人以及IOT场景的存储以及流数据基石 zerofs 一些新功能 java nats request-many 支持的一些模式 java nats RequestMany context7 面向llm 以及ai代码编辑器的依赖包更新平台 NATS Agents Protocol nats 团队提出的agent 通信协议
llama-agents workflow 持久化运行的一些玩法
荣锋亮 · 2026-05-28 · via 博客园 - 荣锋亮

对于workflow 的持久化处理,在执行中还是很重要的,官方提供了一些思路

共享数据模式

实际上就是通过存储彬变量在三方中,复用使用

class DbWorkflow(Workflow):
    def __init__(self, db: Client, *args, **kwargs):
        self.db = db
        super().__init__(*args, **kwargs)

    @step
    def count(self, ev: StartEvent) -> StopEvent:
        num_rows = self.db.exec("select COUNT(*) from t;")
        return StopEvent(result=num_rows)

存储数据在context 对象中

w = MyWorkflow()
handler = w.run()
context = handler.ctx
# Save the context to a database
db.save("id", context.to_dict())

#
# Restart the Python process...
#

w = MyWorkflow()
# Load the context from the database
context = Context.from_dict(w, db.load("id"))
# Pass the context containing the state to the workflow
result = await w.run(ctx=context)

外部resource 注入模式

实际上就是使用resource(可以是各类共享存储)

说明

持久运行还是比较重要的,尤其是需要可靠执行的场景,官方提供了一些思路可以学习下

参考资料

https://developers.llamaindex.ai/python/llamaagents/workflows/durable_workflows/