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

# Python agents

> How a Python agent is built and run: the two runtimes, how dependencies install, the ARM architecture and native packages, system packages and build commands.

A Python agent is built from its folder into an image with the Python version you choose, your dependencies installed, and Onecortex's shim beside your code. You do not write a Dockerfile.

| `runtime` | Language | Version |
| - | - | - |
| `python3.12` | Python | 3.12 |
| `python3.11` | Python | 3.11 |
| `node22` | TypeScript or JavaScript | Node.js 22 |
| `node20` | TypeScript or JavaScript | Node.js 20 |

## What the build does

1. Copies your dependency file, and installs from it. See [Dependencies](/build/dependencies).
2. Copies the whole agent folder into `/app`, which is the working directory when your agent runs.
3. Compiles your code to bytecode, so it starts faster. A file that does not compile is left for the smoke test to report, with a real traceback.
4. Runs your `build.commands`, if you have any.

Output is unbuffered, so `print` and `logging` lines reach your [logs](/observe/logs) as they are written.

## The architecture: 64 bit ARM Linux

Every agent runs on 64 bit ARM Linux (`aarch64`, also called `arm64`). Pure Python packages work as they are. A package with a native extension needs a wheel for `manylinux` `aarch64`, which most popular packages publish.

A package that publishes none fails the build with:

```text theme={null}
'<package>' does not publish a build for this architecture.

Onecortex builds run on 64-bit ARM Linux (`aarch64`); this package does not publish a compatible build.
```

followed by the installer's own output. Upgrade to a release that ships an `aarch64` wheel, or use an alternative. The build image has a C compiler, so a package that builds from source with no system libraries beyond the standard ones can still install.

## System packages

Two system packages can be installed with `systemPackages`:

```yaml agent.yml theme={null}
systemPackages:
  - ffmpeg
  - poppler-utils
```

Anything else fails validation with `` `<package>` is not an available system package.`` To ask for another, email [support@onecortex.io](mailto:support@onecortex.io).

## Build commands

`build.commands` runs shell commands after your code is copied in and your dependencies are installed, in the agent folder:

```yaml agent.yml theme={null}
build:
  commands:
    - python scripts/download_data.py
    - python -m nltk.downloader punkt
```

The commands run once, at build time, with no configuration or secrets available. A command that fails fails the build at **Build image**, with its output.

## Related

* [Entrypoints](/build/entrypoints): how your agent object is found.
* [Frameworks](/frameworks/langgraph): each Python framework's page.
* [The `agent.yml` reference](/agent-yml).
