
Copy-paste examples for the most popular AI agent frameworks.
Orita handles eligibility and availability; OpenAI Agents SDK orchestrates the conversation. Agents resolve, hold, and confirm β never guess which provider to book.
from orita import OritaClient
from agents import Agent, tool
client = OritaClient(api_key="orita_xxx")
@tool
def resolve_provider(service_id: str, constraints: dict) -> dict:
return client.resolve_scheduling(serviceId=service_id,
dateRange={"from":"2026-08-05","to":"2026-08-12"},
constraints=constraints, limit=3)
@tool
def confirm_booking(resolution_id: str, option_id: str, customer: dict) -> dict:
client.hold_option(resolution_id, option_id, ttlSeconds=120)
return client.confirm_resolution(resolution_id,
optionId=option_id, customer=customer)View exampleLangGraph coordinates the multi-step workflow; Orita determines provider eligibility and resolves real availability. Nodes: resolve β hold β approval gate β confirm.
from orita import OritaClient
from langchain_core.tools import tool
@tool
def resolve_service(service_id: str, constraints: dict) -> dict:
"""Find eligible providers β does NOT book."""
return client.resolve_scheduling(
serviceId=service_id,
constraints=constraints, limit=5)
@tool
def confirm_with_hold(resolution_id: str, option_id: str) -> dict:
client.hold_option(resolution_id, option_id, 120)
# call only after user approves:
return client.confirm_resolution(resolution_id, option_id)View exampleCrewAI coordinates the crew workflow; Orita resolves which provider is eligible and available. The booking agent holds the option while the approval agent collects the customer's sign-off.
from orita import OritaClient
from crewai.tools import BaseTool
class OritaResolveTool(BaseTool):
name: str = "Resolve Provider"
def _run(self, service_id: str, constraints: dict) -> str:
result = client.resolve_scheduling(
serviceId=service_id, constraints=constraints)
opt = result['options'][0]
client.hold_option(result['resolutionId'],
opt['optionId'], 120)
return f"{opt['providerName']} β {opt['reason']}"View exampleMastra orchestrates the agent workflow; Orita resolves the provider resolution problem. Tools: resolveProvider (read-only) + confirmBooking (requires approval before calling).
import { OritaClient } from 'orita-sdk'
import { createTool } from '@mastra/core/tools'
const client = new OritaClient({ apiKey: process.env.ORITA_API_KEY })
const resolveProvider = createTool({
id: 'resolve-provider', // read-only β does NOT book
execute: async ({ serviceId, constraints }) =>
client.resolveScheduling({ serviceId, constraints, limit: 3 })
})
const confirmBooking = createTool({
id: 'confirm-booking', // only after user approval
execute: async ({ resolutionId, optionId, customer }) => {
await client.holdOption(resolutionId, optionId, { ttlSeconds: 120 })
return client.confirmResolution(resolutionId, { optionId, customer })
}
})View examplen8n handles the workflow triggers and user interactions; Orita's REST API resolves which provider to book, holds the slot, and confirms only after approval.
Trigger (Webhook or Form) β HTTP Request: POST /api/v2/resolutions β resolve β HTTP Request: POST /resolutions/:id/options/:optionId/hold β hold β Wait node (customer approval step) β HTTP Request: POST /resolutions/:id/confirm β confirm β Respond to WebhookView example
Run the complete provider-resolution lifecycle in the public sandbox, or create an account when you are ready for production.