Client
For a step-by-step setup walkthrough, see the Quick Start guide.
MentioraClient
Main client class for interacting with the Mentiora platform.
Constructor
- TypeScript
- Python
new MentioraClient(config: MentioraConfig)
MentioraClient(config: MentioraConfig)
MentioraConfig
- TypeScript
- Python
| Option | Type | Required | Description |
|---|---|---|---|
apiKey | string | ¹ | Project API key for server-side usage — see Authentication |
publishableKey | string | ¹ | Publishable key for browser-side usage — safe to expose in client code |
baseUrl | string | No | Base URL (defaults to https://platform.mentiora.ai) |
timeout | number | No | Request timeout in ms (default: 30000) |
retries | number | No | Max retry attempts (default: 3) |
identityToken | string | No | Identity token for authenticated end-users (browser mode only) |
getIdentityToken | () => Promise<string> | No | Callback to fetch/refresh identity tokens (browser mode only) |
debug | boolean | No | Enable verbose SDK logging (default: false) |
¹ Exactly one of apiKey or publishableKey is required.
| Option | Type | Required | Description |
|---|---|---|---|
api_key | str | Yes | Project API key — see Authentication |
base_url | str | No | Base URL (defaults to https://platform.mentiora.ai) |
timeout | int | No | Request timeout in ms (default: 30000) |
retries | int | No | Max retry attempts (default: 3) |
debug | bool | No | Enable verbose SDK logging (default: False) |
Browser mode (publishableKey, identityToken, getIdentityToken) is only available in the TypeScript SDK — these are browser-specific features.
Properties
- TypeScript
- Python
tracing
Access to tracing functionality.
client.tracing: TracingClient
agents
Access to agent execution functionality.
client.agents: AgentsClient
debug
Whether debug mode is enabled (read-only).
client.debug: boolean
close(): void
Close the client. Currently a no-op (the TypeScript SDK uses stateless fetch()), provided for API parity with the Python SDK.
client.close();
tracing
Access to tracing functionality.
client.tracing: TracingClient
agents
Access to agent execution functionality.
client.agents: AgentsClient
debug
Whether debug mode is enabled (read-only).
client.debug: bool
close() -> None
Close HTTP clients and cleanup resources.
client.close()
aclose() -> None
Close async HTTP clients and cleanup resources.
await client.aclose()