langchain-ai/deepagents-thread-inspector
Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse ~/.deepagents/.state/sessions.db and a thread UUID or prefix.
npx skills add https://github.com/langchain-ai/deepagents --skill deepagents-thread-inspector
If LangSmith tooling is available for a traced thread, prefer it. Otherwise, use scripts/inspect_sessions.py instead of manually decoding database blobs. It opens the database read-only and deserializes the root message channel with LangGraph's strict MsgPack loader — reading the materialized messages from the latest checkpoint, or replaying writes in checkpoint order when that fast path is unavailable — and emits JSON.
Resolve SKILL_DIR to the directory containing this SKILL.md; do not assume a user, project, or installation-specific location. Start with the smallest useful view:
python3 "$SKILL_DIR/scripts/inspect_sessions.py" THREAD_ID --mode latest-turn
A unique thread-ID prefix is accepted. Select another view when needed:
python3 "$SKILL_DIR/scripts/inspect_sessions.py" THREAD_ID --mode summary
python3 "$SKILL_DIR/scripts/inspect_sessions.py" THREAD_ID --mode transcript
Use --include-metadata only when run, repository, model, checkpoint, or LangGraph metadata matters. Use --max-content N to raise or lower the default 4,000-character limit per message, tool result, or tool-call argument.
If the user does not know the ID, list recent threads first:
python3 "$SKILL_DIR/scripts/inspect_sessions.py" --list 20
Pass --db PATH only for a non-default session store. The default is ~/.deepagents/.state/sessions.db; DEEPAGENTS_SESSIONS_DB can override it.
Synthesize the JSON rather than pasting it verbatim.
content_truncated or args_truncated set.warnings array (for example, a corrupt checkpoint, a skipped write, or malformed metadata) so conclusions are appropriately hedged.Keep inspection read-only. Do not deserialize an untrusted database: checkpoint deserialization is intended for trusted local Deep Agents state. Do not mutate or delete session rows unless the user separately and explicitly requests it.
Take langchain-ai/deepagents-thread-inspector from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.