Examples
Each Tarski example is a working app that teaches a specific containment or verification behavior, with fixtures that cover its unsafe paths as well as its happy paths.
Tarski’s examples are working apps with executable fixtures that define their expected behavior. Each example teaches a specific platform behavior, and its fixtures cover the unsafe paths as well as the happy paths. Browse and install them with the CLI:
tarski examples list
tarski examples install
Choose by what you need to learn
| You want to learn | Example |
|---|---|
| First-app authoring | Appointment booking |
| Recursive derivation and remediation gates | Incident response |
| Sensitive evidence and human review | Medical intake |
| External provider effects and replay | Price watch |
| Plugin-driven collection, offer history, blob archival | Google Shopping Price Monitor |
| LLM proposal containment | Car dealership chat (live / deterministic) |
| Multi-agent shared reality | Multi-agent live, incident response |
| Agent worldview reads, budgets, multi-hop loops | Incident response |
| Consent- and policy-gated agent reads | Medical intake |
| Your first declared query | Appointment booking |
| Consuming the query API externally | Price watch |
| Entity declarations and optimistic concurrency | Team Tasks |
| Verified end-user identity and tenant scoping | Member Portal, Team Tasks |
| Full-stack SDK consumption (React over serve) | Team Tasks web/ |
Example details
Appointment booking is the tutorial app. Its invariants prevent double holds and double
bookings, and its first declared query (queries/booking-status.ta, exposed
studio, api) comes with a real tarski query booking-status transcript in its README.
Incident response is the flagship agent-read example, and it encodes remediation and
approval rules. It exposes compound blast-radius queries to agents, enforces a query budget
of 2 through decision rules with PM-readable denial reasons ("budget_exhausted",
"no_open_session"), and has a backstop invariant that makes over-approval an impossible
state. Its fixtures prove multi-hop assessments, denied reads, and failed reads.
Medical intake encodes clinician review and consent rules for sensitive evidence. It
has candidate extraction with clinician review, PHI projection boundaries, and
consent-gated agent reads. The patient-history query approves only when the worldview
holds medical.patient_consent(patient_id, "agent_history_review").
Car dealership chat ships in two canonical variants. car-dealership-chat-live uses a
live OpenAI model and requires OPENAI_API_KEY; a missing credential surfaces as a
visible warning, and the app does not silently fall back to deterministic output.
car-dealership-chat-det replays deterministic provider scripts for stable containment
demos. Both variants have the same shape: chat becomes evidence, assistant replies and
offers enter through proposal.*, decisions accept or reject them, and policy-gated
intents drive external sends.
Team Tasks is the collaborative-SaaS reference. It models tasks and comments as
entity declarations, uses tenant-scoped access facts, fails closed on
same-version conflicts, and includes a full React frontend under web/ that consumes the
published @tarski/client package. In that frontend, reads are row-filtered projection
calls, writes are policy-gated observation appends with version-carrying idempotency keys,
and live updates arrive over a single declared-query subscription.
Member Portal is the identity-enabled example. Verified IdP tokens become actor
context at ingress, the access.* account plane gates session starts and appends, and
tenant notices are row-filtered per verified tenant. Its fixtures cover revoked accounts,
contested sessions, and cross-tenant scoping.