mixseek-debug
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMixSeek デバッグ機能
MixSeek 调试功能
概要
概要
MixSeek-Plusは複数のデバッグ用環境変数を提供しています。これらを使用して、エージェント実行時の詳細なログ出力を有効化し、問題の診断や動作確認を行うことができます。
MixSeek-Plus提供多个调试用环境变量,可通过这些变量启用Agent执行时的详细日志输出,用于问题诊断和运行验证。
環境変数一覧
环境变量一览
| 環境変数 | 値 | 効果 | スコープ |
|---|---|---|---|
| | 統合デバッグモード | MCPツールログ + |
| | claudecode-model単体のログ | claudecode-modelパッケージのみ |
| | Logfireインストルメンテーション | pydantic-ai トレース(要Logfire設定) |
| 环境变量 | 取值 | 效果 | 作用范围 |
|---|---|---|---|
| | 集成调试模式 | MCP工具日志 + |
| | 仅claudecode-model的日志 | 仅claudecode-model包 |
| | Logfire埋点 | pydantic-ai 追踪(需Logfire配置) |
推奨設定
推荐设置
通常のデバッグには のみで十分です。
MIXSEEK_VERBOSE=1MIXSEEK_VERBOSE=1- MCPツール呼び出しの開始/完了ログ
- ロガーのDEBUGレベル出力
mixseek.member_agents - ロガーのDEBUGレベル出力
claudecode_model
常规调试仅需设置 即可。
MIXSEEK_VERBOSE=1设置 后,将启用以下日志:
MIXSEEK_VERBOSE=1- MCP工具调用的开始/完成日志
- 日志器的DEBUG级别输出
mixseek.member_agents - 日志器的DEBUG级别输出
claudecode_model
使用方法
使用方法
Step 1: 環境変数の確認
Step 1: 确认环境变量
現在の環境変数設定を確認するには、以下のスクリプトを実行してください:
bash
bash skills/mixseek-debug/scripts/check-debug-env.sh要查看当前环境变量设置,执行以下脚本:
bash
bash skills/mixseek-debug/scripts/check-debug-env.shStep 2: CLI実行時の使用
Step 2: CLI执行时的使用
方法A: 環境変数を設定してCLI実行
方法A: 设置环境变量后执行CLI
bash
undefinedbash
undefined統合デバッグモード(推奨)
集成调试模式(推荐)
MIXSEEK_VERBOSE=1 uv run mskp team "タスク" --config configs/agents/team.toml
MIXSEEK_VERBOSE=1 uv run mskp team "任务" --config configs/agents/team.toml
claudecode-model単体のデバッグ
仅调试claudecode-model
CLAUDECODE_MODEL_LOG_LEVEL=DEBUG uv run mskp team "タスク" --config configs/agents/team.toml
CLAUDECODE_MODEL_LOG_LEVEL=DEBUG uv run mskp team "任务" --config configs/agents/team.toml
複数の環境変数を組み合わせ
组合多个环境变量
MIXSEEK_VERBOSE=1 MIXSEEK_LOGFIRE=1 uv run mskp team "タスク" --config configs/agents/team.toml
undefinedMIXSEEK_VERBOSE=1 MIXSEEK_LOGFIRE=1 uv run mskp team "任务" --config configs/agents/team.toml
undefined方法B: シェルセッション全体に設定
方法B: 为整个Shell会话设置
bash
undefinedbash
undefined現在のセッションに設定
为当前会话设置
export MIXSEEK_VERBOSE=1
export MIXSEEK_VERBOSE=1
以降のコマンドはすべてverboseモードで実行される
后续所有命令都将以verbose模式运行
uv run mskp team "タスク" --config configs/agents/team.toml
uv run mskp team "任务" --config configs/agents/team.toml
無効化
关闭调试模式
unset MIXSEEK_VERBOSE
undefinedunset MIXSEEK_VERBOSE
undefinedStep 3: Python APIでの使用
Step 3: Python API中的使用
python
import mixseek_pluspython
import mixseek_plus方法A: enable_verbose_mode()を使用(推奨)
方法A: 使用enable_verbose_mode()(推荐)
mixseek_plus.enable_verbose_mode()
mixseek_plus.patch_core()
mixseek_plus.enable_verbose_mode()
mixseek_plus.patch_core()
これ以降のClaudeCodeエージェントはverboseログを出力
此后的ClaudeCode Agent将输出verbose日志
コンソール出力例:
控制台输出示例:
[Tool Start] fetch_page: url=https://example.com
[Tool Start] fetch_page: url=https://example.com
[Tool Done] fetch_page: success in 1234ms
[Tool Done] fetch_page: success in 1234ms
ファイル出力先: $WORKSPACE/logs/member-agent-YYYY-MM-DD.log
文件输出路径: $WORKSPACE/logs/member-agent-YYYY-MM-DD.log
verboseモードを無効化
关闭verbose模式
mixseek_plus.disable_verbose_mode()
```python
import os
import mixseek_plusmixseek_plus.disable_verbose_mode()
```python
import os
import mixseek_plus方法B: 環境変数を直接設定
方法B: 直接设置环境变量
os.environ["MIXSEEK_VERBOSE"] = "1"
mixseek_plus.patch_core()
os.environ["MIXSEEK_VERBOSE"] = "1"
mixseek_plus.patch_core()
方法C: 一時的に有効化(コンテキストマネージャは非提供、手動管理)
方法C: 临时启用(无上下文管理器,需手动管理)
os.environ["MIXSEEK_VERBOSE"] = "1"
try:
# デバッグしたい処理
pass
finally:
del os.environ["MIXSEEK_VERBOSE"]
undefinedos.environ["MIXSEEK_VERBOSE"] = "1"
try:
# 要调试的处理逻辑
pass
finally:
del os.environ["MIXSEEK_VERBOSE"]
undefinedログ出力先
日志输出位置
コンソール出力
控制台输出
MIXSEEK_VERBOSE=1[Tool Start] <tool_name>: <params>
[Tool Done] <tool_name>: <status> in <time>ms
[Tool Result Preview] <result_preview>例:
[Tool Start] fetch_page: url=https://example.com/docs
[Tool Done] fetch_page: success in 2345ms
[Tool Result Preview] # Documentation\n\nWelcome to...设置 时,将以以下格式输出到控制台:
MIXSEEK_VERBOSE=1[Tool Start] <tool_name>: <params>
[Tool Done] <tool_name>: <status> in <time>ms
[Tool Result Preview] <result_preview>示例:
[Tool Start] fetch_page: url=https://example.com/docs
[Tool Done] fetch_page: success in 2345ms
[Tool Result Preview] # Documentation\n\nWelcome to...ファイル出力
文件输出
Member Agentのログは以下のファイルに出力されます:
$MIXSEEK_WORKSPACE/logs/member-agent-YYYY-MM-DD.log出力内容:
- ツール呼び出しの詳細(パラメータ、実行時間、ステータス)
- エージェント実行のトレース情報
- エラーとスタックトレース
Member Agent的日志将输出到以下文件:
$MIXSEEK_WORKSPACE/logs/member-agent-YYYY-MM-DD.log输出内容:
- 工具调用详情(参数、执行时间、状态)
- Agent执行的追踪信息
- 错误及堆栈追踪
claudecode_model ログ
claudecode_model 日志
MIXSEEK_VERBOSE=1claudecode_modelclaudecode_model - DEBUG - <message>设置 时, 日志器将自动设置为DEBUG级别,输出如下内容:
MIXSEEK_VERBOSE=1claudecode_modelclaudecode_model - DEBUG - <message>組み合わせ例
组合示例
1. 基本的なデバッグ(最も一般的)
1. 基础调试(最常用)
bash
MIXSEEK_VERBOSE=1 uv run mskp team "Webページを取得して要約して" --config configs/agents/team.tomlbash
MIXSEEK_VERBOSE=1 uv run mskp team "获取网页并总结" --config configs/agents/team.toml2. Logfireトレースを追加
2. 追加Logfire追踪
bash
undefinedbash
undefined事前にLogfireの設定が必要
需预先配置Logfire
MIXSEEK_VERBOSE=1 MIXSEEK_LOGFIRE=1 uv run mskp team "タスク" --config configs/agents/team.toml
undefinedMIXSEEK_VERBOSE=1 MIXSEEK_LOGFIRE=1 uv run mskp team "任务" --config configs/agents/team.toml
undefined3. claudecode-model単体のデバッグ
3. 仅调试claudecode-model
他のログを抑制してclaudecode-modelのみをデバッグしたい場合:
bash
CLAUDECODE_MODEL_LOG_LEVEL=DEBUG uv run mskp team "タスク" --config configs/agents/team.toml若需屏蔽其他日志,仅调试claudecode-model:
bash
CLAUDECODE_MODEL_LOG_LEVEL=DEBUG uv run mskp team "任务" --config configs/agents/team.tomlトラブルシューティング
故障排查
ログが出力されない
无日志输出
原因1: 環境変数が正しく設定されていない
bash
undefined原因1: 环境变量设置不正确
bash
undefined確認
检查
echo $MIXSEEK_VERBOSE
echo $MIXSEEK_VERBOSE
正しく設定
正确设置
export MIXSEEK_VERBOSE=1
**原因2: patch_core()が呼び出されていない**
Python APIを使用する場合、`patch_core()` を呼び出す必要があります:
```python
import mixseek_plus
mixseek_plus.enable_verbose_mode()
mixseek_plus.patch_core() # これを忘れないこと原因3: ログハンドラーが設定されていない
Pythonのロギング設定を確認してください:
python
import logging
logging.basicConfig(level=logging.DEBUG)export MIXSEEK_VERBOSE=1
**原因2: 未调用patch_core()**
使用Python API时,必须调用`patch_core()`:
```python
import mixseek_plus
mixseek_plus.enable_verbose_mode()
mixseek_plus.patch_core() # 请勿遗漏原因3: 未配置日志处理器
请检查Python的日志设置:
python
import logging
logging.basicConfig(level=logging.DEBUG)ファイルログが見つからない
找不到文件日志
原因: MIXSEEK_WORKSPACEが設定されていない
bash
undefined原因: 未设置MIXSEEK_WORKSPACE
bash
undefined確認
检查
echo $MIXSEEK_WORKSPACE
echo $MIXSEEK_WORKSPACE
設定
设置
export MIXSEEK_WORKSPACE=/path/to/workspace
export MIXSEEK_WORKSPACE=/path/to/workspace
ログファイルの場所
查看日志文件位置
ls -la $MIXSEEK_WORKSPACE/logs/
undefinedls -la $MIXSEEK_WORKSPACE/logs/
undefinedログ出力が多すぎる
日志输出过多
MIXSEEK_VERBOSE=1bash
undefinedMIXSEEK_VERBOSE=1bash
undefinedclaudecode-model単体のみ
仅调试claudecode-model
CLAUDECODE_MODEL_LOG_LEVEL=DEBUG uv run mskp team "タスク" --config configs/agents/team.toml
または、Pythonでロガーレベルを個別に制御:
```python
import loggingCLAUDECODE_MODEL_LOG_LEVEL=DEBUG uv run mskp team "任务" --config configs/agents/team.toml
或在Python中单独控制日志器级别:
```python
import logging特定のロガーのみDEBUGに
仅将特定日志器设为DEBUG
logging.getLogger("claudecode_model").setLevel(logging.DEBUG)
logging.getLogger("claudecode_model").setLevel(logging.DEBUG)
他はINFOに抑制
其他日志器设为INFO以屏蔽冗余日志
logging.getLogger("mixseek.member_agents").setLevel(logging.INFO)
undefinedlogging.getLogger("mixseek.member_agents").setLevel(logging.INFO)
undefinedLogfireトレースが表示されない
Logfire追踪不显示
原因: Logfireが設定されていない
Logfireを使用するには、事前に設定が必要です:
python
import logfire
logfire.configure()詳細は Logfire公式ドキュメント を参照してください。
関連ドキュメント
相关文档
- MixSeek-Plus README
- ClaudeCode Provider
- Member Agent ログ
- MixSeek-Plus README
- ClaudeCode Provider
- Member Agent 日志
次のステップ
后续步骤
デバッグが完了したら、環境変数を削除または無効化してください:
bash
unset MIXSEEK_VERBOSE
unset CLAUDECODE_MODEL_LOG_LEVEL
unset MIXSEEK_LOGFIREまたは、Python APIで:
python
import mixseek_plus
mixseek_plus.disable_verbose_mode()调试完成后,请删除或关闭环境变量:
bash
unset MIXSEEK_VERBOSE
unset CLAUDECODE_MODEL_LOG_LEVEL
unset MIXSEEK_LOGFIRE或通过Python API关闭:
python
import mixseek_plus
mixseek_plus.disable_verbose_mode()