Skip to content

feat(investigations): Add agentic investigation creation - #123086

Merged
wedamija merged 1 commit into
masterfrom
sentry/investigations-orchestration-control-api
Sep 1, 2026
Merged

feat(investigations): Add agentic investigation creation#123086
wedamija merged 1 commit into
masterfrom
sentry/investigations-orchestration-control-api

Conversation

@arslnb

@arslnb arslnb commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

POST /organizations/{org}/investigations/ now accepts a source object without a templateKey. It creates the investigation, its project links, and its orchestration run in one transaction. Existing manual and template creation are untouched.

Two source types. manual carries an optional prompt, time range, and seed. metric_open_period carries only a server-resolved ref, resolved against the caller's accessible projects before anything is written. Concurrent launches for the same metric converge on one investigation through the existing lineage constraints, so a second launch returns the first with a 200 instead of creating a duplicate.

Sources are validated by strict per-type schemas dispatched on source.type, and the object is stored as-is rather than as validated_data so its camelCase keys survive into the JSON columns. The candidates endpoint now resolves the agentic lineage key ahead of the template one.

No new routes, migrations, workers, or Seer calls. Models landed in #122972; the read and command APIs follow in separate PRs.

@github-actions github-actions Bot added Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components labels Aug 28, 2026
@arslnb
arslnb marked this pull request as ready for review September 1, 2026 00:04
@arslnb
arslnb requested review from a team as code owners September 1, 2026 00:04
@wedamija
wedamija force-pushed the sentry/investigations-orchestration-persistence branch from ab2f85f to 4e51201 Compare September 1, 2026 21:36
@wedamija
wedamija requested review from a team as code owners September 1, 2026 21:36
@wedamija
wedamija force-pushed the sentry/investigations-orchestration-control-api branch from 88c03ec to 73f9bad Compare September 1, 2026 21:36
Base automatically changed from sentry/investigations-orchestration-persistence to master September 1, 2026 21:58
Source-backed requests now reuse the existing collection endpoint. Manual context and canonical metric-open-period references create the investigation, its project links, and its orchestration run atomically. Existing manual and template creation are unchanged.

Agentic sources are validated against strict per-type schemas dispatched on the source type, and the source object is stored unchanged so its camelCase keys survive into the orchestration record.

Adds no APIs, workers, Seer calls, or migrations.
@wedamija
wedamija force-pushed the sentry/investigations-orchestration-control-api branch from 73f9bad to 2ea4505 Compare September 1, 2026 22:47
@wedamija wedamija changed the title feat(investigations): Add orchestration control API feat(investigations): Add agentic investigation creation Sep 1, 2026
@wedamija
wedamija enabled auto-merge (squash) September 1, 2026 22:56
@wedamija
wedamija disabled auto-merge September 1, 2026 22:56
@wedamija
wedamija enabled auto-merge (squash) September 1, 2026 22:59
@wedamija
wedamija merged commit 9b12bcf into master Sep 1, 2026
59 of 60 checks passed
@wedamija
wedamija deleted the sentry/investigations-orchestration-control-api branch September 1, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants