API 参考
用于创建智能体并通过 REST API 与其交互的公共参考。内部上下文组装、记忆管理和状态编排由平台管理,此处有意省略。
身份验证
所有 API 调用都需要使用项目 API 密钥进行 Bearer 身份验证。
Authorization: Bearer YOUR_PROJECT_API_KEYAPI Reference
/docs/en/api 页面为英文。常用术语可参考本页。
浏览完整的端点参考(包含 schema、请求/响应示例及可交互的在线调试面板),请访问 /docs/en/api。每个操作均有独立页面,内容由实时 OpenAPI spec 自动生成。
原始规范(用于 Postman、代码生成器及自定义工具)
实时 OpenAPI 3.1 JSON + YAML 公开托管,无需身份验证,每次部署后自动重新生成:
https://api.sonz.ai/docs/openapi.json
https://api.sonz.ai/docs/openapi.yamlcurl -sL https://api.sonz.ai/docs/openapi.json -o openapi.json错误格式
所有错误响应使用 RFC 7807 application/problem+json 格式,包含 type、title、status、detail 和可选的 instance 字段。
REST API
用于智能体生命周期、实时智能体交互和主动投递的公共 HTTP 端点。记忆、情绪、关系和上下文管理内部机制由平台处理。
仅限服务端。 该 API 不接受浏览器请求。对于 Web 应用,请通过后端代理。请参阅集成指南。
智能体生命周期
创建智能体
POST /api/v1/agents
创建新智能体。返回带有平台生成的 UUID 的智能体。
参数:
name(string): 智能体名称(必填)personality_prompt(string): 自定义系统提示(可选)big5(object): 大五人格评分:openness、conscientiousness、extraversion、agreeableness、neuroticism (0.0-1.0)speech_patterns(string[]): 语言模式(可选)true_interests(string[]): 智能体兴趣(可选)project_id(string): 分配智能体的项目 UUID(可选)language(string): ISO 语言代码,如 "en"(可选)
响应: { "agent_id": "uuid", "name": "...", ... }
列出智能体
GET /api/v1/agents
列出智能体。通过 project_id 查询参数筛选。
参数:
project_id(string): 按项目筛选(查询参数,可选)
响应: 智能体对象数组
获取智能体
GET /api/v1/agents/{agentId}
通过 ID 获取智能体。
响应: 包含人格、情绪、资料的智能体对象
对话
流式聊天
POST /api/v1/agents/{agentId}/chat
通过 SSE 流式传输与智能体对话。返回 Server-Sent Events。
参数:
messages(CEChatMessage[]): 对话消息user_id(string): 用户标识符
响应: 聊天完成块的 SSE 流
主动通知
列出通知
GET /api/v1/agents/{agentId}/notifications
列出待处理的主动消息。
参数:
status(string): 按状态筛选:pending | consumed(默认:pending,查询参数)user_id(string): 按用户筛选(可选,查询参数)limit(int): 最大结果数(默认:50,最大:500,查询参数)
响应: 主动消息列表,包含 message_id、agent_id、user_id、check_type、intent、generated_message、status、created_at
消费通知
POST /api/v1/agents/{agentId}/notifications/{messageId}/consume
投递后将通知标记为已消费。
响应: 确认
通知历史
GET /api/v1/agents/{agentId}/notifications/history
列出所有状态的通知。
响应: 完整通知历史
智能体生命周期(详细)
CreateAgent
创建具有人格配置的新智能体。生成人格提示、语言模式和情感倾向。
请求:
user_id(string): 所有者用户标识符agent_name(string): 智能体显示名称gender(string): "male"、"female" 或 "non_binary"bio(string): 智能体传记(可选)avatar_url(string): 头像图片 URL(可选)big5(CEBig5Scores): 大五人格评分 (0.0-1.0)language(string): 主要语言equipped_outfit(string): 初始装扮 ID(可选)skills(CESkillLevel[]): 初始技能等级(可选)model_tier(int32): LLM 模型层级(可选)project_id(string): 分配智能体的项目(可选)agent_id(string): 调用方指定的 ID,用于确定性智能体(可选)personality_prompt(string): 自定义系统提示(可选)generate_goals(bool): 创建后自动生成目标(可选)provided_goals(string[]): 直接存储这些目标(可选)speech_patterns(string[]): 语言模式(可选)true_interests(string[]): 智能体兴趣(可选)true_dislikes(string[]): 智能体不喜欢的(可选)user_display_name(string): 所有者显示名称(可选)generate_avatar(bool): 创建时自动生成 AI 头像(默认:true,消耗 1 积分)。设为 false 可跳过。
响应: agent_id (UUID)、status ('completed' 或 'in_progress')
GetAgent
检索智能体当前状态,包括人格、情绪和资料。
请求:
agent_id(string): 智能体 UUID
响应: Agent ID、name、bio、gender、avatar_url、Big5 scores、owner、created_at
UpdateAgent
更新智能体字段(名称、传记、头像、人格、兴趣、语言模式)。
请求:
agent_id(string): 智能体 UUIDname(string): 新名称(可选)bio(string): 新传记(可选)avatar_url(string): 新头像 URL(可选)big5(CEBig5Scores): 更新的 Big5 评分(可选)true_interests(string[]): 更新的兴趣(可选)true_dislikes(string[]): 更新的不喜欢的(可选)speech_patterns(string[]): 更新的语言模式(可选)personality_prompt(string): 更新的系统提示(可选)
响应: success (bool)
DeleteAgent
永久删除智能体及所有关联数据(记忆、情绪、关系)。
请求:
agent_id(string): 智能体 UUID
响应: success (bool)
RegenerateAvatar
为智能体生成或重新生成 AI 创建的头像。使用 LLM 根据人格数据创建图像提示,然后生成并上传图像。消耗 1 积分。除非禁用,头像在智能体创建时自动生成。
请求:
agent_id(string): 智能体 UUID(URL 参数)style(string): 可选的风格提示(如 'watercolor anime'、'realistic portrait')
响应: success (bool)、avatar_url (string)、prompt (string)、generation_time_ms (int64)
UpdateAgentPersonality
当您的产品有意更改智能体设计时,更新智能体的创作大五人格配置。
请求:
agent_id(string): 智能体 UUIDbig5(CEBig5Scores): 更新的大五人格评分(含置信度)
响应: success (bool)
主动行为
ScheduleWakeup
安排智能体在延迟后主动联系用户。
请求:
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符check_type(string): 检查类型:check_in、follow_up、mood_drivenintent(string): 智能体想要联系的原因delay_hours(int32): 唤醒前的延迟小时数
响应: wakeup_id (string)、scheduled_at (Timestamp)
GetPendingWakeups
检索智能体待处理的唤醒事件。
请求:
agent_id(string): 智能体 UUID
响应: PendingWakeup 列表 (wakeup_id、user_id、check_type、intent、scheduled_at)
流式对话
主要的公共对话 RPC。发送智能体、用户、应用上下文和消息历史;平台自动处理上下文组装和状态更新。
StreamChat
流式传输智能体交互的 AI 响应,同时平台在后台处理内部记忆和状态更新。
请求:
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符session_id(string): 唯一会话 IDbackend_context(BackendContext): 应用状态上下文messages(CEChatMessage[]): 对话消息continuation_token(string): 从上一个响应恢复(可选)request_type(string): "chat"、"guide" 或 "outing"capabilities(string[]): 已解锁的能力(可选)language(string): ISO 语言代码(可选)interaction_role(string): "owner" 或 "non_owner"skill_levels(map<string, int32>): 技能等级(可选)max_turns(int32): 每个请求的最大助手轮次数(可选)
响应: StreamChatEvent 流 (delta | message_boundary | complete | side_effects | error)
StreamChatEvent 是一个 oneof,包含以下事件类型:
StreamChatDelta (delta)
content(string): AI 的文本块message_index(int32): 多消息响应中的索引is_follow_up(bool): 是否为后续消息replacement(bool): 如果为 true,则替换所有之前的内容
StreamChatComplete (complete)
full_content(string): 完整响应文本finish_reason(string): "stop"、"length" 或 "content_filter"continuation_token(string): 用于继续对话的令牌message_count(int32): 响应中的消息数量
StreamChatError (error)
message(string): 错误消息code(string): 错误代码
AI 生成
平台管理的 AI 内容生成,用于传记、目标、人格、日记条目和图像。
GenerateBio
基于人格和上下文使用 AI 生成或重写智能体的传记。
请求:
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符current_bio(string): 用于重写的当前传记(可选)style(string): 风格:casual、formal、poetic 等(可选)
响应: bio (string)、tone (string)、confidence (double)
GenerateGoals
基于特质、兴趣和记忆为智能体生成人格驱动的目标。
请求:
agent_id(string): 智能体 UUIDagent_name(string): 智能体显示名称big5(CEBig5Scores): Big5 评分true_interests(string[]): 智能体兴趣true_dislikes(string[]): 智能体不喜欢的speech_patterns(string[]): 语言模式recent_memories(CERecentMemory[]): 用于上下文的近期记忆current_goals(CEGoalSummary[]): 现有目标以避免重复max_goals(int32): 最大生成目标数model_config(CEModelConfig): LLM 模型配置(可选)custom_context(map<string, string>): 应用特定上下文(可选)
响应: CEGeneratedGoal 列表 (type、title、description、priority、related_traits)、reasoning
GeneratePersonality
从模板和 Big5 评分生成语言模式和兴趣。
请求:
template_id(string): 模板标识符base_prompt(string): 基础人格提示big5(CEBig5Scores): Big5 评分agent_name(string): 智能体名称gender(string): 智能体性别
响应: speech_patterns (string[])、true_interests (string[])、used_fallback (bool)
GenerateDiary
从对话消息和/或应用事件生成日记条目。
请求:
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符date(string): YYYY-MM-DD 格式的日期agent_name(string): 智能体显示名称language(string): 生成内容的语言messages(CEDiaryMessage[]): 对话消息 (role、content、time)trigger_type(string): daily_summary、achievement、milestone、breakthroughtrigger_context(CEDiaryTriggerContext): 事件触发上下文(可选)model(string): LLM 模型覆盖(可选)temperature(double): 温度覆盖(可选)timezone(string): 日期处理的时区(可选)
响应: user_id、date、diary (title、body_lines、tags)、generation_time_ms
GenerateImage
从文本提示生成图像并存储到云存储。
请求:
prompt(string): 图像生成提示negative_prompt(string): 负面提示(可选)model(string): 使用的模型(可选)provider(string): 使用的提供商(可选)output_bucket(string): 输出 GCS 存储桶(可选)output_path(string): 存储桶中的输出路径(可选)cdn_domain(string): 公共 URL 的 CDN 域名(可选)
响应: success、image_id、gcs_uri、public_url、mime_type、generation_time_ms、error
语音与媒体
语音匹配、文本转语音、语音聊天和反思能力。
VoiceMatch
根据人格特质为智能体匹配合适的 TTS 语音。
请求:
big5(CEBig5Scores): 用于匹配的 Big5 评分preferred_gender(string): 偏好的语音性别(可选)agent_id(string): 智能体 UUID(如果不提供 big5 则自动查找)
响应: voice_id、voice_name、match_score、reasoning
TextToSpeech
使用 Google Gemini 语音进行文本转语音,具有情感上下文感知。
请求:
text(string): 要转换的文本voice_name(string): Gemini 语音名称language(string): 语言代码(可选)emotional_context(CEEmotionalContext): 情感主题和语调(可选)
响应: audio (bytes)、content_type、voice_name
VoiceChat
单轮语音聊天:转录音频、生成 AI 响应、返回 TTS 音频。
请求:
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符audio(bytes): 原始音频数据audio_format(string): 音频格式 (opus、pcm、wav)voice_name(string): TTS 语音名称continuation_token(string): 从上一轮恢复(可选)language(string): 语言代码(可选)application_id(string): 应用标识符(可选)
响应: transcript、response (text)、audio (bytes)、content_type、continuation_token、side_effects_json
ListVoices
列出可用的 Gemini TTS 语音,可选按性别筛选。
请求:
gender(string): 按性别筛选(可选)
响应: CEGeminiVoice 列表 (name、gender)
Reflect
生成关于能力解锁、里程碑或其他事件的 AI 反思。
请求:
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符reflection_type(string): "capability_unlock"、"milestone" 等capability(string): 能力名称capability_source(string): 能力来源context(string): 附加上下文字符串(可选)new_capabilities_json(bytes): 新能力 JSON(可选)session_id(string): 用于自动构建上下文的会话 ID(可选)interaction_role(string): "owner" 或 "non_owner"(默认:"owner")
响应: success (bool)、reflection (string)、side_effects_json (bytes)
流式语音聊天
具有服务端 VAD(语音活动检测)的双向流式语音聊天。客户端持续流式传输音频块;服务器处理语音检测、转录、AI 响应和 TTS。
StreamVoiceChat
双向流式传输:客户端发送初始化 + 音频块,服务器返回转录和 TTS 音频。无需手动停止按钮。
请求:
init(VoiceChatInit): 第一条消息:会话初始化audio_chunk(VoiceAudioChunk): 后续消息:原始音频数据
响应: 事件流:ready | vad | transcript | response_delta | audio | turn_complete | error
VoiceChatInit
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符audio_format(string): "opus"、"pcm"、"wav"(默认:"opus")sample_rate(int32): 采样率(Hz)(opus 默认:48000)voice_name(string): TTS 语音名称language(string): 语言代码(默认:"en")application_id(string): 应用标识符continuation_token(string): 从上一个会话恢复(可选)
VoiceAudioChunk
audio(bytes): 原始音频数据(如 Opus 帧)end_of_speech(bool): 可选的客户端 VAD 提示
服务器响应事件:
VoiceStreamReady
session_id(string): 分配的会话 ID
VoiceStreamVAD
speaking(bool): true = 语音开始,false = 语音结束
VoiceStreamTranscript
text(string): 转录文本is_final(bool): true = 此次话语的最终转录
VoiceStreamAudio
audio(bytes): 音频数据块content_type(string): 如 "audio/opus"、"audio/wav"
VoiceStreamTurnComplete
continuation_token(string): 用于继续会话的令牌side_effects_json(bytes): JSON 序列化的 AgentSideEffects(可选)
VoiceStreamError
message(string): 错误消息code(string): "vad_error"、"stt_error"、"llm_error"、"tts_error"fatal(bool): 如果为 true,应关闭会话
分析与搜索
AI 驱动的对话分析、摘要和基于搜索。
AnalyzeConversation
分析对话以提取副作用(人格变化、习惯、记忆等)。
请求:
agent_id(string): 智能体 UUIDagent_name(string): 智能体显示名称user_id(string): 用户标识符messages(CEAnalyzeConversationMessage[]): 要分析的消息 (role、content)is_final(bool): 是否为最后一批消息
响应: success、side_effects_json (bytes)、summary、latency_ms
SummarizeConversation
生成带主题提取的对话简洁摘要。
请求:
messages(CESummarizeConversationMessage[]): 消息 (role、content、time)agent_name(string): 智能体名称user_name(string): 用户显示名称max_summary_length(int32): 最大摘要长度(字符数)
响应: summary (string)、topics (string[])、message_count (int)
GenerateSearchQuery
从主题和类别生成优化的搜索查询,用于网络搜索。
请求:
topic(string): 要搜索的主题category(string): 上下文类别
响应: query (string)、context (string)
GroundedSearch
使用多个查询执行基于事实的网络搜索,返回带来源的摘要结果。
请求:
queries(string[]): 搜索查询context(string): 搜索相关性上下文agent_name(string): 用于响应框架的智能体名称
响应: CEGroundedSearchResult 列表 (query、summary、sources with title/url/snippet)
多智能体对话
智能体之间的对话,用于外出、对话和多智能体场景。
AgentDialogue
在多智能体对话上下文中生成智能体响应(如智能体之间的外出)。
请求:
agent_id(string): 智能体 UUID(响应方智能体)user_id(string): 用户标识符messages(CEChatMessage[]): 对话消息request_type(string): "outing"、"dialogue" 等scene_guidance(string): 场景特定提示引导tool_config_json(bytes): 工具配置 JSON(可选)session_id(string): 用于自动构建上下文的会话 ID(可选)interaction_role(string): "owner" 或 "non_owner"(默认:"owner")
响应: response (string)、side_effects_json (bytes)
应用事件
通知平台重要的应用事件。平台可能生成日记条目、更新目标或采取其他 AI 操作。当日记创建时触发 OnDiaryGenerated webhook。
TriggerEvent
接受应用事件(成就、里程碑、突破、完成)并触发 AI 内容生成。
请求:
agent_id(string): 智能体 UUIDuser_id(string): 用户标识符event_type(string): "achievement"、"milestone"、"breakthrough"、"level_up"event_description(string): 供 AI 使用的人类可读上下文metadata(map<string, string>): 附加上下文(achievement_id、level 等)language(string): 生成内容的语言(默认:"en")
响应: accepted (bool)、event_id (string)
知识库
项目范围的知识图谱。上传文档或通过 API 推送结构化数据——平台提取实体、构建图谱,并为智能体提供 knowledge_search 工具在对话中查询。
文档
上传文档
POST /projects/{projectId}/knowledge/documents
上传文档(带 'file' 字段的 multipart/form-data,最大 50 MB)。返回 202 及 document_id 并触发异步提取。
参数:
file(multipart): 文档文件
响应: document_id、file_name、file_size、checksum、status、gcs_path
列出文档
GET /projects/{projectId}/knowledge/documents
列出文档。查询参数:limit(默认 50,最大 200)。
响应: documents[]、total
获取文档
GET /projects/{projectId}/knowledge/documents/{docId}
获取单个文档。
响应: KBDocument 对象
删除文档
DELETE /projects/{projectId}/knowledge/documents/{docId}
删除文档。
响应: 204 No Content
事实与图谱
插入事实
POST /projects/{projectId}/knowledge/facts
向知识图谱插入实体和关系。与现有节点进行解析,创建/更新并保存版本历史。
参数:
source(string): 来源标识符(默认:'api')facts[](array): 实体:entity_type、label、propertiesrelationships[](array): 边:from_label、to_label、edge_type
响应: processed、created、updated、details[]
列出节点
GET /projects/{projectId}/knowledge/nodes
列出知识图谱节点。查询参数:type(筛选)、limit(默认 100,最大 500)。
响应: nodes[]、total
获取节点
GET /projects/{projectId}/knowledge/nodes/{nodeId}
获取节点及连接的边。查询参数:history=true 获取版本历史。
响应: node、outgoing[]、incoming[]、history[]
删除节点
DELETE /projects/{projectId}/knowledge/nodes/{nodeId}
软删除节点(设置 is_active=false)。
响应: 204 No Content
节点历史
GET /projects/{projectId}/knowledge/nodes/{nodeId}/history
获取节点版本历史。查询参数:limit(默认 50,最大 200)。
响应: history[]、total
搜索
搜索知识库
GET /projects/{projectId}/knowledge/search
带图谱遍历的全文搜索。查询参数:q(必填)、limit、history、type、filters (JSON)。
参数:
q(string): 搜索查询(必填)limit(int): 最大结果数(默认 20,最大 100)type(string): 逗号分隔的实体类型筛选filters(JSON string): 属性筛选对象history(bool): 包含版本历史
响应: query、results[](含相关节点)、total
架构
创建架构
POST /projects/{projectId}/knowledge/schemas
创建带字段和可选相似度配置的实体类型架构。
参数:
entity_type(string): 实体类型名称(必填)fields[](array): 字段定义:name、type、requireddescription(string): 架构描述similarity_config(object): match_fields[]、threshold
响应: KBEntitySchema 对象
列出架构
GET /projects/{projectId}/knowledge/schemas
列出项目的实体架构。
响应: schemas[]、total
更新架构
PUT /projects/{projectId}/knowledge/schemas/{schemaId}
更新实体架构。
参数:
entity_type(string): 更新的实体类型名称fields[](array): 更新的字段定义
响应: KBEntitySchema 对象
删除架构
DELETE /projects/{projectId}/knowledge/schemas/{schemaId}
删除实体架构。
响应: 204 No Content
统计
获取知识库统计
GET /projects/{projectId}/knowledge/stats
获取知识库统计信息(文档数量、节点数量、边数量、提取 token 数)。
响应: documents {total、indexed、pending、failed}、nodes {total、active}、edges、extraction_tokens
分析
创建分析规则
POST /projects/{projectId}/knowledge/analytics/rules
创建分析规则(推荐或趋势)。
参数:
rule_type(string): 'recommendation' 或 'trend'name(string): 规则名称config(object): 规则配置enabled(bool): 规则是否激活
响应: KBAnalyticsRule 对象
获取推荐
GET /projects/{projectId}/knowledge/analytics/recommendations
获取推荐。查询参数:rule_id、source_id(均为必填)、limit。
响应: recommendations[]、total
获取趋势
GET /projects/{projectId}/knowledge/analytics/trends
获取趋势聚合。查询参数:node_id(必填)。
响应: trends[]、total
记录反馈
POST /projects/{projectId}/knowledge/analytics/feedback
记录推荐反馈(展示/转化)。
参数:
source_node_id(string): 来源节点 IDtarget_node_id(string): 目标节点 IDrule_id(string): 分析规则 IDconverted(bool): 用户是否转化score_at_time(float): 推荐展示时的评分
响应: status: 'recorded'
用户引导
预加载用户元数据和内容,使 AI 智能体从首次对话起就"了解"用户。元数据(姓名、公司、职位)成为即时事实;内容块(文本、聊天记录)通过 LLM 提取异步处理。
引导用户
引导用户
POST /agents/{agentId}/users/{userId}/prime
使用元数据和内容引导用户。返回 202 及任务 ID;内容的 LLM 提取异步运行。
参数:
display_name(string): 用户显示名称metadata(object): company、title、email、phone、custom (map)content[](array): 内容块:type ('text'、'chat_transcript')、bodysource(string): 来源标识符(如 'crm'、'linkedin')
响应: job_id、status ('queued')、facts_created
获取引导状态
GET /agents/{agentId}/users/{userId}/prime/{jobId}
获取引导任务的状态。
响应: ImportJob 对象 (job_id、status、facts_created、error_message 等)
内容
添加内容
POST /agents/{agentId}/users/{userId}/content
添加用于异步 LLM 提取的内容块(如引导后追加聊天记录)。
参数:
content[](array): 内容块:type、bodysource(string): 来源标识符
响应: job_id、status ('queued')
元数据
获取用户元数据
GET /agents/{agentId}/users/{userId}/metadata
获取用户的引导元数据。
响应: UserPrimingMetadata 对象
更新用户元数据
PATCH /agents/{agentId}/users/{userId}/metadata
部分更新引导元数据。更新字段会自动生成新事实。
参数:
display_name(string): 更新的名称company(string): 更新的公司title(string): 更新的职位email(string): 更新的邮箱phone(string): 更新的电话custom(map): 自定义键值对(合并)
响应: metadata(已更新)、facts_created
批量导入
批量导入用户
POST /agents/{agentId}/users/import
在单个请求中导入多个用户及其元数据和内容。元数据事实同步创建;内容提取异步运行。
参数:
users[](array): {user_id、display_name、metadata、content[]} 数组source(string): 来源标识符
响应: job_id、status ('queued')、total_users、facts_created
获取导入状态
GET /agents/{agentId}/users/import/{jobId}
获取批量导入任务的状态。
响应: ImportJob 对象
列出导入任务
GET /agents/{agentId}/users/imports
列出智能体最近的导入任务。查询参数:limit(默认 20)。
响应: jobs[]、count
共享类型
BackendContext
custom_fields(map<string, string>): 传递到提示的任意应用特定键值对state_json(bytes): 可选的结构化状态 JSON(透传到提示)
CEBig5Scores
openness(double): 经验开放性 (0.0-1.0)conscientiousness(double): 组织性和纪律性 (0.0-1.0)extraversion(double): 社交能量和热情 (0.0-1.0)agreeableness(double): 温暖和合作性 (0.0-1.0)neuroticism(double): 情绪敏感性 (0.0-1.0)confidence(double): 评估置信度 (0.0-1.0)
BFASFacets
从 Big5 分数推导。在人格档案响应中为只读。
intellect(double): Openness 方面 — 知识好奇心 (0.0-1.0)aesthetic(double): Openness 方面 — 美学敏感度 (0.0-1.0)industriousness(double): Conscientiousness 方面 — 自律性 (0.0-1.0)orderliness(double): Conscientiousness 方面 — 对秩序的偏好 (0.0-1.0)enthusiasm(double): Extraversion 方面 — 积极情绪 (0.0-1.0)assertiveness(double): Extraversion 方面 — 社交主导性 (0.0-1.0)compassion(double): Agreeableness 方面 — 共情 (0.0-1.0)politeness(double): Agreeableness 方面 — 对他人的尊重 (0.0-1.0)withdrawal(double): Neuroticism 方面 — 退缩倾向 (0.0-1.0)volatility(double): Neuroticism 方面 — 情绪不稳定性 (0.0-1.0)
BehavioralTraits
从人格推导。在人格档案响应中为只读。
response_length(string): 智能体回复的冗长或简洁程度question_frequency(string): 智能体提出后续问题的频率empathy_style(string): 情感支持方式(认同型、解决方案型等)conflict_approach(string): 处理分歧的方式(顺应型、直接型、调解型等)
MoodState
valence(double): 愉悦/不悦光谱 (0-100)arousal(double): 激活/能量水平 (0-100)tension(double): 压力/平静状态 (0-100)affiliation(double): 社交温暖/亲密度 (0-100)
CEChatMessage
role(string): "user" 或 "assistant"content(string): 消息文本timestamp(Timestamp): 消息发送时间
MemoryCandidate
content(string): 记忆内容文本fact_type(string): preference、commitment、fact、experience、correctionimportance(double): 重要性评分 (0.0-1.0)entities(string[]): 相关实体
Habit
name(string): 习惯名称category(string): 习惯类别strength(double): 当前强度 (0.0-1.0)last_observed(Timestamp): 最后观察时间is_formed(bool): 习惯是否已完全形成
CEGoal
id(string): 目标标识符description(string): 目标描述status(string): "active"、"completed"、"abandoned"priority(string): 优先级related_traits(string[]): 相关人格特质created_at(Timestamp): 目标创建时间
Interest
topic(string): 兴趣主题category(string): 兴趣类别confidence(double): 检测置信度 (0.0-1.0)discovered_at(Timestamp): 兴趣发现时间research_status(string): "pending" 或 "researched"
CEModelConfig
provider(string): LLM 提供商名称model(string): 模型标识符temperature(double): 采样温度max_tokens(int32): 最大生成 token 数
ProactiveMessage
message_id(string): 唯一消息标识符agent_id(string): 生成消息的智能体user_id(string): 目标用户wakeup_id(string): 关联的唤醒事件check_type(string): 检查类型 (check_in、follow_up、mood_driven)intent(string): 智能体想要联系的原因generated_message(string): 实际消息文本status(string): pending、consumed、expired、failed_generationcreated_at(Timestamp): 生成时间