Profile API
Profile API
import { CodeBoltClient } from '@codebolt/clientsdk';
const client = new CodeBoltClient();
Quick Reference
| Method | Description |
|---|---|
getDefaultProfile | Retrieves the default user profile for the current session. |
setDefaultAgent | Sets 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
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | SetDefaultAgentRequest | Yes | The request containing the agent to set as default |
Returns: Promise<void> — A promise that resolves when the default agent has been updated