All skills
langchain-ai avatar

/deepagents-thread-inspector

@feb5736
by LangChainlangchain-ai/deepagents30k stars
4,200

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_HOME/.state/sessions.db and a thread UUID or prefix.

Use this Skill: https://skilld.dev/gh/langchain-ai/deepagents/deepagents-thread-inspector

This session only. Nothing lands on disk.

SKILL.md

≈101 tokens always: the name and description. ≈686 when used: this file.

Deep Agents 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.

Inspect local state

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_HOME/.state/sessions.db, or ~/.deepagents/.state/sessions.db when that variable is unset. DEEPAGENTS_SESSIONS_DB overrides both. The script applies the same rules dcode does, so a relative or ~user value is rejected rather than resolved to a database dcode never writes.

Explain the result

Synthesize the JSON rather than pasting it verbatim.

  • State the user's request, the assistant's conclusion, and significant tool actions or failures.
  • Distinguish stored facts from your interpretation.
  • For the latest turn, describe only the final user message and subsequent activity unless earlier context is required to make it understandable.
  • Mention truncation when a relevant record has content_truncated or args_truncated set.
  • Surface reconstruction problems when the result includes a top-level warnings array (for example, a corrupt checkpoint, a skipped write, or malformed metadata) so conclusions are appropriately hedged.
  • Do not expose unrelated credentials, tokens, personal data, or hidden reasoning that may appear in local records.

Safety

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.

Source: SKILL.md on GitHub

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides a utility for inspecting local conversation history stored in an SQLite database. It includes security considerations regarding the processing of potentially untrusted session data and the use of dynamic execution to ensure compatibility with the required environment.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

Signed by skilld at feb5736. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
compatibility
designed for deepagents-code

README badge

README badge for langchain-ai/deepagents/deepagents-thread-inspector