Skip to content

feat(insights): analyze a single session - #997

Merged
wesm merged 4 commits into
kenn-io:mainfrom
rodboev:pr/session-agent-analysis
Jul 5, 2026
Merged

feat(insights): analyze a single session#997
wesm merged 4 commits into
kenn-io:mainfrom
rodboev:pr/session-agent-analysis

Conversation

@rodboev

@rodboev rodboev commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

The insights generator can analyze agent activity, but the request path is date-window scoped, so starting from a single session still asks the backend for a sessions-list prompt. That makes the top-bar workflow in #445 impossible without manually narrowing dates and still getting surrounding sessions in the prompt.

This adds a session-scoped path to the existing insights generation flow instead of creating a parallel endpoint. The session breadcrumb starts an agent_analysis task with the current session id, the server validates that session scope only applies to agent analysis, and the prompt builder switches to a single-session branch that reads the session, messages, timing, and usage through the existing store interface.

The storage shape stays unchanged for this pass. The PR keeps the generated insight pipeline, SSE stream, task handling, and ordinary date-range analysis intact, and limits the new behavior to the missing session scope.

Closes #445

@roborev-ci

roborev-ci Bot commented Jul 5, 2026

Copy link
Copy Markdown

roborev: Combined Review (5697355)

Summary verdict: No Medium, High, or Critical findings to report.

Both reviews found no reportable issues at Medium severity or above.


Reviewers: 2 done | Synthesis: codex, 4s | Total: 7m43s

@wesm
wesm merged commit 172e97d into kenn-io:main Jul 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Agent Analysis for single session

3 participants