> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Neuron Script

> Automate a Neuron with its compact, extensible, mathematical scripting language

Neuron Script is the language implemented by `Waher.Script`. It is not JavaScript or ECMAScript. It is a compact expression language designed for mathematics, data queries, dynamic content, reports, automation, and direct integration with .NET objects.

## What you can build

* operational queries and reports;
* dynamic Markdown, XML, HTML, images, and PDF content;
* scheduled jobs and event processing;
* database and ledger workflows;
* XMPP, email, contract, token, and payment automation;
* graphs, statistics, cryptography, semantic-web queries, and transforms;
* custom functions supplied by Neuron packages.

## Execution contexts

| Context            | Typical use                                 | Important inputs                                            |
| ------------------ | ------------------------------------------- | ----------------------------------------------------------- |
| Script prompt      | Interactive exploration and administration  | Current user/session and prompt variables                   |
| Markdown page      | Dynamic content embedded in a rendered page | HTTP request, response, session and page variables          |
| Report             | Parameterized, reusable operational output  | Report parameters and server data                           |
| Job                | Background or scheduled automation          | Job configuration and runtime services                      |
| C# host            | Evaluate expressions inside a module        | Explicit `Variables`, cancellation and application services |
| Contract parameter | Validate a contract value                   | Other parameter values and contract client                  |

The function set is assembled from loaded modules. A bare `Waher.Script` host has core mathematical and runtime functions; a Neuron adds persistence, networking, content, gateway, contract, token, mail, and package-defined extensions.

## Learn in this order

<CardGroup cols={2}>
  <Card title="Run your first script" icon="play" href="/script/quickstart">
    Use the Script prompt and verify values and tables.
  </Card>

  <Card title="Language basics" icon="code" href="/script/language-basics">
    Values, assignment, collections, functions, and control flow.
  </Card>

  <Card title="Query data" icon="database" href="/script/data-and-persistence">
    Work with the object database, external SQL, SPARQL, and the ledger.
  </Card>

  <Card title="Automate operations" icon="gears" href="/script/reports-and-automation">
    Turn scripts into reports, jobs, and repeatable procedures.
  </Card>
</CardGroup>

<Warning>
  Script can call .NET APIs and mutate databases, files, accounts, contracts, and external services. Access to a Script prompt is administrative code-execution access unless the host deliberately restricts the available variables and types.
</Warning>
