Skip to main content

Client

For a step-by-step setup walkthrough, see the Quick Start guide.

MentioraClient

Main client class for interacting with the Mentiora platform.

Constructor

new MentioraClient(config: MentioraConfig)

MentioraConfig

OptionTypeRequiredDescription
apiKeystring¹Project API key for server-side usage — see Authentication
publishableKeystring¹Publishable key for browser-side usage — safe to expose in client code
baseUrlstringNoBase URL (defaults to https://platform.mentiora.ai)
timeoutnumberNoRequest timeout in ms (default: 30000)
retriesnumberNoMax retry attempts (default: 3)
identityTokenstringNoIdentity token for authenticated end-users (browser mode only)
getIdentityToken() => Promise<string>NoCallback to fetch/refresh identity tokens (browser mode only)
debugbooleanNoEnable verbose SDK logging (default: false)

¹ Exactly one of apiKey or publishableKey is required.

Properties

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();

See also: Tracing | Agents | Errors