Sessions Manager for Openclaw

A command-line utility for managing OpenClaw agent sessions, providing full visibility and control over session states and history files.

6eanut
v1.0.0
Apr 9, 2026
0
719
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install sessions-manager

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install sessions-manager using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Sessions Manager?

The Sessions Manager is an essential administrative component designed for developers working with Openclaw Skills. It provides a robust command-line interface to oversee the lifecycle of AI agent interactions, allowing users to move beyond opaque processes by offering deep visibility into active and historical session states.

By integrating this skill, users can ensure their environment remains clean and efficient. It serves as the primary tool for auditing session durations, model usage, and current statuses, ensuring that Openclaw Skills operate within a well-maintained workspace without orphaned or resource-heavy background tasks.

Sessions Manager Use Cases

  • Debugging Stuck Processes: Quickly identify which subagents are still in a running state to resolve execution hangs.
  • Workspace Maintenance: Clean up legacy session metadata and history files to optimize storage and performance.
  • Concurrent Task Monitoring: Track multiple active subagents to understand how complex workflows are distributed.
  • Resource Optimization: Manually terminate and delete sessions that are no longer contributing to the project goals.

How Sessions Manager Works

  1. Discovery: The utility scans the local Openclaw Skills environment to locate session metadata stored in the global sessions JSON file.
  2. Parsing: It reads the session history logs and metadata to extract key performance indicators like duration, model type, and current status.
  3. Selection: Users interact via the CLI to target specific sessions using unique session IDs or descriptive keys.
  4. Execution: The tool performs targeted deletions, ensuring that both the metadata entry and the associated .jsonl history files are synchronized and removed.

Sessions Manager Setup

The Sessions Manager is part of the standard Openclaw Skills ecosystem. To use the scripts, ensure you are in an environment where Python 3 is installed.

# Navigate to the skills directory
cd ~/.openclaw/workspace/skills/sessions-manager/

# Run the CLI to list active sessions
python3 scripts/sessions_cli.py list

Sessions Manager Data Schema & Taxonomy

The Sessions Manager interacts with specific file structures within the Openclaw Skills directory to maintain state integrity:

Data Type File Path Description
Metadata ~/.openclaw/agents/main/sessions/sessions.json Stores the registry of all known sessions, labels, and statuses.
History ~/.openclaw/agents/main/sessions/<session-id>.jsonl Contains the actual message exchange and event logs for a specific session.
Schema Keys Session ID, Status, Model, Duration The primary attributes used to filter and manage sessions via the CLI.

Sessions Manager Advanced Features

  • Verbose Output Mode: Use the -v flag to expose granular channel information and deep networking metadata for complex subagent trees.
  • Pattern-Based Deletion: Support for deleting sessions via both UUIDs and human-readable session keys for faster workflow integration.
  • Label Tracking: Allows for the identification of sessions based on custom labels, making it easier to manage Openclaw Skills during large-scale development tasks.
  • Filesystem Synchronization: Automatically ensures no orphaned history files remain after a session metadata entry is purged.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*