AgentDBDocs

Approvals and the AgentHub

Some changes are too important to leave to an AI alone. With approvals, you decide which writes need a person first. For example: "any deal above 10,000 needs an admin".

How it works:

  1. An owner or admin creates an approval policy.
  2. An agent tries a covered change. AgentDB refuses it with APPROVAL_REQUIRED.
  3. The agent proposes the same change, with a reason and evidence.
  4. A person approves or rejects it in the AgentHub.
  5. On approval, AgentDB makes the change exactly once. The agent reads the outcome.

The AgentHub is the page in the AgentDB app where people do this. It also shows your inbox, channels and reports.

#Create an approval policy

The example uses a small deal list:

MCPChecked
{"tool": "schema_define_object", "arguments": {"name": "deal"}}
MCPChecked
{"tool": "schema_define_field", "arguments": {"object": "deal", "name": "name", "type": "text"}}
MCPChecked
{"tool": "schema_define_field", "arguments": {"object": "deal", "name": "amount", "type": "integer"}}
MCPChecked
{"tool": "records_create", "arguments": {"object": "deal", "data": {"name": "Example Ltd renewal", "amount": 5000}}}

This policy covers updates that raise a deal above 10,000:

MCPChecked
{"tool": "approval_policies_create", "arguments": {
  "name": "Large deals need a person",
  "operations": ["records.update"],
  "objects": ["deal"],
  "condition": {"field": "amount", "op": "gt", "value": 10000},
  "applies_to": ["agent", "key"]
}}

Main settings:

SettingMeaningDefault
operationsWhich writes, such as records.update, records.* or *required
objects, fieldsOnly these objects, or only changes to these fieldsall
conditionA threshold on a proposed value, such as amount > 10000none
applies_toWho is covered: agent, user, key, formagent
approversMinimum role, named members, and allowed kindsadmins and owners
quorumHow many different people must approve (1 to 5)1
expires_in_secondsTime to decide (60 seconds to 30 days)7 days
human_onlyOnly a signed-in person may decidetrue
distinct_approverThe person who proposed can never decidefalse

applies_to: ["agent"] covers agent keys and AI connectors such as Claude or ChatGPT. Add key to cover API keys too.

Only owners and admins manage policies. A human-only policy protects itself: weakening or deleting it needs a person, too.

#Propose a change

The agent tries the update. The policy stops it:

MCPChecked
{"tool": "records_update", "arguments": {"record_id": "$DEAL_ID", "version": 1, "data": {"amount": 25000}}}

The agent proposes the same change with approvals_submit. It adds a reason and evidence for the person who decides.

MCPChecked
{"tool": "approvals_submit", "arguments": {
  "operation": "records_update",
  "arguments": {"record_id": "$DEAL_ID", "version": 1, "data": {"amount": 25000}},
  "justification": "The customer signed the larger order.",
  "evidence": {"source": "signed order form"}
}}

What AgentDB does with a proposal:

  • It checks the input, exactly as the real write would.
  • It checks that the agent could make this change itself. A proposal never adds rights.
  • It stores a preview: for an update, each field's old and new value.
  • It records the record's version. If the record changes meanwhile, the proposal fails safely.

Agents can also propose a change without a policy. Then one owner or admin must approve it within 7 days.

#Approve or reject a change

A person decides in the AgentHub. Open it at https://app.agentdb.link/app/hub and sign in.

  1. Open the Overview tab. Waiting for your decision lists the proposals you may decide.
  2. Read the preview, the reason and the evidence. The exact action is shown too.
  3. Choose Approve, Reject or Request changes. Add a comment if you like.
  4. For a high-risk policy, type the approval id to confirm.

An agent can send you a direct link to one proposal: https://app.agentdb.link/app/hub?approval=apr_.... If you are not signed in, AgentDB brings you back to it after sign-in.

Rules for deciding:

  • The person who proposed a change can never decide it.
  • By default, only a signed-in person decides. API keys, agents, AI connectors and the CLI cannot.
  • The approver must be allowed to make the change themselves.
  • Reject and request changes end the proposal. The agent can then submit a new one.

An API key that tries to decide a human-only proposal gets an error. The error includes the AgentHub link:

MCPChecked
{"tool": "approvals_decide", "arguments": {"approval_id": "$APPROVAL_ID", "decision": "approve"}}

#Follow the outcome

The agent reads the proposal with approvals_get until its status is final.

MCPChecked
{"tool": "approvals_get", "arguments": {"approval_id": "$APPROVAL_ID"}}
StatusMeaning
pendingWaiting for a decision.
executedApproved, and the change was made.
failedApproved, but the change could not be made. The error is stored.
rejected, changes_requestedA person said no, or asked for changes.
expired, cancelledNobody decided in time, or the proposal was withdrawn.

approvals_list shows proposals, for example with status: "pending". approvals_cancel withdraws a pending proposal.

AgentDB runs an approved change exactly once. A second approval or a retry never applies it twice.

#The AgentHub

The AgentHub shows all your workspaces in one place. It has five tabs:

TabWhat you see
OverviewProposals to decide, notifications, recent activity, and schedules
InboxYour mentions, direct messages, assignments, reminders and failures. Mark them read or done.
ChannelsThe channels you belong to. Read and post messages.
ReportsSaved views with the report display
SettingsYour notification email choices, per workspace

Your role and permissions apply everywhere in the AgentHub. Nobody else can read your inbox, also not the owner.

#Notifications

AgentDB puts an inbox item in your inbox when something needs you:

  • a proposal you may decide, or a decision on your own proposal;
  • a calendar reminder or a mention in a channel;
  • a flow notify action or a form submission;
  • a scheduled job or webhook that failed after its last retry (owners and admins).

Email is optional. In Settings, you choose per workspace:

  • Approval requests: off, immediate or a daily digest. The default is immediate.
  • Everything else: off, immediate or a daily digest. The default is off.

Notification emails contain no record values. They name the kind of item and link to the AgentHub. Some servers do not send email; the Settings tab then says so.

Webhooks can follow approvals too. Subscribe to approval.submitted, approval.decided, approval.executed or approval.expired. See Automation.