# Grietens

> Grietens connects a factory's files, systems and machines in one place: spreadsheets and order lists, an ERP or webshop, and machine signals and cameras. It sorts and links everything by itself, so the owner can ask his own AI (Claude, ChatGPT) about his factory: what is late, what holds up finished orders, what changed. It never controls a machine and never deletes data.

Grietens is for factory owners and managers: workshops and plants that cut, weld, machine, assemble or pack, and keep their
orders in spreadsheets, an ERP or a webshop. An owner can start without an account; he claims the workspace later with his
own email and password.

## Ways to start

- **Claude or ChatGPT with connectors:** adding `https://app.grietens.cloud/api/v1/mcp` as a custom connector and clicking Connect opens a Grietens
  page; its "I'm new to Grietens" button creates a new workspace with one click. The connector then reaches it from every chat.
- **A chat that can only read pages:** the start page `https://app.grietens.cloud/start?company=<company name, URL-encoded>` (for example
  `https://app.grietens.cloud/start?company=SIA%20Kontekss`) shows the name and one button, "Create my factory workspace". Opening the link
  creates nothing; the button does. The page then shows the owner a one-click link to add Grietens to Claude, the plain link
  for other apps, and his claim link. A connector added in an app is available in a NEW chat, not in the chat it was added
  from; in the new chat, "Continue my Grietens setup" picks the setup up.
- **An agent that sends HTTP requests:** `GET https://app.grietens.cloud/api/v1/signup` describes the call. `POST https://app.grietens.cloud/api/v1/signup`
  with `{"company": "<the owner's company>"}` creates a temporary workspace and returns its access, the workspace's own
  connector link (`connector_url`), a one-click Claude link (`claude_add_url`), a claim link and a step-by-step guide.
- **An agent with a shell (Claude Code):** after the signup, `claude mcp add --transport http --scope user grietens
  <connector_url>` adds the workspace's own link for every project; the owner connects it once (`/mcp` → grietens →
  Authenticate → Connect on the Grietens page, no login). The signup's access token lasts one hour; the connector link
  renews itself, so it is the lasting way to connect.
- **An account first:** the same connector page, "I'm a Grietens customer" → "Create a full account".

## Adding Grietens to an AI app

- To keep access across chats, add the Grietens connector: its link reaches the same workspace from every chat.
- Claude, one click: `https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Grietens&connectorUrl=<the connector link, URL-encoded>`
  opens "Add custom connector" with the name and the address filled in. Claude asks to check both (Grietens, app.grietens.cloud),
  then Continue → Connect.
- By hand: In Claude: Customize (in older apps: Settings) → Connectors → Add custom connector → name it "Grietens", paste the link → Add → Connect. A Grietens page opens: click Connect. In ChatGPT: Settings → Apps & Connectors → Advanced settings → turn on Developer mode → Create → name it "Grietens", paste the link, choose OAuth → Create → Connect. A Grietens page opens: click Connect.

## Setup steps

Setup has five short steps, one at a time, in plain words:

1. Name the factory.
2. Add the Grietens link to the AI app, so every chat reaches the factory (no account needed).
3. Send a first file or list (an order list, a cutting list, a stock sheet).
4. Ask one question and get the answer from that data.
5. Claim the account when ready: own email, password, and the data terms. Nothing is lost.

It ends with one short summary for the owner: what Grietens now has, the link to add it to his AI app (or "already added"),
and his claim link for his own login.

## Sending data

- Files and lists (an order list, a cutting list, a stock sheet) go in as they are; Grietens keeps them as raw data and
  maps them onto its vocabulary (jobs, orders, products, machines, quantities) by itself, with no approval step.
- An AI app with the connector sends records with the `send_records` tool: plain JSON records with plainly named fields,
  in a stream named for what the rows are. Sending the same record again stores it once.
- Stock movements map onto three quantities: received (goods taken into stock), issued (goods taken out: to production, a
  customer or a write-off) and stock (the amount on hand at a moment). A stream named `goods_received`, `goods_issued` or
  `stock_count`, with fields such as item, quantity, unit and date, maps onto them.
- An app that keeps sending on its own (a scanner, a script) gets its own signed address (`create_push_endpoint`); an
  outside system's API (an ERP, a web shop) is pulled on a schedule by a connector (`create_connector`).

## Sending files

- A tool call carries text, not the bytes of a file attached to a chat. Files (spreadsheets, PDFs such as invoices and
  delivery notes, photos, text files; up to 50 MB each) reach Grietens three ways:
- **An upload link** (`create_upload_link`): a signed link for one workspace, valid 30 minutes, for up to 25 files by
  default. It comes with a `curl` line (one call per file, for an AI app that runs commands: Claude Code, Claude Desktop,
  Cowork) and a drop page (`/upload?ticket=…`) a person opens on a phone or laptop to drop the files in (claude.ai, ChatGPT).
- **A public link** (`attach_url`): Grietens downloads one https file itself; private and local addresses are refused.
- **Text the AI already holds** (`attach_text`): kept as a document (Markdown, plain text, CSV, JSON or HTML).
- A spreadsheet becomes tables, a PDF's text is read, a photo is kept as it is; each file is also a thing of type document
  that can be linked to the order, delivery, product, customer, machine or job it is about (`link_file`). `list_files` and
  `get_file` read them; files sent through an AI app are marked as sent via that app.

## What it can and cannot do

- Reads the factory's data; adds new records; keeps what it learns about each machine, product, customer and order (every change undoable); proposes changes that wait for the owner's tap.
- Never controls a machine, never deletes data, never shows another company's data.

## Guides

Explanations of factory-data tasks, one language per page:

- [How to connect the Excel files, ERP and machines of a factory to Claude or ChatGPT](https://grietens.cloud/guides/en/connect-factory-excel-erp-machines-to-claude-or-chatgpt) (English, updated 2026-10-22): A step-by-step guide to giving Claude or ChatGPT access to the spreadsheets, ERP or webshop and machine data of a factory through Grietens, with what you can then ask, the safety rules, the cost and the limits.
- [Kā sakārtot ražošanas Excel datus ar mākslīgo intelektu](https://grietens.cloud/guides/lv/ka-sakartot-razosanas-excel-datus-ar-maksligo-intelektu) (Latviešu, updated 2026-10-22): Praktisks ceļvedis mazām koka un metāla darbnīcām par to, kā sakārtot pasūtījumu, griešanas sarakstu un noliktavas Excel tabulas, lai mākslīgais intelekts tās saprastu, un kā tās savienot ar Claude vai ChatGPT caur Grietens.

## Links

- [Set up Grietens with your AI](https://app.grietens.cloud/setup-with-ai)
- [Create a factory workspace (the start page)](https://app.grietens.cloud/start)
- [Guides](https://grietens.cloud/guides)
- [Signup for AI agents](https://app.grietens.cloud/api/v1/signup)
- [OpenAPI](https://app.grietens.cloud/api/v1/openapi.json)
- [OAuth metadata](https://app.grietens.cloud/.well-known/oauth-authorization-server)
- [Data terms](https://app.grietens.cloud/terms)
