Menu
Schemas

Profile Models

Data structures for user profiles — searching, retrieving, deleting profiles and tracking profile changes.

UserProfile

Represents a user profile generated from user interactions.

PropTypeDefaultDescription
profile_idstring—Unique identifier for the profile. Reflexio-generated IDs use canonical UUIDv4 strings; caller-supplied IDs remain accepted for backward compatibility.
user_idstring—Identifier of the user
contentstring—Content of the user profile
last_modified_timestampinteger—Unix timestamp of last modification
generated_from_request_idstring—Request ID that generated this profile
profile_time_to_live?ProfileTimeToLiveINFINITYTime-to-live setting for the profile
expiration_timestamp?integerMaximum timestampUnix 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.

PropTypeDefaultDescription
user_idstring—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?floatmodel-specificSimilarity threshold for the vector arm. Omit it to use the embedding model's default.
enable_reformulation?booleanfalseEnable query reformulation for improved search results
search_mode?SearchMode"hybrid"Search mode: "vector", "fts", or "hybrid"
top_k?integer10Number of results to return

SearchUserProfileResponse

Response model for profile search requests.

PropTypeDefaultDescription
successboolean—Whether the search was successful
user_profilesarray[UserProfile]—List of matching profiles
msg?string—Additional message

GetUserProfilesRequest

Request model for getting user profiles.

PropTypeDefaultDescription
user_idstring—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?integer30Maximum 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.

PropTypeDefaultDescription
successboolean—Whether the request was successful
user_profilesarray[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.

PropTypeDefaultDescription
user_profilesarray[UserProfile]—List of profiles to add

AddUserProfileResponse

Response model for adding user profiles.

PropTypeDefaultDescription
successboolean—Whether the operation was successful
message?string—Additional information about the operation
added_count?integer0Number of profiles added

DeleteUserProfileRequest

Request model for deleting a user profile.

PropTypeDefaultDescription
user_idstring—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.

PropTypeDefaultDescription
successboolean—Whether the deletion was successful
message?string""Additional information about the operation

ProfileChangeLog

Represents a log entry tracking changes to user profiles.

PropTypeDefaultDescription
idinteger—Unique identifier for the change log
user_idstring—Identifier of the user whose profile changed
request_idstring—Request ID that triggered the change
created_at?integerCurrent timeUnix timestamp when the change occurred
added_profilesarray[UserProfile]—Profiles that were added
removed_profilesarray[UserProfile]—Profiles that were removed

ProfileChangeLogResponse

Response model for profile change log requests.

PropTypeDefaultDescription
successboolean—Whether the request was successful
profile_change_logsarray[ProfileChangeLog]—List of profile change logs

RerunProfileGenerationRequest

Request model for rerunning profile generation.

PropTypeDefaultDescription
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.

PropTypeDefaultDescription
successboolean—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).

PropTypeDefaultDescription
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.

PropTypeDefaultDescription
successboolean—Whether the operation was successful
msg?string—Additional information
profiles_generated?integer—Number of profiles generated