Chuyển đến nội dung
Skillpedia
Agent7.6k · #13154

delegate-to-agent

Skill này làm gì

Skill này giải thích cách một nút hoặc quy trình trong ứng dụng nên chuyển công việc AI cho khung chat agent. Các hành động xác định vẫn ở trong ứng dụng, còn agent xử lý suy luận và các tác vụ nhiều bước. Skill dành cho lập trình viên thêm tính năng AI vào ứng dụng.

Khi nào nên dùng

  • ✓Khi bạn thêm một nút cần suy luận, nghiên cứu hoặc sinh nội dung bằng AI.
  • ✓Khi một quy trình có nhiều bước mà người dùng nên theo dõi và điều hướng được.
  • ✓Khi một hành động tiếp theo nên được agent xử lý trong chat.

Liên kết skill

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/delegate-to-agent/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/delegate-to-agent/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể làm cho nút Tóm tắt trong ứng dụng gửi tài liệu sang khung chat agent để tôi theo dõi bản tóm tắt không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Ứng dụng gửi yêu cầu của người dùng tới khung chat agent, kèm một đoạn ngữ cảnh hỗ trợ ngắn, rồi mở thanh bên để công việc hiển thị. Agent đọc dữ liệu riêng tư qua các action được ủy quyền của ứng dụng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Delegate AI Work to Agent Chat

Rule

Use the agent chat for work that needs AI reasoning, research, generation, or multi-step decisions. Keep app actions deterministic; let the agent orchestrate them so the user can see and steer the work.

Start a visible agent turn

Call sendToAgentChat() from the UI and open the AgentSidebar for user-initiated work:

import { sendToAgentChat } from "@agent-native/core/client/agent-chat";

sendToAgentChat({
  message: userRequest,
  context: JSON.stringify({ documentId }),
  submit: true,
  openSidebar: true,
});

Keep the user's request in message. Put only concise supporting context—such as a selected record id, current view, or bounded excerpt—in context. Use attachments or image fields for files and visuals; do not serialize full records or credentials into a prompt. The agent should read private or large data through the app's authorized actions.

Use submit: true when a clear user action already states the intent. Use submit: false to open the composer with a prefill when the user should review or complete the request. Do not auto-submit a generic generation prompt before the user has supplied the request.

Reserve background: true with openSidebar: false for work the product intentionally runs silently, such as a system-initiated task. A button that asks the user to do AI work should open the sidebar.

Keep the boundary clear

  • Use focused actions for provider reads, validation, deterministic transformations, database writes, and other explicit operations.
  • Let the agent choose and sequence those actions for AI-shaped workflows.
  • Keep a user's freeform prompt in the AgentSidebar composer. Use controls for structured parameters; do not add a second prompt or follow-up textbox.
  • Do not call model-provider SDKs, completeText(), or AI SDK generation functions from app UI, actions, or server helpers. Do not make an action a hidden second agent.

Related skills

  • actions — define deterministic operations shared by the UI and agent.
  • context-awareness — provide navigation and selected-record context.
Câu hỏi thường gặp

Mọi nút AI có nên tự gửi không?

Không. Skill nói chỉ tự gửi khi hành động của người dùng thể hiện rõ ý định.

Bản ghi lớn có nên được đưa vào tin nhắn không?

Không. Skill nói chỉ gửi ngữ cảnh ngắn gọn và để agent đọc dữ liệu qua các action được ủy quyền.

Khi nào được phép làm việc nền?

Chỉ cho các tác vụ do hệ thống khởi động mà sản phẩm chạy có chủ đích, không dành cho nút mà người dùng nhấn.

Chi tiết

Mô tả gốc của tác giả

Route user-facing AI work through the app's agent chat. Use when adding an AI-powered button, workflow, research task, generation flow, or follow-up.

repo: BuilderIO/agent-native

Độ phổ biến

Sao GitHub
7.6k
Vị trí xếp hạng
#13154
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự