> ## 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.

# Run your first script

> Use the Neuron Script prompt to calculate, query, and format a result

After this guide, you can evaluate expressions, retain variables during a prompt session, and query the Neuron object database.

## Prerequisites

* A configured Neuron.
* A user role allowed to open the Script prompt.
* Read access to the data you intend to query.

## Open the prompt

From the administration UI, open **Script**. The prompt evaluates one expression or statement sequence and renders the resulting object using an available content renderer.

## Evaluate values

```text theme={null}
2+3*4
```

Expected result:

```text theme={null}
14
```

Assign with `:=` and separate statements with semicolons:

```text theme={null}
Radius:=5;
Area:=pi*Radius^2;
Area
```

## Work with vectors

```text theme={null}
Temperatures:=[18.2,19.1,21.0,20.4];
[
  Min:=min(Temperatures),
  Max:=max(Temperatures),
  Average:=avg(Temperatures)
]
```

Function names are case-insensitive in normal Script usage, but keep the documented casing in shared code.

## Create objects

```text theme={null}
Status:={};
Status["Service"]:="Neuron";
Status["CheckedAt"]:=Now;
Status["Healthy"]:=true;
Status
```

## Query persisted objects

```text theme={null}
SELECT TOP 10
  Key,
  GetCounter(Key) AS CurrentValue
FROM RuntimeCounter
ORDER BY Key
```

Collections and types vary by installation. Start with a known application type or use `Properties(TypeName)` to inspect the fields available on persisted objects.

## Produce a table

Many query results render automatically. To transpose a vector of records into table form, use `T`:

```text theme={null}
Rows:=[
  {Name:"alpha",Value:1},
  {Name:"beta",Value:2}
];
Rows T
```

## Handle an error

```text theme={null}
try
  Int("not-an-integer")
catch
  "Calculation failed: "+Exception.Message
```

Do not expose raw exception messages to untrusted web users; log a correlation ID and return a safe message.

## Next steps

* [Language basics](/script/language-basics)
* [Data and persistence](/script/data-and-persistence)
* [Reports and automation](/script/reports-and-automation)
