Skip to Content
Single UserQuickstart

Single User Quickstart

This guide covers the fastest single-user path to a working end-to-end approval flow:

  1. Create a project.
  2. Issue an API key.
  3. Add one simple approval rule.
  4. Pair a signer.
  5. Run a script with @beav3r/sdk.
  6. Approve the request from the signer.

Before starting

Estimated time:

  • 10-15 minutes

Required:

  • a running Beav3r server
  • the Beav3r dashboard at https://dashboard.beav3r.ai
  • one active signer paired to the same project
  • one project API key with access to the target project

First-run testing note:

  • use https://staging.server.beav3r.ai for staging or first-run evaluation
  • use https://server.beav3r.ai for the hosted production server
  • self-hosted or alternate environments should replace the default base URL in the script or env file

If setup is not complete yet, use the supporting setup docs for projects, signers, and pairing.

Step 1: Create a project and API key

In the Beav3r dashboard at https://dashboard.beav3r.ai:

  1. Open Projects.
  2. Create a project.
  3. Open Integrations.
  4. Create an API key for that project.
  5. Copy the key.

Keep the project open. The same project will be used for the rule and signer steps.

Step 2: Add one simple rule

In Policy Studio, create a rule with:

  • action type: payments.send_usdt
  • user-facing label: Send USDT
  • effect: Require approval
  • reason: Require approval above 10 USDT
  • condition field: amount
  • operator: gt
  • value: 10

This makes any request above 10 USDT route to signer approval.

Rule-to-payload contract

The technical rule fields must align exactly with the script payload.

Dashboard rule fieldExample valueScript field
action typepayments.send_usdtactionType
condition fieldamountpayload.amount
operatorgtevaluated by policy
value10compared against payload.amount
user-facing labelSend USDTrendered from policy and presentation

Step 3: Pair a signer

In Integrations:

  1. Create a pairing session.
  2. Scan the QR code with the mobile signer.
  3. Confirm the signer shows as active.

Checkpoint: quick dashboard trigger (before script)

Before running the script, do one quick validation in the dashboard:

  1. Make sure the project approval mode is bridge_all (Bridge Every Request).
  2. In Integrations, open Test trigger.
  3. Send the quick trigger.
  4. Confirm the request appears in Inbox and reaches the paired signer.

If this checkpoint works, continue to the SDK script steps below.

Step 4: Run a minimal SDK script

Install the package in an empty folder:

npm init -y npm install @beav3r/sdk

Create single-user-quickstart.mjs:

import { Beav3r } from '@beav3r/sdk' const client = new Beav3r({ baseUrl: process.env.BEAV3R_BASE_URL ?? 'https://staging.server.beav3r.ai', apiKey: process.env.BEAV3R_API_KEY, agentId: process.env.BEAV3R_AGENT_ID ?? 'single_user_quickstart', defaultExpirySeconds: Number(process.env.BEAV3R_DEFAULT_EXPIRY_SECONDS ?? 180) }) const result = await client.guardAndWait( { actionType: 'payments.send_usdt', payload: { amount: 25, asset: 'USDT', network: 'base', recipient: '0x1111111111111111111111111111111111111111' }, attributes: { amount: 25 } }, { pollIntervalMs: 2000, timeoutMs: 5 * 60 * 1000 } ) console.log(JSON.stringify(result, null, 2))

Run it:

BEAV3R_API_KEY=project_api_key node single-user-quickstart.mjs

Step 5: Optional demo repo path

The official demo project is also available:

git clone https://github.com/beav3r-ai/beav3r-demo.git cd beav3r-demo npm install

Then:

cp .env.example .env

Update .env with the project API key:

BEAV3R_API_KEY=your_project_api_key

Run the included quickstart:

node beav3r-quickstart.mjs

Expected result

In Beav3r:

  • the request appears in Inbox
  • the request status is pending
  • the paired signer receives it

Because this example sends 25 USDT, it is above the 10 USDT threshold and should require approval.

After approval:

  • the signer returns the decision
  • Beav3r updates the action state
  • the script logs a final result

Example success output:

{ "status": "approved", "actionId": "act_demo_123", "actionHash": "a741740cadadc260ca7e6101b0be43af5328a0d9c95bc7665a8f837c860df4", "evaluation": { "decision": "require_approval", "severity": "elevated", "reason": "Require approval above 10 USDT" } }

Typical outcomes:

  • approved: signer approved the action
  • executed: Beav3r executed the action immediately after approval
  • denied: policy denied the action before it reached a signer
  • rejected: signer rejected the action
  • expired: the request timed out before a decision

Common mistakes

If the request does not show up:

  • check that the API key belongs to the intended project
  • confirm the action type matches the rule exactly
  • confirm the payload field name matches the rule condition
  • confirm the signer is paired to that same project
  • verify BEAV3R_BASE_URL points at the running Beav3r server

If the request is denied immediately:

  • check the project policy
  • look for a deny rule that matches before the approval rule

If the request stays pending:

  • check that the signer is still active
  • confirm the mobile signer can receive notifications
  • increase the script timeout for manual testing