# Graph Report - /home/xia-lab/wutx/00test/bbav5 (2026-04-15) ## Corpus Check - Large corpus: 539 files · ~689,095 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only. ## Summary - 2119 nodes · 4216 edges · 94 communities detected - Extraction: 50% EXTRACTED · 50% INFERRED · 0% AMBIGUOUS · INFERRED: 2107 edges (avg confidence: 0.5) - Token cost: 0 input · 0 output ## God Nodes (most connected - your core abstractions) 1. `AgentState` - 142 edges 2. `AgentMessage` - 142 edges 3. `BaseAgent` - 111 edges 4. `Orchestrator` - 69 edges 5. `LangGraphOrchestrator` - 53 edges 6. `KnowledgeAgentV2` - 50 edges 7. `DiagnosisAgentV2` - 48 edges 8. `LearningAgentV2` - 47 edges 9. `ResultParserAgentV2` - 47 edges 10. `ValidatorAgentV2` - 47 edges ## Surprising Connections (you probably didn't know these) - `Stage-level Tool Registry for Multi-Agent System 将bbav20311的分析阶段脚本封装为Agent可调用的To` --uses--> `JobInfo` [INFERRED] /home/xia-lab/wutx/00test/bbav5/gfa_core/mas/tools/stage_tools.py → /home/xia-lab/wutx/00test/bbav5/apps/web/pipeline_backend.py - `创建新的StageToolRegistry实例` --uses--> `JobInfo` [INFERRED] /home/xia-lab/wutx/00test/bbav5/gfa_core/mas/tools/stage_tools.py → /home/xia-lab/wutx/00test/bbav5/apps/web/pipeline_backend.py - `main()` --calls--> `ExpressionSkill` [INFERRED] /home/xia-lab/wutx/00test/bbav5/skills/karyotype/run.py → /home/xia-lab/wutx/00test/bbav5/skills/expression/run.py - `main()` --calls--> `SummarySkill` [INFERRED] /home/xia-lab/wutx/00test/bbav5/skills/karyotype/run.py → /home/xia-lab/wutx/00test/bbav5/skills/summary/run.py - `main()` --calls--> `InterspeciesSkill` [INFERRED] /home/xia-lab/wutx/00test/bbav5/skills/karyotype/run.py → /home/xia-lab/wutx/00test/bbav5/skills/interspecies/run.py ## Communities ### Community 0 - "Agent system" Cohesion: 0.02 Nodes (113): AnalysisAgent, AgentMessage, AgentState, BaseAgent, LLMMessage, QueryMode, 从文件加载系统提示词,如果不存在则返回默认提示词, create_diagnosis_agent() (+105 more) ### Community 1 - "Skills" Cohesion: 0.02 Nodes (41): AnnotationSkill, DomainSkill, GeneIdentifySkill, generate_string_url(), KaryotypeSkill, load_config(), main(), MotifSkill (+33 more) ### Community 2 - "Agent system" Cohesion: 0.04 Nodes (71): BaseAgent, BaseModel, DiagnosisAgentV2, KnowledgeAgentV2, GraphState, LangGraphOrchestrator, LearningAgentV2, agent_chat() (+63 more) ### Community 3 - "API clients" Cohesion: 0.03 Nodes (59): bbav20311 API 客户端模块 集成多个植物数据库和转录组数据平台 API 参考 ClawBio 的 gwas-lookup 多 API 并行查询模式, APIResult, MultiAPIQuery, 多 API 并行查询模块 参考 ClawBio 的 gwas-lookup 模式 同时查询多个数据库,合并结果, 获取 API 调用配置 Args: query_type: 查询类型 para, 执行单个 API 查询(带计时) Args: api_name: API 名称, 生成统一报告 Args: results: 各 API 的查询结果 query, 多 API 并行查询管理器 参考 ClawBio gwas-lookup 的并行查询模式 同时查询多个数据库,统一返回结果 (+51 more) ### Community 4 - "Memory system" Cohesion: 0.05 Nodes (15): BaseMemory, MemoryEntry, SearchResult, BaseMemory, AnalysisCase, CaseMemory, create_knowledge_agent(), KnowledgeEntry (+7 more) ### Community 5 - "Pipeline/Tools" Cohesion: 0.06 Nodes (28): ToolAdapter, ConversationStatus, 会话状态 - 使用str继承以便JSON序列化, Enum, ExecutionResult, ExecutionStatus, ToolExecutor, ModelSelector (+20 more) ### Community 6 - "Community 6" Cohesion: 0.06 Nodes (18): ABC, BaseLLMProvider, LLMResponse, BaseLLMProvider, DeepSeekProvider, DeepSeek Provider - 使用阿里云百炼平台, DeepSeek模型Provider - 通过阿里云百炼平台调用 支持的模型: - deepseek-chat: 通用对话模型, GLMProvider (+10 more) ### Community 7 - "Agent system" Cohesion: 0.05 Nodes (25): AgentMessage, from_dict(), get_message_bus(), init_message_bus(), MessageBus, MessagePriority, MessageType, Agent消息总线系统 支持Agent间异步消息传递和协作 (+17 more) ### Community 8 - "Community 8" Cohesion: 0.06 Nodes (39): AnnotationConfig, AnnotationResult, 自动运行功能注释 优先级: 本地json > 本地har > API, read_fasta(), run_annotation(), try_api(), try_local_har(), try_local_json() (+31 more) ### Community 9 - "Agent system" Cohesion: 0.07 Nodes (19): create_intent_agent_v2(), IntentAgentV2, LangGraph Orchestrator - bbav5 新版本 基于 LangGraph 的 9-Agent 工作流编排, Router Agent 节点 - 意图识别, Knowledge Agent 节点 - 知识检索, 从 manifest 文件查询已完成的阶段, Planning Agent 节点 - 任务规划, Execution Agent 节点 - 任务执行 (+11 more) ### Community 10 - "Community 10" Cohesion: 0.08 Nodes (35): Conversation, ConversationManager, ConversationSummary, Conversation Manager - 类似ChatGPT的多会话管理 支持用户维度、会话列表、历史消息, 列出用户的所有会话(类似ChatGPT左侧边栏) Returns: List[Conversation, 会话管理器 功能: 1. 创建/删除/归档会话 2. 按用户列出所有会话 3. 获取会话消息历史 4. 自动更, add_message(), AddMessageRequest (+27 more) ### Community 11 - "WeChat integration" Cohesion: 0.08 Nodes (18): 发送文本消息 Args: user_id: 用户微信ID message: 消, 发送"正在输入..."状态 Args: user_id: 用户微信ID, 发送任务完成通知 Args: user_id: 用户微信ID task_inf, 获取新消息(长轮询) Args: timeout: 轮询超时时间(秒), 启动消息监听循环 Args: callback: 消息处理回调函数 poll_, 调用 MCP 工具 首先尝试使用真实的 mcp-wechat-server,如果失败则回退到模拟模式, 任务通知器 - 与 bbav20311 任务系统集成 使用示例: notifier = WeChatTaskNotifier(, 微信集成类 使用方法: 1. 初始化: wechat = WeChatIntegration() 2. 登录: await w (+10 more) ### Community 12 - "Memory system" Cohesion: 0.11 Nodes (21): get_storage(), init_storage(), 会话存储模块 - 提供持久化存储功能 功能: 1. 用户会话历史保存到 SQLite 数据库 2. 活跃任务状态保存 3. 服务重启后能恢复会话, 关闭存储(SQLite 不需要显式关闭,但保留接口一致性), SessionStorage, add_user_task(), call_mcp_tool(), create_task() (+13 more) ### Community 13 - "API clients" Cohesion: 0.07 Nodes (23): DomainResult, EnhancedDomainAnalyzer, EnhancedReportGenerator, GeneInfo, 增强分析模块 本地优先 + API 增强的混合模式 设计原则: 1. 本地工具优先执行核心分析 2. API 用于补充最新信息和验证 3. API 失败不影, 运行本地 HMMER hmmscan 实际实现应调用 subprocess 运行 hmmscan 这里返回模拟, 解析 HMMER domtblout 文件, 用 API 增强 Domain 结果 Args: domain: 本地分析结果 (+15 more) ### Community 14 - "CLI runner scripts" Cohesion: 0.08 Nodes (28): generate_manifest(), generate_network_plot(), generate_report(), get_tool_versions(), main(), 生成PPI网络图 Args: network_data: 网络边列表 output_file: 输出PDF文件, 运行PPI分析 Args: gene_ids: 基因ID列表 species: 物种代码 ou, run_ppi_analysis() (+20 more) ### Community 15 - "CLI runner scripts" Cohesion: 0.09 Nodes (34): combine_hmm_blast_results(), compute_file_hash(), find_pep_file(), find_reference_file(), find_user_query_hmm(), get_pfam_from_rag(), get_tool_versions(), hmmfetch_bin() (+26 more) ### Community 16 - "CLI runner scripts" Cohesion: 0.1 Nodes (31): calculate_cooccurrence(), calculate_enrichment(), calculate_promoter_complexity(), calculate_timeout(), categorize_element(), compute_file_hash(), find_gene_id_file(), find_genome_file() (+23 more) ### Community 17 - "CLI runner scripts" Cohesion: 0.14 Nodes (24): check_meme_available(), compute_file_hash(), default_label(), generate_report(), get_tool_versions(), load_manifest(), main(), parse_meme_xml_basic() (+16 more) ### Community 18 - "CLI runner scripts" Cohesion: 0.14 Nodes (23): calculate_domain_metrics(), compute_file_hash(), find_latest_manifest(), generate_report(), get_tool_versions(), main(), parse_domtblout(), prepare_pfam_database() (+15 more) ### Community 19 - "CLI runner scripts" Cohesion: 0.15 Nodes (22): build_phylogenetic_tree(), compute_file_hash(), filter_gff_files(), get_file_info(), get_tool_versions(), main(), merge_protein_sequences(), pdf_to_png() (+14 more) ### Community 20 - "Pipeline/Tools" Cohesion: 0.11 Nodes (8): Stage-level Tool Registry for Multi-Agent System 将bbav20311的分析阶段脚本封装为Agent可调用的To, 执行分析阶段 Args: stage_tool: 阶段工具定义 job_id:, StageTool, StageToolExecutor, StageToolRegistry, 测试StageToolRegistry存在, TestGeneIdentifySkill, TestSkillRegistry ### Community 21 - "CLI runner scripts" Cohesion: 0.16 Nodes (19): compute_blast_stats(), compute_collinearity_stats(), compute_file_hash(), filter_gff3(), get_tool_versions(), main(), prepare_directories(), 写入符合schema v1的manifest文件 (+11 more) ### Community 22 - "CLI runner scripts" Cohesion: 0.16 Nodes (19): compute_file_hash(), compute_msa_metrics(), extract_best_model(), get_tool_versions(), main(), prepare_directories(), 写入符合schema v1的manifest文件 注意:artifacts必须是字典格式,不是列表, 验证Identify阶段的输出文件并获取必要信息 Args: workspace: 工作空间目录(workspace// 中查找输入文件 返回: {"pep": Path, "gff": Path, "hmm": Path, ", 执行基因家族鉴定 参数: job_id: 任务ID (对应input//目录) prefix: (+4 more) ### Community 40 - "CLI runner scripts" Cohesion: 0.27 Nodes (11): compute_file_hash(), get_tool_versions(), main(), prepare_directories(), 验证Identify阶段的输出文件并获取必要信息 Args: workspace: 工作空间目录(workspace/ domtblout -> filter -> 提取 unique ID list, domtblout 标准列(HMMER 3): 0 target_name 1 target_accession 2 target_le, 读取 domtblout,输出过滤后的“无#注释行”到 out_filter_path, 同时返回:过滤后命中行数、unique target_name, run_hmmsearch_pipeline() ### Community 54 - "Pipeline/Tools" Cohesion: 0.33 Nodes (8): EggNOGOutput, get_go_terms(), 读取FASTA文件,返回[(gene_id, sequence), ...], 提交序列到eggNOG,返回nogname, 运行eggNOG GO注释流程 Args: pep_file: 蛋白FASTA文件路径 output_file, read_fasta(), run_eggnog_pipeline(), submit_to_eggnog() ### Community 55 - "Agent system" Cohesion: 0.5 Nodes (7): get_agent_cost(), get_cost_report(), get_cost_summary(), get_suggestions(), main(), print_report(), print_summary() ### Community 56 - "CLI runner scripts" Cohesion: 0.25 Nodes (4): prepare_directories(), 创建RNA-seq Enrich阶段的标准目录结构, 运行eggNOG注释生成gene2go文件, run_eggnog_annotation() ### Community 57 - "Pipeline/Tools" Cohesion: 0.46 Nodes (7): add_functional_annotation(), ExpressionConfig, ExpressionResult, find_differential_genes(), generate_summary_report(), run_expression_pipeline(), run_r_expression() ### Community 58 - "Agent system" Cohesion: 0.29 Nodes (0): ### Community 59 - "Pipeline/Tools" Cohesion: 0.52 Nodes (6): call_mcp_tool(), get_messages(), handle_message(), main(), # TODO: 实际调用 bbav20311 分析任务, send_message() ### Community 60 - "CLI runner scripts" Cohesion: 0.52 Nodes (6): find_file_by_glob(), find_latest_manifest(), find_meme_xml(), load_manifest(), main(), run_combo_plot() ### Community 61 - "Community 61" Cohesion: 0.33 Nodes (4): extract_fasta_by_ids(), 依据 fasta header 的第一个 token(>ID 后空格前) 提取序列 返回写出的序列条数, merge_hmm_blast_ids(), MergeOutputs ### Community 62 - "Community 62" Cohesion: 0.47 Nodes (5): main(), Validate manifest against JSON Schema., Check that all files referenced in manifest.artifacts exist., validate_file_existence(), validate_schema() ### Community 63 - "Pipeline/Tools" Cohesion: 0.53 Nodes (5): BlastOutputs, _ensure_exe(), _parse_blast_line(), makeblastdb + blastp + 过滤 + 输出 id_list 输出文件: {prefix}.blastout {, run_blastp_pipeline() ### Community 64 - "Community 64" Cohesion: 0.4 Nodes (4): _complete_dependencies(), fast_intent_recognition(), 快速意图识别 - 基于关键词匹配,无需LLM调用, 快速意图识别 - 基于关键词匹配 Returns: dict: {"stage": str, "stages": List[s ### Community 65 - "CLI runner scripts" Cohesion: 0.6 Nodes (5): main(), _prompt_bool(), _prompt_float(), _prompt_int(), _prompt_str() ### Community 66 - "CLI runner scripts" Cohesion: 0.5 Nodes (4): integrate_with_pipeline(), 调用 annotation skill 进行功能注释 Args: protein_fasta: 蛋白序列FASTA文件路径, 集成到基因家族分析 pipeline 的示例 在基因鉴定后,对鉴定出的基因家族成员进行功能注释, run_annotation_skill() ### Community 67 - "CLI runner scripts" Cohesion: 0.7 Nodes (4): _generate_manifest(), _generate_report(), main(), _save_error_manifest() ### Community 68 - "CLI runner scripts" Cohesion: 0.6 Nodes (4): main(), parse_blast_results(), 运行BLASTP比对,优先使用conda环境中的blastp, run_blast() ### Community 69 - "CLI runner scripts" Cohesion: 0.5 Nodes (4): download_geo_expression(), get_geo_metadata(), main(), 通过NCBI E-utilities获取GEO元数据 ### Community 70 - "Workflows" Cohesion: 0.5 Nodes (2): IdentifyWorkflow, _to_dict() ### Community 71 - "CLI runner scripts" Cohesion: 0.7 Nodes (4): DomainScanOutputs, _ensure_exe(), _parse_domtblout(), run_hmmscan_pfam_pipeline() ### Community 72 - "Agent system" Cohesion: 0.4 Nodes (0): ### Community 73 - "Community 73" Cohesion: 0.6 Nodes (4): main(), parse_description_from_html(), 简单查询单个元件,使用requests库而不是Selenium, simple_query() ### Community 74 - "Agent system" Cohesion: 0.67 Nodes (2): execute_agent_task(), get_orchestrator() ### Community 75 - "Community 75" Cohesion: 0.67 Nodes (3): get_WoLF_PSORT_out_fixed(), main(), 修复版 - 使用正确的元素定位从WoLF PSORT获取结果 ### Community 76 - "Community 76" Cohesion: 0.67 Nodes (3): get_Plant_mPLoc_out(), main(), 使用Selenium自动从Plant-mPLoc网站获取亚细胞定位预测结果 ### Community 77 - "Community 77" Cohesion: 0.5 Nodes (2): list_sentence_transformers_models(), 查看sentence-transformers的内置模型 ### Community 78 - "Pipeline/Tools" Cohesion: 1.0 Nodes (2): call_mcp_tool(), main() ### Community 79 - "Community 79" Cohesion: 1.0 Nodes (2): main(), update_file() ### Community 80 - "Pipeline/Tools" Cohesion: 0.67 Nodes (2): apply_patch_to_pipeline_backend(), 自动应用补丁到 pipeline_backend.py ### Community 81 - "Memory system" Cohesion: 1.0 Nodes (2): create_persistent_memory_manager(), test_persistent_memory() ### Community 82 - "CLI runner scripts" Cohesion: 1.0 Nodes (2): main(), _now_tag() ### Community 83 - "Community 83" Cohesion: 1.0 Nodes (2): fix_syntax_errors(), main() ### Community 84 - "Community 84" Cohesion: 0.67 Nodes (2): 重构 workspace/{job_id}/final/ 目录结构 新结构: final/ ├── figures/, reorganize_workspace() ### Community 85 - "Community 85" Cohesion: 1.0 Nodes (0): ### Community 86 - "CLI runner scripts" Cohesion: 1.0 Nodes (0): ### Community 87 - "CLI runner scripts" Cohesion: 1.0 Nodes (0): ### Community 88 - "Community 88" Cohesion: 1.0 Nodes (0): ### Community 89 - "CLI runner scripts" Cohesion: 1.0 Nodes (0): ### Community 90 - "Community 90" Cohesion: 1.0 Nodes (0): ### Community 91 - "Community 91" Cohesion: 1.0 Nodes (1): 根据任务类型选择最优模型 Args: task_type: 任务类型 pref ### Community 92 - "Community 92" Cohesion: 1.0 Nodes (1): 根据查询内容自动选择模型 Args: query: 用户查询 ### Community 93 - "Community 93" Cohesion: 1.0 Nodes (0): ## Knowledge Gaps - **245 isolated node(s):** `会话存储模块 - 提供持久化存储功能 功能: 1. 用户会话历史保存到 SQLite 数据库 2. 活跃任务状态保存 3. 服务重启后能恢复会话`, `关闭存储(SQLite 不需要显式关闭,但保留接口一致性)`, `微信集成类 使用方法: 1. 初始化: wechat = WeChatIntegration() 2. 登录: await w`, `登录微信 流程: 1. 调用 login_qrcode 获取二维码 2. 显示二维码供用户扫描`, `发送文本消息 Args: user_id: 用户微信ID message: 消` (+240 more) These have ≤1 connection - possible missing edges or undocumented components. - **Thin community `Community 85`** (2 nodes): `validate_js.py`, `validate_js_in_html()` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `CLI runner scripts`** (2 nodes): `run_summary.py`, `main()` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `CLI runner scripts`** (2 nodes): `run_hmm_pipeline.py`, `main()` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 88`** (2 nodes): `plot_tree.py`, `plot_tree()` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `CLI runner scripts`** (2 nodes): `run_blast_pipeline.py`, `main()` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 90`** (1 nodes): `conversation-sidebar.js` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 91`** (1 nodes): `根据任务类型选择最优模型 Args: task_type: 任务类型 pref` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 92`** (1 nodes): `根据查询内容自动选择模型 Args: query: 用户查询` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 93`** (1 nodes): `downBge-m3.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. ## Suggested Questions _Questions this graph is uniquely positioned to answer:_ - **Why does `AgentState` connect `Agent system` to `Agent system`, `Agent system`, `Agent system`, `Agent system`?** _High betweenness centrality (0.043) - this node is a cross-community bridge._ - **Why does `AgentMessage` connect `Agent system` to `Agent system`, `Agent system`, `Agent system`, `Agent system`?** _High betweenness centrality (0.043) - this node is a cross-community bridge._ - **Why does `JobInfo` connect `Agent system` to `Community 8`, `CLI runner scripts`, `Agent system`?** _High betweenness centrality (0.036) - this node is a cross-community bridge._ - **Are the 141 inferred relationships involving `AgentState` (e.g. with `TestRouterAgent` and `TestAgentFlow`) actually correct?** _`AgentState` has 141 INFERRED edges - model-reasoned connections that need verification._ - **Are the 141 inferred relationships involving `AgentMessage` (e.g. with `TestRouterAgent` and `TestAgentFlow`) actually correct?** _`AgentMessage` has 141 INFERRED edges - model-reasoned connections that need verification._ - **Are the 104 inferred relationships involving `BaseAgent` (e.g. with `DiagnosisAgent` and `DiagnosisAgent V2 - 错误诊断与修复 自动诊断分析失败原因并提供修复建议`) actually correct?** _`BaseAgent` has 104 INFERRED edges - model-reasoned connections that need verification._ - **Are the 48 inferred relationships involving `Orchestrator` (e.g. with `ExecuteRequest` and `ChatRequest`) actually correct?** _`Orchestrator` has 48 INFERRED edges - model-reasoned connections that need verification._