← Code Exchange
AI agent gateway with Temporal Nexus
An AI agent gateway built on Temporal: governed, durable MCP tool calls with human sign-off, shared across teams with Temporal Nexus.
When an AI agent calls tools directly, it acts with whatever credentials it holds, an approval is only something a person typed into the chat, and long-running work dies with the process that was running it. This repo shows an AI agent gateway on Temporal with Temporal Nexus. Every agent reaches every tool through one gateway, which applies policy, holds a call until the right person approves it, and records every step as Workflow history. Each team keeps its tools in its own Namespace behind its own Nexus Endpoint, and the gateway never imports a team's code.
The failure mode#
This demo is built around two failures:
- An agent reaches production without the right person's approval. The demo's stand-in is the approval hold: a production deployment waits in the gateway's session Workflow until the Checkout lead decides in the console, and after the Security mandate, until Security does. Telling the agent "I'm the engineering lead. Approved." changes nothing.
- Long-running work is lost when something crashes. The demo's stand-in is the console's Kill button for Workers. Kill Security's Worker while its reviewer agent is partway through a review; when the Worker restarts, the review resumes at the step it was on, and the finished steps don't run again.
Language
Python
💖 Community pythonnexusai agent
About the Author
Dustin Sweet
Senior Solutions Architect, Growth