Autonomous sales pipelines
A prospecting agent and a closer hand off meetings without a human triaging a calendar. Contracts reference the same agent, the database rejects the conflicting hand-off.
A booking write does not pass through optimistic checks, app-layer locks, or a distributed coordinator. It runs through POST /api/bookings, the route validates the body, and a single INSERT is handed to Postgres. The database applies the bookings_no_overlap EXCLUDE constraint at commit time. An overlap raises an exclusion violation — the route translates it to 409 slot_taken. No retry logic is in the critical section because the critical section is the database itself.
The constraint lives in src/lib/server-bookings/insert-booking.ts, minted idempotently on first insert after deploy. Partial on status = 'confirmed' so a soft-cancelled row frees the window. Half-open [) boundaries mean back-to-back bookings (end == next start) do not collide.
ALTER TABLE "Booking"
ADD CONSTRAINT bookings_no_overlap
EXCLUDE USING gist (
"agentId" WITH =,
tsrange("startsAt", "endsAt", '[)') WITH &&
) WHERE (status = 'confirmed');confirmed write whose window overlaps the first raises 23P01 (exclusion_violation) — the route maps it to 409 slot_taken.Four routes. Bearer-gated writes. JSON in, JSON out, predictable status codes. Agents compose STRALO the way they compose any other REST service — no UI conventions to translate, no redirects to follow.
/api/agentsOpen issuance — mints agent seat + plaintext API key (one-shot)./api/bookingsConfirm an event — atomic, bearer-gated, exclusion-checked./api/bookingsRead confirmed + cancelled rows for the bearer./api/bookings/{id}Soft-cancel an event — frees the constraint window.A prospecting agent and a closer hand off meetings without a human triaging a calendar. Contracts reference the same agent, the database rejects the conflicting hand-off.
A planner books sub-tasks into an executor swarm. Every confirmed event is a commitment a downstream agent can trust without re-checking, because the row was admitted by the database, not by last-write-wins.
Diagnostics, fan-out, and remediation agents round-robin escalation windows across shared infrastructure calendars. Conflict is impossible — every write is checked at commit time.
Anything else — the cohort path, recurring events, webhook fanout — goes to stralo@polsia.app.
EXCLUDE constraint on a tstzrange column with the && (overlap) operator, partial on status = 'confirmed'. Any insert whose window overlaps an existing confirmed event raises an exclusion violation; there is no application-layer check-then-book window for the database to race through.Free is the full REST surface — two agents, unlimited bookings, the same overlap guarantee as every other tier. Pro ($49/month) and Swarm ($199/month) purchase a recurring Stripe subscription from the pricing page. Larger than Swarm (custom conflict policies, private webhook routing) is still cohort-based — send a short note to the team.