sage-session-management

Persist, restore, and branch Sage conversations with a typed Rust data model.

12|1|Updated Jul 15, 2025
One-click install
npx skills add https://github.com/majiayu000/sage --skill sage-session-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sage-session-management
Source: https://github.com/majiayu000/sage/tree/main/.sage/skills/sage-session-management
Command: npx skills add https://github.com/majiayu000/sage --skill sage-session-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sage 会话管理提供持久化、恢复、分支与缓存等能力,帮助开发者在多会话环境中高效组织对话与任务状态。

Core Features & Use Cases

  • 持久化与恢复:将会话状态、消息和元数据持久化至存储后端,支持断点续航。
  • 分支管理:在不同探索路径间保存快照,安全地切换与合并分支。
  • 缓存与元数据:会话缓存减少重复加载,元数据支持快速查询和偏好设置。

Quick Start

  • Create an in-memory SessionManager
  • Create a new session with a working_directory and optional name and model
  • Add system, user, and assistant messages
  • Persist to storage and then resume a session later

Frequently Asked Questions about sage-session-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist and restore conversation sessions in Rust?

To persist and restore conversation sessions in Rust, this Skill provides a typed Rust data model and storage abstractions that save session state, messages, and metadata to a backend, enabling resume from breakpoints. It supports creating an in-memory SessionManager to manage the lifecycle.

What is session branching and when do I need it for conversational workflows?

Session branching saves snapshots of conversations to explore different paths safely. You need session branching when switching between exploration routes or merging outcomes in multi-session environments, ensuring recoverable and auditable conversational workflows without losing prior context.

Can I use a custom storage backend for Sage conversation persistence?

Yes, you can use custom storage backends for Sage conversation persistence. The Skill defines storage abstractions that decouple the persistence layer from the typed Rust data model, allowing you to integrate your preferred backend while maintaining auditable and recoverable conversations.

Does this Skill require any external dependencies to manage session lifecycles?

No, this Skill requires zero external dependencies to manage session lifecycles. It self-contains the typed Rust data model, storage abstractions, and lightweight cache needed for session creation, resume, branch snapshots, and recent-session tracking.

What are the limitations of in-memory session management in Rust?

The primary limitation of in-memory session management is data loss upon process termination. To retain state, messages, and metadata across restarts, you must persist sessions to a configured storage backend, as the in-memory SessionManager only supports temporary session lifecycle operations.