Skip to content

feat: export session insights in export-agent scripts - #283

Closed
Deepthi Chelupati (dm-chelupati) wants to merge 2 commits into
mainfrom
feat/export-session-insights
Closed

feat: export session insights in export-agent scripts#283
Deepthi Chelupati (dm-chelupati) wants to merge 2 commits into
mainfrom
feat/export-session-insights

Conversation

@dm-chelupati

Copy link
Copy Markdown
Collaborator

Summary

Add session insights export to both export-agent.sh and Export-Agent.ps1.

What it does

  • Reads session insights from GET /api/v1/threads/insights?skip=0&take=1000 (data-plane)
  • Writes to 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)
  • Shows count in the dry-run summary

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

  • Verified API returns data: GET /api/v1/threads/insights on demo agent (3 insights found)
  • Bash syntax check passes (bash -n)
  • PowerShell syntax check passes (ParseFile)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant