OpenAI Agents SDK can pause for approval. But who reminds the human? Who escalates? AXME adds the missing pieces.
Alpha - Built with AXME (AXP Intent Protocol). cloud.axme.ai - contact@axme.ai
OpenAI Agents SDK lets you build powerful agents with tool use and handoffs. But when your agent processes a $2,500 refund that needs finance approval before issuing - the SDK has no built-in way to pause, notify a human, remind after 5 minutes, escalate after 30, and resume when approved.
OpenAI agent processes refund request
-> Determines eligibility (structured, reliable, great!)
-> Now what? Who approves this before the money moves?
Options without AXME:
1. Poll a database in a loop? (fragile, no reminders, crashes lose state)
2. Send a Slack message and hope? (no timeout, no escalation, no audit trail)
3. Build webhook + queue + DB + reminder system? (weeks of infrastructure)
Open issues confirm this gap:
- openai-agents-python #378 - Human-in-the-loop approval
# OpenAI Agents SDK does the reasoning
from agents import Agent, Runner
refund_agent = Agent(name="Refund Processor", instructions="Analyze refund eligibility...")
result = Runner.run_sync(refund_agent, refund_prompt)
# AXME handles the human gate
intent_id = client.send_intent({
"intent_type": "intent.finance.refund_approval.v1",
"to_agent": "agent://myorg/production/openai-refund-processor",
"payload": {"refund_id": "REF-2026-3391", "eligibility": result.final_output},
})
approval = client.wait_for(intent_id) # reminder in 5 min, timeout in 1hOpenAI does the reasoning. AXME does the waiting.
pip install axme openai-agents
export AXME_API_KEY="your-key" # Get one: axme login
export OPENAI_API_KEY="sk-..." # For OpenAI Agents LLM callsfrom agents import Agent, Runner
from axme import AxmeClient, AxmeClientConfig
import os
# 1. OpenAI Agents: process refund
refund_agent = Agent(
name="Refund Processor",
instructions="Analyze refund eligibility based on order history and policy.",
)
result = Runner.run_sync(refund_agent, "Refund REF-2026-3391: $2499.99 for service_outage")
print(f"Agent assessment: {result.final_output}")
# 2. AXME: human approval before issuing refund
client = AxmeClient(AxmeClientConfig(api_key=os.environ["AXME_API_KEY"]))
intent_id = client.send_intent({
"intent_type": "intent.finance.refund_approval.v1",
"to_agent": "agent://myorg/production/openai-refund-processor",
"payload": {
"refund_id": "REF-2026-3391",
"amount": 2499.99,
"assessment": result.final_output,
},
})
# Agent suspends. Reminder in 5 min. Timeout in 1 hour.
approval = client.wait_for(intent_id)
print(f"Decision: {approval['status']}")# OpenAI agent processes the refund...
result = Runner.run_sync(refund_agent, refund_prompt)
# ...but how does finance approve it?
print(result.final_output) # Print to console?
input("Press Enter to approve...") # Block the process?
# No reminders. No timeout. No escalation.
# If the approver is in a meeting, the refund is stuck forever.result = Runner.run_sync(refund_agent, refund_prompt)
intent_id = client.send_intent({
"intent_type": "intent.finance.refund_approval.v1",
"to_agent": "agent://myorg/production/openai-refund-processor",
"payload": {"refund_id": "REF-2026-3391", "assessment": result.final_output},
})
approval = client.wait_for(intent_id)
# Reminder in 5 min. Escalation in 30 min. Timeout in 1h.| Component | Role | Framework |
|---|---|---|
agent_openai.py |
Process refund with OpenAI Agents SDK | OpenAI Agents |
agent.py |
Simplified agent (no LLM, tests AXME flow) | AXME SDK |
initiator.py |
Send refund intent, observe lifecycle | AXME SDK |
scenario.json |
Scenario definition (agent + human approval) | AXME CLI |
OpenAI Agents SDK does the thinking. AXME does the infrastructure.
+-----------+ send_intent() +----------------+ process +-----------+
| | ---------------> | | ----------> | |
| Initiator | | AXME Cloud | | OpenAI |
| | <- wait_for() -- | (platform) | <- result | Agents |
| | | | | |
| | | WAITING for | +-----------+
| | | human approval|
| | | | approve +-----------+
| | | | <---------- | |
| | <- COMPLETED --- | - remind 5m | | Finance |
| | | - timeout 1h | | Team |
+-----------+ +----------------+ +-----------+
curl -fsSL https://raw.githubusercontent.com/AxmeAI/axme-cli/main/install.sh | sh
axme login
pip install -r requirements.txtaxme scenarios apply scenario.json# macOS
cat ~/Library/Application\ Support/axme/scenario-agents.json | grep -A2 openai-refund-demo
# Linux
cat ~/.config/axme/scenario-agents.json | grep -A2 openai-refund-demo# Simplified agent (no LLM required)
AXME_API_KEY=<agent-key> python agent.py
# Full OpenAI Agents SDK agent (requires OPENAI_API_KEY)
AXME_API_KEY=<agent-key> OPENAI_API_KEY=sk-... python agent_openai.pyaxme tasks approve <intent_id>axme intents get <intent_id>
# lifecycle_status: COMPLETED- AXME - project overview
- OpenAI Agents SDK - agent framework
- Async Human Approval for AI Agents - framework-agnostic async approval
- AXME Examples - 20+ runnable examples
Built with AXME (AXP Intent Protocol).