# open_url_async

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/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,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `url` | `str` | Yes | The URL to open. |
| `app` | `App` | Yes | App used to post the failure toast. |

## 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/a98f0dfa8d534d8a1885b524632400e52db22ac6/libs/code/deepagents_code/widgets/_links.py#L19)