01 · Execution Kit

Buy a simulated Arc plan in two reviewed steps.

Aomi prepares a bounded Task and sells its frozen result separately. Circle signs each service payment; any business transaction stays under your own review.

Runtime
Staging API live
Payment
Two Arc Mainnet purchases verified
Network
Arc Mainnet · chain 5042
Production
Older contract still live
01

Use this when

You already own the intelligence.

Your system ownsThe intent, constraints, payment reviews, and final transaction decision.
Aomi ownsBounded preparation, a private job, an attested preview, and frozen result bytes.
Circle ownsTwo separate Gateway payment authorizations and their transfer records.
Your verifier ownsAttestation, byte equality, Arc batch confirmation, and later execution review.
02

Copy the integration

Integrate against the staging contract.

STAGING CLIENT · PINNED SOURCE
npm install github:aomi-labs/arc-canteen#7b3a3ce00280f185074bbc2380455edb8f4833ce
SERVER-SIDE NODE · ARC MAINNET STAGING
// server/execution.ts
import { TwoStageTaskClient } from "arc-canteen/task-client/two-stage";
import { fetchTrustedTaskJwks } from "arc-canteen/task-client";
import { CircleArcWallet } from "arc-canteen/circle-arc-wallet";

const endpoint = "https://api-staging.aomi.dev/v1/task/build";
const wallet = new CircleArcWallet({ walletAddress: circleWalletAddress });
const payer = await wallet.gatewayPayer(5042); // Arc Mainnet
const request = {
  intent: decision.summary,
  chainId: 5042,
  sender: payer,
  payer,
  constraints: decision.constraints,
};
const client = new TwoStageTaskClient({
  endpoint,
  chainId: 5042,
  payer,
  merchant: independentlyVerifiedAomiSeller,
  trustedJwks: await fetchTrustedTaskJwks(endpoint),
  maxRetrievalMicrousd: decision.maximumServiceFeeMicrousd,
  stateDirectory: "/private/task-state/invoice-1042",
  rpcUrl: "https://rpc.mainnet.arc.io",
  approve: (payment) => showEachServicePaymentReview(payment),
  signTypedData: (data) => wallet.signTypedData(data, showExactSignatureReview),
});

let prepared = await client.prepare(request); // 0.01 USDC preparation.
while (prepared.status === "pending") {
  await wait(2_000); // Reuse the same journal and signed proof.
  prepared = await client.prepare(request);
}
let preview = await client.status(); // Free polling.
while (preview.status === "pending") {
  await wait(2_000);
  preview = await client.status();
}
if (preview.status !== "ready") throw new Error("Task preparation failed");

let result = await client.retrieve(); // Separate review/payment for nonzero outflow.
while (result.status === "pending") {
  await wait(5_000); // Gateway batch settlement can outlive the preview quote.
  result = await client.retrieve();
}
const artifact = JSON.parse(result.bytes.toString("utf8"));
reviewBusinessTransactionSeparately(artifact); // No Task transaction is broadcast here.

Network scope: the public staging API accepts Arc Mainnet USDC, and a direct two-stage paid client run has settled onchain. This sample stops at the simulated artifact; the existing execution adapter still uses the retired TaskAuthorization contract. Production and venue-routed purchases are not verified. Use a private durable journal, independently verify the seller address, and review any final wallet transaction separately.

03

Trace the request

From agent intent to a settled result.

Execution Kit sequence diagramYour agent submits a bounded Task, signs separate Circle Gateway payments for preparation and retrieval, and verifies the attested result and Arc batch. Final execution is a separate decision.Your agentCircle walletAomi Task APIAomi runtimeGatewayArcYour app01Intent + Arc constraints02Preparation 402 · 0.01 USDC03Review + sign preparation04Submit preparation proof05Build + simulate06Private job + attested preview07Review + sign retrieval08Submit retrieval proof09Frozen result + receipts10Confirmed Arc batch

Control boundary: each service payment needs its own review and signature. Aomi returns a simulated, frozen result; it cannot sign or broadcast the business transaction. Your app reviews any execution separately.

04

Implementation reference

Five gates before result delivery.

01
Bind the Task request

Submit the intent, Arc chain, payer, and constraints. Check the unpaid preparation challenge against the exact canonical body.

Free request
02
Buy preparation

Review and sign the fixed 0.01 USDC Gateway charge. Persist and reuse the original proof on uncertain responses.

Payment 1
03
Inspect the preview

Poll the private job for free. Verify its attestation, frozen payload hash, and separately measured retrieval fee.

Free polling
04
Buy the frozen result

Review the second fee, sign a distinct Gateway authorization, and retain the exact proof for recovery.

Payment 2
05
Verify before execution

Match the delivered bytes to the attestation and both payment records to Circle and Arc. Review any business transaction separately.

No auto-execution