Databricks 发布 Temporal 与 Lakebase 构建持久化 agent 参考实现
展示如何用 Temporal 持久化工作流与 Lakebase 操作状态构建能跨重启恢复的 agent,适合 Databricks 用户参考。
个人贷款审批 agent 需收集证据、应用政策并等待人工审核,期间 worker 可能重启、工具可能失败。Databricks 参考实现用 Temporal 保存执行历史,用 Lakebase Postgres 存放可查询状态,并通过同步表与 Change Data Feed 衔接 Unity Catalog,确保任务中断后能恢复、证据不丢失。
正文摘录
A personal-loan underwriting agent gathers evidence, applies policy, and may wait days for a reviewer. During that time, workers can restart and tool calls can fail. The application must preserve completed work, resume execution, and keep the evidence available to the reviewer. This reference implementation uses Temporal for durable execution and Lakebase Postgres for queryable operational state. A synced table makes underwriting policy from Unity Catalog available in Lakebase. Temporal Activities write evidence, decisions, and metrics to Lakebase; once enabled, Lakebase Change Data Feed can publish those changes to Unity Catalog-managed Delta history tables. This combination is especially useful when Databricks already manages the agent’s inputs and downstream analysis. A cloud agent may …