⚡ vspagent
Agent Orchestrator for AI model training and tuning.
vspagent is a lightweight Python agent orchestrator that connects any AI application, web backend, or developer CLI to Google Colab Cloud GPUs (Tesla T4, A100, V100) via the Model Context Protocol (MCP) with zero local VRAM/GPU requirements.
Whether you are orchestrating fine-tuning jobs (ModernBERT, Laya), running deep learning inference (TotalSegmentator, MedGemma), or dispatching heavy audio/vision pipelines (Demucs, Seed-VC), vspagent orchestrates the entire cloud GPU lifecycle seamlessly.
🌟 Key Capabilities
- 🤖 Agentic MCP Orchestration: Manages the
colab-mcpstdio daemon, JSON-RPC protocol, and tool invocations behind clean, Pythonic abstractions. - 👤 Intelligent Account & Profile Routing: Automatically detects signed-in Google/Chrome profiles across Linux, WSL, Windows, and macOS, dispatching browser pairing to the desired Google account.
- 🚀 Remote Cloud GPU Dispatch: Injects, monitors, and cleans up remote execution payloads on Colab runtimes with real-time log streaming and traceback extraction.
- 📁 Automated Cloud File Transfer: High-speed, chunked bidirectional file synchronization between local storage and remote Colab file systems.
- 🔌 Drop-in Web Framework Adapters:
- FastAPI: One-line
app.include_router(get_colab_router())providing ready-to-use/colab/status,/colab/accounts,/colab/connect,/colab/executeendpoints. - Flask: One-line
app.register_blueprint(get_colab_blueprint())supporting synchronous multi-threaded Flask backends.
- FastAPI: One-line
- 🖥️ Interactive Terminal CLI: Built-in developer CLI with rich tables, live account discovery, connection health checks, and direct code dispatch.
- 🪶 Zero-Dependency Local Footprint: Keeps local environments clean (<1MB). Heavy machine learning dependencies (
torch,cuda,transformers) stay isolated on the remote cloud GPU.
📦 Installation
pip install vspagent
🛠️ Quickstart
1. Python SDK — Direct Agent Orchestration
import asyncio
from vspagent import ColabClient
async def main():
colab = ColabClient()
# 1. Orchestrate pairing with the user's preferred Google account
print("Initiating Colab agent handshake...")
await colab.connect_browser(profile_directory="Default")
# 2. Await tab authorization in Chrome
await colab.ensure_connected(timeout=60.0)
print(f"Connected to Cloud GPU: {colab.gpu_info}")
# 3. Dispatch remote GPU execution
payload = """
import torch
print("Agent GPU Ready:", torch.cuda.get_device_name(0))
"""
res = await colab.execute_code(payload, keep_cell=False)
print("Remote Output:\n", res["output"])
asyncio.run(main())
2. FastAPI Web Orchestration (e.g. Vibe-ML-Studio, Vibe-MI-Stdio)
Mount the orchestrator directly into your FastAPI application:
from fastapi import FastAPI
from vspagent.colab.integrations import get_colab_router
app = FastAPI(title="My GPU-Accelerated Service")
# Exposes /colab/status, /colab/accounts, /colab/connect, /colab/execute
app.include_router(get_colab_router(), prefix="/api")
3. Flask Web Orchestration (e.g. Karaoke Extractor)
from flask import Flask
from vspagent.colab.integrations import get_colab_blueprint
app = Flask(__name__)
# Exposes /colab/status, /colab/accounts, /colab/connect, /colab/execute
app.register_blueprint(get_colab_blueprint(), url_prefix="/api/colab")
4. Interactive Terminal CLI
# Discover available Google / Chrome profiles
vspagent colab accounts
# Inspect Colab MCP orchestrator status & GPU hardware
vspagent colab status
# Interactively pair terminal session with Colab tab
vspagent colab connect
# Dispatch inline code to Colab GPU
vspagent colab exec -c "import torch; print(torch.cuda.is_available())"
# Dispatch a local Python script to remote Colab GPU
vspagent colab exec -f ./train_model.py
📄 License
MIT License © Vishnu Suresh Perumbavoor
Metadata
Release files for vspagent 3.0.1
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 | Actions |
|---|---|---|---|---|
| vspagent-3.0.1.tar.gz | 19.5 kB | Without provenance | Details for vspagent-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vspagent-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for vspagent-3.0.1-py3-none-any.whl |
Total release size: 39.8 kB
Release files / vspagent-3.0.1.tar.gz
| Download URL | vspagent-3.0.1.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29884808a55edccce8d2315804f7ff18f7bd15016b2384be5679e2c8e8d2be5e
|
|
BLAKE2b-256 checksum How to use checksums |
f8d8db6feb1bff9b1b6e76b4e67f9ed7eeadcbd99c4a08ae870d42e000ae2ac6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / vspagent-3.0.1-py3-none-any.whl
| Download URL | vspagent-3.0.1-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a5526e8633971ffa4c1b0369e23a901f0231089b244e12ff60a6533bedb9a69
|
|
BLAKE2b-256 checksum How to use checksums |
c34b7b29cc73b467b72b9665bbccbce17a7b8b17dae351553d1897769305ae80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for vspagent 3.0.1
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.