This release is a pre-release and may not be stable for production use.
GMI AgentBox SDK for Python
Thin Python client for AgentBox.
Public names are Agent (registered template) and Sandbox (launched container). Registering an Agent does not start anything.
Install
python -m pip install -e ".[dev]"
Requires Python 3.9+.
Auth
export GMI_AGENTBOX_API_KEY="your-api-key"
GMI_AGENTBOX_API_KEY is required (or pass api_key=).
GMI_AGENTBOX_BASE_URL is optional and defaults to production
https://console.gmicloud.ai.
Quickstart
from agentbox_sdk import AgentBoxClient
client = AgentBoxClient()
# Discover available IDCs and SKUs, then pass explicit values.
# The SDK does not pick IDC or instance_type for you.
idc_id = "us-central-iowa1"
instance_type = "gmi.container.intel.x4660.large"
agent = client.agents.create(
title="agentbox-demo",
image_url="docker.io/library/alpine:3.20",
idc=idc_id,
)
# generated_api_key is plaintext only on this response
sandbox = agent.launch(instance_type=instance_type)
sandbox.wait_until_running() # default timeout 300s
print(sandbox.endpoint_url)
print(sandbox.logs())
sandbox.delete()
agent.delete() # does not stop remaining sandboxes
GET /products?idc_name= takes an idcId from GET /idcs, not a region
label. Launch cannot change the Agent's IDC.
sandboxes.list() omits stopped and deleted unless you pass status.
Against production (bills the account):
set -a && source ./ie-pro-env && set +a
PYTHONPATH=src python examples/live_smoke.py
For the runtime E2E (build, command execution, file round trip, and asynchronous cancellation), select a matching runtime/IDC/SKU and run:
export GMI_AGENTBOX_RUNTIME="sandbox" # or "container"
PYTHONPATH=src python examples/sandbox_e2e.py
GMI_AGENTBOX_BASE_URL is optional. The E2E defaults
GMI_AGENTBOX_RUNTIME to sandbox; GMI_AGENTBOX_IDC and
GMI_AGENTBOX_INSTANCE_TYPE must always be set to values for the selected
runtime.
Set GMI_AGENTBOX_TEST_SHELL=1 to include a WebSocket shell-connect check.
The E2E asserts its data-plane operations for either runtime; it does not skip
them according to Sandbox capabilities. Set GMI_AGENTBOX_VALIDATE_CATALOGUE=1
to enable the optional runtime eligibility/IDC/SKU preflight.
Sandbox runtimes also support command execution, file upload/download, and an
interactive WebSocket shell. See the reference for sandbox.execute(),
sandbox.upload_file(), sandbox.download_file(), and sandbox.shell().
Metadata
Release files for gmi-agentbox-sdk 0.1.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gmi_agentbox_sdk-0.1.0b1.tar.gz | 16.7 kB | Without provenance | Details for gmi_agentbox_sdk-0.1.0b1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gmi_agentbox_sdk-0.1.0b1-py3-none-any.whl | Python 3 | none | any | Details for gmi_agentbox_sdk-0.1.0b1-py3-none-any.whl |
Total release size: 29.1 kB
Release files / gmi_agentbox_sdk-0.1.0b1.tar.gz
| Download URL | gmi_agentbox_sdk-0.1.0b1.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b051bb186201c03b4e5a33f1a587e6eb294a45ce236b32fcd2c7132d093b5182
|
|
BLAKE2b-256 checksum How to use checksums |
4e889eed203acb81ba95c080c8a36337e3f926341e220a55cbffadf0603d244f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / gmi_agentbox_sdk-0.1.0b1-py3-none-any.whl
| Download URL | gmi_agentbox_sdk-0.1.0b1-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7f1bec314f9d9b76138f8ee46f11900d2c735071cc8cc4fea50668bd21a0ab9
|
|
BLAKE2b-256 checksum How to use checksums |
9a05d6a0f0f0fbdfe12ba64a36597f3e6fa1013b8e285f269496226dcd2de002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for gmi-agentbox-sdk 0.1.0b1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.