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

# Quickstart

> Create your first agent runtime, run code, and execute commands

## Install the SDK

```bash theme={null}
pip install gravixlayer
```

## Run Your First Agent Runtime

```python theme={null}
from gravixlayer import GravixLayer

client = GravixLayer()

# Create an agent runtime
runtime = client.runtime.create(template="python-3.14-base-small")
print(f"Runtime: {runtime.runtime_id} ({runtime.status})")

# Run Python code
result = runtime.run_code(code="print('Hello from Gravix Layer!')")
print(result.text)  # Hello from Gravix Layer!

# Terminate the runtime
runtime.kill()
```

## Run a Terminal Command

```python theme={null}
from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

cmd = runtime.run_cmd(command="python --version")
print(cmd.stdout)

cmd = runtime.run_cmd(command="python", args=["--version"])
print(cmd.stdout)

runtime.kill()
```

## Write and Read Files

```python theme={null}
from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

# Write a file
runtime.file.write("/workspace/hello.txt", "Hello World\n")

# Read it back
file = runtime.file.read("/workspace/hello.txt")
print(file.content)  # Hello World

runtime.kill()
```

## What's Next

<CardGroup cols={2}>
  <Card title="Code Execution" icon="code" href="/documentation/agentruntime/code-execution/run-python">
    Run Python and JavaScript
  </Card>

  <Card title="Terminal" icon="terminal" href="/documentation/agentruntime/command-execution/run-command">
    Shell commands and package installs
  </Card>

  <Card title="Custom Templates" icon="cube" href="/documentation/agentruntime/templates">
    Build your own runtime environments
  </Card>

  <Card title="Access Runtime" icon="key" href="/documentation/agentruntime/ssh-access/ssh">
    SSH or web terminal access
  </Card>
</CardGroup>
