Skip to content
Console
Try one

    SDK Functions

    Copy-paste Thalovant SDK examples for control-plane calls, identities, runtime requests, events, and context.

    Use this page when you want to build with the SDK, not memorize every method name.

    Start with the quick example, then copy the recipe closest to your task. Each recipe shows the same idea in Python, Node.js, Go, and Rust where the SDKs expose it. The Quick Start, Sign In, and Create A Client Identity recipes also show Kotlin, Swift, and C#; for the full surface of those SDKs, use the Kotlin, Swift, and .NET SDK pages.

    Every call is shown in each language that has it, so you can compare one operation across SDKs without opening five pages.

    If you are…Open
    Getting a client and signing inSigning in and creating a client
    Looking up or creating hubsFinding and provisioning hubs
    Issuing a client identityClient identities and protocols
    Asking a hub somethingTalking to a hub
    Listening for events, or debuggingEvents, context, and diagnostics

    This example signs in, creates a client identity for one hub, connects, sends one request, and prints the reply.

    from thalovant import ThalovantClient, ThalovantControlPlane
    api = ThalovantControlPlane()
    api.login("[email protected]", "password")
    result = api.create_client_identity(
    "hub-id",
    name="python-demo-client",
    preferred_protocols=("wss", "https", "mqtt"),
    )
    with ThalovantClient(result.identity, protocol="wss") as client:
    reply = client.ask("Tell me a short clean joke.")
    print(reply.text)

    The Kotlin, Swift, and C# clients connect over WSS only, so they take no protocol argument here. These examples require the current v3-compatible SDK versions.

    Expected result:

    Why did the hub keep good logs? It wanted every punchline to be traceable.

    Control plane

    Discover hubs and create client identities.

    Identity

    Load saved credentials and choose a protocol.

    Runtime client

    Connect, ask, emit events, and send structured input.

    Events and context

    Listen for hub events and attach session metadata.

    Use this table only when you already know the task and need the language-specific name.

    TaskPythonNode.jsGoRust
    Create API clientThalovantControlPlane()new ThalovantControlPlane()NewDefaultControlPlane(token)ControlPlane::default()
    Sign inlogin(email, password)login(email, password)Login(ctx, email, password, scope)login(email, password, scope)
    Sign in with MFAlogin(..., otp_code=..., recovery_code=...)login(..., { otpCode, recoveryCode })LoginWithOptions(ctx, email, password, options)login_with_options(email, password, options)
    Sign in without a passwordlogin_with_browser(...)loginWithBrowser(options)LoginWithBrowser(ctx, options)login_with_browser(options)
    Use an API tokenThalovantControlPlane(access_token=...)new ThalovantControlPlane(url, { accessToken })NewDefaultControlPlane(token)ControlPlane::with_access_token(token)
    List public hubslist_public_hubs(...)listPublicHubs(...)ListPublicHubs(ctx, limit, cursor)list_public_hubs(limit, cursor)
    Get public hubget_public_hub(ref)getPublicHub(ref)GetPublicHub(ctx, ref)get_public_hub(ref)
    List visible hubslist_hubs(...)listHubs(...)ListHubs(ctx, limit, cursor, ownerID)list_hubs(limit, cursor, owner_id)
    Get hubget_hub(hub_id)getHub(hubId)GetHub(ctx, hubID)get_hub(hub_id)
    Get operationget_operation(operation_id)getOperation(operationId)GetOperation(ctx, operationID)get_operation(operation_id)
    Create identitycreate_client_identity(...)createClientIdentity(...)CreateClientIdentityForHubID(...)create_client_identity_for_hub_id(...)
    List hub skillslist_hub_skills(hub_id)listHubSkills(hubId)ListHubSkills(ctx, hubID)list_hub_skills(hub_id)
    List hub skill historylist_hub_skill_history(hub_id, limit=50)listHubSkillHistory(hubId, { limit: 50 })ListHubSkillHistory(ctx, hubID, 50)list_hub_skill_history(hub_id, 50)
    Install hub skillinstall_hub_skill(hub_id, skill, version=, wait=)installHubSkill(hubId, skill, { version, wait })InstallHubSkill(ctx, hubID, skill, version, options)install_hub_skill(hub_id, skill, version, options)
    Update hub skillupdate_hub_skill(hub_id, skill, version=, wait=)updateHubSkill(hubId, skill, { version, wait })UpdateHubSkill(ctx, hubID, skill, version, options)update_hub_skill(hub_id, skill, version, options)
    Remove hub skillremove_hub_skill(hub_id, skill, wait=)removeHubSkill(hubId, skill, { wait })RemoveHubSkill(ctx, hubID, skill, options)remove_hub_skill(hub_id, skill, options)

    Hub skill calls and history are available in all seven managed SDKs at the current versions. The provisioning calls have their own naming table on Provision Hubs.

    TaskPythonNode.jsGoRust
    Load identity from configThalovantIdentity.from_config(...)ThalovantIdentity.fromConfig(...)IdentityFromConfig(path, profile)Identity::from_config(profile)
    Load identity fileThalovantIdentity.from_file(path)ThalovantIdentity.fromFile(path)IdentityFromFile(path)Identity::from_file(path)
    Load client from fileThalovantClient.from_identity_file(path)ThalovantClient.fromIdentityFile(path)NewClientFromFile(path)Client::from_file(path)
    Load client from configThalovantClient.from_config(...)ThalovantClient.fromConfig(...)NewClientFromConfig(path, profile)Client::from_config(profile)
    Load client from envThalovantClient.from_env()ThalovantClient.fromEnv()NewClientFromEnv()Client::from_env()
    Enabled protocolsenabled_protocols()enabledProtocols()EnabledProtocols()enabled_protocols()
    Endpoint for protocolendpoint_for(protocol)endpointFor(protocol)EndpointFor(protocol)endpoint_for(protocol)
    Check protocolsupports_protocol(protocol)supportsProtocol(protocol)SupportsProtocol(protocol)supports_protocol(protocol)
    MQTT credentialsidentity.mqttidentity.mqttIdentity.MQTTidentity.mqtt
    TaskPythonNode.jsGoRust
    Create protocol clientThalovantClient(identity, protocol="wss")new ThalovantClient(identity, { protocol })NewClientWithOptions(identity, ClientOptions{Protocol: ...})Client::with_protocol(identity, protocol)
    Connectconnect()connect()Connect(ctx)connect()
    Closeclose()close()Close(ctx)close()
    Healthhealthcheck()healthcheck()Healthcheck()healthcheck()
    Askask(text, ...)ask(text, options)Ask(ctx, text, options)ask(text, options)
    Emit raw eventemit(event, data, context)emit(event, data, context)Emit(ctx, event, data, context)emit(event, data, context)
    Send utterancesend_utterance(text, ...)sendUtterance(text, options)SendUtterance(ctx, text, options)send_utterance(text, options)
    Send actionsend_action(payload, ...)sendAction(payload, options)SendAction(ctx, payload, options)send_action(payload, options)
    Send codesend_code(value, ...)sendCode(value, options)SendCode(ctx, value, options)send_code(value, options)
    Conversationconversation(...)conversation(options)Conversation(options)conversation(options)
    Intent inventoryintents(languages, ...)intents(languages)Intents(ctx, languages, options)intents(languages, options)
    List intentslist_intents(lang, ...)listIntents(lang)ListIntents(ctx, lang, options)list_intents(lang, options)
    Describe intentdescribe_intent(skill_id, intent_name, lang, ...)describeIntent(skillId, intentName, lang)DescribeIntent(ctx, skillID, intentName, lang, options)describe_intent(skill_id, intent_name, lang, options)
    Policy refusalThalovantPolicyDeniedErrorThalovantPolicyDeniedErrorPolicyDeniedErrorThalovantError::PolicyDenied

    The intent rows are published in every SDK. The SDKs page lists the version each one shipped them in, and the Kotlin, Swift, .NET, and embedded C spellings are on their own SDK pages.

    TaskPythonNode.jsGoRust
    Wait for eventwait_for_event(name, ...)waitForEvent(name, options)WaitForEvent(ctx, name, options)wait_for_event(name, options)
    Stream eventslisten(name, ...)on(name, handler, options)Listen(ctx, name, options)listen(name, options)
    Diagnosticsdoctor()healthcheck()Healthcheck()healthcheck()
    Build contextbuild_client_context(...)buildClientContext(...)BuildClientContext(...)build_client_context(...)
    Response textreply.textreply.textreply.Textreply.text
    Display itemsreply.display_items(...)reply.displayItems(...)reply.DisplayItems(...)reply.display_items(...)
    Event textevent.textevent.textevent.Text()event.text()

    Hub-addressed skill helpers are now available in all seven managed SDKs, including history and optional operation waiting. They operate on the attached runtime group; every hub sharing it is affected. See each SDK reference for its method names. Embedded C has no provisioning HTTP client.