-
Notifications
You must be signed in to change notification settings - Fork 439
feat: Claude Managed Agents for ClickStack alert investigations (+ EE extensibility seams) #2646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jordan-simonovski
wants to merge
14
commits into
main
Choose a base branch
from
feat/ai-webhook
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9c5b4e2
committing work in progress
jordan-simonovski 2787af3
feat(api): handle managed-agent alerts in-process with Slack delivery
jordan-simonovski 838b4a9
added alert webhook picker emojis
jordan-simonovski ccb9816
feat(api): fail-open extension seams for managed-agent alert runs
jordan-simonovski 04d51dc
docs: downstream extensibility guidance and extension-seams changeset
jordan-simonovski c7da17b
refactor(api): introduce AIProvider enum for AI provider values
jordan-simonovski 59f3731
feat(api): resolve managed-agent Anthropic key from env + resolveAnth…
jordan-simonovski 2faac8e
feat(app): remove per-team Anthropic key UI (now EE-only)
jordan-simonovski 80e32a0
docs: update extension-seams changeset for env key resolution
jordan-simonovski 9357771
chore(app): remove orphaned api dashboard templates
jordan-simonovski 6481d9f
fix(api): address managed-agent PR review findings
jordan-simonovski 01a7e1d
fix(app): use ISO-8601 timestamps in the Claude webhook default template
jordan-simonovski c6aff3b
fix(api): second-pass review fixes for managed agents
jordan-simonovski 3459c1d
fix(app): persist the Claude default body on save
jordan-simonovski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| '@hyperdx/api': minor | ||
| '@hyperdx/app': minor | ||
| --- | ||
|
|
||
| The managed-agent alert flow now exposes fail-open extension seams | ||
| (`onProvisionAgent`, `onSessionStart`, `onBeforeDelivery`, `resolveAnthropicKey`) | ||
| with a downstream-owned registration point and an `AgentRun.metadata` field, so | ||
| downstream distributions can extend investigations (e.g. notebook tracking) and | ||
| swap the agent's system and kickoff prompts wholesale without editing core | ||
| files. Claude webhooks now also honour their user-editable `body` template as | ||
| the agent's kickoff prompt (previously documented but ignored), falling back to | ||
| the built-in enriched payload for empty or broken templates. | ||
|
|
||
| The Anthropic API key for managed agents is now resolved from the environment | ||
| (`AI_API_KEY` with `AI_PROVIDER=anthropic`, or the legacy `ANTHROPIC_API_KEY`), | ||
| which is the sensible default for self-hosted deployments. The per-team, | ||
| UI-managed key (previously stored encrypted in MongoDB) has been removed from | ||
| open source and is now a downstream concern, injected through the | ||
| `resolveAnthropicKey` extension seam. With no extensions registered and the | ||
| default webhook body, behaviour is otherwise unchanged. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| '@hyperdx/common-utils': minor | ||
| '@hyperdx/api': minor | ||
| '@hyperdx/app': minor | ||
| --- | ||
|
|
||
| feat: add Claude Managed Agents webhook template with enriched, agent-ready payload | ||
|
|
||
| Adds a "Claude Managed Agents" webhook service type that posts an enriched, | ||
| agent-ready JSON payload (sent identically to a Generic webhook). The pre-built | ||
| body carries structured alert context (status, type, comparator, threshold, | ||
| current value, group key, source query, team id, time range) and a prompt | ||
| instructing the agent to investigate via its pre-configured ClickStack MCP | ||
| server and post a root-cause summary. No MCP URL or auth is sent in the | ||
| payload — the agent reaches ClickStack through the MCP server declared on the | ||
| agent with credentials held in a vault. | ||
|
|
||
| These enriched template variables (`{{status}}`, `{{alertType}}`, | ||
| `{{comparator}}`, `{{threshold}}`, `{{value}}`, `{{groupKey}}`, | ||
| `{{sourceQuery}}`, `{{teamId}}`, `{{alertId}}`, `{{note}}`) are also available to | ||
| Generic webhook bodies for pre-agent routing and dedup. The alert's freeform | ||
| `note` is surfaced as `context.runbook` so a runbook link attached to the alert | ||
| reaches the agent. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| '@hyperdx/api': minor | ||
| '@hyperdx/app': minor | ||
| --- | ||
|
|
||
| feat: provision Claude Managed Agents from the HyperDX UI | ||
|
|
||
| Add a Managed Agents section under Team Settings → API & Agents (gated by | ||
| `HDX_MANAGED_AGENTS_ENABLED` / `NEXT_PUBLIC_HDX_MANAGED_AGENTS_ENABLED`). The | ||
| Anthropic API key is read from the server environment (`AI_API_KEY` with | ||
| `AI_PROVIDER=anthropic`, or the legacy `ANTHROPIC_API_KEY`); per-team, | ||
| UI-managed key storage is a downstream (EE) concern injected via the | ||
| `resolveAnthropicKey` extension seam. A team can provision an opinionated | ||
| ClickStack SRE agent in one click — HyperDX creates the Anthropic environment, | ||
| vault (with the provisioning user's ClickStack access key as the MCP | ||
| credential), and agent with the ClickStack MCP server pre-configured, then | ||
| stores the references for management. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: We should not reference EE from OSS, same for the PR description.