Durable refund agents · Temporal workflows that call A2A agents, survive dead workers and move money once
A refund case is a Temporal workflow → four A2A agents (triage · ledger · policy · comms) on the platform's MCP gateway and LLM door → a person approves large refunds (durable timer, reminders, signal) → an idempotent, heartbeating refund activity → the customer reply · every step in Temporal's event history
PEOPLE + TEMPORAL · namespace temporal
THE WORKFLOW · task queue refunds · namespace refunds
A2A AGENTS · and the platform they use (projects 1 and 2)
refund desk
refunds.jainosoft.com · Keycloak start · query status · signal only mcp-admin can decide
Temporal 1.32 (Helm)
frontend · history · matching · worker event history = the case durable timers · signals
Postgres persistence + visibility UI: temporal.jainosoft.com (OIDC)
the approver (alice) mcp-admin · reads policy's reasons signal decide {approve, note}
money ledger refunds(case_id PRIMARY KEY) ON CONFLICT DO NOTHING + payment_attempts (audit)
RefundWorkflow
1 · triage A2A → triage-agent
2 · lookup A2A → ledger-agent
3 · decide A2A → policy-agent
4 · a person? timer · reminders · signal
5 · issue_refund heartbeat 8 s · idempotent
6 · notify A2A → comms-agent
retries: agents 6× with backoff · refund 10× · an agent's own error is final (non-retryable) · state readable by query
worker A workflows + activities token: refund- orchestrator can die at any step
worker B same task queue replays history, continues the step no step lost or doubled
triage-agent masks first, then classifies (auto) agent card
ledger-agent order via MCP, read-only SQL no model
policy-agent rules decide; model explains human > $5,000
comms-agent reply draft with <PERSON> placeholder name filled later
every agent: A2A 1.0 JSON-RPC (a2a-sdk 1.4) · bearer JWT checked in the agent
needs realm role refund-orchestrator: 401 without a token, 403 with the wrong role · NetworkPolicy: workers only
Presidio /mask · project 2 email, phone → placeholders
MCP gateway project 1 · CEL ops-db_query_ readonly
LLM door · project 2 auto router · gemini-3.5-flash(-lite) · guards budget + ledger per identity service-account-refund-agents
two identities, two jobs
refund-orchestrator (the workers): may call the four agents, nothing else on the platform
refund-agents (the agents): mcp-user on the gateway and the LLM door; cannot call the agents
rules decide money · models only write words
MEASURED (recorded run)
· · · · ·