Logo Using Elicitations

Using Elicitations

Tổ chức
friday-platform
using-elicitations

Asks the user mid-run from inside an FSM action or Python `type: user` agent via the elicitation tools — `request_tool_access` for allowlist approvals and `request_human_input` for HITL (human-in-the-loop) decisions, approvals, confirmations, and disambiguation. Use when a job needs the user to choose, approve, or supply input before the action can continue. Covers simple multiple choice, nested per-item choice, prompt formatting, and how to consume the answer.

Tổng quan

Nhà phát hànhfriday-platform
Kho mãfriday-studio
Tên kỹ năngusing-elicitations
Sao
102
Bản fork
5
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được friday-platform công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Using Elicitations trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/using-elicitations
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/friday-platform/friday-studio.git /tmp/friday-studio
mkdir -p .claude/skills
cp -r /tmp/friday-studio/packages/system/skills/using-elicitations .claude/skills/using-elicitations
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Using Elicitations trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Using Elicitations ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Using Elicitations với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Using elicitations

Elicitations pause a running FSM action (or Python type: user agent), surface a prompt to the user in the Activity feed, and resume the same tool call with the user's answer. Two tools, one mechanism.

  • request_tool_access(toolName, reason) — ask for permission to call a tool not in the action's allowlist. Fixed options: Allow once, Allow always, Deny.
  • request_human_input(question, options?) — ask the user a question. Flat options for simple choice, free-form text when options omitted, or grouped per-item options for nested choice.

Both tools block until the user answers, declines, or the elicitation expires. The terminal answer comes back as the tool's return value, and the action continues from there in the same run.

Choosing between them

NeedTool
Permission to call a tool you don't haverequest_tool_access
A user decision between alternativesrequest_human_input (with options)
Free-form user textrequest_human_input (no options)
Approval before a destructive side effectrequest_human_input with [Confirm, Cancel]
One choice for each of several itemsrequest_human_input with grouped options

Never substitute a prose menu for request_human_input. An outputTo action that prints choices and waits for a future user message will fail — the action only resumes through the elicitation answer envelope.

Formatting the question

The question field renders as plain text with whitespace preserved. The UI does not parse markdown.

  • No **bold**, no # headings, no - bullets, no fenced code. They render literally.
  • Lead with a short top-level title and a one-line description of what the user is choosing.
  • Keep the question itself terse — the action's verbose context belongs in the action's prose output, not the prompt body.
  • Newlines are preserved; use them to separate sections, never markdown.

Bad — markdown that renders as raw characters:

**Pick an action:**
- Archive
- Keep

Good — plain text, short intro, options carry the choice copy:

Pick an action for this receipt.

Simple multiple choice

One question, one answer. Flat options array, each { label, value }. label is shown to the user; value is what the agent receives back.

json
{
  "question": "Send the invoice now?",
  "options": [
    { "label": "Send now", "value": "send" },
    { "label": "Save as draft", "value": "draft" },
    { "label": "Cancel", "value": "cancel" }
  ]
}

The answer comes back as { status: "answered", answer: "send" }. Branch on answer and continue. On status: "declined" or "expired", stop safely and explain what was blocked.

Do not pass multi_select, default, required, or any other fields — the schema rejects them. For multiple independent selections, use grouped nested choice below.

Nested multiple choice — one decision per item

When the user must pick one action for each of several items (the inbox-triage shape), encode the item index in both label and value. The UI groups the options into one choice set per item and returns the selected values as a JSON-array answer string.

Question body — short intro, then numbered items with detail lines:

Review your inbox — select an action for each email.

[1] Subject: Your receipt
    From: billing@example.com
    Date: May 7, 2026
    Preview: Monthly subscription paid

[2] Subject: Meetup reminder
    From: events@example.com
    Date: May 7, 2026
    Preview: Quarterly community meetup tomorrow

Detail line keys the parser recognises: Subject:, From:, Date:, Preview:. Use them — the UI lifts those values into the per-item header. Anything else under a [N] block is shown as supporting text.

Options — one entry per (item, action). label is [N] ActionLabel — Title. value is N:action:

json
{
  "label": "[1] Archive — Receipt",
  "value": "1:archive"
}

A full grouped call:

json
{
  "question": "Review your inbox — select an action for each email.\n\n[1] Subject: ...\n[2] Subject: ...",
  "options": [
    { "label": "[1] Archive — Receipt", "value": "1:archive" },
    { "label": "[1] Keep — Receipt", "value": "1:keep" },
    { "label": "[1] Delete — Receipt", "value": "1:delete" },
    { "label": "[2] Archive — Meetup reminder", "value": "2:archive" },
    { "label": "[2] Keep — Meetup reminder", "value": "2:keep" },
    { "label": "[2] Delete — Meetup reminder", "value": "2:delete" }
  ]
}

Requirements for the grouping to fire:

  • At least two items ([1], [2]).
  • At least two actions per item.
  • Every option value is N:action where N matches an item index in the question.
  • Every option label starts with [N] matching the same index.

If any constraint fails, the UI falls back to a flat radio list of all options — usable, but the per-item structure is lost.

The answer comes back in answer.value as a JSON array string:

"[\"1:archive\",\"2:keep\"]"

Parse it before acting:

ts
const picks: string[] = JSON.parse(answer.value);
for (const pick of picks) {
  const [idx, action] = pick.split(":");
  // dispatch (idx, action)
}

Optional per-item comments arrive in answer.note as [N] free text. Treat as advisory context, not as a parallel command stream.

When per-item input is complex (free-form text, multiple fields), ask one item at a time instead of flattening. The grouped contract is for one choice per item, nothing more.

Handling tool-access requests

request_tool_access(toolName, reason) returns one of:

reasongrantedWhat it means
bypasstrueWorkspace/daemon has dangerouslySkipAllowlist; proceed silently
persistent_allowtrueThe user previously chose Allow always for this tool
answeredtrue/falseUser picked Allow once / Allow always / Deny
pending_user_approvalfalseElicitation created but not yet answered (rare — usually you wait)
declinedfalseUser declined
expiredfalseElicitation TTL elapsed
unknown_toolfalsetoolName not in the runtime catalog — do not retry

Rules:

  • Only request access to tools you know exist. If you don't know the name, call list_capabilities or list_mcp_tools first. An unknown_tool response means stop guessing.
  • The reason field is shown to the user verbatim. Make it specific to the moment ("Need fs_write_file to save the patch we just drafted"), not generic ("Need write access").
  • On granted: true, continue in the same action and finish normally.
  • On granted: false, do not retry the underlying tool. Acknowledge what was blocked and either route around it or stop safely.

Authoring rule: only declare request_tool_access on actions that can produce a useful denial outcome (partial result, clear explanation). Don't list it as a generic escape hatch.

Handling human-input answers

request_human_input blocks until terminal, then returns:

ts
{
  ok: boolean,
  status: "answered" | "declined" | "expired",
  elicitationId: string,
  answer?: string,
  note?: string,
}
  • status: "answered" → branch on answer. For grouped prompts, JSON.parse(answer) first.
  • status: "declined" or "expired" → halt the side effect, summarise what was skipped, and finish the action without faking the answer.

Python type: user agents call the same primitive through ctx.tools.call("request_human_input", {"question": ..., "options": [...]}) with the same return shape.

Lifecycle and timeouts

  • Elicitation TTL inherits the parent job's config.timeout (override per-job with jobs.<name>.elicitations.timeout). Default is 30 minutes.
  • The same (question, options, sessionId, actionId) re-uses any still-pending elicitation rather than creating a duplicate. Accidental retries are idempotent.
  • Expired prompts move to a read-only Activity log entry; the user cannot answer them retroactively, and acting on one does not reify the timed-out job.

Gotchas

  • The question field renders plain — markdown becomes literal characters. Use newlines and short prose, not formatting tokens.
  • options is flat. There is no multi_select, no default, no nested option objects. Encode item grouping in label/value strings.
  • Grouped options need at least two items and at least two actions per item or the UI falls back to a flat list.
  • request_tool_access is for permission, not for asking the user what tool to use. If the underlying problem is "which provider", that is a request_human_input question with options like [Gmail, Outlook], not a tool-access request.
  • An outputTo LLM action must complete in one execution. Without request_human_input, the action cannot wait for a user reply — the run will end without the answer.
  • Don't call request_human_input with no options when you actually expect a fixed choice. Either provide options (so the UI renders buttons) or expect free-form text — pick one.
  • Per-item comments in answer.note are advisory. Do not parse them for primary commands — those go in answer.value.

Câu hỏi thường gặp

Kỹ năng AI Using Elicitations làm được gì?

Asks the user mid-run from inside an FSM action or Python `type: user` agent via the elicitation tools — `request_tool_access` for allowlist approvals and `request_human_input` for HITL (human-in-the-loop) decisions, approvals, confirmations, and disambiguation. Use when a job needs the user to choose, approve, or supply input before the action can continue. Covers simple multiple choice, nested per-item choice, prompt formatting, and how to consume the answer.

Vì sao nên dùng Using Elicitations trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Using Elicitations là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Using Elicitations trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/using-elicitations. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Using Elicitations?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Using Elicitations với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Using Elicitations với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Using Elicitations có miễn phí không?

Kỹ năng này được friday-platform phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇