Installation

Install Sentrial SDK for your preferred language and framework.

Python SDK

From PyPI (Recommended)

# Standard installation
pip install sentrial

# With LangChain integration
pip install sentrial[langchain]

# All integrations
pip install sentrial[all]

From Source

Install directly from the GitHub repository:

pip install git+https://github.com/neelshar/Sentrial.git#subdirectory=packages/python-sdk

Local Development

For development or contributing:

git clone https://github.com/neelshar/Sentrial.git
cd Sentrial/packages/python-sdk
pip install -e .

# With development dependencies
pip install -e ".[dev]"

TypeScript SDK

npm / pnpm / yarn

npm install @sentrial/sdk
# or
pnpm add @sentrial/sdk
# or
yarn add @sentrial/sdk

From Source

git clone https://github.com/neelshar/Sentrial.git
cd Sentrial/packages/typescript-sdk
pnpm install
pnpm build

# Link for local development
pnpm link --global

Verification

Verify your installation by running a simple test:

Python

python -c "from sentrial import SentrialClient; print('✓ Sentrial installed successfully')"

# Check version
python -c "import sentrial; print(f'Sentrial version: {sentrial.__version__}')"

# Test API connection
from sentrial import SentrialClient
client = SentrialClient(api_key="your-key", project_id="your-project")
print(client.health_check())  # Should return {"status": "ok"}

TypeScript

// test.ts
import { SentrialClient } from '@sentrial/sdk';

const client = new SentrialClient({
  apiKey: 'your-key',
  projectId: 'your-project'
});

const health = await client.healthCheck();
console.log('✓ Sentrial installed successfully', health);

// Run: tsx test.ts or ts-node test.ts

Environment Variables

Optional: Set environment variables to avoid passing credentials in code:

# .env file
SENTRIAL_API_KEY=your-api-key-here
SENTRIAL_PROJECT_ID=your-project-id
SENTRIAL_API_URL=https://realm-api.vercel.app  # Optional, defaults to production

The SDK will automatically read these variables if available:

# Python - credentials from environment
from sentrial import SentrialClient
client = SentrialClient()  # Uses SENTRIAL_API_KEY and SENTRIAL_PROJECT_ID

# TypeScript - credentials from environment
import { SentrialClient } from '@sentrial/sdk';
const client = new SentrialClient();  // Uses process.env.SENTRIAL_API_KEY

Getting Your API Key

  1. Sign in to your Sentrial dashboard
  2. Go to Settings → API Keys
  3. Click "Generate New Key"
  4. Copy and securely store your API key

Troubleshooting

ModuleNotFoundError: No module named 'sentrial'

Make sure you've installed the package and are using the correct Python environment:

pip list | grep sentrial

Cannot find module '@sentrial/sdk'

Ensure the package is installed in your project:

npm list @sentrial/sdk

API Connection Errors

Check that your API key is valid and your network allows connections to realm.ai. If behind a firewall, you may need to allowlist our API endpoints.

Next Steps

Now that you have Sentrial installed, continue with the Quick Start guide:

Continue to Quick Start →