> For the complete documentation index, see [llms.txt](https://docs.valohai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valohai.com/executions/advanced-features/service-buttons.md).

# Service Buttons

Service buttons allow you to create additional tabs in your application's interface by writing specially formatted messages to stderr. These tabs can either link to external URLs or embed content directly.

### Basic Usage

To display a service button, print a message to stderr in the following format:

```
::show-service-button::{options}
```

#### Required Options

* `url` (string): The URL the button should link to or embed
* `name` (string): The display name for the button

#### Optional Options

* `embed` (boolean): When set to `true`, embeds the URL content inline instead of showing a button. Default: `false`
* `style` (string): Alternative way to set embed mode using `style: "embed"`

### Examples

#### Basic Button Tab

Create a tab that links to an external URL:

```python
import sys
print('::show-service-button::{"url":"http://example.com/","name":"Example"}', file=sys.stderr)
```

<figure><img src="https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2Fgit-blob-886e7205d7eaf6ad6c2515f7b067d9efa9b8a713%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Embedded Content Tab

Create a tab with embedded content displayed directly:

```python
import sys
print('::show-service-button::{"url":"https://dashboard.example.com/","name":"Dashboard",embed:true}', file=sys.stderr)
```

Or using the `style` parameter:

```python
import sys
print('::show-service-button::{"url":"https://dashboard.example.com/","name":"Dashboard",style:"embed"}', file=sys.stderr)
```

<figure><img src="https://4109720758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3mjTRQNkASbnMbJqzJ2%2Fuploads%2Fgit-blob-639807bc2f2261e11fff27995c9ce7f88daa9d09%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Important Notes

* Service button commands **must** be written to **stderr**, not stdout
* Each service button creates a new **tab** in the interface
* The JSON options should be valid JSON format (use double quotes for strings)
* Tabs with `embed: true` will display the content inline, while regular tabs will link to external URLs


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.valohai.com/executions/advanced-features/service-buttons.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
