An Agent Capability Token (Documentation Index
Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt
Use this file to discover all available pages before exploring further.
agt_…) lets an AI agent shop on a
specific customer’s behalf — within boundaries the customer chose. It
is the differentiator slice of Stella: every merchant gets agent
traffic for free because /api/agent/* is just a different token type
on the same backend.
What makes an agent token different
| Aspect | Storefront token | Customer token | Agent token |
|---|---|---|---|
| Identifies | A merchant | A logged-in customer | An agent + a customer + a budget |
| Lifetime | Indefinite | ~24h, renewable | Bounded by expires_at |
| Spending limit | None (merchant trust) | None (customer’s own card) | Hard budget_cents cap |
| Per-call audit | Mutations only | Mutations only | Every call, every endpoint |
| Auto-completes payment | n/a | If buyer confirms | Never — always returns a checkout URL the human must tap |
Consent flow (RFC 8628 Device Authorization)
Modeled on OAuth’s device flow because LLMs can’t open embedded browsers. The customer never sees the agent’s screen, and the agent never sees the customer’s password. Tokens never travel through the agent’s process before the customer has explicitly approved.What an agent can do
/api/agent/* is a separate API surface optimized for LLM tool-use:
| Endpoint | Effect |
|---|---|
GET /agent/catalog/search | LLM-shape product search |
POST /agent/intent/find | NL query → ranked candidates |
POST /agent/intent/find-and-add | One-shot: find + create cart + add |
POST /agent/intent/find-and-buy | One-shot: find + cart + checkout. Returns checkout_url for the human to tap. Stella never auto-pays. |
GET /agent/customer/me | Customer profile (capability-token-aware) |
GET /agent/audit/me | Agent’s own action history |
Budget enforcement
Every mutation that allocates spend (find-and-buy, find-and-add if
followed by checkout completion) checks:
budget_used_cents is incremented in the same transaction that
finalizes the order (CheckoutFinalizer.consume_budget), so partial
failures can’t double-spend.
Per-customer agent cap
A customer can have at most 10 active agent tokens at any time. The 11thconsent/poll returns:
approved — the customer can revoke an
existing token and the next poll will succeed without re-issuing.
Audit trail
Every agent call writes toaudit_events with:
actor_type = "agent"actor_id = <agent_token_id>action = <endpoint>payload_hash- IP, UA, correlation ID
Revocation
Three paths, all instant:- Customer revokes from the dashboard’s customer-side My agents panel.
- Customer revokes via API:
DELETE /api/storefront/customer/me/agents/{id}. - Merchant revokes from the dashboard’s merchant-side panel (compliance / abuse cases).
401.
Try it from the CLI
The reference smoke harness lives atexamples/agent-cli/ in the
agenticom repo. Seven
subcommands cover the full flow: