SCOUT
SCOUT Home Dashboard How it works API docs Features (all) EasyScan EasyGift Sale & Discount Business units Access Activity
SCOUT Gateway
Dashboard How it works API docs Features Business units Access Activity
SCOUT

Shop Context for Optimised Understanding & Targeting

Operator access

Sign in to review gateway usage and configuration. Details are available after authentication.

Usage and costs Monthly spend, traffic, and budgets for connected integrations.
Capabilities Feature registry and shared runtime policies (visible after sign-in).
Audit trail Recent requests with previews (operators only).

Welcome back

Sign in with your Google account to continue.

SCOUT

Choose a tool to get started

Gateway

AI completions, spend tracking, feature registry, and activity logs.

Enrichment

Shop intelligence, storefront scanning, and store context builder.

Coming soon

Signals

Extracting meaningful marketing intelligence from the noise.

Dashboard

Spend and traffic for this gateway. Figures persist to disk (see below) and survive process restarts.

Spend by app

App Month Spend Budget Requests

Response cache

App Cached entries

How it works

SCOUT sits between your Shopify apps and the language model: one place for auth, policy, spend tracking, and operator visibility.

Connecting an app with an AI coding agent

The full integration contract — gateway completions, feedback, and enrichment — lives in one markdown brief served from this host at /llms.txt. No MCP server needed: paste the prompt below into Claude Code, Cursor, or any coding agent and it can wire an app up end to end.

Open /llms.txt

Request path

  1. An app calls POST /ai/complete with a Bearer gateway key. The key identifies the app; do not rely on an app field in the JSON body in production.
  2. The gateway validates the feature id, prompt, and optional storeId / storeContext, then applies rate limits (per minute, per shop per UTC day).
  3. For each feature, the model sees the feature’s base system prompt plus a shared gateway runtime block (UTC clock, domain rules, safety expectations). That suffix is built server-side and matches what you preview on the Features page.
  4. Responses may be served from cache (keys include the UTC calendar day so “today” does not go stale). Usage and cost are recorded for the current month and shown on the dashboard.

This portal

After email + password sign-in, operators can review spend by app, inspect the live feature registry and gateway runtime text, browse recent completion logs (with optional shop filter), and adjust gateway settings (per-app access, disabled built-ins, custom features).

Cost ledger, request log, portal settings, and shop-context snippets are persisted under GATEWAY_DATA_DIR (or the default data directory on the host).

Other interfaces

  • Dashboard JSON — GET /dashboard/* with GATEWAY_DASHBOARD_KEY for automation and monitoring without the browser UI.
  • Health — GET /health for load balancers and deploy health checks.

API docs

Short reference for integrators and operators. Base URL is your gateway host; all paths are from the server root.

Integrating with an AI coding agent?

GET /llms.txt serves a self-contained markdown brief covering everything below in agent-ready form — auth, request contracts, error handling, enrichment, and a verification checklist.

Open /llms.txt

Public

GET /health

Liveness JSON: status, timestamp, uptime. No authentication.

GET /llms.txt

Agent integration brief as text/markdown. No authentication; contains no secrets (placeholders only).

AI completion (app keys)

POST /ai/complete — headers: Content-Type: application/json, Authorization: Bearer <GATEWAY_KEY_*>.

FieldRequiredNotes
featureYesRegistry id for the calling app (e.g. sku_generator).
promptYesUser text; validated length and control characters.
storeIdNoShop hostname, e.g. shop.myshopify.com.
storeContextNoExtra string or JSON for the model; size-capped.
skipCacheNoBoolean; if true, bypass response cache.

Typical success body includes text, usage, costUsd, model, cached, storeId, responseTruncated. Errors use HTTP 4xx/5xx with a JSON message / error where applicable.

Dashboard JSON

Prefix Authorization: Bearer <GATEWAY_DASHBOARD_KEY> on every request.

MethodPathDescription
GET/dashboard/spendSpend for all apps.
GET/dashboard/spend/:appSpend for one app key.
GET/dashboard/featuresFeature registry metadata.
GET/dashboard/features/:appFeatures for one app.
GET/dashboard/cacheCache stats.
POST/dashboard/cache/clearClear response cache.
GET/dashboard/limitsEffective caps and rate limits.

Portal session API

Browser clients use the session cookie set at login. JSON endpoints are under /api/portal (send cookies; credentials: include in fetch).

MethodPathDescription
GET/api/portal/statusAuth state and optional email.
POST/api/portal/auth/loginBody: email, password.
POST/api/portal/auth/logoutClear session.
GET/api/portal/overviewSpend summary (session).
GET/api/portal/featuresFeatures + gateway runtime tail (session).
GET/api/portal/logsRecent requests; query limit, storeId.
GET/api/portal/dataAggregate bundle for scripts (session).
GET/api/portal/appsPer-app gateway toggles + recent change log.
POST/api/portal/appsCreate a new app. Body: id, name, businessUnitId, environment, monthlyBudgetUsd. Audited in app_change_log.
PATCH/api/portal/apps/:app/budgetBody: monthlyBudgetUsd (number, 0 = no cap, ≤999999.99). Optional reason. Audited in app_change_log.
POST/api/portal/business-unitsCreate a new BU. Body: id, name, anthropicKeyEnv, status. Audited in app_change_log.
POST/api/portal/apps/:appFlip gatewayEnabled on or off; audited in app_change_log.
POST/api/portal/features/:keyInsert/update a feature row in Postgres (writes feature_change_log).
DELETE/api/portal/features/:keyHard-delete a feature; recorded in feature_change_log.
GET/api/portal/features/:key/historyAudit history for one feature.
POST/api/portal/ai/suggest-featureDraft a feature definition with AI (session).
GET/api/portal/logs/exportCSV export of activity (session).

UI routes GET / (dashboard), /portal/how-it-works, /portal/api-docs, /portal/features, /portal/activity, and legacy GET /portal (redirects to /) serve the same single-page app.

Features

Registry entries below show the base system prompt for each capability. Every completion appends a shared gateway runtime block (UTC date/time, policies). Usage reflects the current calendar month.

Gateway runtime context

Concatenated after the per-feature prompt on each completion. UTC date and time below update live; the rest matches what the gateway appends server-side.

Per-feature prompts

Activity

Recent completion calls with prompt and response previews. Newest first; saved on disk (up to 500 entries).

Spend (last 30 days)

No completion activity in the last 30 days.

Spend by feature (month-to-date)

No completion activity this month.

Business units

One Anthropic API key per business unit. Each app inherits its BU’s key. Spend figures reflect the current calendar month.

Access

Portal users and the role each one has. Every grant, demotion, and removal is written to portal_users_change_log.

New business unit

Lowercase letters, digits, underscores; must start with a letter. Used as the primary key — cannot be changed.
Name of the env var that holds the Anthropic secret (not the secret itself). Format: ANTHROPIC_KEY_<BU ID uppercase>.

New app

Lowercase letters, digits, underscores; must start with a letter. Must match the GATEWAY_KEY_<ID uppercase> env var.
Default: $50.00. Enter 0 for no cap.
After creating the app, set GATEWAY_KEY_<ID> in your environment and restart the gateway to activate the API key.

Edit business unit

(immutable)
Changing this requires the new env var to be set on the gateway and a restart.

Edit app

(immutable — env var must match)
Enter 0 for no cap.

Settings

App access

When disabled, that app’s API keys receive 403 app_gateway_disabled from POST /ai/complete. Every flip is recorded in app_settings_change_log.

Recent app changes

Edit monthly budget

Set the maximum USD spend per calendar month for . The gateway blocks new LLM calls (HTTP 402) once the cap is reached; cached responses still serve. Set to 0 to remove the cap.

Default: $50.00. Enter 0 for no cap.

Add feature

Leave blank for unlimited. Counts cache hits + fresh calls. Resets at UTC midnight.
Blank = use global default. 0 disables caching. Max 604800 (7 days).
Pulls SCOUT store profile (industry, products, brand voice) into prompt before LLM call. Adds tokens.
Appends the store's colour palette, fonts, and layout style to the prompt. Ignored when "Auto-inject SCOUT store context" is also enabled (signals are already included).

Add user

Must be a domain-allowlisted address (e.g. @506.io, @shopcircle.co). Cannot be changed after creation.
Required for bu_admin and bu_member. Ignored for super_admin.
Hold Ctrl/Cmd to pick multiple. Empty = access to all apps in this BU.

Recent changes

SCOUT — internal portal Cost and request data follow GATEWAY_DATA_DIR retention. Related: SCOUT Enrichment
© 2026 506io. All rights reserved.