Skip to main content

Profile API

Profile API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
getDefaultProfileRetrieves the default user profile for the current session.
setDefaultAgentSets the default agent for the user's profile.

Methods


getDefaultProfile

client.profile.getDefaultProfile(): Promise<UserProfile>

Retrieves the default user profile for the current session.

Returns the full profile object including user identity, preferences, and configured defaults. Use this to display user information or check profile settings.

No parameters.

Returns: Promise<UserProfile> — A promise that resolves to the user's profile data

Full reference →


setDefaultAgent

client.profile.setDefaultAgent(data: SetDefaultAgentRequest): Promise<void>

Sets the default agent for the user's profile.

Configures which agent is automatically selected when the user starts a new conversation or task. This persists across sessions until changed.

ParameterTypeRequiredDescription
dataSetDefaultAgentRequestYesThe request containing the agent to set as default

Returns: Promise<void> — A promise that resolves when the default agent has been updated

Full reference →