openai · OpenAI Platform Docs
Agents Guardrails and human review | OpenAI API
Teaches how to implement safety guardrails and human-in-the-loop approval workflows to control agent actions and prevent unauthorized or harmful executions.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Agents Guardrails and human review | OpenAI API
Teaches how to implement safety guardrails and human-in-the-loop approval workflows to control agent actions and prevent unauthorized or harmful executions.
When To Use
Use when designing agentic workflows that require validation of tool calls or sensitive actions through automated constraints or manual human intervention.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/agents-guardrails-approvals-and-human-review-openai-api-workflow-guide.md | A guide explaining how to implement automatic guardrails and human review processes for OpenAI API agents. | Questions about a guide explaining how to implement automatic guardrails and human review processes for OpenAI API agents. |
examples/agents-guardrails-approvals-and-human-review-openai-api-openai-agents-gu.text | A JavaScript code example demonstrating how to define a guardrail agent using the OpenAI Agents SDK to detect specific user intents. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to define a guardrail agent using the OpenAI Agents SDK to detect specifi... |
examples/agents-guardrails-approvals-and-human-review-openai-api-openai-agents-gu-2.text | A Python code example using Pydantic and the OpenAI Agents framework to implement a guardrail agent that validates math homework outputs. | Exact payloads, commands, or snippets shown in A Python code example using Pydantic and the OpenAI Agents framework to implement a guardrail agent that validates ma... |
examples/agents-guardrails-approvals-and-human-review-openai-api-openai-api-agent.text | A JavaScript code example demonstrating how to define an agent tool with the needsApproval property set to true for human review. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to define an agent tool with the needsApproval property set to true for h... |
examples/agents-guardrails-approvals-and-human-review-openai-api-openai-agents-py.text | A Python code example demonstrating how to use the @functiontool decorator with needsapproval=True to implement human-in-the-loop guardrails for an OpenAI Agent. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the @functiontool decorator with needsapproval=True to implement human... |
What This Skill Covers
- Use guardrails for automatic checks and human review for approval decisions. Together, they define when a run should continue, pause, or stop.
- Main sections:
Choose the right control,Add a blocking guardrail,Pause for human review,Approval lifecycle,Workflow boundaries matter.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/agents/guardrails-approvals
