Skip to content

Permission Request

Premium

A permission card where an agent asks for access and you allow it once, for this chat or always for a pattern, then revoke it from the receipt.

AI Agent UIAI coding agentsBrowser agentsEnterprise assistants

Wants to reach api.weather.dev

Request 1 of 2

To fetch the 7-day forecast for your trip summary.

Only this timeJust this request
For this chatUntil this chat ends
Always for

Also covers /v2/alerts and /v2/history

The pattern does not match this request. Edit it, or choose a narrower option.

Examples

Four permission requests

Wants to reach api.payments-sandbox.example.dev

Request 1 of 4

To check whether the renewal webhook signature matches the sandbox key.

Only this timeJust this request
For this chatUntil this chat ends
Always for

Every request that matches this pattern

The pattern does not match this request. Edit it, or choose a narrower option.
No permissions requested

Add to your projectPremium component

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for one inside Claude Code, Codex, or Cursor and it installs the component you pick. Works with any AI Canvas account, free or premium.

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

AccessRequest

PropTypeDefaultDescription
idreqstring-Stable request identifier that must be unique within the requests list.
kindreqAccessKind-Selects the request wording, icon and scope choices.
targetreqstring-Resource or command the agent wants to access.
summarystring-Short context shown above the reason; left out, the reason moves up with no summary.
whyreqstring-Explanation shown for why the access is needed.
patternstring-Initial editable pattern for always access; left out, a pattern is derived from kind and target.
coverage(pattern: string) => string-Describes what an edited always-access pattern covers; left out, built-in coverage text is used.
allowAlwaysboolean-Allows the always scope when true for non-secret requests; left out, always is allowed for every kind except secret.

PermissionScope

PropTypeDefaultDescription
requestsAccessRequest[]-Supplies access requests shown one at a time; left out, the component plays its demo, while passing it turns the demo off.
onDecide(id: string, decision: AccessDecision) => void-Reports an allow or deny decision while the receipt is still tracked locally; left out, no decisions are reported.
onRevoke(id: string) => void-Reports revocation of chat or always access while the receipt still changes locally; left out, no revocations are reported.
onReason(id: string, text: string) => void-Receives the explanation submitted after a denial while the receipt still changes locally; left out, no explanations are reported.
classNamestring-Adds classes to the outermost root; left out, only the built-in classes are used.
tuningPartial<PermissionScopeTuning>-Overrides permission measurements, timing and motion values; left out, every value in PERMISSION_SCOPE_TUNING is used.

About Permission Request

Permission Scope is the card an agent shows when it needs a capability: read a folder, use the network, run a command class, access a secret. The scope is the decision, a segmented control for once, this session or always with the Allow label following it. Details expand to the exact paths or hosts in mono with checkboxes, so unchecking narrows the grant and the callback carries only what stayed checked. Write and secret tiers show a chip and disable always by default, secrets are masked with a reveal, and the decision folds into a receipt with undo and a Revoke link.

Built with

MotionTailwind CSS

Frequently asked questions

Is Permission Request free to use?
Permission Request is a Premium AI Canvas component. Premium unlocks the full source code, the full remix prompt, and one-command installs for every Premium component, block, and template.
How do I install Permission Request?
Premium unlocks one-command installs: run the shadcn CLI with your AI Canvas token, or connect the AI Canvas MCP server and ask your AI editor to install it for you. Premium also unlocks the full remix prompt in the Remix panel.
What is Permission Request built with?
Permission Request is built with React and TypeScript, using Motion and Tailwind CSS. It ships with both light and dark styling.
Where would I use Permission Request?
Common uses include AI coding agents, Browser agents, and Enterprise assistants. Like every AI Canvas component, it is self-contained and drops into any React project.
Can I remix Permission Request with AI?
Yes. Open "Remix with AI" on this page to read the setup and the constants Permission Request is built from. The engine, the markup and the notes on how it works are part of Premium. For the exact component, install it with the one-command CLI.

Featured in collections

More like this