# LedgyX — full product description > Source: LedgyX Technical Overview (November 2026), https://ledgyx.com/Ledgyx-Technical-Overview.pdf. Everything described here exists in the running platform; firm limits are stated in "Design boundaries". Company: Ineron Information Technology Co. LLC. App: https://app.ledgyx.com ## What LedgyX is LedgyX is a **serverless, event-driven platform for data, APIs, AI agents and pages**. You do not deploy servers or write a backend service. You describe a product — its data, logic, pages and automations — and the platform runs it, scoped to your own workspace (a *configuration*). - **Serverless**: business logic is stored in the platform as SQL handlers, templates and agent graphs, and executed on demand. No build, container or deploy step: saving an object makes it live. - **Event-driven**: the unit of work is an *event* — a named handler that runs when something happens (a REST call, a record change, a timer, a file landing in storage, a Telegram or WhatsApp message, an Ethereum smart-contract log). Its outcome changes shared state, which can trigger the next event. ## Seven building blocks, one runtime 1. **Ineron SQL engine** — queries that return finished JSON; reads, writes and entity definitions. 2. **Entities** — typed, linked data objects; change the model live, no migrations. 3. **Events & API Builder** — SQL handlers published as REST endpoints with generated docs and a test console. 4. **AI agents & AI Builder** — visual agent graphs with skills, triggers, sandboxed code execution. 5. **File storage** — per-workspace disk that is also the site root, the agents' workspace and an event source. 6. **HTML generation** — Mustache templates rendered together with the JSON an event returns. 7. **Subscriptions** — react to data changes, schedules, file operations, chat messages and Ethereum contract events. All seven share one data model, one event bus and one permission system, so a finished product is mostly configuration. ## Architecture - One transactional data core holds data, templates, endpoint definitions and agent graphs; a page, an API call and an agent read the same state. - Request work and background work are separate: agent runs, scheduled jobs and blockchain listeners execute in their own workers. - Code you do not trust runs isolated: agent skills that execute Python or shell run in disposable micro-VMs with no network by default. - Integration is through REST, webhooks, an end-user API, an MCP endpoint, server-sent events and chat/file/chain connectors. ## Core concepts - **Configuration** — a tenant workspace; entities, events, endpoints, templates, agents, files, API keys, disks, credentials and quotas are scoped to it. - **Entity** — a typed data object (Dictionary, Enum, Const, Operation, Contract, …) with user-defined fields; a field is a scalar or a reference to another entity. - **Event** — a named handler holding one Ineron SQL query per HTTP method (GET, POST, PUT, DELETE); the query result becomes the response. - **Endpoint** — a public URL `/{group}/{name}` bound to an event, with generated docs and a test console. - **Subscription** — a listener that runs an event when a record changes, a timer fires, a file is added or a contract emits a log. - **Agent** — an LLM-driven worker defined as a graph node with a system prompt, a model and skills. - **Skill** — a tool an agent may call (run code, query data, read a file, send a message, call an HTTP API, start another agent). - **Trigger** — the entry point that starts an agent: cron, webhook, Telegram, WhatsApp, Google Drive, file operation, manual input. - **Template / Sitemap** — a Mustache HTML template, and the route table mapping a URL to a template plus the event supplying its data. - **Release** — an immutable, named snapshot of a configuration's logic that can be made the default and rolled back instantly. - **Vault** — the credential store; secrets are written by a human, applied by the platform, never shown to an LLM or API client. ## Ineron SQL engine A SQL-style statement becomes **finished JSON**. A query ends with `TYPE OBJECT` (one JSON object) or `TYPE LIST` (array). Sub-selects in the select list become nested JSON, so a parent and its children arrive in one response. ```sql select h.name, h.city, (select r.number, r.price from Dictionary.room as r where r.hotel = &hotel::uuid type list) as rooms from Dictionary.hotel as h where h.ref() = &hotel::uuid type object; ``` - One language for read, write and define: `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, `ALTER`, `DROP`. - Parameters come from the request: `&name` (also `&body.a.b`), typed cast `&id::uuid`, a JSON array as recordset `from &data as d(id int, name text)`. - SELECT supports joins (inner, up to three tables and self-joins), sub-queries, `count/sum/avg/min/max`, `GROUP BY`, `HAVING`, `ORDER BY`, `LIMIT`, `OFFSET`, `CASE`, `IN`, `LIKE`, `IS NULL`, functions (`substr`, `trim`, `concat`, `uuid`, `now`, `coalesce`, `render(template, json)`). - Archived (soft-deleted) records are filtered out automatically; a `select allowed` variant applies access rules. - Deterministic references (`uuid(...)` from a natural key) make writes idempotent and safe to retry. - `CALL` reaches other modules from SQL (asynchronous): `AI_AGENT`, `AI_CHAT_COMPLETION`, `TG_SEND_MESSAGE`, `TG_SEND_DOCUMENT`, `TG_GET_FILE`, `AI_TRANSCRIBE_AUDIO`, `WEBHOOK`, `SSE_SEND`. - Entity definition in the same language: `CREATE DICTIONARY …`, `CREATE ENUM …`, `ALTER DICTIONARY … ADD COLUMN`, `CREATE VECTOR TABLE`. Graph data is queried with patterns such as `GRAPH.nodes MATCH (a:User)-[:follows]->(b:User) RETURN a.name`; vector search uses `VECTOR "items" NEAREST …`. - The query language can be written in **Arabic** as well as English (127 keywords, each with both spellings; mixing is allowed). ## Entities — the data model without migrations Categories: Dictionary (regular records), Enum, Const, Operation/Document (transactional records), Contract (smart contract ABI + address), Ledger/InfoReg (register-style records), Graph (relationship data), Vector (semantic-search storage). Fields are scalars (String, Number with scale 0–3, Boolean, Date, JSON, Address, Data) or references to any entity. Every record has a stable identity read with `ref()`. Deletes are soft by default. A new entity or field is available to queries, endpoints and agents as soon as it is saved. Entity and field names can be in Arabic. | | Conventional stack | LedgyX | |---|---|---| | Change a field | migration, deploy, update API and client types | edit the field; queries and endpoints see it at once | | Shape the response | resolvers/serializers per endpoint | write the query; the response is its result | | Add a relationship | foreign key, ORM mapping, API change | add a reference field; join or sub-select it | ## Events and the API Builder An event has a stable identifier such as `rooms/list` and up to four handlers (GET, POST, PUT, DELETE). Saving a changed event creates a new version and archives the previous one. The API Builder organises groups and endpoints (`/{group}/{name}`), generates a Swagger-style reference, and provides a test console that proxies real requests. ```bash # key in the path curl https://app.ledgyx.com/rest/v2/{api-key}/rooms/list # key in a header curl https://app.ledgyx.com/api/rooms/list -H "X-API-Key: {api-key}" # write curl -X POST https://app.ledgyx.com/api/rooms/create \ -H "X-API-Key: {api-key}" -H "Content-Type: application/json" \ -d '{"hotel":"","number":"103","price":470.00}' ``` A missing or invalid key returns HTTP 401 `{"success": false, "message": "…"}`. Clients can pin a version with headers: `Ledgyx-Version: ` (immutable release) or `Ledgyx-Snapshot: ` (draft branch). No header = the configuration's default release. Any external system can start a flow with `POST /webhooks/{token}`; the JSON body becomes the event input. ## AI agents and the AI Builder Agents are first-class objects defined as graphs (nodes and edges) on a visual canvas and run on a managed runtime. An agent has a name, system prompt, model, temperature, maximum tool iterations and an autopilot switch. - **Models**: Anthropic Claude natively; OpenAI and any OpenAI-compatible endpoint (for example Google Gemini or a local Ollama) via the tenant's own credential and base URL. - **Skills**: data (`exec_query`, `build_structured_event`, `ledger`), files (`file_manager_get_text`, `file_manager_view_image`, `file_manager_transcribe_audio`, `file_manager_save_text`), Google Drive, messaging (`telegram_reply`, `whatsapp_reply`, `send_email`, `read_email`, `send_sse`, `webhook_send`), external APIs (`http_request` with vault credentials), code (`execute_python`, `execute_shell` in an isolated micro-VM), knowledge (`knowledge_search`, `knowledge_add`), scheduling (`schedule_cron_job` …), orchestration (`agent_run`, `agent_spawn`, `call_pipeline`). Custom **UserSkills** are a name, description, JSON-Schema input and a script; a skill can be described in a `SKILL.md`. - **Triggers**: `cron`, `webhook`, `telegram`, `whatsapp`, `gdrive`, file operation, `text_input`. - **Flows**: a graph can be deployed as a flow with Condition, Loop, Smart Switch (rules, LLM or hybrid routing with confidence threshold and fallback) and Pipeline nodes. - **Credentials**: secrets never pass through a model; an agent is given a credential by name; the platform attaches the secret after the request is assembled and scrubs it from responses, errors and run logs. Each agent lists the exact hosts a credential may be sent to; HTTPS only, redirects not followed, non-public addresses refused, 30-second timeout. - **Isolation and limits**: code runs in micro-VMs (only `/workspace` persists); no outbound network by default (per-agent allowlist, logged); per-plan quotas; every run is recorded step by step; agents are versioned and part of releases. - **AI Builder**: a chat assistant in the admin panel that builds projects (entities, events, endpoints, templates, sitemap routes, disk files, agents, triggers). For multi-object builds it inspects, designs, shows a plan, waits for confirmation, executes, then reads back and verifies. It never receives a secret. It can also be driven from Telegram: a chat is linked by sending `/start` to the bot (https://t.me/ElasticAI_Bot) and pasting the 6-digit code it replies with in Settings → Channels → Telegram Bot, after which every text message goes to the same AI Builder chat as in the panel; `/config` selects the configuration and `/approve` handles pending plans. Text only, 20 messages a minute per chat, the bot's service messages are in English. It uses the same Anthropic key as the panel (your own key, or the platform's limited free trial where enabled). ## File storage Each configuration has its own disk: the site's document root (static CSS/JS/images/JSON served from it), the agents' `/workspace`, a source of events (a file added to a folder can start an agent or SQL handler), and a File Manager for people (folders, upload, zip import, search, recovery, trash with retention, storage meter). Access is governed by per-folder rules and a web policy. ## HTML generation A page is produced in the same step as its data: URL → sitemap route (layout + event) → event SQL returns JSON → Mustache render → HTML response. No separate web application tier. Templates are logic-less Mustache (variables, loops, inverted sections, partials `{{> folder/name}}`); layouts are the outer shell; the sitemap maps URL paths (nested, regex-matched dynamic segments) to a layout and an event. The same SQL that serves `/api/hotels/get` as JSON can serve `/hotels/palm` as HTML. Also: Page Builder (visual block editor), live pages via server-sent events (`SSE_SEND`), custom domains with automatic SSL, and AI-generated sites. ## Subscriptions | Source | Fires when… | Runs | |---|---|---| | Data change | a record of a Dictionary, Enum or Const entity is created, updated or deleted (before or after) | an event | | Schedule | a cron expression ticks | event or agent | | File operation | a file is added to a watched folder | event or agent | | Chat | a Telegram or WhatsApp message arrives | an agent | | Google Drive | a file appears or changes in a watched folder | an agent | | Smart contract | a registered Ethereum contract emits a chosen event | an event | | External data | an external source posts a notification | an event | Ethereum is the supported network. Register a contract once (ABI, address, node endpoint), subscribe to an event from the ABI; each log is delivered as JSON. Ethereum transactions and logs can also be queried directly in SQL (`Ethereum.transactions.data(…)`, `transactions.log(…)`) and joined with business data. ## Languages The full admin interface exists in English and Arabic with right-to-left layout (including the agent canvas). Query keywords exist in Arabic and English (mixing allowed). Values are Unicode; entity categories, entity names and field names can be Arabic. Customer-facing pages, API responses and agent conversations carry Arabic natively; the AI Builder answers in the language it is written in. ## Tenancy, security, versioning, metering - **Tenancy**: a configuration is a hard boundary (typical layouts: one per client, or one per environment). - **Authentication**: email/password, Google and GitHub sign-in for administrators; API keys for REST; unguessable tokens for inbound webhooks; bearer tokens for the MCP endpoint and end-user API. - **Credential vault**: secrets encrypted at rest; the master key is kept outside the database; values are write-only for humans, decrypted only at the moment of use; credentials are scoped, typed (`http_bearer`, `http_basic`, `http_header`, `query_param`, `oauth2_service_account`), traceable and referenced rather than copied. Header and parameter names are chosen per credential, so almost any HTTP API can be called the way it expects. - **End-user tier**: an end-user API under `/app/…` with sign-up/sign-in, roles and grants, separate from the administrator tier. - **MCP gateway**: a JSON-RPC MCP endpoint (`POST /mcp`) acting as a firewall for tools: each call is evaluated against policy and ends in allow, deny or require-approval; every call is logged. - **Versioning**: Latest (working version with numbered history), Branches/snapshots (draft with staged changes, review diff, promote), Releases (immutable named captures; switching the default is an instant rollback); a test mode isolates changes. - **Packages**: a configuration can be exported as a package (entities, events, endpoints, templates, agent graphs) and installed elsewhere; installed elements are locked; packages can be listed in a catalog (moderated). - **Backup/transfer**: ZIP (complete, with data) and YAML (structure only, account-specific references removed); import merges by name with a dry-run preview. No stored secret value is ever written into a ZIP or YAML. - **Metering and plans**: API requests per month, subscriptions, webhooks, disk size, agent call depth, maximum agent execution time, parallel VMs, monthly VM minutes; usage is metered and token packages can be bought on top of a plan. Enterprise plans are negotiated. See https://ledgyx.com/en/pricing. ## Integration surface | Surface | Direction | Use it to… | |---|---|---| | REST API `/rest/v2/{key}/…`, `/api/…` | in | read/write data, run any event | | Inbound webhooks `/webhooks/{token}` | in | let an external system start an event or agent | | Outbound webhooks (`WEBHOOK`, `webhook_send`) | out | push events to your endpoint | | HTTP skill | out | let an agent call your API with a vault credential | | End-user API `/app/…` | in | sign-in, roles and access for your customers | | MCP endpoint `POST /mcp` | in | let external AI clients use platform tools under policy | | Server-sent events | out | live updates to open pages | | Telegram, WhatsApp | both | conversational front ends for agents | | Files & Google Drive, Email | both | exchange documents / read and send mail | | Ethereum | in | turn contract events into platform events | For integrators: headless back end, full-stack in one place, multi-client delivery (one configuration per client, a package as reusable base), process automation, AI Builder as accelerator, regional delivery in Arabic or English. For providers: make your API available to agents (describe how it takes its key; customers store theirs in the vault), design for an agent's context (responses over 256 KB cannot be narrowed after the fact), push webhooks, ship a skill or a package, on-chain providers via ABI. ## Design boundaries (plan around these) Ineron SQL dialect: - Joins are inner only (`LEFT/RIGHT/OUTER/FULL` are refused); use a nested sub-select to attach children. - A dotted path through a reference field (`r.hotel.name`) is not resolved; join explicitly. - `IN (select …)` / `NOT IN (select …)` do not work; use `EXISTS` or a join. `DISTINCT` is ignored; `count(distinct x)` is a syntax error. `BETWEEN` is not supported; no date arithmetic (`now() - interval`). - `UPDATE`/`DELETE` without `WHERE` apply to the whole table. `ON CONFLICT` works only with `INSERT … SELECT` over a recordset. No `RETURNING`. - Aggregates work over one table; `GROUP BY` only with `TYPE LIST`. `ORDER BY` takes a table field, not an expression. - Text functions available: `substr`, `trim`, `concat`, `isnull/coalesce`; `upper`, `lower`, `length`, `replace` are not. - No match returns `{}`, not `[]`. A `WHERE` filter on a stored field silently excludes rows that never had a value for it. - Where the engine says "not supported yet", that form is final for now; change the approach rather than the spelling. Platform: - Blockchain: Ethereum is the supported network; subscriptions are to contract events declared through an ABI. - Agent code execution: no outbound internet by default; only `/workspace` persists. - Agent HTTP skill: 30 s timeout, HTTPS only for credentialed calls, no redirects, response cap 256 KB (default 32 KB). - Models: the tenant's own LLM credentials; availability follows the provider. - Interface languages: English, Arabic. Quotas are set by plan. - Money fields need a scale: a Number field without a scale stores whole numbers (19.99 becomes 20); declare scale 2 for currency. ## Contact Ineron Information Technology Co. LLC — https://ledgyx.com/en/contact · app: https://app.ledgyx.com · source & docs: https://github.com/ineron/ledgyx