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

# Run your first SmolVM microVM sandbox

> Install SmolVM and run your first isolated microVM sandbox in under five minutes — execute commands, check outputs, and tear it down with a context manager.

By the end of this guide you'll have an isolated Linux sandbox running on your machine, ready to execute commands safely.

<Steps>
  <Step title="Install SmolVM">
    ```bash theme={null}
    curl -sSL https://celesto.ai/install.sh | bash
    ```

    This installs everything you need and configures your machine. See [Installation](/smolvm/installation) for manual install and requirements.
  </Step>

  <Step title="Run your first sandbox">
    Create `quickstart.py`:

    ```python quickstart.py theme={null}
    from smolvm import SmolVM

    vm = SmolVM()
    result = vm.run("echo 'Hello from the sandbox!'")
    print(result.stdout.strip())
    vm.stop()
    ```

    Run it:

    ```bash theme={null}
    python quickstart.py
    ```

    You should see:

    ```text theme={null}
    Hello from the sandbox!
    ```

    <Note>
      The first run takes 30-60 seconds to download the operating system images.
    </Note>
  </Step>
</Steps>

## Prefer the command line?

You can do the same thing without writing any Python:

```bash theme={null}
smolvm sandbox create --name my-sandbox
smolvm sandbox ssh my-sandbox       # opens a shell inside the sandbox — type `exit` to leave
smolvm sandbox stop my-sandbox
```

## Customize resources

Configure memory and disk for heavier workloads (defaults: 512 MiB memory, 512 MiB disk):

```python theme={null}
from smolvm import SmolVM

vm = SmolVM(memory=2048, disk_size=4096)
result = vm.run("free -m")
print(result.stdout)
vm.stop()
```

## Next steps

<CardGroup cols={2}>
  <Card title="AI agent integration" icon="robot" href="/smolvm/guides/ai-agent-integration">
    Plug SmolVM into PydanticAI, OpenAI Agents, LangChain, and more
  </Card>

  <Card title="Port forwarding" icon="network-wired" href="/smolvm/features/port-forwarding">
    Expose services running inside a sandbox to your host machine
  </Card>

  <Card title="Custom images" icon="box" href="/smolvm/guides/custom-images">
    Build specialized images with your own tools pre-installed
  </Card>

  <Card title="API reference" icon="book" href="/smolvm/api/smolvm">
    Explore the complete SmolVM API
  </Card>
</CardGroup>

<Tip>
  Join the [Discord community](https://discord.gg/KNb5UkrAmm) to get help and share your use cases.
</Tip>
