Quickstart

Operator Quickstart

Get from zero to a certified agent making verified API calls in under 10 minutes.

What you'll do:

  1. 1Create an account and get an API key (2 min)
  2. 2Register as an operator (2 min)
  3. 3Register and certify your first agent (3 min)
  4. 4Verify a certificate (1 min)
  5. 5Make a metered agent-to-agent call (2 min)

Prerequisites

  • A Bridgly account — sign up at bridgly.ai
  • Your API key (rly_...) — shown once on sign-up, copy it now
  • Node.js 18+ (for the examples below)

Set your API key in your environment:

bash
export RELAY_API_KEY=rly_your_key_here
export RELAY_BASE_URL=https://api.bridgly.ai
1

Register as an Operator

An operator is the entity (you, your company) that vouches for the agents you certify. One API call, no UI required.

register-operator.ts
const res = await fetch(`${process.env.RELAY_BASE_URL}/api/operators`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'Acme AI',
    email: 'platform@acme.ai',
    jurisdiction: 'GB',  // ISO 3166-1 alpha-2
  }),
});

const operator = await res.json();
console.log(operator);

Response:

json
{
  "operatorId": "01934f2a-1234-7890-abcd-ef0123456789",
  "did": "did:bridgly:operator:01934f2a-1234-7890-abcd-ef0123456789",
  "apiKey": "rly_abc123..."
}
Note
Save your operatorId — you'll need it for agent registration. The apiKey is shown once. If you missed it, rotate it from your dashboard.
2

Register Your Agent

An agent in Bridgly represents a specific, versioned piece of code. The codeHash pins the cert to a binary — update it when you deploy a new version.

register-agent.ts
const res = await fetch(`${process.env.RELAY_BASE_URL}/api/agents`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${process.env.RELAY_API_KEY}`,
  },
  body: JSON.stringify({
    name: 'invoice-processor',
    version: '1.0.0',
    runtime: 'node/22',
    model: 'anthropic/claude-sonnet-4-6',
    codeHash: 'sha256:a4f8c2e1...',  // hash of your agent bundle
  }),
});

const agent = await res.json();
console.log(agent);
json
{
  "agentId": "01934f2b-5678-7890-abcd-ef0123456789",
  "did": "did:bridgly:agent:01934f2b-5678-7890-abcd-ef0123456789"
}
3

Issue a Certificate

This is the core operation. You're asking Bridgly's CA to sign a Verifiable Credential attesting to your agent's identity and declared capabilities.

issue-cert.ts
const res = await fetch(`${process.env.RELAY_BASE_URL}/api/certs/issue`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${process.env.RELAY_API_KEY}`,
  },
  body: JSON.stringify({
    agentId: '01934f2b-5678-7890-abcd-ef0123456789',
    capabilities: [
      { type: 'invoice.read', scope: ['uk', 'eu'] },
      { type: 'invoice.submit', scope: ['uk'] },
    ],
    constraints: {
      maxInvoiceValue: 50000,
      requiresHumanApproval: true,
    },
    expiryDays: 90,
  }),
});

const cert = await res.json();
console.log(JSON.stringify(cert, null, 2));

Response — a W3C Verifiable Credential, signed by Bridgly's CA:

json
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://bridgly.ai/credentials/v1"
  ],
  "type": ["VerifiableCredential", "BridglyCertificate"],
  "issuer": "did:bridgly:ca",
  "issuanceDate": "2026-03-21T06:00:00.000Z",
  "expirationDate": "2026-06-19T06:00:00.000Z",
  "credentialSubject": {
    "id": "did:bridgly:agent:01934f2b-5678-7890-abcd-ef0123456789",
    "name": "invoice-processor",
    "version": "1.0.0",
    "capabilities": [
      { "type": "invoice.read", "scope": ["uk", "eu"] },
      { "type": "invoice.submit", "scope": ["uk"] }
    ],
    "constraints": {
      "maxInvoiceValue": 50000,
      "requiresHumanApproval": true
    }
  },
  "proof": {
    "type": "Ed25519Signature2020",
    "verificationMethod": "did:bridgly:ca#key-1",
    "proofValue": "z5Y2Kx9m..."
  }
}
Tip
Store this credential. Your agent presents it when calling other services.
4

Verify a Certificate

Any consumer can verify a cert without an API key. This is the public verification endpoint.

verify-cert.ts
const certId = '01934f2c-9abc-def0-1234-567890abcdef';

const res = await fetch(
  `${process.env.RELAY_BASE_URL}/api/certs/${certId}/verify`,
  { method: 'POST' }
);

const result = await res.json();
console.log(result);
json
{
  "valid": true,
  "status": "active",
  "agent": {
    "name": "invoice-processor",
    "did": "did:bridgly:agent:01934f2b-5678-7890-abcd-ef0123456789"
  },
  "operator": {
    "name": "Acme AI",
    "jurisdiction": "GB",
    "kybVerified": false
  },
  "capabilities": [
    { "type": "invoice.read", "scope": ["uk", "eu"] },
    { "type": "invoice.submit", "scope": ["uk"] }
  ],
  "expiresAt": "2026-06-19T06:00:00.000Z"
}
Info
valid: true means the Ed25519 signature checks out and the cert is active and unexpired. valid: false — check status for why (revoked, expired).
5

Check the Revocation List

Before accepting a cert in a production system, check the CRL. It's cached in Redis — fast to query.

typescript
const res = await fetch(`${process.env.RELAY_BASE_URL}/api/revoked`);
const { revoked } = await res.json();

const isRevoked = revoked.some(r => r.id === certId);
Tip
Or just use the /verify endpoint — it checks revocation and expiry automatically.
6

Make a Metered Agent-to-Agent Call

Want to see the full exchange flow end-to-end? Use the demo environment. No auth required.

bash
# Seed the demo environment
pnpm seed:demo
agent-call.ts
// Check demo status to get agent IDs
const statusRes = await fetch(
  `${process.env.RELAY_BASE_URL}/api/v1/demo/status`
);
const { agents } = await statusRes.json();
const { alpha, beta } = agents;

// Simulate a metered call
const res = await fetch(
  `${process.env.RELAY_BASE_URL}/api/v1/demo/agent-call`,
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      fromAgentId: beta.agentId,   // consumer
      toAgentId: alpha.agentId,    // provider
      callType: 'api_call',
      amount: 0.50,
    }),
  }
);

const tx = await res.json();
console.log(tx);
json
{
  "transactionId": "01934f2d-abcd-ef01-2345-678901abcdef",
  "status": "settled",
  "amount": 0.5,
  "currency": "USDC",
  "callType": "api_call",
  "governanceLog": {
    "eventType": "demo.agent_call",
    "immutable": true
  }
}

What you just built

  • Registered as a Bridgly operator with a DID
  • Registered an agent with version + capability metadata
  • Issued a W3C Verifiable Credential, signed by Bridgly's Ed25519 CA
  • Verified the cert cryptographically via the public verify endpoint
  • Ran a metered agent-to-agent call through the exchange

Next Steps

Full API reference
Webhooks (cert events, tx notifications)
Revoking certificates
Security & key management
Pricing (free tier: 5 agents)

Questions? hello@bridgly.ai