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

> ## Agent Instructions
> Install the Beam CLI, sign in, and connect coding agents to the Beam MCP server with `curl -fsSL https://www.beam.cloud/install | sh`. To also create a VM, run `curl -fsSL https://www.beam.cloud/install | sh -s -- --vm`.
> VMs are persistent Linux machines without GPUs. Defaults: 4 CPUs, 8 GiB of RAM, a 50 GiB disk, Ubuntu 24.04, and a browser desktop. A running VM accrues usage until you stop, pause, or remove it, or until an idle timeout puts it to sleep.
> Stopping a VM keeps its disk and discards RAM and processes. Pausing keeps both, and resuming restores them. To pause after 5 idle minutes and wake on access, run `beam vm update NAME --ttl 300 --idle-action pause --auto-resume`.
> Core VM commands: `beam vm new NAME`, `beam vm ssh NAME`, `beam vm sync NAME ./dir`, `beam vm exec NAME -- CMD`, `beam vm expose NAME PORT --protected`, `beam vm fork NAME NEW_NAME`, `beam vm pause NAME`, `beam vm stop NAME`, `beam vm rm NAME`.
> For GPUs, use a sandbox or a deployed endpoint. Sandboxes are disposable environments that boot in seconds and fork from snapshots.
> Current rates are at https://www.beam.cloud/pricing.

# Logs and Metrics

> Read historical logs, follow output, and inspect resource and request metrics

You can inspect your apps through the dashboard, CLI, or MCP.

## Read Logs

`beam logs` returns the last 100 entries. Add `--follow` to stream new output:

```bash theme={null}
beam logs my-api
beam logs my-api --since 30m --tail 200
beam logs my-api --search error --source stderr
beam logs my-api --source system
beam logs my-api --follow --timestamps
```

Use `--source system` to debug image pulls, mounts, and container exits.

A name selects the app's active deployment. Use an ID if multiple versions are active. Target a specific resource with `--deployment-id`, `--stub-id`, `--task-id`, or `--container-id`; use `--app-id` for all versions.

## Time Windows and Output

* `--since` and `--until` accept relative durations (`30m`, `2h`, `1d`) or ISO timestamps. Timestamps without an offset use UTC; `--until` is exclusive.
* `--tail` (also `--lines` or `-n`) accepts 0–1000. Use `--tail 0 --follow` to read only new output.
* `--json` emits one JSON record per line. `--format json` returns a historical JSON response; `--format jsonl` streams records.
* `--until` cannot be combined with `--follow`.

## Dashboard Metrics

Open an app or container to view CPU, memory, GPU, and network metrics. Task details show execution times and exit status.

## MCP Metrics and Logs

| Tool | Use |
| - | - |
| `logs` | Recent logs by app name (all versions), deployment, stub, task, or container; filter with `since_minutes`, `search`, and `stream` |
| `metrics` | Resource time series for an app, deployment, or stub using `window_minutes` and a `1m` or `1h` interval |
| `request_stats` | Endpoint request count, 5xx fraction, and p50/p95/p99 latency |
| `list_tasks`, `get_task` | Invocation state, timings, and container IDs |

`request_stats` supports endpoints. Latency percentiles are histogram upper bounds; resource averages are per container.

Use the [REST API](https://docs.beam.cloud/v2/reference/platform-api.md) for custom dashboards or [webhooks](https://docs.beam.cloud/v2/operations/webhooks.md) for event notifications.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.