Agent Skills › langchain-ai/deepagents › deepagents-thread-inspector

deepagents-thread-inspector

GitHub

用于检查和解释本地 Deep Agents SQLite 会话存储中的对话。支持查询当前线程标题、检查状态、列出最近线程及解析元数据,适用于 LangSmith 不可用或离线场景。

libs/code/deepagents_code/built_in_skills/deepagents-thread-inspector/SKILL.md langchain-ai/deepagents

触发场景

用户要求查看或总结本地对话线程 需要查找当前会话的标题或名称 LangSmith 追踪工具不可用时需进行离线会话检查

安装

npx skills add langchain-ai/deepagents --skill deepagents-thread-inspector -g -y
更多选项

非标准路径

npx skills add https://github.com/langchain-ai/deepagents/tree/main/libs/code/deepagents_code/built_in_skills/deepagents-thread-inspector -g -y

不安装直接使用

npx skills use langchain-ai/deepagents@deepagents-thread-inspector

指定 Agent (Claude Code)

npx skills add langchain-ai/deepagents --skill deepagents-thread-inspector -a claude-code -g -y

安装 repo 全部 skill

npx skills add langchain-ai/deepagents --all -g -y

预览 repo 内 skill

npx skills add langchain-ai/deepagents --list

SKILL.md

Frontmatter
{
    "name": "deepagents-thread-inspector",
    "license": "MIT",
    "description": "Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use to look up the current thread's title or name, 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.",
    "compatibility": "designed for deepagents-code"
}

Deep Agents Thread Inspector

For conversation inspection, prefer LangSmith tooling when available for a traced thread. For saved thread titles, use the local store. 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.

Look up the current thread's title

Call get_current_thread_id to identify this conversation, then run the script with that ID and --mode summary as shown below. Read thread.thread_name: it contains the saved title, including manual renames, with a fallback to the latest root checkpoint's name for older stores. If it is null, report that the thread has no saved title. If the current ID is unavailable, ask for it; do not infer the current thread from the most recent entry in the thread list.

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.

版本历史

  • 12f70f2 当前 2026-10-20 03:50

    新增持久化线程名称功能,支持手动重命名,Inspector 可读取保存的标题及手动重命名记录,并处理旧存储的回退逻辑。

  • 28e5218 2026-08-29 04:10

    新增 DEEPAGENTS_HOME 环境变量支持,允许自定义会话存储路径,默认仍为 ~/.deepagents

  • 1e4f507 2026-08-20 16:33

同 Skill 集合

.agents/skills/textual-screenshot/SKILL.md
examples/content-builder-agent/skills/blog-post/SKILL.md
examples/content-builder-agent/skills/social-media/SKILL.md
examples/deploy-coding-agent/skills/code-review/SKILL.md
examples/deploy-coding-agent/skills/coding-prefs/SKILL.md
examples/deploy-coding-agent/skills/planning/SKILL.md
examples/deploy-content-writer/skills/blog-post/SKILL.md
examples/deploy-content-writer/skills/social-media/SKILL.md
examples/deploy-gtm-agent/skills/competitor-analysis/SKILL.md
examples/nvidia_deep_agent/skills/cudf-analytics/SKILL.md
examples/nvidia_deep_agent/skills/cuml-machine-learning/SKILL.md
examples/nvidia_deep_agent/skills/data-visualization/SKILL.md
examples/nvidia_deep_agent/skills/gpu-document-processing/SKILL.md
examples/text-to-sql-agent/skills/query-writing/SKILL.md
examples/text-to-sql-agent/skills/schema-exploration/SKILL.md
libs/cli/examples/skills/arxiv-search/SKILL.md
libs/cli/examples/skills/langgraph-docs/SKILL.md
libs/cli/examples/skills/web-research/SKILL.md
libs/code/deepagents_code/built_in_skills/deepagents-plugin-discovery/SKILL.md
libs/code/deepagents_code/built_in_skills/remember/SKILL.md
libs/code/examples/skills/arxiv-search/SKILL.md
libs/code/examples/skills/langgraph-docs/SKILL.md
libs/code/examples/skills/web-research/SKILL.md
libs/cli/examples/skills/skill-creator/SKILL.md
libs/code/deepagents_code/built_in_skills/skill-creator/SKILL.md
libs/code/examples/skills/skill-creator/SKILL.md

元信息

文件数
0
版本
12f70f2
Hash
9dd22435
收录时间
2026-08-20 16:33

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 03:35
浙ICP备14020137号-1