Spotinst Agent Beta
raw JSON → 2.2.289 verified Sat May 09 auth: no python
The Spotinst Agent (beta) is a lightweight agent for Spectrum instances that enables remote script execution, data collection, application deployment, and more. Current version: 2.2.289. Release cadence is frequent, often multiple times per month.
pip install spotinst-agent-beta Common errors
error ModuleNotFoundError: No module named 'spotinst_agent' ↓
cause Trying to import the package using the hyphenated name instead of the underscored name.
fix
Install the package with
pip install spotinst-agent-beta and import with from spotinst_agent import Agent. error spotinst_agent.exceptions.AuthenticationError: Authentication failed ↓
cause Missing or invalid SPOTINST_TOKEN or SPOTINST_ACCOUNT_ID environment variables.
fix
Set both environment variables: export SPOTINST_TOKEN='your_token' and export SPOTINST_ACCOUNT_ID='your_account_id'.
Warnings
gotcha The package is named spotinst-agent-beta but the import uses spotinst_agent (underscore). Do not use hyphens in Python imports. ↓
fix Use `from spotinst_agent import Agent`.
deprecated The agent is in beta and may undergo breaking changes without major version bumps. ↓
fix Pin your dependency with a specific version and test updates thoroughly.
Imports
- SpotinstAgent wrong
from spotinst_agent import SpotinstAgentcorrectfrom spotinst_agent import Agent
Quickstart
from spotinst_agent import Agent
# Initialize the agent (authentication via environment variables SPOTINST_TOKEN and SPOTINST_ACCOUNT_ID)
agent = Agent()
# Run a simple command
result = agent.run_command('echo "Hello from Spotinst Agent"')
print(result.output)