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

# Agent Hub

> Publish validated agent versions so others can install them.

Publishing makes an agent version available for installation.

Today, the CLI docs describe publishing as making an agent available to your organization.

## Publish with \`guild agent save\`

You can save, validate, and publish in one command:

```bash theme={null}
guild agent save --message "Ready to ship" --wait --publish
```

### Key flags

* \`--message\`: Sets the version message for this save.
* \`--wait\`: Blocks until validation passes.
* \`--publish\`: Publishes after a successful save (and after validation if you also pass \`--wait\`).

## Publish separately

If you already saved a draft version, you can publish later:

```bash theme={null}
guild agent publish
```

To wait for validation before publishing:

```bash theme={null}
guild agent publish --wait
```

## Visibility and who can install

Agents have three visibility states:

* **Draft**: no published version. The agent is not available for installation. Organization members can see it in the organization Browse tab with a **draft** badge.
* **Team-installable**: published with visibility restricted to your organization (`is_public=false`). Organization members can find and install the agent from the organization Browse tab and category pages. Displayed with an **internal** badge.
* **On-Hub**: published and listed on the public Agent Hub (`is_public=true`). Anyone can find the agent on the Agent Hub. Organization members also see it in the organization Browse tab and category pages. Displayed with a **public** badge.

Publishing with `guild agent save --publish` or `guild agent publish` makes the agent Team-installable by default.

To promote an agent to On-Hub, use the agent settings page:

1. Open the agent in [app.guild.ai](https://app.guild.ai) and go to its settings page.
2. Select **Public** visibility. This marks the form as unsaved and enables **Save**.
3. Click **Save**. A publish confirmation dialog appears before the change commits.
4. Confirm the dialog. The visibility change commits atomically with any other unsaved settings (avatar, tags, maintainer, and archive status).

If the save fails, the form retains the **Public** selection so you can fix the issue and retry without re-selecting.

## What validation runs during \`--wait\`

\`--wait\` blocks until validation passes.

The docs do not currently enumerate the full set of validation checks.

Common failure modes called out in troubleshooting:

* TypeScript errors in \`agent.ts\`
* Saving without being inside an agent directory (one with a \`guild.json\` file)

If validation fails, check the latest version and save again:

```bash theme={null}
guild agent versions --limit 1
guild agent save --message "Fix validation error" --wait
```

## What appears in the Agent Hub listing

The docs do not currently specify which fields appear in the Hub listing and where each one comes from in the agent source.

## Update a published agent

To update an agent, save a new version and publish it:

```bash theme={null}
guild agent save --message "Update behavior" --wait --publish
```

To inspect status and version history:

```bash theme={null}
guild agent get
guild agent versions
```

## Unpublish

To unpublish the latest published version:

```bash theme={null}
guild agent unpublish
```

## View your published agent in the UI

Open [app.guild.ai](https://app.guild.ai), go to **Agents**, then click **Add agent** to browse the Agent Hub.
