Faces Skill
You have access to the faces CLI. Use it to fulfill any Faces Platform request.
Always use --json when you need to extract values from command output.
Current config
! INLINECODE2
Setup
Verify credentials: faces auth:whoami. If no credentials exist, see references/AUTH.md for registration (requires human payment step) and login.
Install (if faces command not found): INLINECODE5
INLINECODE6 and faces keys:* require JWT. Everything else accepts JWT or API key.
Plans
Two plans: Free ($5 minimum initial spend, pay-per-token with 5% markup on all usage including compilation) and Connect ($17/month, 100k compile tokens/month, free passthrough to OpenAI Codex for users with a ChatGPT subscription). See references/AUTH.md for details.
Core workflow
- 1. Create a Face with basic facts and a default model: INLINECODE8
- Compile source material in one step: INLINECODE9
- This creates the document, runs LLM extraction with real-time chunk progress, and syncs automatically
- Repeat for each source document
- 3. Chat through the Face:
faces chat:chat slug -m "message" (auto-routes to the correct API based on model provider) - Compare Faces:
faces face:diff or INLINECODE12 - Compose new Faces from boolean formulas: INLINECODE13
Note: compile:doc handles the full create → compile pipeline. For an already-created document, use compile:doc:make <doc_id>. Threads use a separate workflow: compile:thread:make (same fire-and-forget pattern as documents).
Boolean operators: | (union), & (intersection), - (difference), ^ (symmetric difference). Parentheses supported: (a | b) - c.
Common tasks
Create a face with attributes
When creating a Face, set basic demographic facts with --attr KEY=VALUE (repeatable). Common keys: gender, age, location, occupation, education_level, religion, ethnicity, nationality, marital_status. Unrecognized keys are silently ignored — see references/ATTRIBUTES.md for the complete list of accepted keys.
CODEBLOCK0
You can also add or update attributes and set the default model on an existing Face:
CODEBLOCK1
Compile a document into a face
CODEBLOCK2
Upload a file (PDF, audio, video, text)
CODEBLOCK3
Thread transcript format
Text files uploaded as threads must use Speaker Name: message format, one turn per line:
CODEBLOCK4
Use --face-speaker to specify which speaker IS the face (maps to role=user). All other speakers become role=assistant. If omitted, the first speaker is assumed to be the face.
Audio/video files with --kind thread are transcribed with speaker diarization — speaker labels are assigned automatically (Speaker A, Speaker B, etc.). Use --face-speaker A to map the correct speaker to the face.
Import a YouTube video
CODEBLOCK5
If --type thread fails with a 422, retry with --type document.
Create a composite face
CODEBLOCK6
Composite faces are live: sync new knowledge into any component and the composite updates automatically. Components must be concrete (compiled) faces you own.
Compare faces
CODEBLOCK7
Chat
INLINECODE40 auto-routes to the correct API endpoint based on model provider (Anthropic → /v1/messages, OpenAI/others → /v1/chat/completions). If the face has a default_model set, no --llm flag is needed.
CODEBLOCK8
Face templates
Use ${face-username} in any message to reference another face's profile inline. The token is replaced with the face's display name and the profile is injected as context. A bare model name (no face prefix) skips the persona and lets you reference all faces via templates.
CODEBLOCK9
See references/TEMPLATES.md for full details and rules.
Billing and API keys
CODEBLOCK10
Common errors
- -
faces: command not found — Run npm install -g faces-cli. 401 Unauthorized — Credentials missing or expired. Run faces auth:login or check FACES_API_KEY.compile:doc:make returns "preparing" — Compilation is async. Poll with faces compile:doc:get <doc_id> --json | jq -r '.prepare_status' until status is synced.422 on thread import — No speaker segments detected. Retry with --type document.face:diff or face:neighbors returns null components — The face hasn't been compiled yet. Run faces compile:doc <face_id> --file ... first.
References
Faces 技能
你可以使用 faces 命令行工具。请用它来完成任何 Faces 平台请求。
当你需要从命令输出中提取值时,始终使用 --json。
当前配置
!faces config:show 2>/dev/null || echo (未保存配置)
设置
验证凭证:faces auth:whoami。如果不存在凭证,请参阅 references/AUTH.md 了解注册(需要人工支付步骤)和登录。
安装(如果找不到 faces 命令):npm install -g faces-cli
faces auth: 和 faces keys: 需要 JWT。其他所有命令接受 JWT 或 API 密钥。
套餐
两种套餐:免费版(最低初始消费 5 美元,按 token 付费,所有使用包括编译加价 5%)和 连接版(17 美元/月,每月 10 万编译 token,为拥有 ChatGPT 订阅的用户提供免费直通 OpenAI Codex)。详见 references/AUTH.md。
核心工作流程
- 1. 使用基本事实和默认模型创建 Face:faces face:create --name 名称 --username 别名 --default-model gpt-5-nano --attr gender=male --attr age=34 --attr location=Portland, OR --attr occupation=nurse practitioner
- 一步编译源材料: faces compile:doc 别名 --file document.txt
- 这会创建文档,运行带实时分块进度的 LLM 提取,并自动同步
- 对每个源文档重复此操作
- 3. 通过 Face 聊天:faces chat:chat 别名 -m 消息(根据模型提供商自动路由到正确的 API)
- 比较 Faces:faces face:diff 或 faces face:neighbors
- 从布尔公式组合新的 Faces:faces face:create --formula a | b
注意: compile:doc 处理完整的创建→编译流程。对于已创建的文档,使用 compile:doc:make <文档ID>。线程使用单独的工作流程:compile:thread:make(与文档相同的即发即弃模式)。
布尔运算符:|(并集)、&(交集)、-(差集)、^(对称差集)。支持括号:(a | b) - c。
常见任务
创建带属性的 Face
创建 Face 时,使用 --attr 键=值(可重复)设置基本人口统计事实。常见键:gender、age、location、occupation、educationlevel、religion、ethnicity、nationality、maritalstatus。无法识别的键会被静默忽略——请参阅 references/ATTRIBUTES.md 获取完整的可接受键列表。
bash
faces face:create --name Marcus Rivera --username marcus \
--default-model gpt-5-nano \
--attr gender=male --attr age=34 \
--attr location=Portland, OR \
--attr occupation=nurse practitioner \
--attr education_level=masters degree \
--attr marital_status=married
你也可以在现有 Face 上添加或更新属性并设置默认模型:
bash
faces face:update marcus --attr religion=Catholic --attr ethnicity=Mexican American
faces face:update marcus --default-model claude-sonnet-4-6
将文档编译到 Face 中
bash
推荐:带进度的一步编译
faces compile:doc
--file notes.txt --label 笔记
替代方案:先创建再单独编译
DOCID=$(faces compile:doc:create id> --label 笔记 --file notes.txt --json | jq -r .document_id)
faces compile:doc:make $DOC_ID
上传文件(PDF、音频、视频、文本)
bash
作为文档上传——然后编译
DOCID=$(faces face:upload id> --file report.pdf --kind document --json | jq -r .document_id // .id)
faces compile:doc:make $DOC_ID
作为线程上传——使用 make 编译
THREADID=$(faces face:upload id> --file transcript.txt --kind thread --face-speaker Troy --json | jq -r .thread_id // .id)
faces compile:thread:make $THREAD_ID
线程转录格式
作为线程上传的文本文件必须使用说话者名称:消息格式,每行一个轮次:
Interviewer: 请介绍一下你自己。
Troy: 我是一位住在巴黎乡村的发明家。
Interviewer: 是什么驱动着你的工作?
Troy: 我相信技术应该服务于人类的繁荣。
使用 --face-speaker 指定哪个说话者是该 Face(映射到 role=user)。所有其他说话者变为 role=assistant。如果省略,则假定第一个说话者是该 Face。
带有 --kind thread 的音频/视频文件会进行带说话者分离的转录——说话者标签会自动分配(说话者 A、说话者 B 等)。使用 --face-speaker A 将正确的说话者映射到该 Face。
导入 YouTube 视频
bash
单人演讲/独白 → 文档
IMPORT=$(faces compile:import \
--url https://www.youtube.com/watch?v=VIDEO_ID \
--type document --perspective first-person --json)
DOCID=$(echo $IMPORT | jq -r .documentid // .doc_id // .id)
faces compile:doc:make $DOC_ID
多人对话 → 线程
IMPORT=$(faces compile:import \
--url https://youtu.be/VIDEO_ID \
--type thread --face-speaker A --json)
THREADID=$(echo $IMPORT | jq -r .threadid // .id)
faces compile:thread:make $THREAD_ID
如果 --type thread 返回 422 错误,请使用 --type document 重试。
创建组合 Face
bash
faces face:create --name 现实主义者 --username the-realist \
--formula the-optimist | the-pessimist
像其他 Face 一样通过它聊天
faces chat:chat the-realist -m 你如何看待风险?
组合 Face 是实时的:将新知识同步到任何组件中,组合 Face 会自动更新。组件必须是您拥有的具体(已编译的)Face。
比较 Faces
bash
faces face:diff --face aria --face marco --face jin
faces face:neighbors aria --k 3
faces face:neighbors aria --component beta --direction furthest --k 5
聊天
chat:chat 根据模型提供商自动路由到正确的 API 端点(Anthropic → /v1/messages,OpenAI/其他 → /v1/chat/completions)。如果 Face 设置了 default_model,则不需要 --llm 标志。
bash
使用 Face 的默认模型(如果设置了 default_model,则不需要 --llm)
faces chat:chat 别名 -m 消息
使用特定模型覆盖
faces chat:chat 别名 --llm claude-sonnet-4-6 -m 消息
faces chat:chat 别名 --llm gpt-4o-mini -m 消息
显式使用 OpenAI Responses API
faces chat:chat 别名 --llm gpt-4o -m 消息 --responses
Face 模板
在任何消息中使用 ${face-username} 来内联引用另一个 Face 的个人资料。该 token 会被替换为 Face 的显示名称,并且个人资料会被注入为上下文。裸模型名称(无 face 前缀)会跳过角色,让你通过模板引用所有 Faces。
bash
faces chat:chat alice --llm gpt-4o-mini -m 你正在与${bob}辩论。请阐述你的立场。
faces chat:chat gpt-4o-mini -m 比较${alice}和${bob}的世界观。
详见 references/TEMPLATES.md 了解完整详情和规则。
计费和 API 密钥
bash
faces billing:balance --json
faces billing:subscription --json
faces keys:create --name 合作伙伴密钥 --face 别名 --budget 10.00 --expires-days 30
常见错误
- - faces: command not found — 运行 npm install -g faces-cli。
- 401 Unauthorized — 凭证缺失或已过期。运行 faces auth:login 或检查 FACESAPIKEY。