Profile Models
Data structures for user profiles — searching, retrieving, deleting profiles and tracking profile changes.
UserProfile
Represents a user profile generated from user interactions.
| Prop | Type | Default | Description |
|---|---|---|---|
profile_id | string | — | Unique identifier for the profile. Reflexio-generated IDs use canonical UUIDv4 strings; caller-supplied IDs remain accepted for backward compatibility. |
user_id | string | — | Identifier of the user |
content | string | — | Content of the user profile |
last_modified_timestamp | integer | — | Unix timestamp of last modification |
generated_from_request_id | string | — | Request ID that generated this profile |
profile_time_to_live? | ProfileTimeToLive | INFINITY | Time-to-live setting for the profile |
expiration_timestamp? | integer | Maximum timestamp | Unix timestamp when profile expires |
custom_features? | object | — | Custom feature metadata |
source? | string | — | Source of the interaction that generated this profile |
status? | Status | — | Processing status of the profile (None for current, ARCHIVED, PENDING) |
extractor_names? | array[string] | — | Deprecated provenance field for legacy profiles. New singleton profile rows may omit it. |
source_span? | string | null | — | Verbatim source text span the profile was extracted from, when available |
SearchUserProfileRequest
Request model for searching user profiles.
| Prop | Type | Default | Description |
|---|---|---|---|
user_id | string | — | Identifier of the user |
query? | string | — | Semantic search query |
source? | string | — | Filter by interaction source |
custom_feature? | string | — | Filter by custom features |
extractor_name? | string | — | Deprecated compatibility filter for legacy stored profiles. New singleton extraction does not use names for selection. |
tags? | array[string] | — | Optional tag filter. Matches profiles that have any requested tag. |
generated_from_request_id? | string | — | Filter by request ID that generated the profile |
start_time? | datetime | — | Filter by start time |
end_time? | datetime | — | Filter by end time |
threshold? | float | model-specific | Similarity threshold for the vector arm. Omit it to use the embedding model's default. |
enable_reformulation? | boolean | false | Enable query reformulation for improved search results |
search_mode? | SearchMode | "hybrid" | Search mode: "vector", "fts", or "hybrid" |
top_k? | integer | 10 | Number of results to return |
SearchUserProfileResponse
Response model for profile search requests.
| Prop | Type | Default | Description |
|---|---|---|---|
success | boolean | — | Whether the search was successful |
user_profiles | array[UserProfile] | — | List of matching profiles |
msg? | string | — | Additional message |
GetUserProfilesRequest
Request model for getting user profiles.
| Prop | Type | Default | Description |
|---|---|---|---|
user_id | string | — | Identifier of the user |
profile_id? | string | — | Exact profile ID filter |
query? | string | — | Case-insensitive text filter across visible profile fields |
start_time? | datetime | — | Filter by start time |
end_time? | datetime | — | Filter by end time |
top_k? | integer | 30 | Maximum number of results to return |
source? | string | — | Exact profile source filter |
profile_time_to_live? | string | — | Filter by profile TTL value |
status_filter? | array[Status] | — | Filter by profile status |
tags? | array[string] | — | Optional tag filter. Matches profiles that have any requested tag. |
GetUserProfilesResponse
Response model for getting user profiles.
| Prop | Type | Default | Description |
|---|---|---|---|
success | boolean | — | Whether the request was successful |
user_profiles | array[UserProfile] | — | List of profiles |
msg? | string | — | Additional message |
AddUserProfileRequest
Request model for adding user profiles directly to storage (manual injection, bypassing the inference pipeline). Each profile must have non-empty content for embedding.
| Prop | Type | Default | Description |
|---|---|---|---|
user_profiles | array[UserProfile] | — | List of profiles to add |
AddUserProfileResponse
Response model for adding user profiles.
| Prop | Type | Default | Description |
|---|---|---|---|
success | boolean | — | Whether the operation was successful |
message? | string | — | Additional information about the operation |
added_count? | integer | 0 | Number of profiles added |
DeleteUserProfileRequest
Request model for deleting a user profile.
| Prop | Type | Default | Description |
|---|---|---|---|
user_id | string | — | Identifier of the user |
profile_id? | string | "" | Identifier of the profile to delete |
search_query? | string | "" | Search query to find profiles to delete |
DeleteUserProfileResponse
Response model for profile deletion requests.
| Prop | Type | Default | Description |
|---|---|---|---|
success | boolean | — | Whether the deletion was successful |
message? | string | "" | Additional information about the operation |
ProfileChangeLog
Represents a log entry tracking changes to user profiles.
| Prop | Type | Default | Description |
|---|---|---|---|
id | integer | — | Unique identifier for the change log |
user_id | string | — | Identifier of the user whose profile changed |
request_id | string | — | Request ID that triggered the change |
created_at? | integer | Current time | Unix timestamp when the change occurred |
added_profiles | array[UserProfile] | — | Profiles that were added |
removed_profiles | array[UserProfile] | — | Profiles that were removed |
ProfileChangeLogResponse
Response model for profile change log requests.
| Prop | Type | Default | Description |
|---|---|---|---|
success | boolean | — | Whether the request was successful |
profile_change_logs | array[ProfileChangeLog] | — | List of profile change logs |
RerunProfileGenerationRequest
Request model for rerunning profile generation.
| Prop | Type | Default | Description |
|---|---|---|---|
user_id? | string | — | Specific user ID to rerun for (if None, runs for all users) |
start_time? | datetime | — | Filter interactions from this time |
end_time? | datetime | — | Filter interactions until this time |
source? | string | — | Filter interactions by source |
extractor_names? | array[string] | — | Deprecated compatibility field. Accepted but ignored; rerun uses the singleton profile extractor. |
RerunProfileGenerationResponse
Response model for profile generation rerun requests.
| Prop | Type | Default | Description |
|---|---|---|---|
success | boolean | — | Whether the operation was successful |
msg? | string | — | Additional information |
profiles_generated? | integer | — | Number of profiles generated |
operation_id? | string | "rerun_profile_generation" | Operation identifier for tracking |
ManualProfileGenerationRequest
Request model for manually triggering profile generation with window-sized interactions. Creates profiles with CURRENT status directly (no upgrade needed).
| Prop | Type | Default | Description |
|---|---|---|---|
user_id? | string | — | Specific user ID (if None, runs for all users) |
source? | string | — | Filter interactions by source |
extractor_names? | array[string] | — | Deprecated compatibility field. Accepted but ignored; manual generation uses the singleton profile extractor when manual triggering is allowed. |
ManualProfileGenerationResponse
Response model for manual profile generation.
| Prop | Type | Default | Description |
|---|---|---|---|
success | boolean | — | Whether the operation was successful |
msg? | string | — | Additional information |
profiles_generated? | integer | — | Number of profiles generated |