Skip to content
Back to skills

Save Thread

ASecurity

Synchronize and persist the active OpenHands conversation session or multi-agent canvas run into Nowledge Mem.

  • 182 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 2, 2026
ai-agentspythonbashnodeapi

Works with

  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned October 2, 2026

npx -y skills add nowledge-co/community --skill save-thread --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Save Thread?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Save Thread
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nowledge-co-save-thread-38da2cab/badge)](https://www.skillsdirectory.com/skills/nowledge-co-save-thread-38da2cab)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: save-thread
description: Synchronize and persist the active OpenHands conversation session or multi-agent canvas run into Nowledge Mem.
trigger:
  type: keyword
  keywords:
    - save thread
    - save session
    - sync thread
    - export session
---

# Save Thread

> Synchronize the active OpenHands conversation session or multi-agent canvas run into Nowledge Mem.

## When to Use

- Explicit user request: "save this conversation", "record this thread in nowledge mem".
- Automated Stop hook: runs automatically upon agent completion if `NMEM_DISABLE_AUTO_CAPTURE` is not set.
- Checkpoint before long-running background tasks.

## How Thread Capture Works in OpenHands

OpenHands persists conversation events to disk (`events/event-*.json`). The Nowledge Mem OpenHands plugin integrates via a Tier-2 native transcript importer:

1. **Automated Stop Hook**:
   When a conversation ends or agent pauses, `hooks/nmem-stop.py` runs automatically:
   - Locates the active OpenHands session events on disk.
   - Extracts and deduplicates user prompts and assistant actions/observations.
   - Synchronizes directly to Nowledge Mem via high-speed REST API `POST /threads/import` (with CLI `nmem t import` fallback and offline queue resilience).

2. **Explicit Session Sync**:
   To manually checkpoint the current session from terminal or canvas:
   ```bash
   python3 <plugin-dir>/hooks/nmem-stop.py <<<'{"session_id": "<conversation-id>"}'
   ```
   Or using the `nmem` CLI import:
   ```bash
   nmem t import --id "openhands-<conversation-id>" --title "<title>" --messages '<json>' --source openhands
   ```

3. **Multi-Agent Canvas Provenance**:
   When running multiple agents on a canvas, configure `NMEM_AGENT_ID` and `NMEM_SPACE` so thread captures preserve individual node provenance across the shared graph.

4. **Multi-Agent Orchestrator Capture Control**:
   When orchestrating multi-agent workflows or child processes, you can control thread capture boundaries. If child tasks or workers capture their own threads, set `NMEM_DISABLE_AUTO_CAPTURE=1` in OpenHands to prevent duplicate session captures while keeping MCP memory tools active.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.