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

# Executable runtime

export const runtime_0 = "executable"

<Warning>Executable runtimes are not permitted on the Coral marketplace</Warning>

Executable runtimes can be configured to run an executable of your choice. This is a useful development runtime,
allowing you to run your agent without containerizing it first.

# Full example

<Tabs>
  <Tab title="Python">
    ```toml theme={null}
    [runtimes.executable]
    path = "python3"
    arguments = ["main.py"]
    transport = "streamable_http" # default value
    ```
  </Tab>

  <Tab title="TypeScript">
    ```toml theme={null}
    [runtimes.executable]
    path = "bun"
    arguments = ["run", "src/index.ts"]
    transport = "streamable_http" # default value
    ```
  </Tab>

  <Tab title="Rust">
    ```toml theme={null}
    [runtimes.executable]
    path = "cargo"
    arguments = ["run", "--release"]
    transport = "streamable_http" # default value
    ```
  </Tab>
</Tabs>

# Environment

### Standard streams

<Info>Timestamps and log levels are prefixed by the Coral server, the agent should not print these.</Info>

* Standard output will be printed to the agent’s log at an INFO level.
* Standard error will be printed to the agent's log at a WARN level.
* Standard input is not used

### Coral environment variables

#### `CORAL_CONNECTION_URL`

The URL of the MCP server that this agent must connect to, either SSE or Streamable HTTP depending on the value given
for [runtimes.{runtime_0}.transport](#transport).

This URL will change every time the agent is launched. This URL contains the
[agent secret](#coral_agent_secret) and should not be printed or shared.

The value of this should also not be given to an LLM.

#### `CORAL_RUNTIME_ID`

Always set to <code>{runtime_0}</code>.

#### `CORAL_AGENT_ID`

The unique name provided for this agent in [GraphAgentRequest.name](/api-reference/models/GraphAgentRequest#name).

#### `CORAL_AGENT_SECRET`

A unique secret generated for this agent. This secret is used to authenticate communications between the agent and the
Coral server. This secret should not be printed, shared or given to an LLM.

#### `CORAL_SESSION_ID`

The unique ID of the session that this agent belongs to. This ID is generated by the Coral server and is used uniquely
to identify a session. This ID should not be printed, shared or given to an LLM.

#### `CORAL_API_URL`

The base URL of the Coral server. This can be used to RPC requests to the Coral server on behalf of the agent. All
requests to the Coral server must be authenticated with the [agent secret](#coral_agent_secret).

### Optional Coral environment variables

#### `CORAL_PROMPT_SYSTEM`

If the session that launched this agent defines a [systemPrompt](/api-reference/models/GraphAgentRequest#schema-system-prompt), it will be set to this environment variable. If not, this variable will not be set.

#### `CORAL_REMOTE_AGENT`

Placeholder. Currently not used.

### Other environment variables

* An environment variable for every defined [agent option](/reference/agent/options)
* All the environment variables the Coral server was launched with
* All environment variables configured in the Coral server's [debug.additionalExecutableEnvironment](/reference/server/config/debug#additional-executable-environment) configuration field

# Configuration

### runtimes.executable.path

<Badge color="red">required</Badge>

**Example**

```toml theme={null}
[runtimes.executable]
path = "bootstrap"
```

<Warning>
  Arguments cannot be provided in the path. All arguments must be provided via [runtimes.executable.arguments](#runtimes-executable-arguments)
</Warning>

A [string](https://toml.io/en/v1.1.0#string) representing the path to the executable. This can be:

* A name of an executable/script on your systems `PATH` environment variable
* An executable, relative to the `coral-agent.toml` file
* An absolute path to an executable/script

**Requirements**

* The executable path must be between 1 and 4096 characters long.

<Info>
  On Windows, the Coral server will try to append the extensions:

  * `.exe`
  * `.cmd`
  * `.bat`

  To the executable path. If no files are found with these extensions, it will fallback to the specified path with no
  extension.

  This is a useful feature when developing an agent that requires a bootstrap script.

  Consider the following structure:

  <Tree>
    <Tree.Folder name="my-agent" defaultOpen>
      <Tree.Folder name="src" defaultOpen>
        <Tree.File name="..." />
      </Tree.Folder>

      <Tree.File name="coral-agent.toml" />

      <Tree.File name="bootstrap" />

      <Tree.File name="bootstrap.bat" />
    </Tree.Folder>
  </Tree>

  The example will execute the `bootstrap` file (use a [shebang](https://en.wikipedia.org/wiki/Shebang_\(Unix\)) in this file) on Unix
  and the `bootstrap.bat` on Windows.
</Info>

### runtimes.executable.arguments

<Badge color="blue">optional</Badge>

An [array](https://toml.io/en/v1.1.0#array) of [strings](https://toml.io/en/v1.1.0#string)
denoting the arguments to pass to [runtimes.executable.path](#runtimes-executable-path)

**Example**

```toml theme={null}
[runtimes.executable]
path = "npm"
arguments = ["run", "start"]
```

**Requirements**

* No more than 1024 arguments can be provided.
* The total size of all arguments must not exceed 2 KiB

<h3 id="transport">
  runtimes.executable.transport
</h3>

<Badge color="blue">default </Badge> `streamable_http` <br />
<Badge color="blue">optional</Badge>

**Example**

```toml theme={null}
[runtimes.executable]
transport = "sse"
```

<Warning>
  `sse` is deprecated and may be removed in a future release.
</Warning>

A [string](https://toml.io/en/v1.1.0#string) controlling the value of the [CORAL\_CONNECTION\_URL](#coral_connection_url) Coral environment
variable. If your agent requires a specific MCP transport protocol, it must be set here.

Supported values:

* `sse`
* `streamable_http`
