intermediate20 min readGuide 17 of 21Updated Apr 12, 2026

Framework Cookbook: Support Copilot

See how the same support-copilot workflow maps across OpenAI Agents SDK, LangGraph, PydanticAI, and Vercel AI SDK.

Prerequisites

  • 1Familiarity with at least one agent framework
  • 2Helpful: Choosing Your Stack and Guardrails coverage
  • 3Basic understanding of retrieval, tool calling, and human review

What you will learn

  • How one reference workflow translates across major frameworks
  • Which parts stay constant versus which parts are framework-specific
  • What tradeoffs matter for state, tools, validation, and UI integration
  • How to compare ergonomics without confusing framework style for system design

The Reference Workflow

The reference application is a support copilot for customer-service teams. It does four things:

  • retrieves relevant policy and account context
  • drafts a support response
  • proposes next actions such as refund, escalation, or follow-up
  • requires human approval before high-risk side effects

This workflow is deliberately representative: it combines retrieval, tool use, structured outputs, and approval gates without being tied to one vendor.

OpenAI Agents SDK Shape

With the OpenAI Agents SDK, the support copilot maps naturally to an agent with typed tools, explicit instructions, and a runtime that handles the action loop for you.

agent = Agent(
  name="SupportCopilot",
  instructions="Draft support responses, cite policy, and escalate risky actions.",
  tools=[lookup_account, search_policy, draft_refund_plan],
)

This approach is strong when you want a direct agent abstraction with clean tool orchestration and minimal graph plumbing.

LangGraph Shape

In LangGraph, the same workflow is easier to model as explicit state transitions: classify request, retrieve context, draft response, validate, then route either to approval or final output.

START -> classify -> retrieve -> draft -> validate -> {approve | finalize}

This is a good fit when the workflow has branching, recovery logic, or durability requirements that should be visible in the architecture.

PydanticAI and Vercel AI SDK Shapes

PydanticAI makes the support copilot attractive when typed inputs and outputs are central. Its value shows up in structured result validation, safer tool signatures, and explicit data models.

Vercel AI SDK becomes compelling when the support copilot is tightly tied to a web UI: streaming drafts, message-based interactions, and attachment-aware chat surfaces are first-class concerns.

The key lesson is that the workflow stays the same. What changes is where the framework gives you leverage: runtime orchestration, type safety, or UI delivery.

What to Compare Across Frameworks

When comparing framework implementations, do not ask only “which one looks cleaner?” Compare the parts that affect production work:

  • state model and workflow visibility
  • tool definition ergonomics
  • typed validation support
  • human-approval integration
  • streaming and UI fit
  • testing and observability hooks

A cookbook is valuable when it keeps the business workflow constant and changes only the implementation surface. That makes framework tradeoffs visible instead of hypothetical.

Common Mistakes to Avoid

  • !Comparing framework syntax instead of comparing workflow fit, state handling, and production controls
  • !Changing the business workflow between implementations and calling it a fair comparison
  • !Ignoring approval, observability, or validation paths because they make one framework look heavier
  • !Choosing a framework only from the hello-world experience instead of the real workflow shape
  • !Treating UI tooling and backend orchestration as the same category of decision

Explore Related Content