Metadata-Version: 2.4
Name: agentlink-sdk
Version: 1.0.0
Summary: Official Python SDK for China Mobile Cloud AgentLink MCP Gateway
Author-email: China Mobile Cloud AI Team <agentlink@cmss.com>
License: Apache-2.0
Keywords: agent,agentlink,automation,browser,cloud,desktop-automation,mcp,rpa,sandbox,windows
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.8
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest-httpx>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.0; extra == 'docs'
Requires-Dist: mkdocs>=1.5; extra == 'docs'
Description-Content-Type: text/markdown

# AgentLink Python SDK

**Official Python SDK for China Mobile Cloud AgentLink MCP Gateway**

[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](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

```bash
pip install agentlink-python-sdk
```

Or install from source:

```bash
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

```python
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

```bash
# 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.


