Access policy JSON
Reference for policy documents, rule fields, conditions, and run filters.
Advanced reference
To get started with access policies, follow Control your agent’s actions. Use this reference when you need to edit the JSON directly.
An access policy defines an agent’s permissions through a policy document and its rules. Explore the schema below, or select an example to inspect its JSON.
Policy document
The outer structure: version, mode, rules, and default.
versioninteger · enumRequiredManaged by HyperagentHyperagent maintains the format version and saves the lowest version the policy needs. Keep the provided value; use Draft policy when changing rules requires a different format. Hyperagent lowers the saved version when rules requiring a higher version are removed.
modestring · enumRequiredSets the broadest permission the policy’s rules may grant. Keep Hyperagent’s saved value unless you intend to change this limit.
writeThe list of rule objects. Add or replace a rule here, preserving the others.
default"deny" · enumRequiredAlways deny; any other value fails validation. A write that no rule covers needs approval in a conversation where someone can respond. Otherwise, it cannot proceed.
denyRules
Each rule sets a permission (Allow, Ask, or Deny) for the actions it covers. Narrow that permission to particular apps, destinations, conditions, or thread types.
Rules can cover different thread types and connected integrations.
effectstring · enumRequiredWhat should happen when this rule applies?
opsarray<string>RequiredA nonempty list of operation classes or exact supported action names. The values depend on the rule pattern above. Choose named actions from the action catalog.
Show 3 variantsHide 3 variants
Thread type
array<string> · enumUse this variant to decide which thread types need your approval for integration writes, such as conversations or scheduled runs. Use trigger to select the run type.
Include all three values together to cover every update during that type of run. Individual values do not give create-only or delete-only permissions.
Cannot be combined with
integration, resources, and where objects.App-based
array<string> · enumControls what your agent may do through a connected app, such as reading Notion pages without changing them.
Use this variant with the integration object.
Named-action
array<string>Controls individual tools, such as Gmail’s action for sending an existing draft. Use it when a specific action needs its own permission.
Choose exact action names from the action catalog.
integration object.Example["GmailSendDraft"]
Limit the rule to a specific type of thread or automation trigger. See Thread filters for the fields. Omit trigger to apply the rule without a run-type restriction.
integrationobjectOptionalSelect a connected app by its connector identifier, or slug. This can cover more than one connection to the app.
Show 1 propertyHide 1 property
slugstringRequiredThe app identifier from the actual connection.
notionwhereobjectOptionalAdd a condition that an action must meet for this rule to apply.
Use semantic for criteria Hyperagent’s AI policy checker interprets for each call, or deterministic for precise conditions in structured JSON. When both are present, both must match.
Show 2 propertiesHide 2 properties
semanticstringOptionalNatural-language criteria that Hyperagent interprets for each call. Use this when defining an integration object. Be specific about what may happen and what must not change. This does not create a strict read-only connection.
Only fetching or searching existing Notion content. Do not change it.deterministicobjectOptionalMatch specific criteria using structured JSON. All supplied conditions must match.
These conditions use Judge, per write; they do not make the rule Strict.
Hide 2 propertiesShow 2 properties
paramsobjectOptionalCheck inputs supplied to the action. Each key is a nonempty, top-level input name, such as channel. All named checks must match; dotted paths do not traverse nested inputs.
Each input name maps to one of these comparison objects.
Hide 4 comparison variantsShow 4 comparison variants
equalsobjectMatch one exact value.
Hide 2 propertiesShow 2 properties
typestring · enumRequiredChoose the equals comparison.
equalsvaluestring | number | booleanRequiredA string, number, or boolean to match. Null, arrays, and objects are not accepted.
in_listobjectMatch any value in a list.
Hide 2 propertiesShow 2 properties
typestring · enumRequiredChoose the in_list comparison.
in_listvaluesarray<string | number | boolean>RequiredA nonempty list of strings, numbers, or booleans. The list may mix those types.
domain_matchobjectMatch domains in email addresses, including subdomains.
Hide 2 propertiesShow 2 properties
typestring · enumRequiredChoose the domain_match comparison.
domain_matchdomainsarray<string>RequiredA nonempty list of literal email domains. Wildcards and URLs are not accepted.
numeric_compareobjectMatch an inclusive numeric range. Supply min, max, or both; min must not exceed max.
Hide 3 propertiesShow 3 properties
typestring · enumRequiredChoose the numeric_compare comparison.
numeric_compareminnumberOptionalThe lowest allowed number, inclusive.
maxnumberOptionalThe highest allowed number, inclusive. The action input must be a number, not a numeric string.
whenobjectOptionalMatch a local-time window, optionally limited to selected weekdays. This must match alongside every params condition.
Hide 5 propertiesShow 5 properties
typestring · enumRequiredChoose the time_window condition.
time_windowtimeZonestringRequiredA recognized time-zone name, such as America/New_York. Use 1–64 characters.
startstringRequiredStart time in 24-hour HH:MM format, inclusive.
endstringRequiredEnd time in 24-hour HH:MM format, inclusive. An end earlier than the start wraps past midnight.
daysarray<string · enum>OptionalOptional, nonempty list of weekdays. Omit it for every day. The weekday is checked in the chosen time zone, including for overnight windows.
resourcesobjectOptionalLimit a rule to particular destinations or connected accounts.
integration object.Hide 2 propertiesShow 2 properties
destinationobjectOptionalThe target of the action, such as a Slack channel or email recipient. Choose one comparison below.
Hide 4 variantsShow 4 variants
equalsobjectMatch one destination, such as an email recipient or an identifier the action uses.
Hide 3 propertiesShow 3 properties
typestring · enumRequiredUse equals for this comparison.
valuestringRequiredThe destination identifier or one email address.
principalstring · enumOptionalMarks value as the agent owner’s email address. If the owner’s address changes, an allowance stops matching; a denial can match both the saved and current address.
in_listobjectMatch a destination from the list. This is the comparison used for strict Slack channel permissions.
Hide 2 propertiesShow 2 properties
typestring · enumRequiredUse in_list for this comparison.
valuesarray<string>RequiredA nonempty list of destination identifiers. For a strict Slack posting allowance, use actual C… channel IDs.
domain_matchobjectMatch a recipient or URL domain, including its subdomains.
Hide 2 propertiesShow 2 properties
typestring · enumRequiredUse domain_match for this comparison.
domainsarray<string>RequiredA nonempty list of literal domains, such as example.org. Do not use URLs, email addresses, or wildcard patterns.
outsideobjectMatch mail recipients outside the permitted addresses and domains. Include mailboxes, domains, or both. This denial does not grant permission to send within the set.
Requirements for this variant
- Use only on a
denyrule for sending actions from one mail integration: Gmail or Outlook. - Requires policy format
5. Use Draft policy to generate a compatible policy rather than changing its version yourself. - Keep
destinationas the only field inresources, and leave outwhere. - Use one outside-recipient set per mail integration. Combine its permitted addresses and domains in that set.
Hide 3 propertiesShow 3 properties
typestring · enumRequiredUse outside for this comparison.
mailboxesarray<string | object>OptionalA nonempty list of permitted email addresses. Each entry may be an address string or an owner-address object.
Hide 2 item variantsShow 2 item variants
One permitted email address, such as reviewer@example.com.
A permitted address tied to the agent owner. It is in the permitted set only while value is still the owner’s current address. Both fields are required.
Hide 2 propertiesShow 2 properties
valuestringRequiredThe agent owner’s actual email address.
principalstring · enumRequiredUse owner to tie this entry to the agent owner.
domainsarray<string>OptionalA nonempty list of literal domains, such as example.org. Do not use URLs, email addresses, or wildcard patterns.
accountobjectOptionalThe connected account used to perform the action, identified by the account-selection short ID Hyperagent supplies. Account-specific conditions use Judge, per write.
Hide 2 variantsShow 2 variants
equalsobjectMatch one connected account.
Hide 2 propertiesShow 2 properties
typestring · enumRequiredUse equals for this comparison.
valuestringRequiredThe account-selection short ID Hyperagent supplies, not an email address, display name, integration slug, or full connection record ID.
in_listobjectMatch any connected account in the list.
Hide 2 propertiesShow 2 properties
typestring · enumRequiredUse in_list for this comparison.
valuesarray<string>RequiredA nonempty list of account-selection short IDs supplied by Hyperagent.
Thread filters
Limit a rule to particular thread types and invocations.
Set permissions for each thread type
Define write permissions for every thread type before adding app-specific conditions. Follow Control your agent’s actions to set them up.
triggerobjectOptionalChoose which thread types this rule covers.
Choose one selector below.
Hide 2 selector variantsShow 2 selector variants
kindstring · enumOptionalSelect the thread type. Conversational threads where you can reply, such as room threads, Slack replies, and iMessage replies, are covered by the electionCarrying variant.
Hide 1 related propertyShow 1 related property
idsarray<string>OptionalLimit the rule to one or more saved triggers. Without this list, the rule covers all threads of the selected type.
Requires kind to be one of:
electionCarryingbooleanOptionalSelect the thread type by whether it carries an additional election.
attendedbooleanOptionalChoose whether this rule applies to threads where someone can answer an approval request in the thread’s conversation.
To remove run scoping, omit trigger rather than leaving an empty object.
Integration action names
Native actions are tools Hyperagent recognizes by name, such as GmailSendDraft. Search by integration, action name, or purpose. Put the action name in ops without adding integration.slug.
| Purpose | |
|---|---|
| Gmail31 | |
| Google Calendar13 | |
| Google Drive33 | |
| Google Docs27 | |
| Google Sheets34 | |
| Google Slides31 | |
| Google Tasks11 | |
| GAGoogle Admin10 | |
| GCGoogle Chat6 | |
| GFGoogle Forms5 | |
| GAGoogle Ads19 | |
| GCGoogle Search Console5 | |
| Google Analytics32 | |
| Google Meet16 | |
| YouTube47 | |
| Twitter / X38 | |
| Slack49 | |
| Telegram15 | |
| Google Contacts7 | |
| Meta Ads47 | |
| Instagram29 | |
Run examples
Control your agent’s actions
Write, review, save, and test a policy, or migrate from the old controls.
Understand autonomy
See how instructions, connected accounts, and policy rules work together.