Skip to main content
Add a WorkflowAgent to give a workflow a multi-turn interface. For each message, the agent either answers from recent workflow history or runs the workflow for new work.

Quick Start

WorkflowAgent is a restricted Agent configured for workflow orchestration. The workflow supplies its run_workflow tool.

Architecture

Workflows conversational workflows diagram

Workflow History for Conversational Workflows

The WorkflowAgent receives recent workflow runs from the current session. This context supports follow-up questions and comparisons across prior results. Configure a database on the workflow to persist session history between process restarts. See Workflow history.

Instructions for the WorkflowAgent

The default instructions direct the agent to answer from history when possible and call run_workflow once for new work. Pass instructions to replace that decision policy. Workflow context is appended automatically unless the instructions already contain {workflow_context}.

Usage Example

Start PgVector on port 5532 before running this example.

Developer Resources