API Reference
Alvero is an event-driven agent system. Every one of the 14 agents accepts and returns canonical events, scoped to a tenant and gated by a human-in-the-loop tier. Outbound PHI always requires human approval.
Agent contract
// Canonical event envelope — the contract every agent consumes.
interface CanonicalEventEnvelope {
id: string; // "<source>_<ulid>"
schemaVersion: 1;
emittedAt: string; // ISO-8601
tenantId: string; // 26-char ULID (validated at the Worker layer)
source: "dentrix" | "stripe" | "plaid" | "alvero_internal";
eventType: string; // e.g. "dentrix.payment.received"
idempotencyKey: string;
payload: CanonicalEventPayload; // discriminated union, Zod-validated
safetyTier: "green" | "yellow" | "red"; // HITL routing
}
// Emit to the internal event bus (Cloudflare Worker fan-out).
await emitCanonicalEvent(event, env);
Canonical event types are published in github.com/alvero-dental/alvero-sample-integrations ↗ at src/shared/canonical-events.ts.
The 14 agent endpoints
| Agent | Accepts | Returns | HITL |
|---|---|---|---|
bookkeeper.dentrix-ingestor | Dentrix API pull | appointment.* / claim.* | green |
bookkeeper.bank-ingestor | Plaid feed | payment.posted | green |
bookkeeper.document-ingestor | R2 document | structured line items | yellow |
bookkeeper.posting | canonical events | journal entries | yellow |
bookkeeper.reconciliation | payment.posted | reconciliation report | yellow |
bookkeeper.close | posted ledger | draft close package | yellow |
bookkeeper.supervisor | agent outputs | anomaly flags | red |
economic.cost-cutter | ledger | cost recommendations | yellow |
economic.revenue-hunter | appointments/claims | revenue opportunities | yellow |
economic.efficiency | schedule | scheduling suggestions | yellow |
economic.owner-brief | tier outputs | daily briefing | green |
meta.pattern-miner | de-identified metrics | benchmark insights | green |
meta.per-tenant-coach | tenant history | improvement proposals | red |
meta.agent-evaluator | agent metrics | pass/fail + rollback | red |
Partner integrations
- Dentrix — CDT procedure codes (D1110, D2740, D2950, D4341, D7140) flow into claim events.
- Stripe — webhook events
payment_intent.succeeded,payout.paid→payment.posted. - Plaid — product scopes
transactions,auth.
Public examples. Working sample integrations and the full canonical event definitions live at github.com/alvero-dental/alvero-sample-integrations ↗.