# open_url_async

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/_links/open_url_async)

Open url in a browser and toast on failure.

Runs `webbrowser.open` in a thread, catches the platform errors
that can arise when no browser backend is available, and posts a
warning toast containing the URL so the user can copy it manually
instead of the failure vanishing into a background worker log.

## Signature

```python
open_url_async(
    url: str,
    *,
    app: App,
    notify_on_success: bool = False,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `url` | `str` | Yes | The URL to open. |
| `app` | `App` | Yes | App used to post browser-open notifications. |
| `notify_on_success` | `bool` | No | Whether to post an informational toast when the browser accepts the URL. (default: `False`) |

## Returns

`bool`

`True` when the browser accepted the URL; `False` otherwise
(in which case a warning toast has already been posted).

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e14e0adcbe78565ed3650e7f24b2a775d5437d25/libs/code/deepagents_code/tui/widgets/_links.py#L171)