Skip to content

output_format support for AgentDefinition (subagents)?Β #440

@pixelsoccupied

Description

@pixelsoccupied

ClaudeAgentOptions supports output_format for structured JSON outputs:

ClaudeAgentOptions(
    output_format={"type": "json_schema", "schema": {...}} 
)

However, AgentDefinition (for subagents) does not:

  AgentDefinition(
      description="...",
      prompt="...",
      tools=["Read"],
      model="haiku",
      # output_format=???  # -------------------------->Not available
  )

I'm building a data processing pipeline where specialized subagents extract and transform data. Each step needs to produce structured JSON that the next step (or external systems) can reliably consume.

Questions

  1. Is this a deliberate design decision? If so, what's the reasoning?
  2. Is there a recommended pattern for getting structured data from subagents?
  3. Are there plans to add output_format support to AgentDefinition?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions