跳到正文
Skillpedia
智能体18k · #10627

agents

它能做什么

这个技能指导在 Windmill 中构建一个保存下来的 AI 智能体,它是可复用的助手,你可以与它对话、通过表单运行它,或从流程中链接到它。适合在 Windmill 中设置 AI 助手的人。

适用场景

  • ✓当你想要一个可以在 Windmill 中对话或复用的独立助手时。
  • ✓当你需要为智能体设置它自己的系统提示词、工具和记忆设置时。
  • ✓当某个流程步骤应当链接到已保存的智能体,而不是重新构建相同的逻辑时。

技能链接

https://github.com/windmill-labs/windmill/blob/main/system_prompts/auto-generated/skills/agents/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/windmill-labs/windmill/blob/main/system_prompts/auto-generated/skills/agents/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我在 Windmill 中创建一个可复用的客服助手,让它根据我们的产品文档回答问题。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能把智能体描述为一个资源文件,其中保存了所选的 AI 模型、指令、记忆和工具,因此它可以在多个地方复用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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 optional reasoning_effort. resource names the workspace's AI provider resource of that kind
  • system_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 back
  • memory: 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 run
  • output_type: text (default) or image. Image output ignores tools and needs S3 storage on the workspace
  • output_schema: a JSON schema the answer must follow, for an agent whose output a program reads
  • max_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 say
  • run_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_anyone lets anyone in the Slack channels it is shared in ask it, and is kept only with run_on_behalf_of. Set either only when the user asks: both widen who acts with the deployer's rights
  • on_behalf_of is 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 rawscript tool, as a flow writes its steps. Point a script tool 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's value is 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 summary is the name the agent calls it by: letters, num
常见问题

我应该构建智能体还是流程?

当你想要一个可以对话或复用的助手时,构建独立智能体。当智能体只是更大流程中的一步时,构建流程。

智能体保存在哪里?

它以 ai_agent 资源类型保存为资源文件,与你的其他工作区文件放在一起。

智能体可以使用工具吗?

可以。你可以为智能体提供工具,例如它可以调用的脚本,每个工具都附有何时使用的简短说明。

详情

作者的原始描述

MUST use when creating or changing an AI agent, the reusable `ai_agent` resource the Agents page lists.

repo: windmill-labs/windmill

热度

GitHub 星标
18k
排名
#10627
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能