feat: export session insights in export-agent scripts - #283
Closed
Deepthi Chelupati (dm-chelupati) wants to merge 2 commits into
Closed
feat: export session insights in export-agent scripts#283Deepthi Chelupati (dm-chelupati) wants to merge 2 commits into
Deepthi Chelupati (dm-chelupati) wants to merge 2 commits into
Conversation
Read session insights from GET /api/v1/threads/insights and write them to data/session-insights/ as individual .md files (insight content) + .yaml files (metadata). Both bash and PowerShell scripts updated. Session insights capture learned patterns from past agent sessions including investigation trajectories, root causes, and key learnings.
The assemble scripts now auto-discover .md files from data/session-insights/ (in addition to data/ and data/knowledge/). When deploying or cloning an agent, session insights from the source agent are uploaded as AgentMemory knowledge documents, making them RAG-searchable by the new agent. This enables investigation learnings (root causes, patterns, pitfalls) to transfer when cloning an agent to a new environment. Common prompts were already fully supported in the pipeline.
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
Add session insights export to both
export-agent.shandExport-Agent.ps1.What it does
GET /api/v1/threads/insights?skip=0&take=1000(data-plane)data/session-insights/with:<title-slug>.md— the insight markdown content (investigation trajectory, root cause, learnings)<title-slug>.yaml— metadata (id, threadId, title, timestamp, feedback counts)Session insights capture learned patterns from past agent sessions including investigation trajectories, root causes, and key learnings. Exporting these enables backup, migration, and review of agent learning history.
Testing
GET /api/v1/threads/insightson demo agent (3 insights found)bash -n)ParseFile)