Agent permissions
What each agent may do on its own: a waiting request to Grant or Deny, a table of actions and levels with Edit, a switch to stop all agents, and the default for new actions.
Install
Not exported from agentic-ds-kit. add copies the source into your app (components/patterns/agent-permissions/) with this contract beside it. You own the copy: replace the demo data, rearrange or drop sections, and keep the must lines.
Usage
What a copy keeps
The contract’s must lines: the kit look and accessibility. Ask before breaking one.
- Use kit components from agentic-ds-kit for anything the kit has; no local cousins (request cards, level pickers, autonomy sliders, edit panels)
- Semantic tokens only (agentic-ds-kit/tokens.css); no raw hex, no primitive --color-* ramps
- At most one appearance="solid" mode="primary" Button per view: Grant on the page, Save level in the Edit Drawer
- Do not restyle kit components; change them through their props, slots, and tokens
- Render the page content inside a main landmark; the top bar is AppHeader (a header landmark), and below 640 the nav is reachable from a Menu button in a kit Drawer. With topBar={false} the surrounding app shell gives the header and nav
- A waiting request is the kit PermissionRequest, first on the page, with its own Grant / Deny wording and one-line result
- A level is always an icon and a word, never the icon or colour alone; a level set by workspace policy has no Edit and no drill
- The amount for "Up to an amount" is a kit CurrencyInput under the RadioGroup, not inside an option
Defaults you can change
- Demo is Northwind's billing agents: Collections agent asks to refund up to $500 without asking (now $250, until 22 Dec), and 4 actions across 2 agents
- The request maps onto one scope (Refunds, write, $500 per refund, 30 days until 22 Dec), names the agent in requestedAt, and the one-line result shows the time
- Granting raises the refunds row to Up to $500; while it waits the row shows "$500 requested"
- The switch card and the Default for new actions dial stack full width, the switch first
- The denied row names the agent and what it asked for ("Collections agent · above the $250 limit") and ends in a ghost Button "Change level" that opens the same Edit Drawer as the table row
- Below 640 Last used drops, the list shows the level word as the row value, and the Default for new actions dial is left out
Built from
Related
- Component
AppHeader
Product top chrome: brand mark on the start, centered kit Input search, trailing actions.
- Component
Drawer
Edge panel for secondary tasks.
- Component
SideNav
Product side nav: brand header, icon items, optional badges, closeable; variant single (one column that closes to an icon rail) or rail-subnav (a fixed icon rail plus a SideNav.SubNav column with the picked parent's rows).
- Component
PageHeader
Top-of-page title with optional Breadcrumb trail, subtitle, actions, page Tabs, a profile Avatar and a decorative cover.