Installation
This guide covers installing the Amigo SDK in your Python or TypeScript/JavaScript project.
Requirements
Python 3.8 or higher
pip (Python package manager)
Install from PyPI
Install the latest version of the Python SDK using pip:
pip install amigo_sdkAdd to requirements.txt
For reproducible builds, add the SDK to your requirements.txt file:
amigo_sdkThen install dependencies:
pip install -r requirements.txtVirtual Environment (Recommended)
We recommend using a virtual environment to avoid dependency conflicts:
# Create virtual environment
python -m venv amigo-env
# Activate virtual environment
# On macOS/Linux:
source amigo-env/bin/activate
# On Windows:
amigo-env\Scripts\activate
# Install SDK
pip install amigo_sdkVerify Installation
Verify the installation by importing the SDK:
from amigo_sdk import AmigoClient
print("Amigo Python SDK installed successfully!")Requirements
Node.js 18 or higher
npm or yarn package manager
Install from npm
Install the latest version of the TypeScript SDK:
npm install @amigo-ai/sdkAdd to package.json
The SDK will be automatically added to your package.json dependencies:
{
"dependencies": {
"@amigo-ai/sdk": "^1.0.0"
}
}TypeScript Configuration
If you're using TypeScript, ensure your tsconfig.json includes:
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}Verify Installation
Verify the installation by importing the SDK:
import { AmigoClient } from '@amigo-ai/sdk'
console.log('Amigo TypeScript SDK installed successfully!')Configuration Setup
Both SDKs support initialization with configuration parameters passed directly to the client constructor.
from amigo_sdk import AmigoClient
# Initialize with configuration parameters
with AmigoClient(
api_key="your-api-key",
api_key_id="your-api-key-id",
user_id="user-id",
organization_id="your-organization-id",
base_url="https://api.amigo.ai" # optional
) as client:
# Use the client
passimport { AmigoClient } from '@amigo-ai/sdk'
// Initialize with configuration parameters
const client = new AmigoClient({
apiKey: 'your-api-key',
apiKeyId: 'your-api-key-id',
userId: 'user-id',
orgId: 'your-organization-id',
baseUrl: 'https://api.amigo.ai' // optional
})Environment Variables
For enhanced security, use environment variables for configuration. Create a .env file in your project root:
AMIGO_API_KEY=your-api-key
AMIGO_API_KEY_ID=your-api-key-id
AMIGO_USER_ID=user-id
AMIGO_ORGANIZATION_ID=your-organization-id
AMIGO_BASE_URL=https://api.amigo.aiInstall python-dotenv to load environment variables:
pip install python-dotenvThen load them in your application:
from dotenv import load_dotenv
load_dotenv()
from amigo_sdk import AmigoClient
# Automatically loads from environment variables
with AmigoClient() as client:
passInstall dotenv:
npm install dotenvThen load them in your application:
import 'dotenv/config'
import { AmigoClient } from '@amigo-ai/sdk'
// For TypeScript, you still need to pass config explicitly
const client = new AmigoClient({
apiKey: process.env.AMIGO_API_KEY!,
apiKeyId: process.env.AMIGO_API_KEY_ID!,
userId: process.env.AMIGO_USER_ID!,
orgId: process.env.AMIGO_ORGANIZATION_ID!,
})Next Steps
Once you have the SDK installed, proceed to:
SDK Configuration — Configure authentication and client options
Hello World Example — Create your first conversation
Last updated
Was this helpful?

