用途:通过 ibl.ai 平台 API 读取和写入智能体的核心设置,适合配置智能体的基本身份与能力。
主要能力:可读写身份信息(名称、描述、分类、头像)、可见性与发现设置,以及能力开关(匿名访问、精选、LTI、附件、语音、记忆、多查询 RAG、可复制等)。设置统一通过 settings/ 端点保存,另支持复制(fork)与删除智能体。
使用方式:基础地址为 https://api.iblai.app,每个请求需带请求头 Authorization: Api-Token $IBLAI_API_KEY。路径变量中 {org} 为 $IBLAI_ORG,{username} 为 $IBLAI_USERNAME,{mentor} 为智能体唯一 id。未连接时先运行 /iblai-api-login 以填充 IBLAI_ORG、IBLAI_USERNAME、IBLAI_API_KEY。
读取:GET …/mentor/categories/ 获取分类选项;GET …/mentors/{mentor}/settings/ 加载当前字段值;GET …/mentors/{mentor}/claw-config/ 检测沙箱接线(404 表示未连接)。
写入:PUT …/users/{username}/mentors/{mentor}/settings/ 更新设置,使用 multipart/form-data,只发送变更字段,字段包括 mentor_name、mentor_description、categories、uploaded_profile_image、mentor_visibility、allow_anonymous、is_featured、is_lti_accessible、show_attachment、show_voice_call、show_voice_record、enable_claw、enable_memory_component、enable_multi_query_rag、forkable。复制用 POST …/mentors/{mentor}/fork/,需 new_mentor_name 与 destination_platform_key,可选 clone_documents。删除用 DELETE …/users/{username}/{mentor}/,无请求体。
限制:PUT 中未包含的字段保持不变,不要重发整个对象;categories 需传分类端点返回的数字 id 而非名称;删除与复制按 {username} 作用域,设置读写使用 users/{username}/mentors/{mentor}/ 路径;删除为破坏性操作,需先与用户确认。