A device-bound authorization SDK for OpenAI agents. Developers wrap sensitive agent tools so the agent can research and prepare actions, but cannot execute the exact sensitive action until it is cryptographically approved by the intended user on an enrolled device.
Credentials authorize an agent. They do not prove user intent.
The problem
Valid access can still produce the wrong action.
An agent can spend too much, message the wrong person, delete the wrong data, deploy to the wrong environment, share confidential files, or follow malicious and misunderstood instructionsβeven while holding legitimate account credentials. The threat also includes deliberate interference: a bad actor, compromised service, injected instruction, or unauthorized person may try to make your agent act without your knowledge. Possession of credentials alone must never let someone else silently direct a protected action.
The solution
Bind approval to the complete prepared action.
AgentGuard separates reasoning, action preparation, user authorization, and final execution. Research remains free. A sensitive function pauses until the enrolled device approves its exact material payload.
Product components
One protection path, four focused pieces.
01
AgentGuard SDK
Framework-independent Node wrapper at the sensitive execution boundary.
02
Authorization API
Creates, binds, expires, verifies, and transitions exact-action requests.
03
NFTAuth mobile app
Private-beta iOS app for device-bound review, unlock, approve, and deny.
04
Sandbox
Publicly testable simulation of policy, tampering, replay, expiry, and isolation.
Architecture
The agent proposes. The device decides. The server verifies.
User request
OpenAI agentreason + research
Sensitive toolprepared action
AgentGuard SDKpause execution
Authorization APIhash + route
Enrolled devicesigned decision
Verificationexact payload
Execute once
Ten-minute quickstart
Protect one sensitive function.
Developer Preview credentials are currently issued manually by NFTAuth Project. There is no self-service developer dashboard yet.
Never expose the credential in Webflow, browser JavaScript, an iOS bundle, or model context.
Initialize AgentGuard on your Node server.
Continue with the complete server-side example below.
Protect a sensitive tool.
Wrap one sensitive tool execution.
Enroll or select the user.
Register or select the enrolled NFTAuth user.
Run the agent.
Run the OpenAI agent.
Approve from the device.
Review and approve the exact action on the enrolled device.
Execute exactly once.
Confirm the original function executes once.
OpenAI integrations
Wrap the function you control.
AgentGuard is framework-independent. It protects developer-hosted function execution; it does not modify OpenAI-hosted tools without a local execution boundary.
The phone does not decide developer policy, and the SDK protects only explicitly wrapped functions. Read-only research normally does not require approval. Spend, transfer, send, delete, deploy, disclose, publish, permission, and external-modification functions normally do.
The Sandbox policy controls demonstrate this same developer choice visually.
Connecting the mobile application
Route an exact action to its enrolled user.
Current Build Week implementation
The private-beta iOS app registers an email identity, verifies an email code, creates the wallet and non-transferable NFT identity, creates a Secure Enclave P-256 device signing key, stores the registration PIN hash, and uploads its current FCM token through the signed device flow. The server maps the SDK's configured user_id to that enrollment. An authorization push contains only the request ID; the app signs nftauth.agent-action.v1|mobile-fetch|request_id|user_id|timestamp, downloads the complete protected action, validates request ID, owner, status, expiry, and canonical payload hash, then displays the material purchase details. PIN or hardware-card unlock enables approval; denial is available. Its decision signs nftauth.agent-action.v1|mobile-decision|request_id|nonce|decision|payload_hash|timestamp. The server verifies identity, key, NFT/device binding, hash, nonce, timestamp, ownership, expiry, and state before transitioning the request. Developer Preview access can rely on manually configured, pre-enrolled test accounts.
Intended production onboarding β planned
Self-service developer and user linking, credential issuance, account selection, lifecycle management, and broader mobile distribution are planned architecture. QR linking, deep links, connection codes, a developer dashboard, and App Store availability are not part of the current implementation.
Returns sanitized agent-visible status. Requires the same bearer credential. The SDK verifies request ID, agent ID, user ID, run ID, tool-call identity, and payload hash on every response.
Common failures include 401 invalid agent credential, 400 malformed strict action (including a payload over the module's 64 KiB limit), 403 agent identity mismatch, 404 unknown or inaccessible request, 409 enrollment/idempotency conflict, 410 expiry, 429 rate limiting, and fail-closed 503 dependency errors. Denial is terminal status denied.
SDK reference
Small surface, explicit outcomes.
API
Purpose
new AgentGuard(options)
Configure API base, agent ID, credential, polling, authorization/request timeouts, fetch, and optional atomic execution store.
requestAuthorization(options)
Validate and create a strict pending exact-action request.
waitForDecision(request, options?)
Poll and verify until approved, denied, expired, or timed out.
authorize(options)
Create and wait without executing.
authorizeAndExecute(options)
Authorize, atomically claim, call execute once, and return its result.
protect(config)
Wrap a sensitive function using user lookup and material-payload mapping callbacks.
MemoryExecutionStore
Single-process replay claim. Supply shared atomic storage for multi-process deployments.
Typed errors
All extend AgentGuardError: AgentGuardConfigurationError, AuthorizationDeniedError, AuthorizationExpiredError, AuthorizationUnavailableError, PayloadMismatchError, AuthorizationReplayError, InvalidApiResponseError, AuthorizationTimeoutError, and AgentGuardRateLimitError. Safe properties include code, and when applicable status, requestId, and retryAfter.
Security guarantees
Approval is verified, not inferred.
Device-bound signing
The enrolled device key signs the decision; the backend verifies it server-side with NFT/device enrollment.
Exact payload binding
Canonical hashing binds identity, run, tool, version, and every material argument.
Freshness
Expiration, timestamp, a 256-bit nonce, and atomic state transitions reject stale or replayed decisions.
Fail closed
Denial, expiry, mismatch, malformed data, network failure, or unverified status prevents execution.
Execution is claimed once before the callback. The existing Redis-backed agent-run path provides distributed execution locking; SDK users running multiple Node processes must provide an atomic shared executionStore. Isolated sandbox state never grants production approval.
Threat demonstrations
Open the Sandbox to attempt payload tampering, consumed-approval replay, forced expiration, denial, policy bypass for intentionally non-sensitive actions, and cross-session access.
Availability
What is available today.
SDK: Developer Preview, included in the project repository.
Authorization API: live demonstration environment.
Sandbox: publicly testable simulation.
iOS app: private beta, not currently publicly listed in the App Store.
Production self-service onboarding: planned.
Real external actions: limited to the integrations specifically implemented by the developer.
OpenAI Build Week
From working authorization platform to reusable agent protection.
Build Week produced the GPT-5.6 agent orchestration, agent authorization bridge, strict agent action schema, device-bound action approval integration, agent-run lifecycle, exactly-once execution controls, sandbox, reusable AgentGuard SDK, and this developer documentation. The underlying NFTAuth platform, deployed contract, identity work, mobile foundations, and patent predate Build Week.