Skip to content

Conversation

@Wania-Kazmi
Copy link

@Wania-Kazmi Wania-Kazmi commented May 15, 2025

Problem:

  1. The documentation states that input guardrails only run on the "first agent" and output guardrails only run on the "last agent", which might be unclear in the context of agent sequences or chains.
  2. The original text for the first step of Output Guardrails incorrectly stated that it receives "the same input passed to the agent"

Solution:

  1. Definitions: For "first agent" (the entry point receiving user input) and "last agent" (the one producing the final output) are added directly into the relevant notes. The text also explicitly reiterates that input guardrails apply to the first agent's input and output guardrails apply to the last agent's output.
  2. Output guardrail Error: This has been corrected to reflect the actual behavior: the guardrail receives "the final output produced by the agent". This aligns the documentation with the code examples and the purpose of output guardrails.

Why this change?
Correction of output guardrail description and the clarification helps users understand exactly which agent in a potential chain will have its input or output checked by these types of guardrails, providing crucial context for system design.

…rrect Output guardrail first step.

Enhanced the documentation for input and output guardrails by specifying that input guardrails apply only to the first agent in a sequence, while output guardrails apply only to the last agent. This clarification improves understanding of how guardrails function in agent chains.
@Wania-Kazmi Wania-Kazmi changed the title Clarify Guardrail execution flow and agent roles Fix incorrect and ambiguous guardrail documentation: Input/Output Guardrails and agent sequencing May 15, 2025
Updated the documentation for output guardrails to specify that the guardrail receives the output produced by the agent, enhancing clarity in the guardrail process.
@github-actions
Copy link
Contributor

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label May 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2025

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant