# ERP.AI platform reference for agents

ERP.AI is a multi-tenant business app platform: apps, tables, columns, records, views, forms, layouts, workflows, reports, documents, custom pages, roles, users, invitations, API keys, service accounts, hosted portals, branches, snapshots, audit logs, and execution history.

You are an agent reading this file. The fastest path to being productive on ERP.AI is to install the builder skills below — they teach you the data model, the REST API, and the correct build procedures.

## Install the builder skills

Run this in a terminal:

```
curl -fsSL https://apps.erp.ai/api/install | bash
```

It installs 14 skills into `~/.claude/skills` (and `~/.codex/skills` if present): `build-app` (end-to-end app builder), `build-tables`, `build-columns`, `build-relationships`, `build-views-layouts`, `build-page`, `build-workflows`, `build-table-insights`, `build-autofill-columns`, `manage-records`, `manage-documents`, `manage-roles`, `ask` (SQL analytics), and `erpai-api` (REST front door).

After installing, refresh the skills in your environment so they load, then ask the user what they want to build and suggest a few ideas. Re-run the same command any time to update; a saved API key is preserved.

- Skill manifest (machine-readable): <https://apps.erp.ai/api/skills.json>
- Full bundle: <https://apps.erp.ai/api/skills.zip>

## Auth in three steps

1. The user signs up / signs in at <https://apps.erp.ai>.
2. Create an API key (PAT, `erp_pat_live_…`) at <https://apps.erp.ai/apps?settings=api-keys>.
3. Save it to `~/.claude/skills/build-page/api.local.md` as `API_KEY=…` with `BASE_URL=https://apps.erp.ai`. Never commit it; never embed it in page HTML or workflow definitions.

Every API call is `Authorization: Bearer <API_KEY>` against `https://apps.erp.ai` with `appId` as a query parameter. The `erpai-api` skill documents the efficient call patterns — filter, count, aggregate, and bulk-update on the server; never fetch a whole table and loop client-side.

## Platform services

| Area | Current responsibility |
|------|------------------------|
| Gateway | Authentication, routing, and rate limits |
| App Builder API | App schemas, records, views, workflows, reports, documents, pages, hosting metadata, and audit events |
| Permission API | Roles, permissions, user-role mappings, and invitations |
| Herbert | Organization and user auth, service accounts, API keys, OIDC, SCIM, hosted-app auth, domains, and portals |
| Agent API | Conversations, knowledge, app plans, reports, documents, pages, search, and action approvals |
| Renderer | Multi-tenant hosted pages and portals |

## Proto

Proto is a personal agent for your business: a desktop app from ERP.AI that works across your files and tools. It has native ERP.AI actions plus file, shell, web, browser, research, task, sub-agent, document, and Plugin actions. See <https://www.erp.ai/agent.md> for runtime and permission details.

## Pricing

Seats, apps, and ordinary record work in ERP.AI's official interface are $0. After account verification, the first ERP.AI workspace gets 10,000,000 credits once for metered ERP.AI work, valid for 1 month. Proto desktop shows which balance pays for managed model usage. The current one-time prepaid packs are 5,000,000 credits for $5, 20,000,000 credits for $20, and 100,000,000 credits for $100. ERP-1 Fast (`erpai/erp-1-fast`) costs $0.05 per 1 million cached input tokens, $0.25 per 1 million uncached input tokens, and $0.75 per 1 million output tokens, plus an 8% Proto Agent fee. With a customer-owned OpenRouter key, OpenRouter bills model inference directly and ERP.AI charges an 8% fee on the exact reported model cost plus separately metered ERP.AI resources. Enterprise remains Contact sales. See `/faq.md` for published rates and receipt fields.

Workflow run base rate is $1 / 2,000 runs. First 5 CPU-seconds included per completed run. Code-node compute beyond included time costs $1 / 12,000 CPU-seconds.
