mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-28 16:06:22 +00:00
* feat(hub): publish a folder's AI agents with their project
A saved AI agent is an `ai_agent` resource, and the Hub bundle shipped every
resource as an empty stub: a project built around an agent reached the Hub with
the agent's tools and without the agent.
- The publish screen lists a folder's agents as items. An agent is bundled like
the one-step flow a run makes of it, so the scripts its tools run come along
and its `$res:` references (provider, tools' fixed inputs) are relocated by
the same code as a flow's. Its deploy identity and sharing switches stay here.
- Agents are synced as a set after the items (`POST /hub/agents`).
- Its demo is a conversation: "Record conversation" chats with the agent in a
conversation of its own, one run per message, and saves each turn with its
run (`POST /hub/projects/{slug}/agent_recording`).
- Installing a project recreates its agents after the resource stubs they
point at.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* feat(folders): count a folder's AI agents on their own
The Folders table counted a saved agent among the resources, so a folder built
around an agent showed nothing that said so. Agents get their own column, and
the resources count is the credentials and other resources only.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(hub): hand agents to the deploy layout as the resource rows it knows
Widening the shared layout's item kind broke the workspace deploy screen, which
passes that kind on. The layout already draws an agent as a resource row it is
told about (isAgent): the publish screen now uses that, and the layout is
unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* List the agents a flow or script uses in its Hub dependencies
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Export the read-only AI chat components from the package
The Hub renders recorded agent conversations with the same components as the
AI Sessions share page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Record only the current turn's tool calls; address review nits
- readAgentTurn reads the messages after the turn's own user message: a run
with memory returns the whole conversation, so turn N repeated the tools of
turns 1..N-1. Covered by a two-turn test.
- randomUUID from $lib/utils/uuid instead of crypto.randomUUID, which is
missing on instances served over plain http.
- The record drawer's message box uses TextInput instead of a raw textarea.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Ship agents' MCP servers and variables; keep background tool calls
- extractAgentRefs and rewriteAgentValue read an MCP tool's resource_path,
which the flow walker skips, so its resource is stubbed and relocated
instead of left pointing at the publisher's path.
- collectExportVarPaths visits agents, so a variable only an agent uses is
relocated on retarget and gets its placeholder on install.
- readAgentTurn ignores the user messages that carry a background tool's
result (tagged with agent_action) when finding the turn's start, so a turn
that waits on a background tool keeps its call.
- The record buttons use unifiedSize instead of the deprecated size.
Tests for each.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Ship nested MCP servers and linked agents; surface agent-list failures
- The flow walker reads, on every aiagent step or tool, the saved agent it
links to (`agent`) and its MCP tools' `resource_path`, and the rewriter
relocates both keeping their prefix. This covers agents nested as tools and
flows with agent steps, not only an agent's own tools.
- A referenced `ai_agent` resource is pulled into the bundle as an agent,
so a linked agent from another folder ships whole instead of as an empty
stub.
- The agent list no longer swallows failures: agents sync as a full set, so
publishing without them would have removed them from the Hub.
Tests for the nested MCP tool, the linked agent's retarget and the linked
agent from outside the folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Walk an agent's whole value for references; harden recording
Bundling
- A saved agent is read unvalidated and its tools nest, so references are no
longer looked up field by field. One walk over the whole value serves
extraction, rewriting and the install check: whole-string $res: values,
$res: tokens in rawscript content, and the shapes that name things by path
({type: script|flow, path}, {type: aiagent, agent}, {tool_type: mcp,
resource_path}) wherever they sit. Covers tool_inputs, output_schema and
any key added later.
- Inputs are read as the worker reads them: a static value is data (only
whole-string refs count), a JavaScript expr is never resolved. Only on real
input entries, so nothing can be hidden beside them from the install check.
- Prose holding a $res: token mid-sentence is no longer a reference.
- enabled_tools follows an MCP server to its new path.
- An agent named by a trigger is shipped whole like one an item references.
Recording
- An agent parked on an approval or a question is detected and its run
cancelled with a clear message; closing the drawer or disposing the session
cancels the run in flight.
- Turns no longer keep the whole run: it names who ran it and holds the agent
as the workspace stores it. Structured-output calls are not shown as tools;
web searches are.
- Send is disabled while saving; a failed message is handed back to retype; a
save does not close another agent's drawer.
- The empty agent sync ignores only a 404.
Backend: agent_recording requires the recording key (null clears). OpenAPI:
agents is required in folder usage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address review: install strips identity keys, shared transcript, one agent walk
- importAgent drops on_behalf_of, run_on_behalf_of and slack_anyone, through
the same helper as publish: an export written through the Hub API could
otherwise bind the agent to whoever installs it.
- The recorder draws the conversation with AgentRecordingTranscript, the AI
chat's read-only components, so tool arguments and results are seen before
they are saved. The component and the turns-to-messages mapping are
exported for the Hub page to use the same ones.
- readAgentTurn moves to aiAgentResult.ts on top of parseAgentResult;
STRUCTURED_OUTPUT_CALL has one copy.
- The flow walker hands an aiagent step's agent part to walkAgentConfig
instead of recognising the shapes itself; comments trimmed.
- deserialize_explicit is generic.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Record an agent's demo in the agent's own chat
The record drawer embeds FlowChat as the agent page's Chat tab does (new
conversation, no sidebar), so the recorder uses the same composer, transcript,
tool cards and approval/question handling. Saving reads each answered
message off its completed run with readAgentTurn; failed or unfinished runs
are left out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Retarget imported agents onto an existing resource; recorder guards
- "Use an existing resource" now sees saved agents: each ai_agent resource
is read, those in the project have their resource references moved
(provider, MCP servers, tool inputs) with the run identity preserved, and
any reference left unmoved, outside the project or unreadable keeps the
stub. Before, the stub could be deleted under an agent still reading it.
- Closing the record drawer or disposing the session cancels the run in
flight, which the chat stops following but does not stop.
- Saving waits for the message being answered instead of leaving it out,
and says how many failed messages were left out.
- The recorder warns when the agent keeps no managed memory.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Move enabled_tools with a reused MCP resource; cancel a late run
- rewriteAgentResourceRefs goes through rewriteAgentConfig, so the
enabled_tools entry naming an MCP server follows it when an existing
resource replaces the stub. The worker matches names exactly and dropped
the server otherwise.
- A run whose id comes back after the record drawer closed is cancelled:
it was not tracked yet when the close looked for a run to stop.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>