Capability catalogue
customersread
customers.recent_orders
Recent orders for a customer
Last N orders for a customer, newest first. Thin wrapper over the ecommerce connector's order list; implementers can delegate to orders.lookup_by_email when customerId maps 1:1 to email.
Effect
read Fanout
no
Cache TTL
600s
Traits
none
Request arguments
Passed as the args parameter to ctx.capability.call("customers.recent_orders", …).
| Field | Type | Required | Description |
|---|---|---|---|
| limit | integer | no | default: 5 · min: 1 · max: 20 |
| customerId | string | yes |
Response
Returned by ctx.capability.call("customers.recent_orders", …).
Array; each element is an object with the following fields.
| Field | Type | Required | Description |
|---|---|---|---|
| items | array<object> | no | |
| total | number | null | no | |
| status | string | null | no | |
| orderId | string | yes | Customer-facing order number |
| currency | string | null | no | |
| placedAt | string | null | no | format: date-time |
| tracking | array<object> | no | |
| shippedAt | string | null | no | format: date-time |
| customerEmail | string | null | no | For ownership checks only — never shown to a customer |
| fulfilmentStatus | string | null | no |
Example call
From inside your agent's handle(). The kernel resolves customers.recent_orders to the tenant's connector binding at invocation time.
response = await ctx.capability.call(
"customers.recent_orders",
args={
"limit": 5,
"customerId": "...",
},
)See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.