Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/agents-guardrails-approvals-and-human-review-openai-api-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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