ORIS
Developers SDKs

SDKs

Official client libraries for Python and TypeScript. Typed models, async support, automatic retry with exponential backoff, and built-in rate limit handling.

Python SDK

Requires Python 3.9 or later. Built on httpx for async support.

Installation

bash
pip install oris-sdk

Initialize the client

python
from oris import OrisClient

client = OrisClient(api_key="oris_sk_live_...")

# Register an agent
agent = client.agents.register(
    name="Researcher-01",
    description="Data procurement"
)

print(agent.id)        # "agt_01h..."
print(agent.kya_tier)  # "L0"

Async support

python
from oris import AsyncOrisClient

client = AsyncOrisClient(api_key="oris_sk_live_...")

async def check_agent():
    agent = await client.agents.get(agent_id="agt_01h...")
    print(agent.kya_tier)     # "L1"
    print(agent.wallet_count) # 3

TypeScript SDK

Works in Node.js 18+ and modern browsers. Ships with full type definitions.

Installation

bash
npm install @oris/sdk

Initialize the client

typescript
import { OrisClient } from "@oris/sdk";

const client = new OrisClient({ apiKey: "oris_sk_live_..." });

// Register an agent
const agent = await client.agents.register({
  name: "Researcher-01",
  description: "Data procurement",
});

console.log(agent.id);       // "agt_01h..."
console.log(agent.kyaTier);  // "L0"

Configuration

Both SDKs read configuration from environment variables. You can also pass values directly to the constructor. Constructor values take precedence over environment variables.

VariableDefaultDescription
ORIS_API_KEYNoneYour API key. Required for all requests.
ORIS_BASE_URLhttps://api.useoris.xyzAPI base URL. Override for sandbox.
ORIS_TIMEOUT30sRequest timeout. Accepts seconds (integer) or duration string.

Error handling

Both SDKs raise typed exceptions. Catch specific error classes to handle different failure modes.

python
from oris import OrisClient, OrisError, OrisRateLimitError, OrisAuthError

client = OrisClient(api_key="oris_sk_live_...")

try:
    agent = client.agents.get(agent_id="agt_01h...")
except OrisAuthError as e:
    # Invalid or expired API key (HTTP 401)
    print(f"Auth failed: {e.message}")
except OrisRateLimitError as e:
    # Rate limit exceeded (HTTP 429)
    print(f"Rate limited. Retry in {e.retry_after}s")
except OrisError as e:
    # All other API errors (HTTP 4xx/5xx)
    print(f"API error {e.status_code}: {e.message}")