AgentLink Python SDK
Official Python SDK for China Mobile Cloud AgentLink MCP Gateway
AgentLink Python SDK provides a high-level, Pythonic API for interacting with the AgentLink MCP (Model Context Protocol) Gateway. It supports cloud sandbox lifecycle management, browser automation, Windows desktop control, and generic MCP tool invocation.
Features
- 🌐 Browser Automation — Navigate, click, type, take screenshots, evaluate JavaScript
- 🖥️ Windows Desktop Control — PowerShell commands, click, type, keyboard shortcuts, screenshots
- 🔄 Automatic Sandbox Management — Auto-creates and reuses sandbox sessions
- 🧵 Thread-Safe — Safe for use in multi-threaded applications
- 🔁 Retry Logic — Automatic retries with configurable timeout
- 📦 Context Manager — Auto-cleanup with
withstatement - 🐍 Pythonic API — Clean, intuitive interface with type hints
Installation
pip install agentlink-python-sdk
Or install from source:
cd agentlink-python-sdk
pip install -e .
Quick Start
Prerequisites
- Python 3.8 or later
- An AgentLink API key (obtain from your AgentLink platform administrator)
Basic Usage
from agentlink_sdk import AgentLink
# Initialize client
al = AgentLink(api_key="your-api-key")
# Browser automation (sandbox is auto-created and reused)
al.browser.go("https://www.baidu.com")
snapshot = al.browser.a11y_tree()
screenshot = al.browser.capture()
screenshot.save("page.png")
# Clean up
al.cleanup()
Development
# Install for development
cd agentlink-python-sdk
pip install -e ".[dev]"
# Run tests
pytest
## License
This project is licensed under the Apache License 2.0 — see the [LICENSE](LICENSE) file for details.
Metadata
Release files for agentlink-sdk 1.0.2
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 | |
|---|---|---|---|---|
| agentlink_sdk-1.0.2.tar.gz | 53.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentlink_sdk-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 87.9 kB
Release files / agentlink_sdk-1.0.2.tar.gz
| Download URL | agentlink_sdk-1.0.2.tar.gz |
|---|---|
| Size | 53.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3077f7837ab3543e2b845c9c5e6126fa99e0e65fd8b650897289fc070e5504a
|
|
BLAKE2b-256 checksum How to use checksums |
7ce5958fb5db81787a26f0f5506106388bc5c6fe33a166c67507133e129ff7dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / agentlink_sdk-1.0.2-py3-none-any.whl
| Download URL | agentlink_sdk-1.0.2-py3-none-any.whl |
|---|---|
| Size | 34.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b91411ffe000c500c7d97e6b041a4e3964d6f8f9f09ff3d669ac6da640dd109
|
|
BLAKE2b-256 checksum How to use checksums |
45cfc154263bcc4a0cc39339535c5ac68ced89a2f2e731fd5c72ae22be9a1f73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for agentlink-sdk 1.0.2
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.