Observed since 20 Oct, 23:33 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agenttier
Python SDK for AgentTier — isolated, persistent Kubernetes sandboxes for humans and AI agents
Programmatic client for AgentTier — manage isolated, persistent Kubernetes sandboxes for humans and AI agents from Python.
pip install agenttier
from agenttier import AgentTierClient
with AgentTierClient(api_url="https://agenttier.company.com") as client:
sandbox = client.create_sandbox(template="general-coding", name="demo")
sandbox.wait_until_running()
result = sandbox.exec("echo 'hello from AgentTier'")
print(result.stdout, "exit", result.exit_code)
port = sandbox.forward_port(8080)
print("Forwarded:", port.preview_url or port.internal_url)
sandbox.terminate()
import asyncio
from agenttier import AsyncAgentTierClient
async def main():
async with AsyncAgentTierClient(api_url="https://agenttier.company.com") as client:
sandbox = await client.create_sandbox(template="general-coding", name="demo")
await sandbox.wait_until_running()
result = await sandbox.exec("uname -a")
print(result.stdout)
await sandbox.terminate()
asyncio.run(main())
The SDK auto-detects credentials in this order:
AGENTTIER_API_KEY — sent as X-API-Key.AGENTTIER_TOKEN — sent as Authorization: Bearer <token> (OIDC JWT)./var/run/secrets/kubernetes.io/serviceaccount/token.Or pass an explicit provider:
from agenttier import AgentTierClient, APIKeyAuth, BearerTokenAuth
client = AgentTierClient(
api_url="https://agenttier.company.com",
auth=APIKeyAuth("sk_live_..."),
)
Every error inherits from AgentTierError so you can catch them all at once.
The common subclasses you'll want to handle individually:
| Exception | When |
|---|---|
AuthenticationError | 401 — token / API key missing or invalid |
AuthorizationError | 403 — authenticated but not permitted |
PolicyViolationError | 403 with governance body; exposes .violations |
NotFoundError | 404 — resource doesn't exist |
ConflictError | 409 — operation invalid for current state |
SandboxTimeoutError | wait_until_running timed out |
SandboxErrorState | sandbox entered the Error phase while waiting |
APIError | anything else; carries .status_code and .body |
Only endpoints that the Router server implements in v0.1.0 are exposed:
create_sandbox, list_sandboxes, get_sandbox, stop,
resume, terminate, exec, wait_until_running, status.forward_port, list_ports, remove_port.list_templates, get_template.current_user.Endpoints that are not yet implemented on the server (file transfer, sharing, cloning, WebSocket terminal from Python) are not exposed by the SDK and will be added in a future release once the server ships them.
3.10, 3.11, 3.12, 3.13. Runtime dependencies: httpx and pydantic.
Apache-2.0. Source at github.com/agenttier/agenttier/tree/main/python-sdk.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
httpxEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | httpx<1.0,>=0.27.0 | runtime |
pydanticEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pydantic<3.0,>=2.0.0 | runtime |
mypyEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | mypy>=1.10; extra == "dev" | runtime |
pytest-asyncioEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest-asyncio>=0.23; extra == "dev" | runtime |
pytest-httpxEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest-httpx>=0.30; extra == "dev" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest>=8.0; extra == "dev" | runtime |
ruffEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | ruff>=0.5; extra == "dev" | runtime |
bdist_wheel · 38.87 KB · Python py3
sdist · 39.38 KB · Python source
Observed since 20 Oct, 23:33 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:d4f8b11fa3ef2d12854b9e4e6cefa13e1010d6ce4e57090d4ebf4b22b376b373