feat(agents): add Publish action, overview summary; drop "Explain this agent"#2884
Closed
dmarticus wants to merge 2 commits into
Closed
feat(agents): add Publish action, overview summary; drop "Explain this agent"#2884dmarticus wants to merge 2 commits into
dmarticus wants to merge 2 commits into
Conversation
…s agent" The agent builder header was paying an LLM tax: every visit to an agent's overview seeded a fresh "Explain what this agent does" prompt against the meta-agent. Treat the agent's `description` as the source of truth instead — the agent-builder writes it via a new `set_application_description` client tool, the Overview renders it inline above a compact map of triggers/tools/ skills/MCPs/identities, and the header now hosts a one-click Publish that freezes-then-promotes the latest draft behind a single confirm. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
React Doctor found 3 issues in 2 files · 3 warnings. 3 warnings
Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "feat(agents): add Publish action, overvi..." | Re-trigger Greptile |
The hook was added in this PR but never imported — the agent-builder client tool calls client.updateAgentApplication and invalidates the same caches inline. Delete the unreachable wrapper. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closed
2 tasks
Contributor
|
Reviews (2): Last reviewed commit: "chore(agents): drop unused useUpdateAgen..." | Re-trigger Greptile |
benjackwhite
requested changes
Jun 26, 2026
| "Help me create a new agent — walk me through what it should do, then set it up.", | ||
| agentSlug: null, | ||
| }; | ||
| case "agent": |
| }; | ||
| } | ||
| try { | ||
| await client.updateAgentApplication(agentSlug, { |
Contributor
There was a problem hiding this comment.
this is bizarre - why are we making the agent only able to do this in the console? This should just be soemthing it knows how to do via the mcp surely?
Contributor
Author
|
in hindsight, this was directionally incorrect. closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User feedback flagged three coupled problems with the agent-applications UI:
This PR:
headerActionForPage+ the matching starter suggestion.set_application_descriptionas a new agent-builder client tool. The meta-agent writes a short summary (capped at 280 chars, trimmed, rejected on overflow) toAgentApplication.descriptionvia a newupdateAgentApplicationPATCH on the API client. Cache invalidation flips the header / list / overview.description(or a quiet "agent-builder will write one" fallback) above a compact stat-tile row counting triggers (with type breakdown), tools, skills, MCPs, identities. Sources the live revision's spec via the existinguseAgentRevisionhook, falling back to the newest revision when nothing is live yet.<PublishButton />on the agent page. Hidden when archived, disabled when no draft. One-click confirm → sequentialfreezethenpromote(atomic per action server-side, so no refetch between them).Open follow-up
The deployed
agent-buildermeta-agent's server-side system prompt still needs to be told aboutset_application_descriptionso it actually invokes the tool. That lives outside this repo. Until that prompt update lands, the new Overview will keep rendering the "No description yet — the agent-builder will write one" fallback for fresh agents.Test plan
pnpm vitest run agent-applications— 9 new cases pass (4 PublishButton helper, 5 client-tool branches: happy path, missingagent_slug, missingdescription, over-cap length, update failure)pnpm lint— cleanpnpm --filter @posthog/ui typecheck/pnpm --filter @posthog/api-client typecheck— clean in touched files (preexisting errors incanvas/ChannelsList,canvas/WebsiteLayout,code-review/InteractiveFileDiff,shell/posthogAnalyticsImplare unrelated to this PR)node scripts/check-host-boundaries.mjs— no new violations:9222):set_application_descriptionafter the server-side prompt is updated🤖 Generated with Claude Code