02 · Agent-in-a-Box

Build the agent your Arc app needs.

Connect your product APIs to a hosted Aomi App, embed it in your interface, and keep Circle signing under explicit wallet control.

Status
Live starter
Application
2938640
Test cases
3 invoices
Settlement
Builder-owned
01

Prepare

Give the agent your domain operations.

REPOSITORY
git clone https://github.com/aomi-labs/arc-canteen
cd arc-canteen/templates/invoice-agent
Changesrc/client.rs — call your real APIs.
Keepsrc/tool.rs — deterministic approval and refusal rules.
ConfigureINVOICE_API_BASE_URL — your HTTPS service.
Verifycargo test — approved and refusal cases.
02

Deploy

Use the existing Aomi Build lifecycle.

01
Connect the repository

Open Aomi Build and select the included aomi.toml.

Open Build ↗
02
Add the API base URL

Set the one required secret to an HTTPS API implementing your tools.

INVOICE_API_BASE_URL
03
Build and activate

The activation result gives your frontend an Application ID.

Output: applicationId
03

Embed

Mount the hosted agent in your product.

FRONTEND
import { AomiWidget } from "@aomi-labs/widget-lib";
import "@aomi-labs/widget-lib/styles.css";

<AomiWidget
  applicationId="2938640"
  apiUrl="https://chat.aomi.dev"
  auth={{ kind: "browser_wallet" }}
  routing={{
    targets: [{ mode: "direct", apps: [{ applicationId: 2938640 }] }],
    defaultMode: "direct",
  }}
/>

Boundary: the agent may read, reason, and prepare. Your authenticated backend owns Circle wallet review and signing.

04

Live · Application 2938640

Watch it live.

This invoice agent was built from the original Tameion RFB in one shot with agentic support. Ask it to pay INV-1042, INV-1043, or INV-1044.

Request lifecycle

From natural language to app action.

Aomi agent request sequenceA natural-language prompt travels from the browser widget through the Aomi backend to the hosted app and developer API, then streams back to the widget.Browser WidgetAomi BackendAomi App LayerDeveloper API1 · Prompt + Application ID2 · Direct route loads the app3 · Typed tool call4 · Invoice + vendor data5 · Tool result + agent response6 · Streamed events and answer

Execution boundary: the Aomi App reads and reasons through typed tools. The host application keeps final Circle Wallet review and signing outside the prompt path.

Loading invoice agent…
TryPay invoice INV-1042 if it is still safe.Pay invoice INV-1043.Pay invoice INV-1044.
05

Source challenge

The task we built from.

Tameion RFB 02AP/AR Automation AgentExpand original task

Invoices are still read by hand, and paid at whatever moment someone gets to them.

The problem. AP/AR teams still process invoices, decide payment timing, and chase collections manually. The RFB asks builders to automate that cycle, reduce error and fraud, and improve cash flow.

What the AI decides

  • Read invoices, emails, and contracts to determine what is owed.
  • Optimize vendor payment timing against preserving cash.
  • Detect duplicate invoices and probable fraud.
  • Screen a vendor wallet before paying it.
  • Match payments to invoices automatically.

What builders create

  • Invoice ingestion from email, PDF, or API.
  • Payment-timing optimization engines.
  • Payment workflows with address screening.
  • Receivables collection timed to the customer.

What we built: a hosted invoice agent that checks vendor approval, detects a changed payout address, refuses duplicates, and prepares an Arc USDC payment for explicit Circle Wallet review.

Read the original Tameion RFB ↗