Skip to content

feat(agents): seed kickstart prompts on COLLECTION_VIRTUAL_MCP_CREATE - #4449

Merged
pedrofrxncx merged 3 commits into
mainfrom
feat/agent-create-kickstart-prompts
Jul 11, 2026
Merged

pedrofrxncx merged 3 commits into
mainfrom
feat/agent-create-kickstart-prompts

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

COLLECTION_VIRTUAL_MCP_CREATE (the agent-create tool) gains an optional prompts field. Prompts passed at create time seed the new agent with kickstart prompts — clickable conversation starters (icebreakers) that make an empty agent immediately useful.

The tool description and the Agent Manager / agent guides now instruct authoring coherent starters derived from the agent's role/instructions and the descriptions of the tools it will have — not generic "How can I help?" greetings.

How it works

  • Persist: seeded prompts are written to a dedicated org-fs volume (agent-prompts, one JSON file per prompt at <agentId>/<slug>.json). They are not stored on the agent row, and the volume is intentionally not in the sandbox mount set, so seeding never pollutes the org's sandbox home. This mirrors the existing skills-catalog pattern.
  • Serve: PassthroughClient (the agent gateway) now injects these into listPrompts() — namespaced under the agent id — and resolves them in getPrompt(). Because everything downstream already consumes the gateway's prompts/list / prompts/get, they surface as icebreakers, on the org home next-actions, and via / mentions with zero frontend changes.

Files

  • packages/mesh-sdk/src/types/virtual-mcp.ts — AgentKickstartPromptSchema (title, description?, text) + optional prompts on VirtualMCPCreateDataSchema.
  • apps/mesh/src/file-storage/agent-prompts.ts — org-fs read/write helpers (bounded, best-effort, never throw).
  • apps/mesh/src/tools/virtual/create.ts — seed prompts after create; updated description.
  • apps/mesh/src/mcp-clients/virtual-mcp/passthrough-client.ts — inject/resolve seeded prompts on the gateway.
  • apps/mesh/src/tools/virtual/studio-pack/agent-manager.ts, apps/mesh/src/tools/guides/agents.ts — instructions to author coherent kickstart prompts from role + tool descriptions.

Testing

  • bun run check (all workspaces), bun run lint (0 errors), bun run fmt pass.
  • Existing passthrough-client.test.ts passes.
  • Seeding is best-effort: a failed prompt write logs and is skipped rather than failing agent creation.

Notes / follow-ups

  • Scope is create-only (as requested); COLLECTION_VIRTUAL_MCP_UPDATE does not yet manage seeded prompts.
  • An e2e test for the create → icebreaker round-trip (real Postgres + org-fs) is the appropriate home for a wire-contract test and is left as a follow-up.

🤖 Generated with Claude Code


Summary by cubic

Adds kickstart prompts to agent creation and now lets you edit or remove them on update/delete. Prompts persist in org-fs and are served as native MCP prompts, so they show as icebreakers and via / mentions with no UI changes.

  • New Features

    • COLLECTION_VIRTUAL_MCP_CREATE accepts optional prompts (AgentKickstartPromptSchema), seeded after create; best‑effort and non‑blocking.
    • COLLECTION_VIRTUAL_MCP_UPDATE adds prompts to fully replace the set; pass [] to clear. Writes are idempotent (clear‑then‑write).
    • COLLECTION_VIRTUAL_MCP_DELETE cleans up the agent-prompts/<agentId>/ subtree on delete.
    • Storage: prompts persist to agent-prompts (JSON, max 20); not on the agent row and not mounted in the sandbox.
    • Gateway: PassthroughClient injects prompts in listPrompts() and resolves them in getPrompt() with agent‑id namespacing; per‑instance cache; never throws.
    • Guides updated to author coherent starters from the agent’s role and its tools.
  • Bug Fixes

    • Removed an unused export in agent-prompts.ts (knip).

Written for commit 09db5f4. Summary will update on new commits.

Review in cubic

COLLECTION_VIRTUAL_MCP_CREATE gains an optional `prompts` field. Seeded
prompts are persisted to a dedicated org-fs volume (agent-prompts) and served
back as native MCP prompts on the agent's gateway, so they surface as
icebreakers, on the org home, and via / mentions with no frontend changes.

Agent Manager + agent guides now instruct authoring coherent starters derived
from the agent's role and the descriptions of the tools it will have.
Prompts were create-only: UPDATE ignored them and DELETE orphaned the
org-fs subtree. Add prompts to the update schema (full replace, [] clears),
make writeAgentPrompts idempotent (clear-then-write so stale index-named
files don't linger), and clean up the subtree on agent delete.
@pedrofrxncx
pedrofrxncx enabled auto-merge (squash) July 11, 2026 01:15
@pedrofrxncx pedrofrxncx changed the title feat(agents): seed kickstart prompts on AGENT_CREATE feat(agents): seed kickstart prompts on COLLECTION_VIRTUAL_MCP_CREATE Jul 11, 2026
@pedrofrxncx
pedrofrxncx merged commit 2af9021 into main Jul 11, 2026
14 checks passed
@pedrofrxncx
pedrofrxncx deleted the feat/agent-create-kickstart-prompts branch July 11, 2026 01:23
decocms Bot pushed a commit that referenced this pull request Jul 11, 2026
PR: #4449 feat(agents): seed kickstart prompts on COLLECTION_VIRTUAL_MCP_CREATE
Bump type: minor

- decocms (apps/mesh/package.json): 4.5.1 -> 4.6.0
- @decocms/mesh-sdk (packages/mesh-sdk/package.json): 1.18.0 -> 1.19.0

Deploy-Scope: server
tlgimenes pushed a commit that referenced this pull request Jul 16, 2026
…TS.md (#4475)

Mined ~300 merged PRs for the delta between the first PR proposal and the
work added before merge. The dominant shape: a first draft ships the happy
path, then a hardening pass (often a different engineer who takes over the
branch and merges — the vibecoder→engineer handoff) adds the same categories
every time. Encoded those 9 categories as an actionable first-pass checklist,
each citing a real PR (#4008, #4230, #4365, #4409, #4426, #4445, #4357, #4355,
#4449, #4350, #4373, #4416, #4446, #4461, #4134, #4469).

Covers: variant/edge-case handling, tenant/permission scoping, concurrency &
silent-data-loss, test-per-fix + invert-bug-tests + real-PG, dead-code/knip,
lifecycle symmetry + state reset, kill-switch/GC/git-exclude for risky infra,
input validation vs over-engineering, compile-time type-safety.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant