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

# Agentbox SDK

> Create and control GMI Agentbox sandboxes from Python or Go.

The Agentbox SDK is a thin client for the GMI Agentbox API. Use it to launch sandboxes, run commands, move files, open a shell, pause and resume, and launch many sandboxes from a snapshot.

## Install

```bash Python theme={null}
python -m pip install gmi-agentbox-sdk
```

```bash Go theme={null}
go get github.com/GMISWE/agentbox-sdk-go
```

| Language | Package | Import | Requires |
| - | - | - | - |
| Python | `gmi-agentbox-sdk` | `from agentbox_sdk import AgentBoxClient` | Python 3.9+ |
| Go | `github.com/GMISWE/agentbox-sdk-go` | `github.com/GMISWE/agentbox-sdk-go/agentbox` | Go 1.25.5+ |

## Core objects

| Object | What it is |
| - | - |
| **Agent** | The reusable definition a sandbox launches from: image, data center, start command and environment variables. Creating an Agent builds its image. In the Console, this is the Template you register. |
| **Sandbox** | An isolated instance launched from an Agent. You run commands, transfer files and open a shell in it. |
| **Snapshot** | A saved copy of a running sandbox's disk. New sandboxes of the same Agent can launch from it. |
| **Execution** | One command run in a sandbox, with its status, exit code and output. |

## Typical flow

1. Create an Agent from a container image and wait for the image build to finish.
2. Launch a sandbox from the Agent and wait until it is `running`.
3. Run commands, transfer files, or open a shell.
4. Pause the sandbox to stop run time, or save a snapshot to launch more sandboxes from the same state.
5. Delete your sandboxes when you are done, then delete the Agent.

> [!WARNING]
>
> Sandboxes bill your Console account while they run. Always delete the sandboxes you launch in tests.

## Next steps

> **[Quickstart](https://docs.gmicloud.ai/agentbox-sdk/quickstart.md)**
>
> Launch your first sandbox and run a command.

> **[Agents and image builds](https://docs.gmicloud.ai/agentbox-sdk/agents.md)**
>
> Define what a sandbox runs and follow its image build.

> **[Sandboxes](https://docs.gmicloud.ai/agentbox-sdk/sandboxes.md)**
>
> Launch, label, pause, resume and delete sandboxes.

> **[Commands and files](https://docs.gmicloud.ai/agentbox-sdk/commands-and-files.md)**
>
> Run commands and move files in and out.

> **[Snapshots](https://docs.gmicloud.ai/agentbox-sdk/snapshots.md)**
>
> Save a sandbox and launch many from it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.