#!/bin/sh # Free isolated demo only. No key, payment, phone call or business notification. set -eu command -v python3 >/dev/null 2>&1 || { printf '%s\n' 'Python 3 is required.' >&2; exit 1; } exec python3 - <<'PY' import json import sys import urllib.error import urllib.request url = 'https://api.odilelabs.com/a2a/v1/quickstart' try: req = urllib.request.Request(url, data=b'{}', headers={'Content-Type': 'application/json'}, method='POST') with urllib.request.urlopen(req, timeout=30) as response: data = json.load(response) if data.get('demo') is not True or not isinstance(data.get('tasks'), list): raise ValueError('The endpoint did not return an isolated demo.') expected = ['find_business_agent', 'check_availability', 'book_first_available', 'take_message'] if [task.get('skill') for task in data['tasks']] != expected: raise ValueError('The demo did not return all four requested tasks.') print('OdileM2M: isolated fictional demo; no charges or business notifications.') for task in data['tasks']: task_id, state, marker = task.get('task_id'), task.get('state'), task.get('callback_check') if not isinstance(task_id, str) or not task_id or marker not in ('verified', 'unverified'): raise ValueError('The demo response is missing its task ID or callback_check.') print(f"{task['skill']}: task_id={task_id} state={state} callback_check={marker}") if state != 'TASK_STATE_COMPLETED': raise ValueError('A demo task did not complete. No success is claimed; try again later.') print('callback_check does not prove caller ownership. Docs: https://odilelabs.com/m2m') except (urllib.error.URLError, ValueError, KeyError, TypeError) as error: print(f'Quickstart stopped: {error}', file=sys.stderr) sys.exit(1) PY