ai-agent-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMulti-Agent Workflows
多Agent工作流
Build resumable multi-agent workflows with durable execution, tool loops, and automatic stream recovery on client reconnection.
构建具备持久执行、工具循环和客户端重连时自动流恢复功能的可恢复型多Agent工作流。
Prerequisites
前置条件
Complete these recipes first (in order):
请按顺序完成以下前置教程:
Type-Safe Environment Configuration
类型安全的环境配置
Type-safe environment variable validation using Zod with a Drizzle-like schema API. Supports server/public fields, feature flags, either-or constraints, and client-side protection.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup使用Zod和类Drizzle的Schema API实现类型安全的环境变量验证。支持服务端/公开字段、功能标志、二选一约束以及客户端保护。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setupNeon + Drizzle Setup
Neon + Drizzle 配置
Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup使用Drizzle ORM将Next.js应用连接到Neon Postgres,针对Vercel无服务器函数优化连接池。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setupBetter Auth Setup
Better Auth 配置
Add user authentication using Better Auth with Drizzle ORM and Neon Postgres. Base setup with email/password authentication.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-setup结合Drizzle ORM和Neon Postgres,使用Better Auth添加用户认证。基础配置包含邮箱/密码认证功能。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-setupAI Chat Persistence with Neon
基于Neon的AI对话持久化
Persist AI chat conversations to Neon Postgres with full support for AI SDK message parts including tools, reasoning, and streaming. Uses UUID v7 for chronologically-sortable IDs.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-chat-persistence将AI对话持久化到Neon Postgres,全面支持AI SDK消息组件,包括工具、推理和流处理。使用UUID v7生成可按时间排序的ID。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-chat-persistencePino Logging Setup
Pino 日志配置
Configure structured logging with Pino. Outputs human-readable colorized logs in development and structured JSON in production for log aggregation services.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/pino-logging-setup使用Pino配置结构化日志。开发环境输出人类可读的彩色日志,生产环境输出结构化JSON日志,适配日志聚合服务。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/pino-logging-setupCookbook - Complete These Recipes in Order
教程手册 - 按顺序完成以下教程
Workflow Development Kit Setup
工作流开发工具包配置
Install and configure the Workflow Development Kit for resumable, durable AI agent workflows with step-level persistence, stream resumption, and agent orchestration.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/workflow-setup安装并配置工作流开发工具包,用于构建具备步骤级持久化、流恢复和Agent编排功能的可恢复型、持久化AI Agent工作流。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/workflow-setupResumable AI Response Streams
可恢复的AI响应流
Add automatic stream recovery to AI chat with WorkflowChatTransport, start/resume API endpoints, and the useResumableChat hook.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/resumable-ai-streams通过WorkflowChatTransport、启动/恢复API端点和useResumableChat钩子,为AI对话添加自动流恢复功能。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/resumable-ai-streamsCustom Durable Agent
自定义持久化Agent
Build a custom durable AI agent with full control over streamText options, provider configs, and tool loops. Compatible with the Workflow Development Kit.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/custom-durable-agent构建自定义持久化AI Agent,全面控制streamText选项、提供商配置和工具循环。与工作流开发工具包兼容。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/custom-durable-agentWorking with Workflows
工作流使用指南
Create and run durable workflows with steps, streaming, and agent execution. Covers starting, resuming, and persisting workflow results.
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-workflows创建并运行包含步骤、流处理和Agent执行的持久化工作流。涵盖工作流的启动、恢复和结果持久化。
bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-workflows