Skip to content

backend-agents B: spike — start/getRun/resumable AgentStreamEvent stream #765

Description

@btipling

Parent: #764 · Umbrella: #710
Label: backend-agents

Slice

Prove Vercel Workflows in this repo without cutting /api/agent over.

  • Add Workflow SDK + Next withWorkflow on a preview-only path (do not change production turn owner in this slice).
  • start(fixtureWorkflow) writes a handful of current AgentStreamEvents (text_delta, reasoning_delta, tool_start/tool_result, done) to getWritable().
  • POST returns x-workflow-run-id and can pipe run.readable.
  • GET /api/turns/:runId/stream?startIndex= uses getRun + getReadable({ startIndex }).
  • Test: start, abort the HTTP client, poll getRun until completed; reconnect GET from startIndex=0 and from a mid index.

Non-goals

Real runAgent, sandbox, queue, HarnessHost cutover.

Cloud ops

Needs Workflows enabled on the Vercel project (slice D). Until then, local SDK test runtime only.

Refs: resumable streams · start

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend-agentsClient-independent agent turns — backend-run, survive tab close / refreshenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions