Appearance
Installation
The elsai Prompt Manager SDK is a single Python package — elsai-prompts — published to our private package index. The same package works for both SaaS and on-prem; the only difference is which index URL you install from and whether you pass a base_url at runtime.
Prerequisites
- Python 3.10, 3.11, or 3.12
- pip 22+ (for
--extra-index-urlsupport) - An elsai Prompt Manager account (SaaS) or a deployed on-prem instance
Install the SDK
bash
pip install --extra-index-url https://elsai-core-package.optisolbusiness.com/root/elsai-prompts-sass/ elsai-prompts==2.0.0bash
pip install --extra-index-url https://elsai-core-package.optisolbusiness.com/root/elsai-prompts/ elsai-prompts==2.0.0TIP
SaaS: No further setup is required — point the SDK at the hosted instance with your API key and project ID. See Configuration(.
On-Prem: Also requires you to tell the SDK where your deployment lives via the base_url argument (or PROMPT_MANAGER_API_URL environment variable). See Configuration(.
TIP
Pin a specific version (==2.0.0) in production. The SDK follows semantic versioning; minor releases are backwards-compatible, major releases may change the public API.
Verify the install
bash
python -c "from elsai_prompts.prompt_manager import PromptManager; print('SDK installed:', PromptManager.__module__)"You should see:
SDK installed: elsai_prompts.prompt_manager.prompt_handlerIf you get an ImportError, the package isn't on the path — most often because pip installed it into a different Python than the one you ran. Re-run with python -m pip install ... to be sure.
Optional dependencies
For loading credentials from a .env file (recommended — see Best Practices():
bash
pip install python-dotenvTroubleshooting
ERROR: Could not find a version that satisfies the requirement elsai-prompts
pip didn't reach the private index. Double-check the --extra-index-url. If you're behind a corporate proxy, make sure outbound HTTPS to elsai-core-package.optisolbusiness.com is allowed.
ERROR: HTTP error 401 from private index
The index requires authentication and your environment isn't providing credentials. Email dev@elsaifoundry.ai to confirm your access.
ImportError: cannot import name 'PromptContent'
You're on an old SDK version (<2.0.0). PromptContent, the typed-content return, was added in 2.0.0. Upgrade with pip install --upgrade elsai-prompts==2.0.0.
INFO
Need help? Email dev@elsaifoundry.ai.