agents
Skill này làm gì
Skill này hướng dẫn xây dựng một agent AI đã lưu trong Windmill, một trợ lý có thể tái sử dụng để bạn trò chuyện, chạy từ một biểu mẫu hoặc liên kết từ một flow. Nó dành cho người thiết lập trợ lý AI trong Windmill.
Khi nào nên dùng
- ✓Khi bạn muốn một trợ lý độc lập để trò chuyện hoặc tái sử dụng trong Windmill.
- ✓Khi bạn cần cấp cho agent system prompt, công cụ và cài đặt bộ nhớ riêng.
- ✓Khi một bước flow nên liên kết đến một agent đã lưu thay vì xây lại cùng logic.
Liên kết skill
https://github.com/windmill-labs/windmill/blob/main/system_prompts/auto-generated/skills/agents/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Giúp tôi tạo một trợ lý hỗ trợ có thể tái sử dụng trong Windmill, trả lời câu hỏi từ tài liệu sản phẩm của chúng tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill mô tả agent như một file tài nguyên giữ model AI đã chọn, hướng dẫn, bộ nhớ và công cụ, nên có thể tái sử dụng ở nhiều nơi.
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.
Windmill AI Agents
An agent, as the Agents page lists it, is a saved LLM with its own system prompt, tools and
memory, stored as a resource of type ai_agent. It is built once and used in several places: it is
run from its own page (a chat, or a run form), a flow's AI agent step links to it by path, and it
can be shared in Slack channels from its page. Build a standalone agent when the user wants an
assistant they talk to or reuse. Build a flow when the agent is one step of a larger process.
File Format
An agent is a resource file like any other, {path}.resource.yaml (or .resource.json), with
resource_type: ai_agent.
Structure
{
"resource_type": "ai_agent",
"description": "Answers support questions from the product docs",
"value": {
"provider": { "kind": "openai", "resource": "$res:f/ai_providers/openai", "model": "gpt-4o" },
"system_prompt": "You are the support assistant for Acme. Answer from the docs; say so when they don't cover a question.",
"memory": { "kind": "compaction" },
"output_type": "text",
"tools": [
{
"id": "search_docs",
"summary": "search_documentation",
"description": "Search the product documentation. Use it whenever the user asks how a feature works.",
"value": {
"tool_type": "flowmodule",
"type": "script",
"path": "f/support/search_docs",
"input_transforms": {
"query": { "type": "ai" },
"index": { "type": "static", "value": "product_docs" }
}
}
}
]
}
}
The agent's own settings are plain values, not the input_transforms an agent step in a flow uses:
each is fixed when the agent is saved. Only a tool's arguments keep input_transforms (see Tools). $res: and $var: references inside it are resolved at run time.
provider(required):{ "kind", "resource": "$res:<path>", "model" }, plus an optionalreasoning_effort.resourcenames the workspace's AI provider resource of that kindsystem_prompt: how the agent behaves. Write it for the agent's job: who it serves, what it may do with its tools, and what it should refuse or hand backmemory: what lets the agent see earlier turns.{ "kind": "compaction" }keeps the whole conversation, summarizing its older part as it nears the model's context window; it is what a new agent starts with on its page.{ "kind": "off" }makes every run start from nothing, right for an agent that handles one request per runoutput_type:text(default) orimage. Image output ignores tools and needs S3 storage on the workspaceoutput_schema: a JSON schema the answer must follow, for an agent whose output a program readsmax_iterations: how many model and tool rounds a run may take, 1 to 1000 (default 10)streaming(default on),temperature,max_completion_tokens: as their names sayrun_on_behalf_of: runs from the agent's page take the identity the agent was deployed with rather than the caller's, so people can use it without access to what its tools touch.slack_anyonelets anyone in the Slack channels it is shared in ask it, and is kept only withrun_on_behalf_of. Set either only when the user asks: both widen who acts with the deployer's rightson_behalf_ofis the identity itself. Deploying sets it, so never write it
Tools
tools takes the same entries as a flow's AI agent step. value.tool_type is flowmodule for a
script or inline script the agent calls (or a nested agent or AI decision), mcp for an MCP server
({ "tool_type": "mcp", "resource_path": "$res:<path>", "include_tools": [], "exclude_tools": [] }),
or websearch for web search ({ "tool_type": "websearch" }, summary Web Search).
- Write logic made for this agent as an inline
rawscripttool, as a flow writes its steps. Point ascripttool at a deployed script (path) only when one already does the job: a run calls the deployed version, so a script that exists only as a draft fails the run. An inline tool'svalueis a flow's rawscript step:{ "tool_type": "flowmodule", "type": "rawscript", "language": "bun", "content": "export async function main(query: string) { ... }", "input_transforms": { "query": { "type": "ai" } } } - A flow cannot be a tool: a run offered one fails with
Unsupported tool. Wrap it in a script that runs the flow - A flowmodule tool's
summaryis the name the agent calls it by: letters, num
Câu hỏi thường gặp
Nên xây dựng agent hay flow?
Xây agent độc lập khi bạn muốn một trợ lý để trò chuyện hoặc tái sử dụng. Xây flow khi agent chỉ là một bước trong quy trình lớn hơn.
Agent được lưu ở đâu?
Nó được lưu dưới dạng file tài nguyên với loại tài nguyên ai_agent, cạnh các file khác trong workspace.
Agent có dùng được công cụ không?
Có. Bạn có thể cấp cho agent các công cụ như script mà nó có thể gọi, mỗi công cụ kèm mô tả ngắn về thời điểm dùng.
Chi tiết
Mô tả gốc của tác giả
MUST use when creating or changing an AI agent, the reusable `ai_agent` resource the Agents page lists.
repo: windmill-labs/windmill
Độ phổ biến
- Sao GitHub
- 18k
- Vị trí xếp hạng
- #10627
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
commit
18kGiúp agent của bạn viết commit message git gọn một dòng theo định dạng quy ước, chỉ stage những file đã thay đổi.
pr
18kGiúp agent của bạn mở một pull request nháp trên GitHub với tiêu đề và mô tả rõ ràng, rồi theo dõi các vòng review.
cli-commands
18kGiúp agent của bạn chạy công cụ dòng lệnh Windmill để quản lý script, flow, app và lịch sử job.
datatables
18kGiúp agent của bạn thay đổi bảng dữ liệu Windmill an toàn, dùng migration có phiên bản, bước hoàn tác và quyền truy cập đúng.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.