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

# Runtime Variables

> Accessing information about the runtime while running tasks

## Available Runtime Variables

In order to access information about the runtime while running a task, you can use the `context` value.

`context` includes important contextual information about the runtime, like the current `task_id` and `callback_url`.

| Field Name       | Purpose                                                |
| ---------------- | ------------------------------------------------------ |
| `container_id`   | Unique identifier for a container                      |
| `stub_id`        | Identifier for a stub                                  |
| `stub_type`      | Type of the stub (function, endpoint, task queue, etc) |
| `callback_url`   | URL called when the task status changes                |
| `task_id`        | Identifier for the specific task                       |
| `timeout`        | Maximum time allowed for the task to run (seconds)     |
| `on_start_value` | Any values returned from the `on_start` function       |
| `bind_port`      | Port number to bind a service to                       |
| `python_version` | Version of Python to be used                           |

## Using a Runtime Variable

Any of the fields above can be accessed on the `context` variable:

```python theme={null}
from beam import task_queue

@task_queue()
def handler(context):
    task_id = context.task_id
    return {}
```
