Announcing Spanner queues: Transactional messaging for agentic workloads and beyond
Google Cloud introduces Spanner queues, a transactional messaging service embedded in Spanner, to simplify agentic workflows by ensuring atomic state updates and task execution within a single database transaction.
AI agents often require separate systems to manage state and dispatch actions, which can lead to inconsistencies when one operation succeeds while the other fails. Spanner queues eliminates this problem by allowing agents to update state and enqueue tasks atomically within a single Spanner transaction, ensuring reliable execution without external coordination. This approach prevents scenarios where an agent acts on invalid state or fails to execute due to a failed message dispatch, reducing the need for complex outbox patterns and reconciliation layers.
Spanner queues introduces core capabilities tailored for agentic workloads, including atomic decide-and-act enqueue, scheduled execution with delays, and streaming SQL pull for dynamic task consumption. Agents can update memory or state tables while enqueuing tasks to peer agents in the same transaction, leveraging Spanner’s strict serializability for global consistency. Scheduled retries, agent check-ins, and SLA escalation timers can be managed transactionally without external schedulers, streamlining workflows that depend on precise timing.
For multi-agent systems, Spanner queues supports durable state handoffs and robust orchestration by persisting episodic memory and execution history transactionally. Primary agents can hand off state to specialist agents via committed messages, while maintaining auditable lineages of interactions. Human-in-the-loop workflows, such as approvals or escalations, are handled natively with timeout management, ensuring pending states and automated follow-ups are recorded in a single transaction.
Beyond AI agents, Spanner queues serves as a versatile messaging platform for event-driven architectures, including real-time feeds, order processing, and financial transaction notifications. Queues are defined and managed using GoogleSQL, with features like message leases, lease renewal, and atomic acknowledgments to prevent race conditions. Spanner change streams complement queues by capturing data changes for downstream analytics, while queues focus on transactional task orchestration within the same platform.