Quickstart - Authorize Your First Action
Time to first authorization: under 5 minutes. No account needed. No API key required.
1. Install
npx create-yebo
That's it. Sandbox mode generates a local keypair, creates a default policy file, and scaffolds a working demo - no network calls, no signup.
2. Run the demo
cd yebo-demo
npm run demo
Output:
Yebo Authorization Demo
Sandbox mode - no network required
Script Amount Decision Reason
─────────────────────────────────────────────────────
payment.js $200 ALLOW Amount $200 below auto_approve threshold of $500
large-payment.js $5,000 REQUIRE_APPROVAL Amount $5,000 requires human authorization ($500-$10,000)
blocked.js $50,000 DENY Amount $50,000 exceeds Policy deny_above threshold of $10,000
Policy file: yebo.policy.json
Run individual scripts: node payment.js
Go live: npx create-yebo --live
Three scenarios. Three outcomes. Under 60 seconds.
3. See the full pipeline
Run an individual script to see every stage:
node yebo-demo/payment.js
INTENT → MANDATE → POLICY → SENTINEL → RESULT
INTENT payment of $200 to Acme Corp
MANDATE mnd_7c9c0a4d (sealed)
POLICY rule: auto_approve_below | version: sandbox-v1
SENTINEL all invariants passed
RESULT ALLOW - Amount $200 is below auto_approve threshold of $500
4. Use in your code
Install the package:
npm install yebo-protect
Call protectPayment() before any action:
import { protectPayment } from "yebo-protect";
const result = await protectPayment({
type: "payment",
amount: 200,
vendor: "Acme Corp",
currency: "USD",
});
// result.decision → "ALLOW" | "REQUIRE_APPROVAL" | "DENY"
// result.reason → "Amount $200 is below auto_approve threshold of $500"
// result.policy_rule → "auto_approve_below"
// result.mandate_id → "mnd_7c9c0a4d..."
if (result.decision === "ALLOW") {
// Safe to execute - Yebo has authorized this action
await stripe.paymentIntents.create({ amount: 20000, currency: "usd" });
}
if (result.decision === "DENY") {
console.log(`BLOCKED: ${result.reason}`);
// Stripe is never called
}
if (result.decision === "REQUIRE_APPROVAL") {
console.log(`Pending ID: ${result.pending_id}`);
console.log(`Approve with: yebo approve ${result.pending_id}`);
}
5. How decisions are made
Every decision comes from your yebo.policy.json:
{
"auto_approve_below": 500,
"deny_above": 10000,
"currency": "USD",
"version": "sandbox-v1"
}
| Amount | Decision | What happens | |--------|----------|-------------| | Under $500 | ALLOW | Action executes immediately | | $500 - $10,000 | REQUIRE_APPROVAL | Paused - human must approve | | Over $10,000 | DENY | Blocked - action never executes |
Change the thresholds at any time. See Policy → for full reference.
6. Go live
Once your demo works, run:
npx create-yebo --live
This connects your local identity to the Yebo gateway, enabling real Stripe execution and biometric approval on mobile.
What's next
| I want to... | Go here | |---|---| | Understand what Yebo does in plain English | What is Yebo? → | | See the full approval flow | Approval Flow → | | Configure my policy | Policy → | | Connect LangChain / OpenAI / Anthropic | Integrations → | | Guard email, files, databases, deploys | Adapters → | | See every API method | SDK Reference → |