Skip to main content

Official Python SDK for China Mobile Cloud AgentLink MCP Gateway

Project description

AgentLink 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-sdk

Or install from source:

git clone <repo-url>
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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentlink_sdk-1.0.1.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentlink_sdk-1.0.1-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page