Installation Guide
This guide will help you get started with the LMSystems SDK.
Requirements
- Python 3.7 or higher
- pip package manager
- A LMSystems account and API key
Installation Steps
1. Install the SDK
Install the LMSystems SDK using pip:
pip install lmsystems
2. Set Up Authentication
Get your API key from the LMSystems marketplace:
- Create an account at LMSystems
- Navigate to your account settings
- Generate a new API key
3. Configure Environment Variables
Store your API key securely using environment variables:
export LMSYSTEMS_API_KEY="your-api-key"
For local development, you can use a .env
file with the python-dotenv
package:
# Install python-dotenv
pip install python-dotenv
# Create .env file
echo "LMSYSTEMS_API_KEY=your-api-key" > .env
Then in your code:
from dotenv import load_dotenv
import os
load_dotenv() # Load environment variables from .env
api_key = os.getenv("LMSYSTEMS_API_KEY")
Verify Installation
You can verify your installation by running this simple test (make sure you have access to the graph you're trying to connect to):
from lmsystems.client import SyncLmsystemsClient
client = SyncLmsystemsClient(
graph_name="github-agentz-6", # Replace with a graph you have access to
api_key=LMSystems_API_KEY
)
Note: You must have access to the specified graph to successfully connect. If you receive a permission error, verify that:
- You have purchased or been granted access to the graph
- Your API key is valid
- The graph name is correct
Dependencies
The SDK has the following key dependencies:
httpx
: For HTTP requestspyjwt
: For token handlinglanggraph
: For graph executionpython-dotenv
: For environment variable management (recommended)
These will be installed automatically when you install the SDK.
Next Steps
Now that you have installed the SDK, you can:
- Learn about the LmsystemsClient API
- Explore the PurchasedGraph API
- Check out our GitHub Agent example
Troubleshooting
Common Installation Issues
-
Python Version
# Check your Python version
python --versionMake sure you're using Python 3.7 or higher.
-
Pip Installation
# Upgrade pip
python -m pip install --upgrade pip -
Virtual Environment It's recommended to use a virtual environment:
# Create virtual environment
python -m venv venv
# Activate it (Unix/macOS)
source venv/bin/activate
# Activate it (Windows)
.\venv\Scripts\activate
# Install SDK in virtual environment
pip install lmsystems
Getting Help
If you encounter any issues:
- Check our GitHub repository
- Join our Discord community
- Contact support at support@lmsystems.ai