Skip to content

Implement structured output across multiple agents and phases#2660

Draft
robgruen wants to merge 32 commits into
mainfrom
dev/robgruen/structured_output
Draft

Implement structured output across multiple agents and phases#2660
robgruen wants to merge 32 commits into
mainfrom
dev/robgruen/structured_output

Conversation

@robgruen

Copy link
Copy Markdown
Collaborator

This pull request introduces a comprehensive "structured output" system for agent display content, enabling agents to return rich, semantically-typed documents (tables, lists, cards, images, etc.) with automatic markdown/text fallbacks for legacy clients. It adds a new StructuredContent type and related block types to the SDK, a builder function for creating structured results, and supporting helpers. The changes also include test scaffolding and documentation of the rollout plan and status.

The most important changes are:

Structured Output System (Core Types & Helpers):

  • Added StructuredContent and a suite of typed block interfaces (e.g., TableBlock, ListBlock, CardBlock, etc.) to display.ts, allowing agents to describe UI output as a semantic block document with optional machine-readable payloads and automatic markdown/text alternates.
  • Added the createStructuredResult helper to actionHelpers.ts for constructing action results with structured content, including automatic fallback and memory text derivation.
  • Updated imports and exports throughout the SDK to support the new structured output system, including exporting block types and helpers. [1] [2]

Testing Infrastructure:

  • Added a jest.config.cjs to the agent SDK package and new npm scripts in package.json to enable local and ESM-mode Jest testing for agent builders and derivation logic. [1] [2]

Documentation and Planning:

  • Added a detailed status and rollout tracker for structured output in docs/plans/structured-output/STATUS.md, covering phases, agent adoption, test coverage, and open questions.

Other:

  • Updated the repository to include the node_modules directory for the VSCode chat package.

Copilot AI and others added 27 commits July 11, 2026 18:35
Copilot stopped work on behalf of robgruen due to an error July 15, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants