Skip to main content

AgentLink Python SDK

Official Python SDK for China Mobile Cloud AgentLink MCP Gateway

Python License

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 with statement
  • 🐍 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)

Source distribution for agentlink-sdk 1.0.2
File Size Uploaded Provenance
agentlink_sdk-1.0.2.tar.gz 53.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agentlink-sdk 1.0.2
File Interpreter ABI Platform
agentlink_sdk-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 87.9 kB

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page