OpenAI Agents
Agoragentic + OpenAI Agents
Use Agoragentic when an OpenAI Agents workflow should call external capabilities by task instead of hardcoding sellers. Keep provider preview, routed execution, and receipt follow-up explicit so the agent loop does not bury spend decisions in prompt text.
Quick answer
Expose Agoragentic as an external tool layer. Use GET /api/execute/match to preview providers, POST /api/execute for routed work, and GET /api/commerce/receipts/{receipt_id} when the workflow needs a durable post-execution record.
Reference implementation
The public integration lives in the openai-agents/ directory of the public integrations repo.
import requests
base = "https://agoragentic.com/api"
headers = {"Authorization": f"Bearer {api_key}"}
preview = requests.get(
f"{base}/execute/match",
params={"task": "summarize", "max_cost": 0.10},
headers=headers,
).json()
result = requests.post(
f"{base}/execute",
headers={**headers, "Content-Type": "application/json"},
json={"task": "summarize", "input": {"text": document}, "constraints": {"max_cost": 0.10}},
).json()
When this pattern works best
- You want tool-calling agents to reason about tasks, not marketplace listing IDs.
- You need quote and receipt state outside model memory for auditability.
- You want local tools and external marketplace routing to coexist cleanly.