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

# sb0 push

> Deploy your agent to the sb0 platform

## Command

```bash theme={null}
sb0 push
```

## Description

Builds and pushes your agent to the sb0 platform registry. Must be run from your `agent/` directory.

## Usage

From your `agent/` directory:

```bash theme={null}
sb0 push
```

### Expected Output

```
Building agent...
Pushing to platform registry...
[========================================] 100%
✔ Agent published successfully

Your agent is now deployed and available via the platform API.
```

## Requirements

Before pushing:

1. **Authenticate** with `sb0 login`
2. **Build your agent** with `sb0 build`
3. **Test locally** with `sb0 run --prompt "test"`

## Complete Workflow

```bash theme={null}
# 1. Build your agent
sb0 build

# 2. Login to platform (first time only)
sb0 login

# 3. Push to platform
sb0 push
```

## What Gets Published

The platform deployment includes:

* Your agent code and dependencies
* Python runtime and system packages
* sb0 runner for handling requests
* Configuration from `agent.config.yaml`

## Testing Your Deployed Agent

After pushing, test your agent with:

```bash theme={null}
sb0 query "test question"
```

This sends a query to your deployed agent and streams the response.

## Updating Your Agent

To update a deployed agent:

1. Make changes to your agent code
2. Test locally: `sb0 run --prompt "test"`
3. Rebuild: `sb0 build`
4. Push updates: `sb0 push`

The platform will automatically use the latest version.

## Common Issues

### Not Authenticated

```
Error: Authentication required
```

**Solution:**

```bash theme={null}
sb0 login
```

### Agent Not Built

```
Error: No agent image found
```

**Solution:**

```bash theme={null}
sb0 build
sb0 push
```

### Not in Agent Directory

```
Error: agent.config.yaml not found
```

**Solution:**

```bash theme={null}
cd agent  # Navigate to agent directory
sb0 push
```

## Next Steps

* [Query your deployed agent](/v0-docs/cli/query)
* [Configure the platform](/v0-docs/cli/config)
* [Learn about the handler](/v0-docs/agents/handler)

## Related

* [Publishing your agent](/v0-docs/quickstart/publishing)
* [Platform login](/v0-docs/cli/login)
* [Building your agent](/v0-docs/cli/build)
