All docs
Docs
Examples

SQLAlchemy with Synapsor

Keep SQLAlchemy for your Python app while Synapsor governs agent-facing data access and proposal workflows.

Overview

SQLAlchemy remains the ORM/transaction layer for your Python service. Synapsor adds reviewed capabilities for the agent path.

Your backend sets trusted SESSION values, then invokes Synapsor capabilities. The model never receives SQLAlchemy sessions, database URLs, or raw SQL access.

Approved proposal writeback can be applied by a trusted Python worker using SQLAlchemy transactions and the Synapsor proposal idempotency key.

Developer notes

  • Never pass a SQLAlchemy connection or raw SQL tool to the model for sensitive paths.
  • Use SESSION/HIDDEN for trusted tenant and principal scope.
  • Apply approved writebacks in a server-side transaction.
  • Record proposal and evidence lookup records in your app audit trail when useful.