{"id":28230,"library":"spotinst-agent-beta","title":"Spotinst Agent Beta","description":"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.","status":"active","version":"2.2.289","language":"python","source_language":"en","source_url":"https://github.com/spotinst/spotinst-spectrum-agent","tags":["spotinst","agent","beta","cloud","deployment","remote-scripting"],"install":[{"cmd":"pip install spotinst-agent-beta","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"The main class is Agent, not SpotinstAgent.","wrong":"from spotinst_agent import SpotinstAgent","symbol":"SpotinstAgent","correct":"from spotinst_agent import Agent"}],"quickstart":{"code":"from spotinst_agent import Agent\n\n# Initialize the agent (authentication via environment variables SPOTINST_TOKEN and SPOTINST_ACCOUNT_ID)\nagent = Agent()\n\n# Run a simple command\nresult = agent.run_command('echo \"Hello from Spotinst Agent\"')\nprint(result.output)","lang":"python","description":"Initialize the agent and run a remote command. Ensure SPOTINST_TOKEN and SPOTINST_ACCOUNT_ID are set as environment variables."},"warnings":[{"fix":"Use `from spotinst_agent import Agent`.","message":"The package is named spotinst-agent-beta but the import uses spotinst_agent (underscore). Do not use hyphens in Python imports.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin your dependency with a specific version and test updates thoroughly.","message":"The agent is in beta and may undergo breaking changes without major version bumps.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install the package with `pip install spotinst-agent-beta` and import with `from spotinst_agent import Agent`.","cause":"Trying to import the package using the hyphenated name instead of the underscored name.","error":"ModuleNotFoundError: No module named 'spotinst_agent'"},{"fix":"Set both environment variables: export SPOTINST_TOKEN='your_token' and export SPOTINST_ACCOUNT_ID='your_account_id'.","cause":"Missing or invalid SPOTINST_TOKEN or SPOTINST_ACCOUNT_ID environment variables.","error":"spotinst_agent.exceptions.AuthenticationError: Authentication failed"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}