Ensoul

SDKs

Official client libraries for 7 languages. All SDKs provide a consistent interface for authentication, streaming, pagination, and error handling.

Get the packages

Python on PyPI · TypeScript on npm · All 7 SDKs on GitHub.

Supported Languages

Installation

pip install ensoul

Python requires 3.11 or newer

The Python SDK requires Python 3.11+. On Python 3.9 or 3.10, pip install ensoul fails with no compatible version. Check your version with python --version and upgrade if needed.

Quick Example

All SDKs follow the same pattern: create a client, call resources.

Health Check

from ensoul import Ensoul

client = Ensoul()  # reads ENSOUL_API_KEY from env
health = client.health.check()
print(f"API status: {health}")

Chat with a Persona

from ensoul import Ensoul

client = Ensoul()
response = client.chat.send(
    persona_id="persona-uuid",
    message="What do you think about remote work?"
)
print(response.response)

Features

Auto-Pagination

Iterate through large result sets automatically. All list endpoints return paginated results that the SDK handles for you.

Streaming Support

Real-time streaming for chat, aggregate queries, and simulations via Server-Sent Events.

Automatic Retries

Transient failures are retried with exponential backoff and jitter. Rate-limit headers are respected automatically.

Dual Authentication

Authenticate with API keys for server-to-server use, or OAuth tokens for user-facing applications.

Environment Variables

All SDKs read these environment variables as defaults when no explicit value is passed to the client constructor.

VariablePurposeDefault
ENSOUL_API_KEYAPI key for authentication(none)
ENSOUL_BASE_URLAPI base URLhttps://api.ensoul-ai.com

Next Steps