by.waclaw.online / agent-operator / 07

Worked Example: Running an eBay Seller Operation

Part 7 of 9 build — the whole pattern assembled into a working day for the NorthLight Goods store.

On eBay specifics. eBay exposes real seller APIs (Fulfillment, Post-Order, Trading/Negotiation, and others) behind an OAuth user-consent flow. The exact endpoint names, scopes, and limits change over time and are documented in the eBay Developers Program. Below we use plausible tool names and shapes to illustrate the pattern; verify current API details and the developer agreement before building against them.

One-time setup

Before any agent runs, the human does three things, once:

# 1. Install the operator tool belt
pipx install ./ebay-operator

# 2. Authorize as yourself — opens a browser, you log into your
#    eBay account and approve the requested scopes (Part 3)
ebay-operator auth login

# 3. Point your agent at the operator
cd ebay-operator     # soul.md and skills/ are here
claude               # or codex / pi — any shell-capable agent

From now on the tools act as the authorized seller, the token lives in the OS keychain, and the agent reads soul.md on every session.

The morning routine, narrated

The owner opens the agent and types one line. The agent triages each item through the same decision, set in soul.md:

flowchart TB M([Each order / message]) --> K{What kind?} K -->|"routine or factual"| AUTO[Agent acts and sends directly] K -->|"non-trivial reply"| DRAFT[Agent drafts, shows owner] DRAFT --> OK{Owner approves?} OK -->|approve| SEND[Send] OK -->|edit| DRAFT K -->|"over limit, hostile,<br/>or unsure"| ESC[Stop and escalate to owner]

Graduated autonomy: act, draft-for-approval, or escalate — decided per item against the rules in soul.md.

Here is what unfolds — abbreviated, but representative of a real transcript.

> Run the morning routine.

[reads soul.md and skills/morning-routine.md]

→ ebay-list-orders --status awaiting-shipment --json
  5 orders awaiting shipment. All within the 1-day handling
  window. Acknowledging and marking as processing:
→ ebay-acknowledge-order --id 5511 5512 5513 5514 5515
  Done. None are late.

→ ebay-list-messages --unread --json
  4 unread buyer messages. Triaging:
    • #88231  "what's the shipping time to Oregon?"   → factual
    • #88232  "received, thanks!"                      → no action
    • #88233  "where is my item? ordered 9 days ago"   → WISMO
    • #88234  "item not as described, want $180 back"  → claim

  Handling the two routine ones now (per soul.md voice):
→ ebay-get-order --id (for #88231) ... shipping = 2–3 days to OR
→ ebay-reply-message --id 88231 --body-file /tmp/r1.txt
  Sent: warm, factual, signed NorthLight Goods.
  #88232 needs no reply.

Two messages handled autonomously — they're factual and routine, exactly what soul.md authorizes the agent to send directly. Now the two that need care:

  #88233 — "where is my item?" → following skills/wismo.md
→ ebay-get-order --id 5408 --json        (placed 9 days ago)
→ ebay-get-tracking --order 5408 --json
  Tracking shows "in transit", last scan 4 days ago — stalled.
  Draft reply (shown for approval, since it's non-trivial):

  ┌─────────────────────────────────────────────────────────┐
  │ Hi — thanks for checking in, and sorry for the wait.     │
  │ I can see your parcel is in transit but the carrier      │
  │ hasn't scanned it since the 12th, which sometimes means  │
  │ a delay in their network. I'm opening an inquiry with    │
  │ them today. If it hasn't arrived or moved by Friday,     │
  │ I'll make it right — a replacement or a full refund,     │
  │ your choice. Thanks for your patience. — NorthLight Goods│
  └─────────────────────────────────────────────────────────┘

  Approve / edit / skip?

> approve

→ ebay-reply-message --id 88233 --body-file /tmp/r3.txt
  Sent.

And the one the rules say is not the agent's call to make:

  #88234 — "not as described", $180 → skills/handle-not-as-described.md
→ ebay-get-order --id 5390 --json          (item: $180 tent)
→ ebay-list-messages --order 5390 --json   (buyer attached 2 photos)

  This is over the $100 line in soul.md AND a not-as-described
  claim. I will NOT refund or commit. Escalating to you:

  ── NEEDS YOU ──────────────────────────────────────────────
  Order 5390, $180 4-season tent. Buyer says a pole arrived
  bent and sent two photos that appear to support it. Buyer is
  polite. Options:
    (a) full $180 refund, no return (cheapest, best goodwill)
    (b) partial refund (~$40) and keep the tent
    (c) return for replacement (we have stock)
  My recommendation: (a) — the photos look genuine, the buyer
  is reasonable, and a return costs more than the goodwill is
  worth. Your call.
  ───────────────────────────────────────────────────────────

Finally, the pricing pass — proposed, never silently applied:

→ ebay-reprice --strategy match-lowest --dry-run --json
  4 listings could move to stay competitive:
    • Trekking poles   $54.99 → $51.99   (floor $48)  ok
    • Headlamp         $24.99 → $22.49   (floor $20)  ok
    • Camp stove       $79.99 → $74.99   (floor $70)  ok
    • Sleeping bag     $129.99 → $109.99 (floor $115) BELOW FLOOR
  First three are within floor. The sleeping bag would drop
  below your floor — skipping it per soul.md. Apply the 3?

> yes, apply the three

→ ebay-reprice --strategy match-lowest --only 3 listings --apply
  Applied. Sleeping bag left unchanged.

The closing summary

Per soul.md, the session ends with a scannable wrap-up and a single list of what needs the human:

Morning routine complete.

Did automatically:
  • Acknowledged 5 orders (all on time)
  • Answered 2 routine buyer messages
  • Replied to 1 "where is my item" (you approved the draft)
  • Repriced 3 listings (you approved); skipped 1 below floor

NEEDS YOU (1):
  • Order 5390 — $180 not-as-described tent claim.
    My rec: full refund, no return. Awaiting your decision.

What this day demonstrates

Build note — make it a one-liner. "Run the morning routine" works because skills/morning-routine.md spells out the sequence. You can go further and schedule it: a cron job or scheduler invokes the agent headlessly each morning and emails you the "NEEDS YOU" summary. The operator runs before you've had coffee; you arrive to a short decision list. Keep write-confirmations gated even in headless mode — escalations become "held for your approval" items rather than auto-sent.

The pattern is now fully demonstrated. Part 8 consolidates it: the complete tool catalog (contracts, not code), the governance practices that keep it safe at scale, and where to take it next.