Session Manager for Openclaw

A powerful session orchestration tool for Openclaw Skills that enables the creation, listing, and routing of independent sub-agent clones.

johnluicn
v1.0.0
Apr 3, 2026
0
612
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install alter-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 alter-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 Session Manager?

The Session Manager is a technical framework designed to extend the capabilities of AI agents by managing independent sub-sessions or clones. This skill allows users to branch out the main agent's execution into separate, isolated environments to handle specific tasks in parallel without cluttering the main conversation history.

A key architectural advantage of using this within the Openclaw Skills ecosystem is that sub-sessions do not load the global MEMORY.md file. This makes them perfect for specialized, ephemeral tasks—such as data crunching or document drafting—where long-term personal context isn't required. The skill also includes a sophisticated routing mode that turns the main agent into a transparent bridge between the user and specific sub-agents.

Session Manager Use Cases

  • Creating isolated sub-agents for specific technical tasks like data analysis or coding.
  • Running multiple parallel conversations to manage different project workstreams simultaneously.
  • Implementing a 'Router' pattern where a primary agent delegates complex instructions to specialized sub-agents.
  • Archiving and cleaning up temporary agent sessions to maintain a high-performance workspace.

How Session Manager Works

  1. The agent extracts a label from the user's request or asks for a name to identify the new session.
  2. The sessions_spawn command is triggered to initialize a unique, independent agent environment.
  3. The skill monitors the ~/.openclaw/agents/main/sessions/sessions.json file to track active sub-agents, filtering specifically for the subagent prefix.
  4. If routing mode is enabled, a session-manager.state.json file is created to store the target session key.
  5. Subsequent user messages are automatically intercepted and forwarded to the target sub-session using sessions_send.
  6. For session cleanup, the skill executes a Gateway RPC call to delete the session while safely archiving the transcript.

Session Manager Setup

To utilize the Session Manager within your Openclaw Skills environment, ensure your agent has filesystem access to its own session directory. No external dependencies are required beyond the standard Openclaw gateway.

To manually delete a session via the CLI for administrative purposes:

openclaw gateway call sessions.delete --params '{"key": "<sessionKey>", "deleteTranscript": true}'

Ensure your workspace is configured to allow the agent to write the state file:

# State file location
<WORKSPACE>/session-manager.state.json

Session Manager Data Schema & Taxonomy

The Session Manager interacts with a specific directory structure and metadata format to ensure session persistence and accurate filtering.

Component Path/Key Description
Session Registry sessions.json Source of truth for all active and archived sessions.
Filter Key agent:main:subagent:* The prefix used to identify valid sub-sessions.
State Store session-manager.state.json Stores the current active routing target and label.
Transcript Archive *.jsonl.deleted. Preservation format for deleted session histories.

Session Manager Advanced Features

  • Intelligent Labeling: Automatically derives session labels from natural language instructions.
  • Transparent Routing: Enables a 'Silent Routing' mode where the main session becomes a transparent proxy for the sub-agent.
  • State Persistence: Remembers active routing targets across session restarts via JSON state tracking.
  • Safe Deletion: Implements a non-destructive delete process that archives conversation transcripts before removing session entries.
  • Parallel Execution: Supports spawning multiple sub-agents that operate with independent histories and no shared memory overhead.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*