# REKKI agents

> Read a REKKI supplier's live data (orders, standing orders and upcoming deliveries, customers and chats, catalog, invoices, Order AI) and message its buyers, through agents.rekki.com's REST API or MCP server.

The MCP server at https://agents.rekki.com/mcp answers questions in a conversation: sign in with OAuth, or send an agent's API key as a Bearer token. Dashboards, apps and scripts that refresh by themselves call the REST API with an API key, not MCP. Each tool is the REST operation whose operationId is its name in https://agents.rekki.com/v1/openapi.json. Keys are made in REKKI Supplier Hub: open https://supplier.rekki.com/insights?tab=agents&agent=<agent.id>, with agent.id from get_me, or pick the agent on https://supplier.rekki.com/insights?tab=agents, and click "new key". Supplier Hub shows the key once. The steps that store it as REKKI_AGENT_KEY without showing it in the chat are under "Apps and scripts" in https://agents.rekki.com/skill/SKILL.md.

## Docs

- [OpenAPI](https://agents.rekki.com/v1/openapi.json): every REST endpoint, its parameters and its responses.
- [Skill](https://agents.rekki.com/skill/SKILL.md): the tools, the data notes, worked queries, and storing a key as REKKI_AGENT_KEY.
- [Skill archive](https://agents.rekki.com/skill.zip): the skill with one reference file per table, to install as a Claude skill.
- [Install script](https://agents.rekki.com/install.sh): installs or updates the skill in ~/.agents/skills and for each of Claude Code, Codex, Cursor, opencode and pi found on the computer.

## Tables

- [`suppliers`](https://agents.rekki.com/skill/reference/suppliers.md): The supplier entities in scope (one business can trade as several marketplace entities; aggregate across them unless asked otherwise). default_cutoff/default_min_order apply unless overridden per chat in chats.
- [`supplier_users`](https://agents.rekki.com/skill/reference/supplier_users.md): Portal accounts of the suppliers in scope; hidden and deleted accounts are excluded. Contains personal contact details (PII).
- [`chats`](https://agents.rekki.com/skill/reference/chats.md): Supplier-buyer relationships of the suppliers in scope (orders are placed inside a chat), with per-relationship order settings and the delivery address of the relationship's latest order.
- [`orders`](https://agents.rekki.com/skill/reference/orders.md): REKKI marketplace orders placed with the suppliers in scope: one row per order a buyer (restaurant) placed in a chat or the standing-order scheduler sent for them (standing_order_id set). chat_id -> chats.chat_id; confirmed_by_agent_id is the id get_me returns as agent.id for the agent that confirmed the order, so an agent finds the orders it confirmed with confirmed_by_agent_id = its id; order value = sum of order_items.line_total per order (NULL when no line had a known price — most REKKI orders are placed without prices).
- [`order_items`](https://agents.rekki.com/skill/reference/order_items.md): Line items of orders. order_id -> orders.order_id. unit is free text (kg, case, box, ...); rows with is_delivery_charge=true are delivery fees, not products.
- [`standing_orders`](https://agents.rekki.com/skill/reference/standing_orders.md): Recurring order schedules (standing orders): one row per template a buyer set up with a supplier in scope, delivered on a repeating weekday cadence. Template lines are the standing_order_items rows with delivery_date IS NULL; each delivery transmits as a real marketplace order, recorded in standing_order_sends and on orders.standing_order_id. chat_id -> chats.chat_id.
- [`standing_order_items`](https://agents.rekki.com/skill/reference/standing_order_items.md): Lines of standing orders, shaped like order_items. delivery_date IS NULL: the recurring template's lines. delivery_date set: the replacement lines of an 'edited' standing_order_overrides row for that one delivery. Effective lines for a delivery = the override's lines when present, else the template's.
- [`standing_order_overrides`](https://agents.rekki.com/skill/reference/standing_order_overrides.md): One-off changes to a standing order for a single delivery date: kind 'skipped' cancels that delivery, 'edited' replaces its lines with the standing_order_items rows carrying this delivery_date. One row per standing order and date; re-editing updates the row in place.
- [`standing_order_sends`](https://agents.rekki.com/skill/reference/standing_order_sends.md): Execution ledger of standing orders: the scheduler turns each due delivery into a marketplace order at cut-off, one row per transmitted segment. Lines with longer lead times transmit earlier, so one delivery can produce several rows (and orders), distinguished by cutoff_at. order_id -> orders.order_id. A delivery has no row until one of its segments transmits.
- [`standing_order_events`](https://agents.rekki.com/skill/reference/standing_order_events.md): Append-only timeline of everything that happened to a standing order: lifecycle and per-delivery changes from the audit log, plus reminder_sent rows for the pre-cutoff pings sent to the buyer.
- [`standing_order_upcoming_deliveries`](https://agents.rekki.com/skill/reference/standing_order_upcoming_deliveries.md): Upcoming deliveries of the active and paused standing orders in scope, computed on every request: one row per standing order and delivery date, for delivery dates from today in the supplier's time zone up to, but not including, the request window's to bound; its from bound is ignored. Without a to bound the table covers 8 weeks; a to bound more than 26 weeks ahead fails the request rather than being shortened. Dates follow the cadence: weekly or biweekly steps of 7 or 14 days from anchor_date within [start_date, end_date]; cadence once is anchor_date only. Skipped dates stay, with status skipped; supplier non-delivery days are not applied. Effective lines are the edited override's when present, else the template's. Segments already sent are removed, so a fully sent delivery has no row; its orders carry orders.standing_order_id.
- [`products`](https://agents.rekki.com/skill/reference/products.md): Per-chat pricelists: products a buyer sees in a specific supplier chat, with the negotiated price. chat_id -> chats.chat_id. For the supplier-wide catalog see catalog_items.
- [`catalog_items`](https://agents.rekki.com/skill/reference/catalog_items.md): Supplier master catalogs: canonical products with list prices. supplier_id -> suppliers.id. products holds the per-buyer view of these.
- [`delivery_zones`](https://agents.rekki.com/skill/reference/delivery_zones.md): Geographic delivery zones per supplier. geometry is a GeoJSON polygon; min_order is the zone minimum order value.
- [`non_delivery_days`](https://agents.rekki.com/skill/reference/non_delivery_days.md): Specific dates a supplier does not deliver (holidays, closures). supplier_id -> suppliers.id.
- [`invoices`](https://agents.rekki.com/skill/reference/invoices.md): Invoices the suppliers in scope issued through REKKI. invoice_id joins invoice_orders and invoice_issues; always filter is_invalid = false for financial analyses.
- [`buyers`](https://agents.rekki.com/skill/reference/buyers.md): The customers (restaurants) of the suppliers in scope: the buyers behind their chats, standing orders and invoices. A customer directory only — join via buyer_id; REKKI's restaurant enrichment is not included.
- [`invoice_orders`](https://agents.rekki.com/skill/reference/invoice_orders.md): Which orders an invoice covers. invoice_id -> invoices.invoice_id; order_id -> orders.order_id.
- [`invoice_issues`](https://agents.rekki.com/skill/reference/invoice_issues.md): Problems buyers reported against invoices. invoice_id -> invoices.invoice_id.
- [`messages`](https://agents.rekki.com/skill/reference/messages.md): Chat messages in the chats of the suppliers in scope. chat_id -> chats.chat_id. agent_id is the id get_me returns as agent.id for the agent that sent the message, so an agent finds its own messages with agent_id = its id. images holds the URLs of the images attached to the message. Message content may contain personal or commercially sensitive text.
- [`check_ins`](https://agents.rekki.com/skill/reference/check_ins.md): Delivery check-in events. Keyed by order_po (the buyer-facing PO id, orders.order_po) — NOT orders.order_id.
- [`check_in_items`](https://agents.rekki.com/skill/reference/check_in_items.md): Per-line outcomes of a delivery check-in. order_po -> orders.order_po; status is the raw per-line result recorded at check-in.
- [`connect_emails`](https://agents.rekki.com/skill/reference/connect_emails.md): REKKI Connect (Order AI) inbound emails of the suppliers in scope: order emails and voicemails buyers send, ingested for order extraction. email_id is referenced by connect_orders.email_id. Sender addresses are PII.
- [`connect_orders`](https://agents.rekki.com/skill/reference/connect_orders.md): Orders the Order AI extracted from the inbound Connect emails of the suppliers in scope: one row per draft awaiting review, committed into a marketplace order, or deleted. committed_order_po -> orders.order_po; email_id -> connect_emails.email_id (a reprocessed order can reference an older email); chat_id -> chats.chat_id.
- [`connect_order_items`](https://agents.rekki.com/skill/reference/connect_order_items.md): Line items the AI extracted per connect order, exactly as parsed from the inbound document (freetext, pre-matching). connect_order_id -> connect_orders.connect_order_id.
- [`connect_order_revisions`](https://agents.rekki.com/skill/reference/connect_order_revisions.md): Edit timeline of the Connect orders of the suppliers in scope: one row per saved revision of the extracted order, including the complete extracted-order JSON. The earliest revision is the untouched AI parse; compare revisions to measure human correction of the AI extraction. connect_order_id -> connect_orders.connect_order_id; supplier_id -> suppliers.id.
