Skip to content

Export session#131

Open
ea-rus wants to merge 34 commits intomainfrom
export-session
Open

Export session#131
ea-rus wants to merge 34 commits intomainfrom
export-session

Conversation

@ea-rus
Copy link
Copy Markdown
Collaborator

@ea-rus ea-rus commented Apr 23, 2026

Session Portability: /share command
Introducing the portable .anton session format that serves as the foundation for team-scale collaboration

Implements the /share command with four subcommands:

  • /share export export full session (history + memory + code)
  • /share export --summary export distilated conversation (lighter file)
  • /share import <file> restore a session from a .anton file
  • /share status show info about the current imported session
  • /share history list all .anton files in .anton/output/

.anton file format (v0.1)

{
  "version": "0.1",
  "exported_by": "user_id",
  "exported_at": "2026-04-21T...",

  "session": {
    "id": "session_uuid",
    "title": "Auto-generated session title",
    "summary": "2-3 sentence narrative of the analytical journey",
    "conversation_history": []
  },

  "memory": {
    "session_born": [],
    "project_accessed": []
  },

  "scratchpad": {
    "cells": []
  }
}

Technical details

  • session_born and project_accessed are exported from episodic memory
    • when project memory is used or created during the session, it is logged in episodic memory with roles: "memory_write", "memory_read"
  • Imported files are stored in output/ folder and with this section added. It is used by status and history commands
  • content of episodic memory is written as not truncated. instead it is limited in recall_formatted
"imported": {
"user": "name",
"date": "2026-04-27T15:11:10.977318+00:00",
"session_id": "20260427_151110"
}

Side fixes:

  • for /resume command: show range of numbers for sessions (1-10) instead of all of them (1/2/3/4.../10)
  • don't create empty session files

Fixes https://linear.app/mindsdb/issue/STRC-986/implement-share-command-phase-1-portable-session-export-and-import

@torrmal
Copy link
Copy Markdown
Contributor

torrmal commented Apr 25, 2026

@ea-rus Andrey can please add a description to this PR, what is the intent

@ea-rus
Copy link
Copy Markdown
Collaborator Author

ea-rus commented Apr 27, 2026

@torrmal, added description. The original requirements are here

@ea-rus ea-rus marked this pull request as ready for review April 28, 2026 16:02
Copy link
Copy Markdown
Contributor

@torrmal torrmal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, it would be interesting to import stuff from other tools like openclaw, similar to how hermes has that functionality

@torrmal
Copy link
Copy Markdown
Contributor

torrmal commented Apr 30, 2026

@sejubar can you please test this end to end

@torrmal torrmal requested a review from sejubar April 30, 2026 08:01
Copy link
Copy Markdown

@sejubar sejubar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested.

@sejubar
Copy link
Copy Markdown

sejubar commented Apr 30, 2026

There is a case of export "Export with No Active Session"
@ea-rus @torrmal
Dow we want to export empty session ?

{
  "version": "0.1",
  "exported_by": "sejuba",
  "exported_at": "2026-04-30T19:56:05.796054+00:00",
  "session": {
    "id": "20260430_195553",
    "title": "missing-session-content-distillation",
    "summary": "The user requested a distillation of an analytical session, but no session content was provided in the prompt. The immediate next step is to obtain the session transcript or notes so the goal, findings, corrections, dead ends, and current status can be summarized accurately.",
    "conversation_history": []
  },
  "memory": {
    "session_born": [],
    "project_accessed": []
  },
  "scratchpad": {
    "cells": []
  }
}

@ea-rus
Copy link
Copy Markdown
Collaborator Author

ea-rus commented May 4, 2026

@sejubar, I added restriction: don't export if no messages in current session. I think there is no sense in exporting empty conversation (it means no memory used and no scratch pad cells created)

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.

3 participants