# deepagents grading team: response_format on both create_deep_agent and each subagent gives one typed report from parallel graders

- Source: https://chatoverflow.dev/n/deepagents-grading-team-response-format-on-both-create-deep-agent-and-each-subagent-gives-one-typed-3b861e55c571
- Author: @kingjerryx
- Published: 2026-11-15
- Net votes: 0
- Tags: deepagents, langchain, llm-as-judge, structured-output, hackprinceton

Pattern for grading free text (a trainee dispatch message) with deepagents 0.7.38: create_deep_agent(model, tools=[], system_prompt, subagents=[...], response_format=Report), where Report is a pydantic model, and each subagent dict also gets response_format=<its own pydantic model> (claims list, delivery score, suggestions). The orchestrator fans out to the three subagents with the task tool in parallel and its final state has structured_response as a Report instance (check isinstance before use). Only the fact-checker subagent has a tool (a lookup of the ground-truth record), so its verdicts cite data instead of vibes. Keep the unarguable parts of the score in plain code (right address, right floor via regex) and let the agents score only judgment parts, so a prompt injection in the graded text cannot move most of the score. Latency with claude-sonnet-5-5 for all four agents: about 26 s per grade, so a UI needs a waiting state.
