Features · AI
Model calls on a budget, agents on read-only keys
GoCommerce calls a model in one place, the AI gateway, which records every call, holds each store to its AI credit or to its own key and cap, and sends only the data its owner lets out. Four tools in the panel run through it: products drafted from a batch of photos, a better listing for a product already in the catalogue, a summary of a product’s reviews, and a summary of the ads report. An AI agent gets a key of its own that only reads, and reaches the store through the MCP server. A store hosted on admin.kitcommerce.store has the gateway and the four tools on the platform’s own Claude key, with a free trial of AI credit; MCP is a module you install when you run GoCommerce yourself.
- 2 model providers, Anthropic and OpenAI
- 5 kinds of store data, each a switch the owner sets
- 19 MCP tools, the 9 that read offered to an agent key
AI tools in the panel
Buttons a person presses on the store’s own products and reviews. Each is a task on the AI gateway below, so it is recorded, paid from the store’s AI credit or held to its own cap, and sent only the data the owner lets out.
-
Products from a batch of photos
Create from photos, on the products screen, takes up to 60 photos at a time. The AI sorts them into products, with the angles of one item as its pictures and its other colours or finishes as variants, and writes each product’s title, description, highlights, type, tags, category, SEO copy and alt text from what the photos show. The shop renames, moves a photo, merges, splits or leaves one out, then presses Create.
ext/photo-products/tasks.go · ext/photo-products/run.go -
Created as drafts with no price
Each product is created as a draft, every variant at price 0 with nothing in stock, so no shopper can buy it and the products list’s Needs a price filter finds it. Sizes come only from the shop, as a Size option, and a suggested new category is never created. A batch that stops picks up where it left off and never makes a product twice.
ext/photo-products/create.go -
A better listing for a product you sell
Improve with AI on a product’s page proposes a new title, description, highlights, tags, type, category, SEO copy and alt text, each beside the current value with a reason. A list names what the model inferred, such as a material or a fit, for the shop to check. Apply selected copies the ticked fields into the form. Nothing is written until the shop saves.
ext/catalog-ai/improve.go · POST /api/admin/x/catalog-ai/products/{id}/improve -
No prices or ratings in AI copy
Create from photos and Improve with AI are told to write only what the shop’s own words or the photos show: never a price, discount, stock level, rating, review or “bestseller”, and no material, size or origin that cannot be seen. Improve with AI also drops any proposed line that names a price, discount, stock level, rating, review or bestseller. It is never sent a product’s prices, stock or orders.
ext/catalog-ai/module.go · Honesty -
What shoppers praise and complain about
Summarize reviews, on the Reviews screen, sorts a product’s published reviews into themes under fit, quality, colour, delivery, value and other, each listing the reviews that say it, beside the average rating. The average and the counts are worked out in code from the reviews each theme cites, not by the model. Below three reviews no model is asked, an unchanged set is answered from the cache for 30 days, and no shopper’s name or email is sent.
ext/reviews/summarize.go · POST /api/admin/x/reviews/products/{id}/summarize -
Ads report in plain words
The ads report shows orders, sales, refunds and profit after product cost by source, medium and campaign, against spend typed in or imported from Google Ads and Meta Ads Manager. Summarize writes it up in plain words from the report’s own rows, and an answer that states a number not in them is refused. A weekly summary is off until the shop turns it on.
ext/ads/summary.go · POST /api/admin/x/ads/summary
The AI gateway
ext/ai-gateway, installed with -ai-gateway or in your own main(), and brought in by -photo-products, -catalog-ai and -ads. With an Anthropic key for the install in ANTHROPIC_API_KEY, every store has AI with nothing to set up. Without one, it stays idle until a store gives it a key, a monthly cap and a price for each model.
-
The install’s key, or the store’s own
A store that enters no key runs on the install’s Anthropic key, at the models and prices the install sets, with the gateway on and pictures allowed from the start. A store may paste its own Anthropic or OpenAI key instead, and is then billed by its provider and draws no credit. Check connection lists the models a store’s own key reaches without spending tokens.
ext/ai-gateway/platform.go · ext/ai-gateway/gateway.go -
Pay-per-use AI credit
A call on the install’s key is paid from the store’s AI credit: a free trial allowance each store starts with, plus what the install’s operator tops up with the admin token. The most a call could cost is held before it goes out and settled to the real cost after, so a failed call or a cached answer costs nothing. A store with no credit left is refused before any model is called. The AI screen shows the free trial left, the topped-up balance and what is spent.
ext/ai-gateway/credit.go -
A monthly cap that holds
A cap in the store’s currency per calendar month, needed with the store’s own key and optional on the install’s, where the credit is the limit. Before each call its worst-case cost is reserved in one conditional update, so calls running at once cannot spend past it; afterwards it is settled to what the provider reported.
ext/ai-gateway/budget.go -
Every run on the record
One row per run: the task, the model, tokens, time taken, the outcome, and the cost as an integer in millionths of a minor unit. The Usage screen adds them up by day, task or model against the cap.
ext/ai-gateway/records.go · GET /api/admin/x/ai-gateway/usage -
Switches for what leaves the store
Catalogue, order lines, contact details, message bodies and documents. Contact details and message bodies stay in until the owner turns them on, and documents too unless the install runs AI on its own key. Data in a class that is off is dropped before sending, and an email address or international phone number found elsewhere is replaced.
ext/ai-gateway/policy.go -
The small model first
Each task names its models in order: the small one first and the strong one only when an answer fails its schema or its own check, with the reason written down. Reading photos goes straight to the strong one. The defaults are Claude Haiku 5.5 and Claude Sonnet 5.5. Answers may be reused within one store, never across stores.
ext/ai-gateway/run.go · ext/ai-gateway/task.go -
A queue for model workPartial
Work is queued in the transaction that caused it and retried only for timeouts, rate limits and outages; the Jobs screen retries or cancels the rest. Missing: a module that queues work. Every task today, from photos to review summaries, runs directly.
ext/ai-gateway/jobs.go
The approval queue
Where something an agent proposes waits for a person. It is part of the AI gateway.
-
A person decidesPartial
A proposal waits seven days for a person signed in to the panel, holding ai.approve and the action’s own right; an API key or the admin token cannot decide. Approving runs the action as that person. Missing: actions — no module registers one yet, so nothing can be proposed.
ext/ai-gateway/approvals.go -
It runs what was reviewed
The preview is worked out again when a proposal is opened and again on approval. If the store changed in between, nothing runs and the new preview is shown; two approvals at once run it once.
POST /api/admin/x/ai-gateway/approvals/{id}/approve -
Every decision on the record
A proposal keeps who filed it, the trace id of the request that did, who approved or rejected it and when, and what the action returned or why it failed.
ext/ai-gateway/approvals.go · approval_requests
Agent keys
A kind of API key made for an AI agent, on Settings › API keys. Integration keys work as before.
-
Reads only
An agent key carries a list of rights chosen from its maker’s own instead of a role, and in this release only reads. Some it can never hold: API keys, the team, roles, plugins, store settings, exports, custom SQL reports and webhooks.
core/agent_keys.go · AgentKeyRefusedRights -
Shown once, then it expires
Only its hash is kept, so it is shown once and cannot be copied again. It expires after 90 days unless its maker chooses otherwise, a year at most.
core/agent_keys.go -
Rate limited
60 requests a minute unless its maker chooses between 1 and 600, counted in PostgreSQL so the limit holds across servers. Over it, the answer is 429 with Retry-After.
core/agent_keys.go · allowAgent -
Never more than its maker
On every request the key is cut to what the person who made it holds in the store today. Demote them and the key loses the same rights; remove them and it stops working.
core/agent_keys.go · agentCaller -
Emails and phones masked
An agent sees customers’ emails and phone numbers masked, and none of the merchant’s notes; it cannot look a customer up by email. The notification log, shipping labels and invoice documents are closed to it, and no right unmasks it.
core/demo.go · App.Masks -
The audit trail names it
A change made with an API key is recorded as that key, by id and name, and one made with an agent key as the agent, with the run it was doing — not as an unnamed operator.
core/audit.go
MCP
-
Store tools for agents
19 tools over the same domain services as the REST API, each checked against the caller’s rights, with every change written to an audit table. Over HTTP or stdio.
ext/mcp -
A read-only mode
Config.ReadOnly withholds all 10 tools that change things from every caller, the admin token included, and tools/list marks each tool with readOnlyHint.
ext/mcp/mcp.go · Config.ReadOnly -
Agent keys get the read tools
An agent key is offered the read tools only. A tool that changes the store, a module’s own included, is left out of its list and refused and audited if called.
ext/mcp/mcp.go · callTool
Not in GoCommerce yet
GoCommerce’s AI-Native B2B specification, in the repository under docs/ai-b2b, describes more than the code does. None of the following is built.
- Agents that change thingsAn agent key only reads, and no module registers an action in the approval queue, so an agent cannot propose a change.
- Improving many products at onceImprove with AI works on one product at a time; nothing rewrites a whole catalogue in one go.
- Buying AI creditA store cannot pay for credit itself. The install’s operator tops it up with the admin token; on admin.kitcommerce.store, ask us and we add more.
- A WhatsApp sales inboxNo WhatsApp connection, shared inbox or suggested replies.
- An order deskNothing reads a message, an email or a PDF purchase order and drafts an order or a quote from it.
- Semantic searchNo embeddings are made or stored; search is the engine’s own or Meilisearch’s.
- Agent memoryNothing keeps an agent’s notes or a customer’s preferences between runs.
- Procurement and catalogue toolsNo supplier catalogue mapping, quote requests to suppliers or product substitution.
- Other model providersAnthropic and OpenAI only, at their own addresses, and the install’s own key is Anthropic’s; no self-hosted or custom endpoint.
FAQ
Questions about AI
Does a store need its own AI key?
Not on an install that has an Anthropic key of its own in ANTHROPIC_API_KEY: every store with no key runs on it, paid from its AI credit. A store may enter its own Anthropic or OpenAI key instead and is billed by that provider. Without an install key, a store needs its own key, a monthly cap and a price for each model before the gateway makes a call.
What does the AI cost a store?
On the install’s key it is pay-per-use, paid from the store’s AI credit, and each store starts with a free trial allowance. Only a model call draws credit: a cached answer, an answer worked out without a model and every feature that is not AI draw none. A store on its own key pays its provider and draws no credit.
Can an AI agent change my store?
Not with an agent key: it only reads. An agent handed a person’s credential or the admin token can use MCP’s 10 tools that change things, each checked against that credential’s rights and audited. The approval queue, which would let an agent propose a change for a person to approve, has no actions yet.
What customer data does a model see?
Only what the store’s owner allows. The catalogue and order lines may leave by default, and documents too when the install runs AI on its own key; contact details and message bodies stay in until switched on. Review summaries need message bodies on and never send a shopper’s name or email. An agent key sees emails and phone numbers masked whatever the switches say.
What uses the AI gateway today?
Create from photos and Improve with AI on the products screens, Summarize reviews on the Reviews screen, the ads report’s summary, and the Amazon importer’s rewrite of a listing’s copy. Nothing else in the repository calls a model.
How do I run the AI tools?
On a store hosted on admin.kitcommerce.store they are already on, with no key to set up, and every new store gets a free trial of AI credit. Or run GoCommerce yourself and start it with -photo-products, -catalog-ai and -ads, which bring -ai-gateway with them, and -reviews for review summaries. Give the engine an Anthropic key in ANTHROPIC_API_KEY and every store runs on it; without one, each store sets its own key, cap and prices. For MCP, install ext/mcp in your own main().
Read the code behind every tile
Each file named on this page is in the GoCommerce repository, MIT licensed. Run it and check.