No native way to pause, block, or require human review. When GPT-4 decides to call a function, it happens automatically. You only find out after the fact — after the email is sent, the record is deleted, or the API is called.
Receive the function_call from OpenAI, pass it through Runplane for policy evaluation, then execute only if approved. Full control over every GPT function call.
import { Shield } from "@runplane/runplane-sdk";
const runplane = new Shield({
apiKey: process.env.RUNPLANE_API_KEY
});
// After receiving function_call from OpenAI, before executing
const message = response.choices[0].message;
if (message.function_call) {
const result = await runplane.guard(
message.function_call.name,
"openai-agent",
JSON.parse(message.function_call.arguments),
async () => executeFunctionCall(message.function_call)
);
if (result.decision === "BLOCKED") {
// Handle blocked action
return { error: "Function call blocked by policy" };
}
}Block dangerous function calls
Require human approval for sensitive operations
Full audit trail of GPT actions
guard() intercepts the action before execution
Policy engine evaluates and returns a decision
Action runs, blocks, or waits for approval
send_email()delete_record()create_user()transfer_funds()