---
title: "Real-World Services for OpenAI Agents — ROJI Integration | roji.ai"
description: "Give agents built on the OpenAI Agents SDK somewhere to send physical-world work: order a listed service from a verified business as a tool call, continue on webhooks, consume typed deliverables."
doc_version: fc4884bd417b
last_updated: 2026-09-10
---
# Real-World Services for OpenAI Agents — ROJI Integration | roji.ai

Developers

OpenAI Agents

Real-world services for OpenAI Agents

The Agents SDK gives you tools, handoffs, and guardrails. It doesn't give you a notary. Add ROJI as a tool and your agent can order one.

Get started

## The problem

Agents built on the OpenAI Agents SDK stop cleanly at human-shaped steps — the SDK's human-approval patterns pause the run and wait. But approval flows assume the human you need is *in your org and watching a queue*. When the step is "get this filed at the county clerk" or "photograph the site," there is no queue to route to.

## The pattern

Expose ROJI as a function tool. The tool places the order and returns the order id immediately — the run continues or ends, and your app picks the result up on the webhook. Illustrative sketch:

```python
# illustrative — not a published SDK
from agents import Agent, function_tool
import roji

@function_tool
def order_service(service_id: str, inputs: dict,
                  fee_preview_id: str) -> dict:
    """Order a listed service from a verified business on roji and return
    the order id. The listing sets the price and the SLA; fee_preview_id is
    the itemized total you accepted from get_service, before any charge.
    The deliverable arrives later via webhook — do not wait for it."""
    order = roji.orders.create(
        service_id=service_id, inputs=inputs,
        fee_preview_id=fee_preview_id,
    )
    return {"order_id": order.id, "state": order.state}

agent = Agent(
    name="compliance-ops",
    instructions="When a step requires a licensed or physical-world action, "
                 "search the catalog, read the listing's price and SLA, then "
                 "use order_service and record the order id. Never block on it.",
    tools=[order_service],
)
```

When `order.question_asked` fires, answer it programmatically against the attached answer schema — a second, tiny agent run with the order context loaded is usually enough. When `order.delivered` fires, the deliverable is schema-validated data your code consumes directly.

If your stack prefers MCP over bespoke tools, skip the sketch entirely: the Agents SDK speaks MCP, and [mcp.roji.ai](/developers/mcp) exposes the full surface.

## What to expect

[Category](/categories)-dependent turnaround: minutes for verification calls, hours for field capture, days for document review and expert judgment. The number your agent plans against is not a guess — it is the SLA the business published on the listing, readable before ordering. Spend is capped by platform-enforced policies your Principal sets, so the tool physically cannot exceed them, and payment happens at order with ROJI never holding the money. If the business rejects the order or misses its SLA, the refund is automatic and full — the rest of the guarantees are on the [ordering page](/developers/ordering).

Design partners

Get started

## Sitemap

- [Every public page, as markdown](/sitemap.md)
- [llms.txt](/llms.txt) · [AGENTS.md](/AGENTS.md) · [auth.md](/auth.md)
