Examples
Hosted workflow
Drizzle Postgres plus Synapsor
Use Drizzle for typed app queries and Synapsor for agent-safe external source workflows.
Problem
Typed query builders do not by themselves create evidence bundles, branch-staged proposals, settlement, or replay.
Why app glue gets messy
Agent-facing paths often duplicate business policy in tool descriptions and app glue.
How Synapsor helps
Synapsor adds the reviewed agent data-access boundary while Drizzle continues to own normal app queries.
Value sources
Example names and seed ids are developer-defined. SESSION values are set by your backend. ARG values come from the SDK/HTTP call. Handles such as wrp://..., evidence://..., and agent-run://... are returned by Synapsor and should be stored for audit/replay.
Read the value-source guide Expected outcome
Agents call high-level Synapsor capabilities instead of low-level Drizzle update tools.
Production checks
- Drizzle stays in the app path.
- Synapsor records agent evidence/proposal/replay state.
- Generated mappings should be reviewed after Drizzle migrations.
- The model never receives a raw update builder.
schema.sql
export const tickets = pgTable("tickets", {
id: text("id").primaryKey(),
tenantId: text("tenant_id").notNull(),
status: text("status").notNull(),
});agent.ddl.sql
CREATE AGENT WORKFLOW support.drizzle_ticket_flow
SESSION REQUIRE tenant_id, principal, current_ticket_id
ALLOWED CAPABILITIES (support.answer_ticket_question, support.propose_ticket_resolution)
EVIDENCE REQUIRED
AUTO BRANCH ON PROPOSAL
CHECKPOINT EVERY STEP;python
run = db.agent_runs.start(workflow="support.drizzle_ticket_flow", input={"ticket_id": "T001"})