diff --git a/.agents/skills/find-skills/SKILL.md b/.agents/skills/find-skills/SKILL.md new file mode 100644 index 0000000..114c663 --- /dev/null +++ b/.agents/skills/find-skills/SKILL.md @@ -0,0 +1,142 @@ +--- +name: find-skills +description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill. +--- + +# Find Skills + +This skill helps you discover and install skills from the open agent skills ecosystem. + +## When to Use This Skill + +Use this skill when the user: + +- Asks "how do I do X" where X might be a common task with an existing skill +- Says "find a skill for X" or "is there a skill for X" +- Asks "can you do X" where X is a specialized capability +- Expresses interest in extending agent capabilities +- Wants to search for tools, templates, or workflows +- Mentions they wish they had help with a specific domain (design, testing, deployment, etc.) + +## What is the Skills CLI? + +The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools. + +**Key commands:** + +- `npx skills find [query]` - Search for skills interactively or by keyword +- `npx skills add ` - Install a skill from GitHub or other sources +- `npx skills check` - Check for skill updates +- `npx skills update` - Update all installed skills + +**Browse skills at:** https://skills.sh/ + +## How to Help Users Find Skills + +### Step 1: Understand What They Need + +When a user asks for help with something, identify: + +1. The domain (e.g., React, testing, design, deployment) +2. The specific task (e.g., writing tests, creating animations, reviewing PRs) +3. Whether this is a common enough task that a skill likely exists + +### Step 2: Check the Leaderboard First + +Before running a CLI search, check the [skills.sh leaderboard](https://skills.sh/) to see if a well-known skill already exists for the domain. The leaderboard ranks skills by total installs, surfacing the most popular and battle-tested options. + +For example, top skills for web development include: +- `vercel-labs/agent-skills` — React, Next.js, web design (100K+ installs each) +- `anthropics/skills` — Frontend design, document processing (100K+ installs) + +### Step 3: Search for Skills + +If the leaderboard doesn't cover the user's need, run the find command: + +```bash +npx skills find [query] +``` + +For example: + +- User asks "how do I make my React app faster?" → `npx skills find react performance` +- User asks "can you help me with PR reviews?" → `npx skills find pr review` +- User asks "I need to create a changelog" → `npx skills find changelog` + +### Step 4: Verify Quality Before Recommending + +**Do not recommend a skill based solely on search results.** Always verify: + +1. **Install count** — Prefer skills with 1K+ installs. Be cautious with anything under 100. +2. **Source reputation** — Official sources (`vercel-labs`, `anthropics`, `microsoft`) are more trustworthy than unknown authors. +3. **GitHub stars** — Check the source repository. A skill from a repo with <100 stars should be treated with skepticism. + +### Step 5: Present Options to the User + +When you find relevant skills, present them to the user with: + +1. The skill name and what it does +2. The install count and source +3. The install command they can run +4. A link to learn more at skills.sh + +Example response: + +``` +I found a skill that might help! The "react-best-practices" skill provides +React and Next.js performance optimization guidelines from Vercel Engineering. +(185K installs) + +To install it: +npx skills add vercel-labs/agent-skills@react-best-practices + +Learn more: https://skills.sh/vercel-labs/agent-skills/react-best-practices +``` + +### Step 6: Offer to Install + +If the user wants to proceed, you can install the skill for them: + +```bash +npx skills add -g -y +``` + +The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts. + +## Common Skill Categories + +When searching, consider these common categories: + +| Category | Example Queries | +| --------------- | ---------------------------------------- | +| Web Development | react, nextjs, typescript, css, tailwind | +| Testing | testing, jest, playwright, e2e | +| DevOps | deploy, docker, kubernetes, ci-cd | +| Documentation | docs, readme, changelog, api-docs | +| Code Quality | review, lint, refactor, best-practices | +| Design | ui, ux, design-system, accessibility | +| Productivity | workflow, automation, git | + +## Tips for Effective Searches + +1. **Use specific keywords**: "react testing" is better than just "testing" +2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd" +3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills` + +## When No Skills Are Found + +If no relevant skills exist: + +1. Acknowledge that no existing skill was found +2. Offer to help with the task directly using your general capabilities +3. Suggest the user could create their own skill with `npx skills init` + +Example: + +``` +I searched for skills related to "xyz" but didn't find any matches. +I can still help you with this task directly! Would you like me to proceed? + +If this is something you do often, you could create your own skill: +npx skills init my-xyz-skill +``` diff --git a/.agents/skills/open-code-review/SKILL.md b/.agents/skills/open-code-review/SKILL.md new file mode 100644 index 0000000..ff61473 --- /dev/null +++ b/.agents/skills/open-code-review/SKILL.md @@ -0,0 +1,231 @@ +--- +name: open-code-review +description: > + Performs AI-powered code review on Git changes using the `ocr` CLI from + alibaba/open-code-review. Use when the user asks to review code, review + a pull request, review staged/unstaged changes, review a commit, or + compare branches for code quality issues. Produces line-level review + comments and can automatically apply fixes when requested. With appropriate + review rules, can detect various types of issues including bugs, security + vulnerabilities, performance problems, and code quality concerns. +license: Apache-2.0 +compatibility: > + Requires the `ocr` CLI installed (via `npm install -g + @alibaba-group/open-code-review` or GitHub release binary). Requires a + configured LLM (Anthropic or OpenAI-compatible) before first run. +metadata: + author: alibaba + homepage: https://github.com/alibaba/open-code-review + version: "1.0.0" +--- + +# Open Code Review + +A skill for invoking [open-code-review](https://github.com/alibaba/open-code-review) (`ocr`) — an open-source AI code review CLI that reads Git diffs and generates structured, line-level review comments. + +## Prerequisites check + +Before starting a review, verify the environment: + +```bash +# 1. Check the CLI is installed +which ocr || echo "NOT INSTALLED" + +# 2. Verify LLM connectivity +ocr llm test +``` + +If `ocr` is not installed, install it first: + +```bash +npm install -g @alibaba-group/open-code-review +``` + +If `ocr llm test` fails, the user must configure an LLM. Guide them with one of these options: + +**Option A — Environment variables (highest priority, recommended for CI):** + +```bash +export OCR_LLM_URL=https://api.anthropic.com/v1/messages +export OCR_LLM_TOKEN= +export OCR_LLM_MODEL=claude-opus-4-6 +export OCR_USE_ANTHROPIC=true +``` + +**Option B — Persistent config:** + +```bash +ocr config set llm.url https://api.anthropic.com/v1/messages +ocr config set llm.auth_token +ocr config set llm.model claude-opus-4-6 +ocr config set llm.use_anthropic true +``` + +Stop here and ask the user to provide credentials — never invent or hardcode API keys. + +## Workflow + +### Step 1: Gather Business Context + +Analyze the review target (commits, branch, or changes) to extract concise business context. Pass this context via `--background` to improve review quality. + +### Step 2: Run Code Review + +Run the OCR command with appropriate flags. **Always pass business context via `--background`** when available: + +```bash +ocr review --audience agent --background "business context here" [user-args] +``` + +**Argument handling:** + +- **Background context** (RECOMMENDED): use `--background "context"` or `-b "context"` to provide business context for better review quality +- **Default** (no user arguments): reviews staged, unstaged, and untracked changes (workspace mode) +- **Specific commit**: use `--commit` or `-c` to review a single commit against its parent +- **Branch comparison**: use `--from ` and `--to ` to review diff between two refs +- **Timeout**: default timeout is 10 minutes per file; adjust with `--timeout ` +- **Concurrency**: default concurrency is 8 file workers; reduce with `--concurrency ` if rate limits are hit +- **Preview mode**: use `--preview` or `-p` to preview which files will be reviewed without running the LLM +- **Installation**: if `ocr` command is not found, install it by running `npm i -g @alibaba-group/open-code-review` + +**Common invocation patterns:** + +| User says | Command to run | +|-----------|---------------| +| "review my changes" / "review the working copy" | `ocr review --audience agent -b "context"` | +| "review this PR" / "review feature branch" | `ocr review --audience agent -b "context" --from main --to ` | +| "review commit abc123" | `ocr review --audience agent -b "context" --commit abc123` | +| "what would be reviewed?" (dry-run) | `ocr review --preview` | + +**Output mode:** + +- Always use `--audience agent` to suppress progress UI and emit only the final summary + +### Step 3: Classify and Report + +For each comment from the review output, classify by priority and report all issues to the user: + +- **High**: Obvious bugs, security issues, clear mistakes, or well-founded suggestions with precise fix proposals +- **Medium**: Reasonable concerns but context-dependent, style/performance suggestions, or fixes that require manual implementation +- **Low**: Likely false positives, lacking sufficient context, nitpicks, or meaningless suggestions + +Report all comments grouped by priority level. + +### Step 4: Fix + +Before applying fixes, check whether the user requested automatic fixes: + +- If the user explicitly requested "review and fix" or similar, proceed with automatic fixes +- If the user only requested "review" without fix intent, ask for permission before applying any changes + +When fixing issues and suggestions: + +- Focus on High and Medium priority items +- Apply fixes directly to the code when safe and well-defined +- For complex fixes requiring manual intervention, clearly describe what needs to be done +- Always verify fixes with the user before committing + +## Output Format + +Each comment contains: + +- `path`: File path +- `content`: Review comment text +- `start_line` / `end_line`: Line range (both 0 means positioning failed) +- `suggestion_code`: Optional fix suggestion +- `existing_code`: Optional original code snippet +- `thinking`: Optional LLM reasoning process + +After filtering comments by priority, present results using this template: + +```markdown +## Code Review Results + +**Files reviewed**: N +**Issues found**: X high priority / Y medium priority + +### High Priority + +- **`path/to/file.java:42`** — Brief description + > Recommendation: How to fix + +### Medium Priority + +- **`path/to/file.ts:88`** — Brief description + > Recommendation: How to fix (if applicable) +``` + +If the review found no issues after filtering, simply state: "Review complete — no issues found in N files." + +**Priority classification:** + +- **High**: Obvious bugs, security issues, clear mistakes, or well-founded suggestions with precise fix proposals +- **Medium**: Reasonable concerns but context-dependent, style/performance suggestions, or fixes that require manual implementation +- **Low**: Discarded silently (likely false positives, lacking context, nitpicks, or meaningless suggestions) + +**Handling mispositioned comments:** + +When `start_line` and `end_line` are both `0`, the comment failed to locate the exact position in the file. In such cases: + +1. Read the comment content to understand the issue +2. Examine the target file mentioned in the comment +3. Identify the relevant code section based on the comment's context +4. Apply the fix or suggestion to the correct location + +## Custom Review Rules + +If the user wants project-specific rules, OCR resolves them in this priority order: + +1. `--rule ` flag (highest) +2. `/.opencodereview/rule.json` +3. `~/.opencodereview/rule.json` +4. Built-in system defaults (lowest) + +Rule file format: + +```json +{ + "rules": [ + { + "path": "**/*.java", + "rule": "All new methods must validate required parameters for null" + }, + { + "path": "**/*mapper*.xml", + "rule": "Check SQL for injection risks and missing closing tags" + } + ] +} +``` + +To preview which rule applies to a file before reviewing: + +```bash +ocr rules check src/main/java/com/example/Foo.java +``` + +## Gotchas + +- **LLM must be configured first** — `ocr review` will fail loudly if no LLM is reachable. Always run `ocr llm test` before the first review. +- **Working directory matters** — `ocr review` operates on the Git repo at the current directory. Use `--repo /path/to/repo` to run from elsewhere. +- **Untracked files are reviewed in workspace mode** — running bare `ocr review` includes staged, unstaged, *and* untracked changes. Stage selectively if you want narrower scope. +- **Large diffs may hit token limits** — files with very large diffs may be truncated. The default `MAX_TOKENS` is 58888 per request. +- **Plan phase triggers at 50 lines** — diffs exceeding 50 changed lines run an extra risk-analysis phase before main review. This adds latency but improves quality. +- **Don't pass `--audience human`** — it streams progress UI that pollutes output. Always use `--audience agent`. +- **Comment language follows config** — set `language` config to `English` or `Chinese` (default: Chinese) to control review comment language. + +## Validation + +After the review completes, verify success by checking: + +1. The command exited with code 0 +2. Comments were generated (or "No comments generated" message appears) +3. Warnings (if any) are displayed in stderr + +If errors occurred, check the stderr warnings for details about which files failed and why. + +## References + +- Full docs: https://github.com/alibaba/open-code-review +- NPM package: https://www.npmjs.com/package/@alibaba-group/open-code-review +- Issue tracker: https://github.com/alibaba/open-code-review/issues diff --git a/.codegraph/.gitignore b/.codegraph/.gitignore new file mode 100644 index 0000000..9de0f16 --- /dev/null +++ b/.codegraph/.gitignore @@ -0,0 +1,16 @@ +# CodeGraph data files +# These are local to each machine and should not be committed + +# Database +*.db +*.db-wal +*.db-shm + +# Cache +cache/ + +# Logs +*.log + +# Hook markers +.dirty diff --git a/.cursor/rules/codegraph.mdc b/.cursor/rules/codegraph.mdc new file mode 100644 index 0000000..00a3f81 --- /dev/null +++ b/.cursor/rules/codegraph.mdc @@ -0,0 +1,39 @@ +--- +description: CodeGraph MCP usage guide — when to use which tool +alwaysApply: true +--- + +## CodeGraph + +This project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot. + +### When to prefer codegraph over native search + +Use codegraph for **structural** questions — what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open. + +| Question | Tool | +|---|---| +| "Where is X defined?" / "Find symbol named X" | `codegraph_search` | +| "What calls function Y?" | `codegraph_callers` | +| "What does Y call?" | `codegraph_callees` | +| "How does X reach/become Y? / trace the flow from X to Y" | `codegraph_trace` (one call = the whole path, incl. callback/React/JSX dynamic hops) | +| "What would break if I changed Z?" | `codegraph_impact` | +| "Show me Y's signature / source / docstring" | `codegraph_node` | +| "Give me focused context for a task/area" | `codegraph_context` | +| "See several related symbols' source at once" | `codegraph_explore` | +| "What files exist under path/" | `codegraph_files` | +| "Is the index healthy?" | `codegraph_status` | + +### Rules of thumb + +- **Answer directly — don't delegate exploration.** For "how does X work" / architecture questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. For a specific **flow** ("how does X reach Y") start with `codegraph_trace` from→to — one call returns the whole path with dynamic hops bridged — then ONE `codegraph_explore` for the bodies; don't rebuild the path with `codegraph_search` + `codegraph_callers`. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent — or running a grep + read loop — repeats work codegraph already did and costs more for the same answer. +- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep — that's slower, less accurate, and wastes context. +- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call. +- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context — `codegraph_context` is one call. +- **Don't loop `codegraph_node` over many symbols** — one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more. +- **Index lag — check the staleness banner, don't guess a wait.** When a codegraph response starts with "⚠️ Some files referenced below were edited since the last index sync…", the listed files are pending re-index — Read those specific files for accurate content. Files NOT in that banner are fresh and codegraph is authoritative for them. `codegraph_status` also lists pending files under "Pending sync". + +### If `.codegraph/` doesn't exist + +The MCP server returns "not initialized." Ask the user: *"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?"* + diff --git a/.understand-anything/build_kg.py b/.understand-anything/build_kg.py new file mode 100644 index 0000000..c28abc6 --- /dev/null +++ b/.understand-anything/build_kg.py @@ -0,0 +1,818 @@ +#!/usr/bin/env python3 +"""Knowledge Graph Builder for Fischer AgentKit + +Scans all Python source files under src/agentkit/ and configs/, +extracts classes, functions, imports, and builds a comprehensive +knowledge graph JSON file. +""" + +import ast +import json +import os +import sys +import uuid +from datetime import datetime, timezone +from pathlib import Path +from typing import Any + +# Project root +PROJECT_ROOT = Path("/Users/Chiguyong/Code/Fischer/fischer-agentkit") +OUTPUT_PATH = PROJECT_ROOT / ".understand-anything" / "knowledge-graph.json" + +# Directories to scan +SCAN_DIRS = [ + PROJECT_ROOT / "src" / "agentkit", + PROJECT_ROOT / "configs", +] + +# Architecture layer mapping +LAYER_MAP = { + "server": "api", + "cli": "api", + "core": "service", + "orchestrator": "service", + "skills": "service", + "router": "service", + "memory": "data", + "session": "data", + "bus": "data", + "llm": "utility", + "mcp": "utility", + "tools": "utility", + "telemetry": "utility", + "prompts": "utility", + "quality": "utility", + "evaluation": "utility", + "evolution": "utility", + "configs": "utility", +} + +# Chinese summaries for modules +MODULE_SUMMARIES = { + "core": "核心模块 - 定义Agent基类、通信协议、ReAct引擎、任务分发、注册中心等基础组件", + "core.base": "Agent基类 - 统一Agent生命周期管理,包括启动、停止、任务执行、Handoff、进度上报", + "core.protocol": "通信协议定义 - 统一消息格式,包括TaskMessage、TaskResult、TaskProgress、HandoffMessage等", + "core.react": "ReAct推理-行动循环引擎 - 实现Think→Act→Observe循环,支持工具调用和文本解析模式", + "core.exceptions": "自定义异常体系 - 定义Agent框架所有异常类型", + "core.dispatcher": "任务分发器 - 通过Redis Queue将任务分发给Agent,支持回调、重试、进度上报", + "core.registry": "Agent注册中心 - 管理Agent的注册、发现、状态、心跳和负载均衡", + "core.config_driven": "配置驱动Agent - 从YAML/Dict配置自动组装Agent,支持llm_generate/tool_call/custom三种模式", + "core.compressor": "上下文压缩器 - 长会话自动压缩历史消息,支持LLM摘要和简单截断策略", + "core.trace": "执行轨迹记录器 - 记录ReAct执行过程中的完整轨迹,为反思和可观测性提供数据", + "core.shared_workspace": "共享工作空间 - 基于Redis的Agent间共享状态存储,支持读写、锁操作", + "core.agent_pool": "Agent实例池 - 运行时管理Agent的创建、获取、删除", + "core.orchestrator": "多Agent协作编排器 - 实现Orchestrator-Worker模式,支持任务分解、并行执行、自适应编排", + "core.headroom_compressor": "Headroom AI压缩器 - 基于Headroom AI的上下文压缩实现", + "core.logging": "日志配置 - 统一日志格式和配置", + "core.standalone": "独立运行模式 - 支持Agent脱离框架独立运行", + + "llm": "LLM网关模块 - 多Provider统一网关,支持OpenAI/Anthropic/Gemini/文心/豆包/元宝等", + "llm.gateway": "LLM网关 - 统一多Provider调用接口,支持路由、重试、流式输出", + "llm.protocol": "LLM协议定义 - 定义LLMProvider、LLMRequest、LLMResponse等接口", + "llm.config": "LLM配置 - 模型别名、Provider配置管理", + "llm.retry": "LLM重试策略 - 指数退避重试和错误处理", + "llm.providers": "LLM Provider实现 - 各大模型服务商的具体适配器", + "llm.providers.openai": "OpenAI Provider - 支持GPT-4/GPT-3.5等模型", + "llm.providers.anthropic": "Anthropic Provider - 支持Claude系列模型", + "llm.providers.gemini": "Gemini Provider - 支持Google Gemini模型", + "llm.providers.wenxin": "文心一言Provider - 支持百度文心大模型", + "llm.providers.doubao": "豆包Provider - 支持字节豆包大模型", + "llm.providers.yuanbao": "元宝Provider - 支持腾讯元宝大模型", + "llm.providers.tracker": "LLM调用追踪器 - 记录和统计LLM调用", + + "tools": "工具模块 - 提供Agent可调用的各类工具", + "tools.base": "工具基类 - 定义Tool接口和标准执行流程", + "tools.registry": "工具注册中心 - 管理工具的注册、发现、获取", + "tools.shell": "Shell工具 - 执行系统命令", + "tools.web_search": "Web搜索工具 - 执行网络搜索", + "tools.web_crawl": "Web爬取工具 - 爬取网页内容", + "tools.memory_tool": "记忆工具 - Agent记忆读写操作", + "tools.ask_human": "人工介入工具 - 请求人类输入", + "tools.schema_tools": "Schema工具 - JSON Schema相关操作", + "tools.function_tool": "函数工具 - 将Python函数包装为Tool", + "tools.agent_tool": "Agent工具 - 将Agent包装为可调用Tool", + "tools.mcp_tool": "MCP工具 - MCP协议工具适配器", + "tools.composition": "工具组合 - 支持工具链式组合", + "tools.baidu_search": "百度搜索工具 - 百度搜索引擎集成", + "tools.headroom_retrieve": "Headroom检索工具 - Headroom AI知识检索", + + "memory": "记忆模块 - 多层记忆系统,支持工作记忆、情景记忆、语义记忆", + "memory.base": "记忆基类 - 定义Memory接口", + "memory.working": "工作记忆 - 基于Redis的短期工作记忆", + "memory.episodic": "情景记忆 - 基于向量数据库的长期情景记忆", + "memory.semantic": "语义记忆 - 基于RAG服务的语义知识检索", + "memory.profile": "用户画像 - 用户偏好和历史信息管理", + "memory.retriever": "记忆检索器 - 统一多层记忆检索接口", + "memory.embedder": "嵌入器 - 文本向量化,支持OpenAI Embedding", + "memory.models": "记忆数据模型 - Pydantic模型定义", + "memory.rag_loop": "RAG循环 - 检索增强生成的迭代循环", + "memory.query_transformer": "查询转换器 - 优化检索查询", + "memory.relevance_scorer": "相关性评分器 - 评估检索结果相关性", + "memory.contextual_retrieval": "上下文检索 - 基于上下文的检索增强", + "memory.http_rag": "HTTP RAG服务 - 远程RAG API客户端", + + "skills": "技能模块 - 定义可复用的Agent技能,包含意图、工具和质量门控", + "skills.base": "技能基类 - 定义Skill、SkillConfig、IntentConfig等", + "skills.registry": "技能注册中心 - 管理技能的注册、发现、获取", + "skills.loader": "技能加载器 - 从YAML配置加载技能定义", + "skills.pipeline": "技能Pipeline - 技能编排流程", + "skills.skill_md": "Markdown技能 - 从Markdown文档生成技能", + "skills.geo_pipeline": "GEO Pipeline - 地理信息处理Pipeline", + + "orchestrator": "编排模块 - Pipeline编排引擎,支持DAG工作流", + "orchestrator.pipeline_engine": "Pipeline引擎 - 执行DAG定义的工作流", + "orchestrator.pipeline_schema": "Pipeline Schema - Pipeline配置模型定义", + "orchestrator.pipeline_state": "Pipeline状态 - Pipeline执行状态管理", + "orchestrator.pipeline_models": "Pipeline模型 - Pipeline数据模型", + "orchestrator.pipeline_loader": "Pipeline加载器 - 从YAML加载Pipeline定义", + "orchestrator.reflection": "反思模块 - 执行后反思和改进", + "orchestrator.retry": "重试策略 - Pipeline步骤重试机制", + "orchestrator.compensation": "补偿机制 - Pipeline失败时的补偿操作", + "orchestrator.handoff": "Handoff - Agent间任务转交", + "orchestrator.dynamic_pipeline": "动态Pipeline - 运行时动态构建Pipeline", + + "router": "路由模块 - 意图路由,将用户输入匹配到对应技能", + "router.intent": "意图路由器 - 基于LLM的意图识别和路由", + + "quality": "质量模块 - 输出质量门控和标准化", + "quality.gate": "质量门控 - 检查Agent输出是否满足质量要求", + "quality.output": "输出标准化 - 统一Agent输出格式", + + "prompts": "Prompt模块 - Prompt模板和渲染", + "prompts.template": "Prompt模板 - 支持变量替换和Section组合", + "prompts.section": "Prompt Section - 定义Prompt的各组成部分", + + "bus": "消息总线模块 - Agent间异步通信", + "bus.protocol": "总线协议 - 定义消息总线接口", + "bus.message": "消息定义 - Agent间通信消息格式", + "bus.memory_bus": "内存消息总线 - 基于进程内队列的消息总线", + "bus.redis_bus": "Redis消息总线 - 基于Redis Pub/Sub的消息总线", + + "session": "会话模块 - 会话管理和持久化", + "session.manager": "会话管理器 - 管理对话会话的创建、获取、更新", + "session.store": "会话存储 - 会话数据的持久化存储", + "session.models": "会话模型 - 会话相关的数据模型", + + "server": "服务器模块 - FastAPI HTTP/WebSocket服务", + "server.app": "FastAPI应用 - 创建和配置FastAPI应用实例", + "server.config": "服务器配置 - 服务器运行参数配置", + "server.runner": "服务器运行器 - 启动和管理服务器进程", + "server.middleware": "中间件 - 请求处理中间件", + "server.client": "API客户端 - 服务端API客户端封装", + "server.client_config": "客户端配置 - API客户端配置管理", + "server.task_store": "任务存储 - 服务端任务状态存储", + "server.routes": "路由模块 - HTTP/WebSocket路由定义", + "server.routes.chat": "聊天路由 - 对话API端点", + "server.routes.ws": "WebSocket路由 - 实时通信端点", + "server.routes.tasks": "任务路由 - 任务管理API", + "server.routes.agents": "Agent路由 - Agent管理API", + "server.routes.skills": "技能路由 - 技能管理API", + "server.routes.memory": "记忆路由 - 记忆管理API", + "server.routes.llm": "LLM路由 - LLM配置和调用API", + "server.routes.health": "健康检查路由 - 服务健康状态端点", + "server.routes.metrics": "指标路由 - 运行指标API", + "server.routes.evolution": "进化路由 - Agent进化管理API", + + "cli": "命令行模块 - CLI工具", + "cli.main": "CLI入口 - Typer应用主入口", + "cli.chat": "聊天命令 - 交互式对话命令", + "cli.init": "初始化命令 - 项目初始化", + "cli.onboarding": "引导命令 - 新用户引导流程", + "cli.skill": "技能命令 - 技能管理CLI", + "cli.task": "任务命令 - 任务提交和管理CLI", + "cli.pair": "配对命令 - Agent配对", + "cli.usage": "使用统计命令 - 使用情况统计", + "cli.templates": "模板命令 - Agent模板管理", + + "mcp": "MCP协议模块 - Model Context Protocol集成", + "mcp.client": "MCP客户端 - 连接MCP服务器", + "mcp.server": "MCP服务器 - 提供MCP服务", + "mcp.manager": "MCP管理器 - 管理MCP连接", + "mcp.transport": "MCP传输层 - MCP通信传输实现", + + "telemetry": "遥测模块 - 可观测性支持", + "telemetry.tracing": "分布式追踪 - OpenTelemetry追踪集成", + "telemetry.metrics": "指标收集 - 运行指标收集和导出", + "telemetry.setup": "遥测设置 - 初始化遥测组件", + + "evolution": "进化模块 - Agent自我进化能力", + "evolution.lifecycle": "进化生命周期 - EvolutionMixin,任务后触发进化", + "evolution.reflector": "反思器 - 分析任务执行结果,生成改进建议", + "evolution.llm_reflector": "LLM反思器 - 使用LLM进行深度反思", + "evolution.prompt_optimizer": "Prompt优化器 - 自动优化Agent Prompt", + "evolution.strategy_tuner": "策略调优器 - 调整Agent执行策略", + "evolution.genetic": "遗传算法 - 基于遗传算法的Prompt进化", + "evolution.fitness": "适应度评估 - 评估进化变体的质量", + "evolution.ab_tester": "A/B测试 - 对比测试不同进化变体", + "evolution.evolution_store": "进化存储 - 持久化进化历史", + "evolution.models": "进化模型 - 进化相关数据模型", + + "evaluation": "评估模块 - Agent输出质量评估", + "evaluation.ragas_evaluator": "RAGAS评估器 - 使用RAGAS框架评估RAG质量", + + "configs": "配置模块 - Pipeline和技能YAML配置", + "configs.geo_server": "GEO服务器 - 地理信息HTTP服务", + "configs.geo_handlers": "GEO处理器 - 地理信息请求处理", + "configs.geo_tools": "GEO工具 - 地理信息相关工具定义", +} + + +def get_layer(file_path: str) -> str: + """Determine architecture layer from file path.""" + parts = file_path.replace("\\", "/").split("/") + # Check for configs/ prefix + if "configs" in parts: + return "utility" + # For src/agentkit/__init__.py and __main__.py, treat as service + if parts[-1] in ("__init__.py", "__main__.py") and len(parts) <= 4: + return "service" + for part in parts: + if part in LAYER_MAP: + return LAYER_MAP[part] + return "unknown" + + +def get_module_key(file_path: str) -> str: + """Get module key for summary lookup.""" + # Convert file path to module key + rel = file_path + if rel.startswith("src/agentkit/"): + rel = rel[len("src/agentkit/"):] + elif rel.startswith("configs/"): + rel = rel[len("configs/"):] + + # Remove __init__.py and .py suffix + rel = rel.replace("/__init__.py", "").replace(".py", "") + return rel + + +def get_file_summary(file_path: str, docstring: str = "") -> str: + """Get Chinese summary for a file.""" + # If we have a docstring, use it as base + if docstring: + # Clean up docstring + doc = docstring.strip().split("\n")[0].strip() + if doc: + return doc + + key = get_module_key(file_path) + # Try exact match first + if key in MODULE_SUMMARIES: + return MODULE_SUMMARIES[key] + # Try parent module + parts = key.split("/") + for i in range(len(parts) - 1, 0, -1): + parent_key = "/".join(parts[:i]) + if parent_key in MODULE_SUMMARIES: + return MODULE_SUMMARIES[parent_key] + return f"模块 {key}" + + +def estimate_complexity(node: ast.AST) -> str: + """Estimate complexity of an AST node.""" + if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)): + # Count branches, loops, nested functions + complexity = 1 + for child in ast.walk(node): + if isinstance(child, (ast.If, ast.While, ast.For, ast.ExceptHandler)): + complexity += 1 + elif isinstance(child, (ast.And, ast.Or)): + complexity += 1 + if complexity <= 3: + return "simple" + elif complexity <= 8: + return "moderate" + return "complex" + elif isinstance(node, ast.ClassDef): + methods = [n for n in node.body if isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef))] + if len(methods) <= 3: + return "simple" + elif len(methods) <= 8: + return "moderate" + return "complex" + return "simple" + + +def extract_class_info(node: ast.ClassDef, file_path: str) -> dict: + """Extract class information from AST node.""" + base_classes = [] + for base in node.bases: + if isinstance(base, ast.Name): + base_classes.append(base.id) + elif isinstance(base, ast.Attribute): + base_classes.append(ast.dump(base)) + + methods = [] + for item in node.body: + if isinstance(item, (ast.FunctionDef, ast.AsyncFunctionDef)): + params = [arg.arg for arg in item.args.args if arg.arg != "self"] + methods.append({ + "name": item.name, + "params": params, + "is_async": isinstance(item, ast.AsyncFunctionDef), + }) + + # Extract class docstring + docstring = ast.get_docstring(node) or "" + + return { + "name": node.name, + "base_classes": base_classes, + "methods": methods, + "complexity": estimate_complexity(node), + "docstring": docstring, + } + + +def extract_function_info(node: ast.FunctionDef | ast.AsyncFunctionDef) -> dict: + """Extract function information from AST node.""" + params = [arg.arg for arg in node.args.args] + + return_type = "" + if node.returns: + if isinstance(node.returns, ast.Name): + return_type = node.returns.id + elif isinstance(node.returns, ast.Constant): + return_type = str(node.returns.value) + else: + return_type = ast.dump(node.returns) + + return { + "name": node.name, + "params": params, + "return_type": return_type, + "is_async": isinstance(node, ast.AsyncFunctionDef), + "complexity": estimate_complexity(node), + } + + +def extract_imports(tree: ast.AST, file_path: str) -> list[dict]: + """Extract import information from AST.""" + imports = [] + for node in ast.walk(tree): + if isinstance(node, ast.ImportFrom): + if node.module and (node.module.startswith("agentkit") or node.module.startswith("configs")): + for alias in node.names: + imports.append({ + "from_module": node.module, + "import_name": alias.name, + }) + elif isinstance(node, ast.Import): + for alias in node.names: + if alias.name.startswith("agentkit") or alias.name.startswith("configs"): + imports.append({ + "from_module": None, + "import_name": alias.name, + }) + return imports + + +def module_to_file_path(module: str) -> str: + """Convert Python module path to file path.""" + parts = module.split(".") + + # Handle agentkit modules + if module.startswith("agentkit"): + # Skip "agentkit" prefix, it's under src/ + sub_parts = parts[1:] # skip "agentkit" + if not sub_parts: + return "src/agentkit/__init__.py" + # Try as package __init__.py + init_path = PROJECT_ROOT / "src" / "agentkit" / "/".join(sub_parts) / "__init__.py" + if init_path.exists(): + return f"src/agentkit/{'/'.join(sub_parts)}/__init__.py" + # Try as module.py + mod_path = PROJECT_ROOT / "src" / "agentkit" / ("/".join(sub_parts) + ".py") + if mod_path.exists(): + return f"src/agentkit/{'/'.join(sub_parts)}.py" + + # Handle configs modules + if module.startswith("configs"): + sub_parts = parts[1:] # skip "configs" + if not sub_parts: + return "configs/__init__.py" + mod_path = PROJECT_ROOT / "configs" / ("/".join(sub_parts) + ".py") + if mod_path.exists(): + return f"configs/{'/'.join(sub_parts)}.py" + + return "" + + +def scan_file(file_path: Path) -> dict: + """Scan a single Python file and extract all information.""" + try: + source = file_path.read_text(encoding="utf-8") + tree = ast.parse(source) + except (SyntaxError, UnicodeDecodeError): + return {"classes": [], "functions": [], "imports": [], "top_level_functions": [], "docstring": ""} + + rel_path = str(file_path.relative_to(PROJECT_ROOT)) + + # Extract module docstring + docstring = ast.get_docstring(tree) or "" + + classes = [] + functions = [] + top_level_functions = [] + + for node in ast.iter_child_nodes(tree): + if isinstance(node, ast.ClassDef): + classes.append(extract_class_info(node, rel_path)) + elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)): + func_info = extract_function_info(node) + functions.append(func_info) + top_level_functions.append(func_info) + + imports = extract_imports(tree, rel_path) + + return { + "classes": classes, + "functions": top_level_functions, + "imports": imports, + "rel_path": rel_path, + "docstring": docstring, + } + + +def build_knowledge_graph(): + """Build the complete knowledge graph.""" + # Collect all Python files + py_files = [] + for scan_dir in SCAN_DIRS: + if scan_dir.exists(): + for py_file in scan_dir.rglob("*.py"): + py_files.append(py_file) + + print(f"Found {len(py_files)} Python files to scan") + + # Scan all files + file_data = {} + for py_file in sorted(py_files): + data = scan_file(py_file) + rel_path = data["rel_path"] + file_data[rel_path] = data + + # Build nodes and edges + nodes = [] + edges = [] + + # Track all node IDs for edge building + file_node_ids = {} + class_node_ids = {} + func_node_ids = {} + + # 1. Create file nodes + for rel_path, data in file_data.items(): + node_id = f"file:{rel_path}" + layer = get_layer(rel_path) + summary = get_file_summary(rel_path, data.get("docstring", "")) + + tags = [] + parts = rel_path.replace("\\", "/").split("/") + for p in parts: + if p not in ("src", "agentkit", "__init__.py") and not p.endswith(".py"): + tags.append(p) + + nodes.append({ + "id": node_id, + "type": "file", + "name": rel_path.split("/")[-1], + "filePath": rel_path, + "layer": layer, + "summary": summary, + "tags": tags, + "complexity": "moderate" if data["classes"] or data["functions"] else "simple", + }) + file_node_ids[rel_path] = node_id + + # 2. Create class nodes + for rel_path, data in file_data.items(): + for cls in data["classes"]: + class_id = f"class:{cls['name']}" + layer = get_layer(rel_path) + + method_names = [m["name"] for m in cls["methods"]] + # Use docstring for summary if available + docstring = cls.get("docstring", "") + if docstring: + # Take first line of docstring + summary = docstring.strip().split("\n")[0].strip() + else: + summary = f"{cls['name']}类" + if cls["base_classes"]: + summary += f",继承自{', '.join(cls['base_classes'])}" + if method_names: + summary += f",包含方法: {', '.join(method_names[:5])}" + if len(method_names) > 5: + summary += f" 等{len(method_names)}个方法" + + nodes.append({ + "id": class_id, + "type": "class", + "name": cls["name"], + "filePath": rel_path, + "layer": layer, + "summary": summary, + "tags": [cls["name"]], + "complexity": cls["complexity"], + }) + class_node_ids[cls["name"]] = class_id + + # Edge: file contains class + edges.append({ + "id": f"edge:{uuid.uuid4().hex[:8]}", + "source": file_node_ids[rel_path], + "target": class_id, + "type": "contains", + "label": f"定义类 {cls['name']}", + }) + + # Edge: class extends base classes + for base in cls["base_classes"]: + if base in class_node_ids: + edges.append({ + "id": f"edge:{uuid.uuid4().hex[:8]}", + "source": class_id, + "target": class_node_ids[base], + "type": "extends", + "label": f"继承 {base}", + }) + + # 3. Create method nodes + for method in cls["methods"]: + method_id = f"func:{cls['name']}.{method['name']}" + async_tag = "异步" if method["is_async"] else "" + summary = f"{cls['name']}.{method['name']}({', '.join(method['params'])}) {async_tag}方法" + + nodes.append({ + "id": method_id, + "type": "function", + "name": method["name"], + "filePath": rel_path, + "layer": layer, + "summary": summary, + "tags": [cls["name"], method["name"]], + "complexity": "simple", + }) + func_node_ids[f"{cls['name']}.{method['name']}"] = method_id + + # Edge: class contains method + edges.append({ + "id": f"edge:{uuid.uuid4().hex[:8]}", + "source": class_id, + "target": method_id, + "type": "contains", + "label": f"方法 {method['name']}", + }) + + # 4. Create top-level function nodes + for rel_path, data in file_data.items(): + for func in data["functions"]: + func_id = f"func:{func['name']}" + async_tag = "异步" if func["is_async"] else "" + summary = f"{func['name']}({', '.join(func['params'])}) {async_tag}函数" + if func["return_type"]: + summary += f" → {func['return_type']}" + + nodes.append({ + "id": func_id, + "type": "function", + "name": func["name"], + "filePath": rel_path, + "layer": get_layer(rel_path), + "summary": summary, + "tags": [func["name"]], + "complexity": func["complexity"], + }) + func_node_ids[func["name"]] = func_id + + # Edge: file contains function + edges.append({ + "id": f"edge:{uuid.uuid4().hex[:8]}", + "source": file_node_ids[rel_path], + "target": func_id, + "type": "contains", + "label": f"定义函数 {func['name']}", + }) + + # 5. Create import edges + for rel_path, data in file_data.items(): + for imp in data["imports"]: + if imp["from_module"]: + target_path = module_to_file_path(imp["from_module"]) + if target_path and target_path in file_node_ids: + edges.append({ + "id": f"edge:{uuid.uuid4().hex[:8]}", + "source": file_node_ids[rel_path], + "target": file_node_ids[target_path], + "type": "imports", + "label": f"导入 {imp['import_name']}", + }) + + # 6. Build tours + tours = build_tours(file_data, file_node_ids, class_node_ids, func_node_ids) + + # Get git commit hash + git_hash = "045fecd4cee49f04dc7b693c14d35ca38a0d92cb" + + # Build final JSON + graph = { + "version": "1.0.0", + "project": { + "name": "Fischer AgentKit", + "languages": ["python"], + "frameworks": ["FastAPI", "Pydantic", "SQLAlchemy", "Typer", "Redis"], + "description": "AI驱动的Agent框架,支持ReAct引擎、多LLM网关、Pipeline编排、自适应反思和消息总线", + "analyzedAt": datetime.now(timezone.utc).isoformat(), + "gitCommitHash": git_hash, + }, + "nodes": nodes, + "edges": edges, + "tours": tours, + } + + return graph + + +def build_tours(file_data, file_node_ids, class_node_ids, func_node_ids): + """Build guided learning tours.""" + tours = [] + + # Tour 1: Entry Points + tours.append({ + "id": "tour:entry-points", + "name": "入口点导览", + "description": "从项目入口开始,了解如何启动和使用AgentKit", + "steps": [ + {"nodeId": "file:src/agentkit/__main__.py", "why": "Python模块入口,python -m agentkit"}, + {"nodeId": "file:src/agentkit/__init__.py", "why": "包入口,导出核心公共API"}, + {"nodeId": "file:src/agentkit/cli/main.py", "why": "CLI主入口,Typer应用定义"}, + {"nodeId": "file:src/agentkit/server/app.py", "why": "HTTP服务入口,FastAPI应用创建"}, + ], + }) + + # Tour 2: Core Agent Lifecycle + tours.append({ + "id": "tour:agent-lifecycle", + "name": "Agent生命周期导览", + "description": "深入理解Agent从创建到执行任务的完整生命周期", + "steps": [ + {"nodeId": "class:BaseAgent", "why": "Agent基类,定义标准生命周期和可插拔能力"}, + {"nodeId": "func:BaseAgent.start", "why": "Agent启动流程:连接Redis→注册→心跳→监听"}, + {"nodeId": "func:BaseAgent.execute", "why": "任务执行框架方法:on_task_start→handle_task→quality_gate→on_task_complete"}, + {"nodeId": "func:BaseAgent.handle_task", "why": "抽象方法,子类实现业务逻辑"}, + {"nodeId": "class:ConfigDrivenAgent", "why": "配置驱动Agent,从YAML自动组装"}, + {"nodeId": "func:ConfigDrivenAgent.handle_task", "why": "根据execution_mode路由到react/direct/custom模式"}, + {"nodeId": "class:AgentConfig", "why": "Agent配置模型,支持YAML/Dict构建"}, + ], + }) + + # Tour 3: ReAct Engine + tours.append({ + "id": "tour:react-engine", + "name": "ReAct引擎导览", + "description": "理解ReAct推理-行动循环的核心实现", + "steps": [ + {"nodeId": "class:ReActEngine", "why": "ReAct引擎核心,Think→Act→Observe循环"}, + {"nodeId": "func:ReActEngine.execute", "why": "执行ReAct循环,支持超时和取消"}, + {"nodeId": "func:ReActEngine.execute_stream", "why": "流式执行,逐步yield事件"}, + {"nodeId": "func:ReActEngine._execute_tool", "why": "工具调用执行,处理成功和失败"}, + {"nodeId": "func:ReActEngine._parse_text_tool_calls", "why": "文本解析模式,支持Action和代码块格式"}, + {"nodeId": "class:ReActStep", "why": "单步记录数据结构"}, + {"nodeId": "class:ReActResult", "why": "ReAct执行结果数据结构"}, + {"nodeId": "class:ReActEvent", "why": "流式执行事件数据结构"}, + ], + }) + + # Tour 4: LLM Gateway + tours.append({ + "id": "tour:llm-gateway", + "name": "LLM网关导览", + "description": "了解多Provider统一网关的设计和实现", + "steps": [ + {"nodeId": "class:LLMGateway", "why": "LLM网关核心,统一多Provider调用接口"}, + {"nodeId": "file:src/agentkit/llm/protocol.py", "why": "LLM协议定义,LLMProvider/LLMRequest/LLMResponse"}, + {"nodeId": "file:src/agentkit/llm/config.py", "why": "模型别名和Provider配置"}, + {"nodeId": "file:src/agentkit/llm/providers/openai.py", "why": "OpenAI Provider实现"}, + {"nodeId": "file:src/agentkit/llm/providers/anthropic.py", "why": "Anthropic Provider实现"}, + {"nodeId": "file:src/agentkit/llm/retry.py", "why": "LLM重试策略"}, + ], + }) + + # Tour 5: Memory System + tours.append({ + "id": "tour:memory-system", + "name": "记忆系统导览", + "description": "理解多层记忆系统的架构和实现", + "steps": [ + {"nodeId": "file:src/agentkit/memory/base.py", "why": "记忆基类接口定义"}, + {"nodeId": "file:src/agentkit/memory/retriever.py", "why": "统一记忆检索器,整合工作/情景/语义记忆"}, + {"nodeId": "file:src/agentkit/memory/working.py", "why": "工作记忆 - 基于Redis的短期记忆"}, + {"nodeId": "file:src/agentkit/memory/episodic.py", "why": "情景记忆 - 基于向量的长期记忆"}, + {"nodeId": "file:src/agentkit/memory/semantic.py", "why": "语义记忆 - RAG服务集成"}, + {"nodeId": "file:src/agentkit/memory/embedder.py", "why": "文本向量化嵌入器"}, + ], + }) + + # Tour 6: Orchestration + tours.append({ + "id": "tour:orchestration", + "name": "编排系统导览", + "description": "了解多Agent协作编排和Pipeline引擎", + "steps": [ + {"nodeId": "class:Orchestrator", "why": "多Agent协作编排器,Orchestrator-Worker模式"}, + {"nodeId": "func:Orchestrator.execute", "why": "编排执行:分解→执行→汇总"}, + {"nodeId": "func:Orchestrator.execute_adaptive", "why": "自适应编排:执行→评估→再分解循环"}, + {"nodeId": "file:src/agentkit/orchestrator/pipeline_engine.py", "why": "Pipeline引擎,执行DAG工作流"}, + {"nodeId": "file:src/agentkit/orchestrator/pipeline_schema.py", "why": "Pipeline配置模型"}, + {"nodeId": "file:src/agentkit/orchestrator/reflection.py", "why": "执行后反思模块"}, + ], + }) + + # Tour 7: Skills & Router + tours.append({ + "id": "tour:skills-router", + "name": "技能与路由导览", + "description": "了解技能定义、注册和意图路由机制", + "steps": [ + {"nodeId": "file:src/agentkit/skills/base.py", "why": "技能基类和配置定义"}, + {"nodeId": "class:SkillRegistry", "why": "技能注册中心"}, + {"nodeId": "file:src/agentkit/skills/loader.py", "why": "从YAML加载技能定义"}, + {"nodeId": "class:IntentRouter", "why": "意图路由器,匹配用户输入到技能"}, + {"nodeId": "file:src/agentkit/router/intent.py", "why": "意图路由实现"}, + ], + }) + + # Tour 8: Evolution + tours.append({ + "id": "tour:evolution", + "name": "进化系统导览", + "description": "了解Agent自我进化的机制和实现", + "steps": [ + {"nodeId": "file:src/agentkit/evolution/lifecycle.py", "why": "进化生命周期Mixin"}, + {"nodeId": "file:src/agentkit/evolution/reflector.py", "why": "反思器 - 分析结果生成改进建议"}, + {"nodeId": "file:src/agentkit/evolution/prompt_optimizer.py", "why": "Prompt自动优化"}, + {"nodeId": "file:src/agentkit/evolution/genetic.py", "why": "遗传算法进化"}, + {"nodeId": "file:src/agentkit/evolution/ab_tester.py", "why": "A/B测试对比"}, + ], + }) + + # Tour 9: Infrastructure + tours.append({ + "id": "tour:infrastructure", + "name": "基础设施导览", + "description": "了解消息总线、会话管理、遥测等基础设施", + "steps": [ + {"nodeId": "file:src/agentkit/bus/protocol.py", "why": "消息总线协议接口"}, + {"nodeId": "file:src/agentkit/bus/redis_bus.py", "why": "Redis Pub/Sub消息总线"}, + {"nodeId": "file:src/agentkit/bus/memory_bus.py", "why": "进程内消息总线"}, + {"nodeId": "file:src/agentkit/session/manager.py", "why": "会话管理器"}, + {"nodeId": "file:src/agentkit/telemetry/tracing.py", "why": "OpenTelemetry追踪集成"}, + {"nodeId": "file:src/agentkit/telemetry/metrics.py", "why": "运行指标收集"}, + ], + }) + + return tours + + +def main(): + """Main entry point.""" + print("Building knowledge graph for Fischer AgentKit...") + + graph = build_knowledge_graph() + + # Ensure output directory exists + OUTPUT_PATH.parent.mkdir(parents=True, exist_ok=True) + + # Write JSON + with open(OUTPUT_PATH, "w", encoding="utf-8") as f: + json.dump(graph, f, ensure_ascii=False, indent=2) + + print(f"Knowledge graph written to {OUTPUT_PATH}") + print(f" Nodes: {len(graph['nodes'])}") + print(f" Edges: {len(graph['edges'])}") + print(f" Tours: {len(graph['tours'])}") + + # Print layer statistics + layer_counts = {} + for node in graph["nodes"]: + layer = node["layer"] + layer_counts[layer] = layer_counts.get(layer, 0) + 1 + + print("\nLayer distribution:") + for layer, count in sorted(layer_counts.items()): + print(f" {layer}: {count} nodes") + + # Print type statistics + type_counts = {} + for node in graph["nodes"]: + t = node["type"] + type_counts[t] = type_counts.get(t, 0) + 1 + + print("\nNode type distribution:") + for t, count in sorted(type_counts.items()): + print(f" {t}: {count} nodes") + + +if __name__ == "__main__": + main() diff --git a/.understand-anything/dashboard.html b/.understand-anything/dashboard.html new file mode 100644 index 0000000..9545cdf --- /dev/null +++ b/.understand-anything/dashboard.html @@ -0,0 +1,315 @@ + + + + + +Fischer AgentKit - Knowledge Graph Dashboard + + + + +
+

Fischer AgentKit Knowledge Graph

+
+
+
+ +
+
+
+ +
+
+
+
+ + + + diff --git a/.understand-anything/fingerprints.json b/.understand-anything/fingerprints.json new file mode 100644 index 0000000..d6a70da --- /dev/null +++ b/.understand-anything/fingerprints.json @@ -0,0 +1,250 @@ +{ + "configs/__init__.py": "830897da8bc1af33", + "configs/geo_handlers.py": "cbcf89b4d9da69c9", + "configs/geo_server.py": "41ddafbef18eea22", + "configs/geo_tools.py": "8a29de5d7511d2a0", + "src/agentkit/__init__.py": "43b17418bafb2c7c", + "src/agentkit/__main__.py": "503810fb0f210fab", + "src/agentkit/bus/__init__.py": "83b51b8b680ee75f", + "src/agentkit/bus/interface.py": "ee93b26fdcee1495", + "src/agentkit/bus/memory_bus.py": "28b4c3a18ef13181", + "src/agentkit/bus/message.py": "035adf5510427f85", + "src/agentkit/bus/protocol.py": "67e1ebb03a53da30", + "src/agentkit/bus/redis_bus.py": "7431c6cc2ed20e51", + "src/agentkit/chat/__init__.py": "e3b0c44298fc1c14", + "src/agentkit/chat/skill_routing.py": "bce85b158d5f2bd0", + "src/agentkit/cli/__init__.py": "a41c63d720a6e4db", + "src/agentkit/cli/chat.py": "fa0b4e7570c8bcb2", + "src/agentkit/cli/init.py": "b4f0de1670acdbb1", + "src/agentkit/cli/main.py": "25d92f4947b60dbf", + "src/agentkit/cli/onboarding.py": "0a6e8f869a02b067", + "src/agentkit/cli/pair.py": "1ceeffcc7a8d8ed3", + "src/agentkit/cli/skill.py": "af567fc67d603df6", + "src/agentkit/cli/task.py": "2a19fd0985717a20", + "src/agentkit/cli/templates.py": "b997aa3fc0dd8162", + "src/agentkit/cli/usage.py": "e121c1a5e76d21c1", + "src/agentkit/core/__init__.py": "f07bf925ec204974", + "src/agentkit/core/agent_pool.py": "d400580ed51fdd75", + "src/agentkit/core/base.py": "ab7261b559dd98c8", + "src/agentkit/core/compressor.py": "bfecb74c1a3de3e3", + "src/agentkit/core/config_driven.py": "68841e58ba2aa461", + "src/agentkit/core/dispatcher.py": "ec4c0dfc4a93b0be", + "src/agentkit/core/exceptions.py": "9145f66231230bd2", + "src/agentkit/core/goal_planner.py": "f2a4b33e33a3ab8a", + "src/agentkit/core/headroom_compressor.py": "cb496a6c5accb2ec", + "src/agentkit/core/logging.py": "96f61c08b97e4ffc", + "src/agentkit/core/orchestrator.py": "dd2de2f5a175e0de", + "src/agentkit/core/plan_checker.py": "8efab3240c01bca9", + "src/agentkit/core/plan_exec_engine.py": "93cc488b6a73cbd1", + "src/agentkit/core/plan_executor.py": "83e65f3399795244", + "src/agentkit/core/plan_schema.py": "a7ba8308e5ca8965", + "src/agentkit/core/protocol.py": "0c7d19ada22bff72", + "src/agentkit/core/react.py": "8612b9b1331c16b6", + "src/agentkit/core/reflexion.py": "a0812059d9c94825", + "src/agentkit/core/registry.py": "fa377a6bc19e87c7", + "src/agentkit/core/rewoo.py": "e673444bc4b91121", + "src/agentkit/core/shared_workspace.py": "9babb2eefff54246", + "src/agentkit/core/standalone.py": "a8a02755d5e4653d", + "src/agentkit/core/trace.py": "529563c5e0621c43", + "src/agentkit/evaluation/__init__.py": "d56ae7e0faa9a31d", + "src/agentkit/evaluation/ragas_evaluator.py": "8b6268ac71df3178", + "src/agentkit/evolution/__init__.py": "95142ac26f1ba26b", + "src/agentkit/evolution/ab_tester.py": "f8dc4bca82be03a9", + "src/agentkit/evolution/evolution_store.py": "9e9a1840f5a92377", + "src/agentkit/evolution/experience_schema.py": "81c2f52a74590e10", + "src/agentkit/evolution/experience_store.py": "f135174a2bbdfc2a", + "src/agentkit/evolution/fitness.py": "ba768d8387013b04", + "src/agentkit/evolution/genetic.py": "cdf3ff703b719be7", + "src/agentkit/evolution/lifecycle.py": "ae86dda1b5801b5f", + "src/agentkit/evolution/llm_reflector.py": "a9de6e81324c64f6", + "src/agentkit/evolution/models.py": "f5efef0d197be11f", + "src/agentkit/evolution/path_optimizer.py": "3fab382499e56ccd", + "src/agentkit/evolution/pitfall_detector.py": "e28d3ec9e8d59bf1", + "src/agentkit/evolution/prompt_optimizer.py": "41fb13fede6b3403", + "src/agentkit/evolution/reflector.py": "e72a78a4e7f2edf5", + "src/agentkit/evolution/strategy_tuner.py": "dc8cd09c786169ef", + "src/agentkit/llm/__init__.py": "657ef26b62f7bbba", + "src/agentkit/llm/config.py": "6a1984e98c59ec66", + "src/agentkit/llm/gateway.py": "b76262bb52cb4d13", + "src/agentkit/llm/protocol.py": "1bcfac4dfdff4d2c", + "src/agentkit/llm/providers/__init__.py": "46c33110f5f2520b", + "src/agentkit/llm/providers/anthropic.py": "28f5155e34b14f92", + "src/agentkit/llm/providers/doubao.py": "b33492eec5c57335", + "src/agentkit/llm/providers/gemini.py": "887f3a1322d0bae3", + "src/agentkit/llm/providers/openai.py": "e271cdb6914c3c2c", + "src/agentkit/llm/providers/tracker.py": "ed247284b574d0eb", + "src/agentkit/llm/providers/wenxin.py": "a0ac6a379635f8da", + "src/agentkit/llm/providers/yuanbao.py": "b9fc13b79e9942aa", + "src/agentkit/llm/retry.py": "478e1bb02bfcc598", + "src/agentkit/marketplace/__init__.py": "1f1580e072a7ca29", + "src/agentkit/marketplace/auction.py": "f09f9d6eff9a5b8f", + "src/agentkit/marketplace/wealth.py": "fd1a946e02f78d8b", + "src/agentkit/mcp/__init__.py": "a8a5c3c1add774af", + "src/agentkit/mcp/client.py": "785b1aba3497b49c", + "src/agentkit/mcp/manager.py": "736d67c3d8dd9d8d", + "src/agentkit/mcp/server.py": "3a9e94779d5eb53e", + "src/agentkit/mcp/transport.py": "8c6b1e564eb3e5e2", + "src/agentkit/memory/__init__.py": "71011b735f958a95", + "src/agentkit/memory/adapters/__init__.py": "469c38ab35d48484", + "src/agentkit/memory/adapters/base.py": "347dfd141a11d140", + "src/agentkit/memory/adapters/confluence.py": "f39068ec5354b67b", + "src/agentkit/memory/adapters/feishu.py": "2c0aa671fbbe3d3b", + "src/agentkit/memory/adapters/generic_http.py": "d45303c306d958f5", + "src/agentkit/memory/base.py": "df64874fe41402d7", + "src/agentkit/memory/chunking.py": "7c9947a60d8ebd7d", + "src/agentkit/memory/contextual_retrieval.py": "e3edd302f05cdfcd", + "src/agentkit/memory/document_loader.py": "30f5646712525d61", + "src/agentkit/memory/embedder.py": "3b483d4e80377e18", + "src/agentkit/memory/episodic.py": "db6f26e0dda31b8c", + "src/agentkit/memory/http_rag.py": "e4cd3f7bf11ba0ab", + "src/agentkit/memory/knowledge_base.py": "faa986892a910eff", + "src/agentkit/memory/local_rag.py": "4d474c286717a5a6", + "src/agentkit/memory/models.py": "e6861ba415a995a8", + "src/agentkit/memory/multi_source_retriever.py": "6eee1f48acf2f19f", + "src/agentkit/memory/profile.py": "153e008e625aa2f2", + "src/agentkit/memory/query_transformer.py": "ebedbfc043ee3ca9", + "src/agentkit/memory/rag_loop.py": "3ca5f89bf16fd16c", + "src/agentkit/memory/relevance_scorer.py": "bdb8930083078914", + "src/agentkit/memory/retriever.py": "28cc28168b69a5a3", + "src/agentkit/memory/semantic.py": "aa86076fd321399c", + "src/agentkit/memory/working.py": "8fc00c3c87d70845", + "src/agentkit/orchestrator/__init__.py": "4102c9499dd08119", + "src/agentkit/orchestrator/compensation.py": "460b78386f605f44", + "src/agentkit/orchestrator/dynamic_pipeline.py": "14e3f57a275160df", + "src/agentkit/orchestrator/handoff.py": "1901f8cd993ea02f", + "src/agentkit/orchestrator/pipeline_engine.py": "ab062dccfdc1f63b", + "src/agentkit/orchestrator/pipeline_loader.py": "2c09e8ede1ee792c", + "src/agentkit/orchestrator/pipeline_models.py": "de0175517a1fbb88", + "src/agentkit/orchestrator/pipeline_schema.py": "d0d64e7c20e63d53", + "src/agentkit/orchestrator/pipeline_state.py": "a462320b6c3554bc", + "src/agentkit/orchestrator/reflection.py": "2472b8d7161461b6", + "src/agentkit/orchestrator/retry.py": "abdc9c5fdd441e83", + "src/agentkit/orchestrator/workflow_schema.py": "f5b7efdb966d3564", + "src/agentkit/org/__init__.py": "ecc4ac01f48368bf", + "src/agentkit/org/context.py": "ee8e857268917c37", + "src/agentkit/org/discovery.py": "81dfb33d7599bb24", + "src/agentkit/prompts/__init__.py": "8afc78b85bd1f569", + "src/agentkit/prompts/section.py": "7698dadf96c29d62", + "src/agentkit/prompts/template.py": "de354279290b886b", + "src/agentkit/quality/__init__.py": "c12a5e356c25ef64", + "src/agentkit/quality/alignment.py": "1b480674d6598f8a", + "src/agentkit/quality/cascade_detector.py": "68dc7066e40ac8c9", + "src/agentkit/quality/gate.py": "211bf1d53ee7154d", + "src/agentkit/quality/output.py": "b26386d06d74d96d", + "src/agentkit/router/__init__.py": "76c37a202d535839", + "src/agentkit/router/intent.py": "99293a856fe71be6", + "src/agentkit/server/__init__.py": "df934a940763b2ae", + "src/agentkit/server/client.py": "badd8fd035e77613", + "src/agentkit/server/client_config.py": "c22cf22a3c9c52d7", + "src/agentkit/server/config.py": "a029878144c1fade", + "src/agentkit/server/middleware.py": "35981a4158defe97", + "src/agentkit/server/routes/agents.py": "f40c808fb19bb183", + "src/agentkit/server/routes/chat.py": "689d69dda752a22f", + "src/agentkit/server/routes/evolution.py": "f2b1d93d1588a9ed", + "src/agentkit/server/routes/health.py": "029fde5bf0951d0e", + "src/agentkit/server/routes/llm.py": "e3abf707341d9677", + "src/agentkit/server/routes/memory.py": "da00b9a092576ebe", + "src/agentkit/server/routes/metrics.py": "9cf9d61479278136", + "src/agentkit/server/routes/portal.py": "8c5ebdc1b3ede2bf", + "src/agentkit/server/routes/skill_management.py": "629bb1fe85f33007", + "src/agentkit/server/routes/skills.py": "3193d721029b5c6e", + "src/agentkit/server/routes/tasks.py": "f15c9f350f869770", + "src/agentkit/server/routes/ws.py": "784cb2b1af8abec2", + "src/agentkit/server/runner.py": "375e22b9f596adb9", + "src/agentkit/server/task_store.py": "b04afea982579a93", + "src/agentkit/session/__init__.py": "f7e2123235f799c2", + "src/agentkit/session/manager.py": "5cb0518f967b854b", + "src/agentkit/session/models.py": "8d96a974afc9acfb", + "src/agentkit/session/store.py": "41238fe9f9a4a522", + "src/agentkit/skills/__init__.py": "cd3bd9c844656636", + "src/agentkit/skills/base.py": "36e3d8062cbccd57", + "src/agentkit/skills/geo_pipeline.py": "42f969c61d0a3a7a", + "src/agentkit/skills/loader.py": "197ae05b735b6946", + "src/agentkit/skills/pipeline.py": "0367d52bd1a4d410", + "src/agentkit/skills/registry.py": "f63b5e174ec5d4d7", + "src/agentkit/skills/schema.py": "3cbe7fe2db688c4d", + "src/agentkit/skills/skill_md.py": "758de3b3601b2520", + "src/agentkit/telemetry/__init__.py": "66f777be163ce971", + "src/agentkit/telemetry/metrics.py": "72d548e3d6f1abef", + "src/agentkit/telemetry/setup.py": "b9f13873ef525378", + "src/agentkit/telemetry/tracer.py": "de8aebbe499ac264", + "src/agentkit/telemetry/tracing.py": "c0bca2277a02d383", + "src/agentkit/tools/__init__.py": "514d210f2d24be53", + "src/agentkit/tools/agent_tool.py": "0ba5f7b255225b0d", + "src/agentkit/tools/ask_human.py": "f9cb5255733e2e77", + "src/agentkit/tools/baidu_search.py": "81eaecce86d80780", + "src/agentkit/tools/base.py": "6a61acd0ca114026", + "src/agentkit/tools/composition.py": "1d2d10361382f459", + "src/agentkit/tools/computer_use.py": "be3462775cf3e004", + "src/agentkit/tools/computer_use_recorder.py": "98cf8693c0f136bf", + "src/agentkit/tools/computer_use_session.py": "102e1ac315fd09b8", + "src/agentkit/tools/function_tool.py": "702e5b3e8d6b465c", + "src/agentkit/tools/headroom_retrieve.py": "6da46b1a23fe8933", + "src/agentkit/tools/mcp_tool.py": "8a1da789ca963e2c", + "src/agentkit/tools/memory_tool.py": "197c51edcbbab705", + "src/agentkit/tools/output_parser.py": "f799cc7cafb6bb2e", + "src/agentkit/tools/pty_session.py": "6ceb31edf52a87fe", + "src/agentkit/tools/registry.py": "b2fe99106355b39d", + "src/agentkit/tools/schema_tools.py": "e490844348f3656b", + "src/agentkit/tools/shell.py": "6e2614979a2ade61", + "src/agentkit/tools/skill_install.py": "3cdf1b7c06343947", + "src/agentkit/tools/terminal_session.py": "432ceed53d63fcac", + "src/agentkit/tools/web_crawl.py": "89e2b4380810f60b", + "src/agentkit/tools/web_search.py": "3901c5ee7450521c", + "src/agentkit/utils/__init__.py": "273d2c7ba7ce101d", + "src/agentkit/utils/security.py": "939e46e447f57882", + "src/agentkit/utils/vector_math.py": "c3c7fa3f1e71463f", + "docs/brainstorms/2026-06-12-frontend-productization-requirements.md": "46e3ab3f45cd622e", + "docs/plans/2026-06-12-023-feat-frontend-productization-plan.md": "8f65a3b0dad42c4b", + "src/agentkit/server/frontend/package.json": "aebd560acfea05e8", + "src/agentkit/server/frontend/tsconfig.node.json": "d5806943b1bd0a2a", + "src/agentkit/server/frontend/vite.config.ts": "75f0385595bdcfcd", + "src/agentkit/server/app.py": "7ab76c4e95d04c05", + "src/agentkit/server/routes/__init__.py": "258f2f4c0d0cfaca", + "src/agentkit/server/routes/evolution_dashboard.py": "50d0e5cabdf6deaf", + "src/agentkit/server/routes/kb_management.py": "f2df2ab336e8966a", + "src/agentkit/server/routes/settings.py": "115e3e6fb9898883", + "src/agentkit/server/routes/terminal.py": "91ef1ba5efec6864", + "src/agentkit/server/routes/workflows.py": "6a3c19b6a4c6b157", + "src/agentkit/server/frontend/src/api/base.ts": "00e0b9a8a20134ae", + "src/agentkit/server/frontend/src/api/client.ts": "5ee2010d46fde145", + "src/agentkit/server/frontend/src/api/evolution.ts": "8e0be1d17af12ddf", + "src/agentkit/server/frontend/src/api/kb.ts": "d72a99362582fd7e", + "src/agentkit/server/frontend/src/api/settings.ts": "b9ed465850bc7ce1", + "src/agentkit/server/frontend/src/api/skills.ts": "59416c4806e257f0", + "src/agentkit/server/frontend/src/api/terminal.ts": "898862c911ca38c9", + "src/agentkit/server/frontend/src/api/workflow.ts": "60c5f34f8bf17739", + "src/agentkit/server/frontend/src/components/evolution/DashboardOverview.vue": "1734ddb592e27a91", + "src/agentkit/server/frontend/src/components/evolution/ExperiencePanel.vue": "c85a57ce584ad065", + "src/agentkit/server/frontend/src/components/evolution/MetricsChart.vue": "bb02f1ccc68e7891", + "src/agentkit/server/frontend/src/components/evolution/MetricsPanel.vue": "96a11588037f431d", + "src/agentkit/server/frontend/src/components/evolution/OptimizationPanel.vue": "cd09d8949e96728a", + "src/agentkit/server/frontend/src/components/evolution/PitfallRoutePanel.vue": "3a257fe8fadf557f", + "src/agentkit/server/frontend/src/components/evolution/UsagePanel.vue": "71e4e86d65238cc8", + "src/agentkit/server/frontend/src/components/kb/DocumentUpload.vue": "f72627b63f7dcd23", + "src/agentkit/server/frontend/src/components/kb/SearchTest.vue": "9189e0cdb6221bda", + "src/agentkit/server/frontend/src/components/kb/SourceConfig.vue": "debc96a327735395", + "src/agentkit/server/frontend/src/components/workflow/ApprovalNode.vue": "554f8c34a47678b8", + "src/agentkit/server/frontend/src/components/workflow/ConditionNode.vue": "3ac8a2cbc279d158", + "src/agentkit/server/frontend/src/components/workflow/FlowCanvas.vue": "aca6f13eaa7f4548", + "src/agentkit/server/frontend/src/components/workflow/ParallelNode.vue": "dcf01080ee5171d4", + "src/agentkit/server/frontend/src/components/workflow/PropertyPanel.vue": "d84b2944a68c4da2", + "src/agentkit/server/frontend/src/components/workflow/SkillNode.vue": "209ebd4ea8b044dc", + "src/agentkit/server/frontend/src/main.ts": "b39507810967315c", + "src/agentkit/server/frontend/src/router/index.ts": "abb5156ca57d99b4", + "src/agentkit/server/frontend/src/stores/evolution.ts": "54f43be963383e56", + "src/agentkit/server/frontend/src/stores/knowledge.ts": "c639bbbee6906230", + "src/agentkit/server/frontend/src/stores/settings.ts": "a74460585842e471", + "src/agentkit/server/frontend/src/stores/terminal.ts": "aa652567a5eac361", + "src/agentkit/server/frontend/src/stores/workflow.ts": "94aadc5b90e7f98f", + "src/agentkit/server/frontend/src/utils/echarts.ts": "0f94ea52ff56ca85", + "src/agentkit/server/frontend/src/utils/workflowSerializer.ts": "2a38775e7c55f364", + "src/agentkit/server/frontend/src/views/EvolutionView.vue": "b6e92037d8ba864c", + "src/agentkit/server/frontend/src/views/TerminalView.vue": "444065d74e0d6272", + "src/agentkit/server/frontend/src/views/WorkflowView.vue": "0b43755c77b1babe", + "tests/unit/server/test_evolution_dashboard.py": "0b584b6c40aaec8b", + "tests/unit/server/test_kb_management.py": "16463430acc7a429", + "tests/unit/server/test_settings_routes.py": "f7920e0768fa4523", + "tests/unit/server/test_terminal_routes.py": "9433384c804e1705", + "tests/unit/server/test_workflow_routes.py": "99c72096d652ba95" +} \ No newline at end of file diff --git a/.understand-anything/knowledge-graph.json b/.understand-anything/knowledge-graph.json new file mode 100644 index 0000000..74d064b --- /dev/null +++ b/.understand-anything/knowledge-graph.json @@ -0,0 +1,52190 @@ +{ + "version": "1.0.0", + "project": { + "name": "Fischer AgentKit", + "languages": [ + "python" + ], + "frameworks": [ + "FastAPI", + "Pydantic", + "SQLAlchemy", + "Typer", + "Redis" + ], + "description": "AI驱动的Agent框架,支持ReAct引擎、多LLM网关、Pipeline编排、自适应反思和消息总线", + "analyzedAt": "2026-06-14T02:23:49.851310+00:00", + "gitCommitHash": "045fecd4cee49f04dc7b693c14d35ca38a0d92cb" + }, + "nodes": [ + { + "id": "file:configs/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "configs/__init__.py", + "layer": "utility", + "summary": "GEO AgentKit Server 配置包", + "tags": [ + "configs" + ], + "complexity": "simple" + }, + { + "id": "file:configs/geo_handlers.py", + "type": "file", + "name": "geo_handlers.py", + "filePath": "configs/geo_handlers.py", + "layer": "utility", + "summary": "GEO 项目的 Custom Handler — 供 AgentKit Server 使用", + "tags": [ + "configs" + ], + "complexity": "moderate" + }, + { + "id": "file:configs/geo_server.py", + "type": "file", + "name": "geo_server.py", + "filePath": "configs/geo_server.py", + "layer": "utility", + "summary": "GEO AgentKit Server 启动入口", + "tags": [ + "configs" + ], + "complexity": "moderate" + }, + { + "id": "file:configs/geo_tools.py", + "type": "file", + "name": "geo_tools.py", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "GEO 项目的 Tool 注册 — 供 AgentKit Server 使用", + "tags": [ + "configs" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/__init__.py", + "layer": "service", + "summary": "Fischer AgentKit - Unified Agent Framework", + "tags": [], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/__main__.py", + "type": "file", + "name": "__main__.py", + "filePath": "src/agentkit/__main__.py", + "layer": "service", + "summary": "Allow running agentkit as: python -m agentkit", + "tags": [], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/bus/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/bus/__init__.py", + "layer": "service", + "summary": "AgentKit Bus - Agent 间通信基础设施", + "tags": [ + "bus" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/bus/interface.py", + "type": "file", + "name": "interface.py", + "filePath": "src/agentkit/bus/interface.py", + "layer": "data", + "summary": "MessageBus ABC — Agent 间通信抽象基类。", + "tags": [ + "bus" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/bus/memory_bus.py", + "type": "file", + "name": "memory_bus.py", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus — 基于 asyncio.Queue 的内存消息总线。", + "tags": [ + "bus" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/bus/message.py", + "type": "file", + "name": "message.py", + "filePath": "src/agentkit/bus/message.py", + "layer": "data", + "summary": "AgentMessage — Agent 间通信消息模型。", + "tags": [ + "bus" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/bus/protocol.py", + "type": "file", + "name": "protocol.py", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "MessageBus Protocol — Agent 间通信抽象层。", + "tags": [ + "bus" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/bus/redis_bus.py", + "type": "file", + "name": "redis_bus.py", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus — 基于 Redis Streams 的消息总线。", + "tags": [ + "bus" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/chat/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/chat/__init__.py", + "layer": "service", + "summary": "模块 chat", + "tags": [ + "chat" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/chat/skill_routing.py", + "type": "file", + "name": "skill_routing.py", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "Shared skill routing logic for GUI and CLI chat.", + "tags": [ + "chat" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/cli/__init__.py", + "layer": "service", + "summary": "AgentKit CLI - Command-line interface for AgentKit framework", + "tags": [ + "cli" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/cli/chat.py", + "type": "file", + "name": "chat.py", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "Chat command — interactive terminal chat with an Agent.", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/init.py", + "type": "file", + "name": "init.py", + "filePath": "src/agentkit/cli/init.py", + "layer": "api", + "summary": "Project initialization CLI command", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/main.py", + "type": "file", + "name": "main.py", + "filePath": "src/agentkit/cli/main.py", + "layer": "api", + "summary": "AgentKit CLI main entry point", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/onboarding.py", + "type": "file", + "name": "onboarding.py", + "filePath": "src/agentkit/cli/onboarding.py", + "layer": "api", + "summary": "Onboarding flow — interactive first-time configuration wizard.", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/pair.py", + "type": "file", + "name": "pair.py", + "filePath": "src/agentkit/cli/pair.py", + "layer": "api", + "summary": "Client pairing CLI command", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/skill.py", + "type": "file", + "name": "skill.py", + "filePath": "src/agentkit/cli/skill.py", + "layer": "api", + "summary": "Skill management CLI commands", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/task.py", + "type": "file", + "name": "task.py", + "filePath": "src/agentkit/cli/task.py", + "layer": "api", + "summary": "Task management CLI commands", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/cli/templates.py", + "type": "file", + "name": "templates.py", + "filePath": "src/agentkit/cli/templates.py", + "layer": "api", + "summary": "Template files for agentkit init", + "tags": [ + "cli" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/cli/usage.py", + "type": "file", + "name": "usage.py", + "filePath": "src/agentkit/cli/usage.py", + "layer": "api", + "summary": "Usage statistics CLI command", + "tags": [ + "cli" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/core/__init__.py", + "layer": "service", + "summary": "AgentKit Core - 基础组件", + "tags": [ + "core" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/core/agent_pool.py", + "type": "file", + "name": "agent_pool.py", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "AgentPool - 运行时 Agent 实例池", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/base.py", + "type": "file", + "name": "base.py", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent 基类 - 统一 Agent 生命周期管理", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/compressor.py", + "type": "file", + "name": "compressor.py", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor - 上下文压缩与 Prompt 缓存", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/config_driven.py", + "type": "file", + "name": "config_driven.py", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent - 配置驱动的 Agent 定义", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/dispatcher.py", + "type": "file", + "name": "dispatcher.py", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "任务分发器 - 通过 Redis Queue 将任务分发给 Agent", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/exceptions.py", + "type": "file", + "name": "exceptions.py", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "Agent 框架自定义异常", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/goal_planner.py", + "type": "file", + "name": "goal_planner.py", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner — 目标分析与计划生成", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/headroom_compressor.py", + "type": "file", + "name": "headroom_compressor.py", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor — 基于 headroom-ai 的上下文压缩器", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/logging.py", + "type": "file", + "name": "logging.py", + "filePath": "src/agentkit/core/logging.py", + "layer": "service", + "summary": "Structured logging configuration for AgentKit.", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/orchestrator.py", + "type": "file", + "name": "orchestrator.py", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator - 多 Agent 协作编排器", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/plan_checker.py", + "type": "file", + "name": "plan_checker.py", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker — 计划检查与复盘", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/plan_exec_engine.py", + "type": "file", + "name": "plan_exec_engine.py", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "Plan-and-Execute 执行引擎适配器", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/plan_executor.py", + "type": "file", + "name": "plan_executor.py", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor — 执行计划执行器", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/plan_schema.py", + "type": "file", + "name": "plan_schema.py", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "Plan Schema — GoalPlanner 的执行计划数据模型", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/protocol.py", + "type": "file", + "name": "protocol.py", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "Agent 通信协议定义 - 统一消息格式", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/react.py", + "type": "file", + "name": "react.py", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReAct 推理-行动循环引擎", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/reflexion.py", + "type": "file", + "name": "reflexion.py", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "Reflexion 执行引擎", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/registry.py", + "type": "file", + "name": "registry.py", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "Agent 注册中心 - 管理 Agent 的注册、发现、状态", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/rewoo.py", + "type": "file", + "name": "rewoo.py", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOO (Reasoning Without Observation Others) 执行引擎", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/shared_workspace.py", + "type": "file", + "name": "shared_workspace.py", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace - Agent 间共享工作空间", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/standalone.py", + "type": "file", + "name": "standalone.py", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "Standalone Runner - 自动发现并启动配置驱动的 Agent", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/core/trace.py", + "type": "file", + "name": "trace.py", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "执行轨迹记录器", + "tags": [ + "core" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evaluation/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/evaluation/__init__.py", + "layer": "service", + "summary": "Evaluation module - RAG quality assessment", + "tags": [ + "evaluation" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/evaluation/ragas_evaluator.py", + "type": "file", + "name": "ragas_evaluator.py", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "Ragas Evaluator - RAG 质量评估管线", + "tags": [ + "evaluation" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/evolution/__init__.py", + "layer": "service", + "summary": "AgentKit Evolution - 自我进化引擎", + "tags": [ + "evolution" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/evolution/ab_tester.py", + "type": "file", + "name": "ab_tester.py", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester - A/B 测试框架", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/evolution_store.py", + "type": "file", + "name": "evolution_store.py", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "EvolutionStore - 进化日志存储", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/experience_schema.py", + "type": "file", + "name": "experience_schema.py", + "filePath": "src/agentkit/evolution/experience_schema.py", + "layer": "utility", + "summary": "Experience Schema - 任务经验数据模型", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/experience_store.py", + "type": "file", + "name": "experience_store.py", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "ExperienceStore - 任务经验存储", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/fitness.py", + "type": "file", + "name": "fitness.py", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "MultiObjectiveFitness - 多目标适应度评估", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/genetic.py", + "type": "file", + "name": "genetic.py", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPA - Genetic-Pareto Prompt Evolution", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/lifecycle.py", + "type": "file", + "name": "lifecycle.py", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin - 将进化引擎集成到 Agent 生命周期", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/llm_reflector.py", + "type": "file", + "name": "llm_reflector.py", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLMReflector - LLM 驱动的执行反思器", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/models.py", + "type": "file", + "name": "models.py", + "filePath": "src/agentkit/evolution/models.py", + "layer": "utility", + "summary": "SQLAlchemy ORM models for evolution persistence (SQLite-backed).", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/path_optimizer.py", + "type": "file", + "name": "path_optimizer.py", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "PathOptimizer - 执行路径优化器", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/pitfall_detector.py", + "type": "file", + "name": "pitfall_detector.py", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "PitfallDetector - 任务避坑预警", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "file", + "name": "prompt_optimizer.py", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "PromptOptimizer - DSPy 风格的 Prompt 自动优化器", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/reflector.py", + "type": "file", + "name": "reflector.py", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "Reflector - 执行反思", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/evolution/strategy_tuner.py", + "type": "file", + "name": "strategy_tuner.py", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "StrategyTuner - 策略调优", + "tags": [ + "evolution" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/llm/__init__.py", + "layer": "service", + "summary": "LLM Gateway Module - 统一 LLM 调用", + "tags": [ + "llm" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/llm/config.py", + "type": "file", + "name": "config.py", + "filePath": "src/agentkit/llm/config.py", + "layer": "utility", + "summary": "LLM Config - 配置加载", + "tags": [ + "llm" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/gateway.py", + "type": "file", + "name": "gateway.py", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLM Gateway - 统一 LLM 调用入口", + "tags": [ + "llm" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/protocol.py", + "type": "file", + "name": "protocol.py", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLM Protocol - 数据类与抽象基类", + "tags": [ + "llm" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/providers/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/llm/providers/__init__.py", + "layer": "utility", + "summary": "LLM Providers", + "tags": [ + "llm", + "providers" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/llm/providers/anthropic.py", + "type": "file", + "name": "anthropic.py", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "Anthropic Provider - 原生 Anthropic Messages API 支持", + "tags": [ + "llm", + "providers" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/providers/doubao.py", + "type": "file", + "name": "doubao.py", + "filePath": "src/agentkit/llm/providers/doubao.py", + "layer": "utility", + "summary": "DoubaoProvider - 字节豆包 Provider", + "tags": [ + "llm", + "providers" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/providers/gemini.py", + "type": "file", + "name": "gemini.py", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "Gemini Provider - 原生 Google Gemini API 支持", + "tags": [ + "llm", + "providers" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/providers/openai.py", + "type": "file", + "name": "openai.py", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAI Compatible Provider - 支持 OpenAI/DeepSeek/Anthropic 等兼容 API", + "tags": [ + "llm", + "providers" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/providers/tracker.py", + "type": "file", + "name": "tracker.py", + "filePath": "src/agentkit/llm/providers/tracker.py", + "layer": "utility", + "summary": "Usage Tracker - 使用量追踪", + "tags": [ + "llm", + "providers" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/providers/wenxin.py", + "type": "file", + "name": "wenxin.py", + "filePath": "src/agentkit/llm/providers/wenxin.py", + "layer": "utility", + "summary": "WenxinProvider - 百度文心 ERNIE Provider", + "tags": [ + "llm", + "providers" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/providers/yuanbao.py", + "type": "file", + "name": "yuanbao.py", + "filePath": "src/agentkit/llm/providers/yuanbao.py", + "layer": "utility", + "summary": "YuanbaoProvider - 腾讯混元/元宝 Provider", + "tags": [ + "llm", + "providers" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/llm/retry.py", + "type": "file", + "name": "retry.py", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "RetryPolicy and CircuitBreaker for LLM provider reliability", + "tags": [ + "llm" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/marketplace/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/marketplace/__init__.py", + "layer": "service", + "summary": "AgentKit Marketplace - 拍卖机制与财富追踪", + "tags": [ + "marketplace" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/marketplace/auction.py", + "type": "file", + "name": "auction.py", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "AuctionHouse - 拍卖机制,基于竞价选择 Agent", + "tags": [ + "marketplace" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/marketplace/wealth.py", + "type": "file", + "name": "wealth.py", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker - Agent 财富追踪,用于拍卖机制", + "tags": [ + "marketplace" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/mcp/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/mcp/__init__.py", + "layer": "service", + "summary": "AgentKit MCP - Model Context Protocol 支持", + "tags": [ + "mcp" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/mcp/client.py", + "type": "file", + "name": "client.py", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCP Client - 调用外部 MCP 工具服务器", + "tags": [ + "mcp" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/mcp/manager.py", + "type": "file", + "name": "manager.py", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCP Manager - 管理 MCP Server 连接和工具发现", + "tags": [ + "mcp" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/mcp/server.py", + "type": "file", + "name": "server.py", + "filePath": "src/agentkit/mcp/server.py", + "layer": "utility", + "summary": "MCP Server - 将 Agent 能力暴露为 MCP 工具", + "tags": [ + "mcp" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/mcp/transport.py", + "type": "file", + "name": "transport.py", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "MCP Transport - 传输层抽象", + "tags": [ + "mcp" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/memory/__init__.py", + "layer": "service", + "summary": "AgentKit Memory - 记忆系统", + "tags": [ + "memory" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/memory/adapters/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/memory/adapters/__init__.py", + "layer": "data", + "summary": "知识库适配器包", + "tags": [ + "memory", + "adapters" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/memory/adapters/base.py", + "type": "file", + "name": "base.py", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter 抽象基类 - 知识库适配器的基础实现", + "tags": [ + "memory", + "adapters" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/adapters/confluence.py", + "type": "file", + "name": "confluence.py", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter - Confluence 知识库适配器", + "tags": [ + "memory", + "adapters" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/adapters/feishu.py", + "type": "file", + "name": "feishu.py", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter - 飞书知识库适配器", + "tags": [ + "memory", + "adapters" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/adapters/generic_http.py", + "type": "file", + "name": "generic_http.py", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter - 通用 HTTP 知识库适配器", + "tags": [ + "memory", + "adapters" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/base.py", + "type": "file", + "name": "base.py", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "Memory 抽象基类 - 统一记忆接口", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/chunking.py", + "type": "file", + "name": "chunking.py", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "Chunking - 文档分块策略", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/contextual_retrieval.py", + "type": "file", + "name": "contextual_retrieval.py", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunker - 上下文增强分块", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/document_loader.py", + "type": "file", + "name": "document_loader.py", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader - 多格式文档解析器", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/embedder.py", + "type": "file", + "name": "embedder.py", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "Embedder 接口与实现 - 文本向量化", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/episodic.py", + "type": "file", + "name": "episodic.py", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "Episodic Memory - 基于 pgvector + PostgreSQL 的任务经验记忆", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/http_rag.py", + "type": "file", + "name": "http_rag.py", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HTTP RAG Service - 通过 HTTP 调用业务系统知识库 API", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/knowledge_base.py", + "type": "file", + "name": "knowledge_base.py", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "KnowledgeBase 协议定义 - 外部知识库统一接口", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/local_rag.py", + "type": "file", + "name": "local_rag.py", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService - 本地文档 RAG 服务", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/models.py", + "type": "file", + "name": "models.py", + "filePath": "src/agentkit/memory/models.py", + "layer": "data", + "summary": "SQLAlchemy ORM models for episodic memory persistence (PostgreSQL + pgvector).", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/multi_source_retriever.py", + "type": "file", + "name": "multi_source_retriever.py", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever - 多源混合检索器", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/profile.py", + "type": "file", + "name": "profile.py", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "分层记忆系统 — SOUL/USER/MEMORY/DAILY 文件管理.", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/query_transformer.py", + "type": "file", + "name": "query_transformer.py", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "QueryTransformer - RAG 查询改写", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/rag_loop.py", + "type": "file", + "name": "rag_loop.py", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "RAGSelfCorrectionLoop - CRAG 自纠正循环", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/relevance_scorer.py", + "type": "file", + "name": "relevance_scorer.py", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer - 检索结果相关性自动评估", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/retriever.py", + "type": "file", + "name": "retriever.py", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever - 混合检索器", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/semantic.py", + "type": "file", + "name": "semantic.py", + "filePath": "src/agentkit/memory/semantic.py", + "layer": "data", + "summary": "Semantic Memory - 知识库适配器", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/memory/working.py", + "type": "file", + "name": "working.py", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "Working Memory - 基于 Redis 的短期任务记忆", + "tags": [ + "memory" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/orchestrator/__init__.py", + "layer": "service", + "summary": "AgentKit Orchestrator - 多 Agent 协同编排", + "tags": [ + "orchestrator" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/orchestrator/compensation.py", + "type": "file", + "name": "compensation.py", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "Saga compensation pattern for Pipeline execution", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/dynamic_pipeline.py", + "type": "file", + "name": "dynamic_pipeline.py", + "filePath": "src/agentkit/orchestrator/dynamic_pipeline.py", + "layer": "service", + "summary": "DynamicPipeline - 动态 Pipeline 组合", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/handoff.py", + "type": "file", + "name": "handoff.py", + "filePath": "src/agentkit/orchestrator/handoff.py", + "layer": "service", + "summary": "HandoffManager - Agent 间任务转交", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/pipeline_engine.py", + "type": "file", + "name": "pipeline_engine.py", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "Pipeline Engine - DAG + 并行执行 + 步骤重试 + Saga 补偿", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/pipeline_loader.py", + "type": "file", + "name": "pipeline_loader.py", + "filePath": "src/agentkit/orchestrator/pipeline_loader.py", + "layer": "service", + "summary": "Pipeline Loader - YAML 加载器", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/pipeline_models.py", + "type": "file", + "name": "pipeline_models.py", + "filePath": "src/agentkit/orchestrator/pipeline_models.py", + "layer": "service", + "summary": "Pipeline execution ORM models for PostgreSQL persistence.", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "file", + "name": "pipeline_schema.py", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "Pipeline 数据模型", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/pipeline_state.py", + "type": "file", + "name": "pipeline_state.py", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "Pipeline execution state persistence — Redis hot state + PostgreSQL cold storage.", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/reflection.py", + "type": "file", + "name": "reflection.py", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "Pipeline 反思-重规划模块", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/retry.py", + "type": "file", + "name": "retry.py", + "filePath": "src/agentkit/orchestrator/retry.py", + "layer": "service", + "summary": "Step-level retry with exponential backoff for Pipeline execution", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "file", + "name": "workflow_schema.py", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "Workflow schema - extends Pipeline with workflow-specific fields", + "tags": [ + "orchestrator" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/org/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/org/__init__.py", + "layer": "service", + "summary": "OrganizationContext - 组织上下文与 Agent 发现", + "tags": [ + "org" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/org/context.py", + "type": "file", + "name": "context.py", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext - 组织上下文,管理 AgentProfile 与能力矩阵", + "tags": [ + "org" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/org/discovery.py", + "type": "file", + "name": "discovery.py", + "filePath": "src/agentkit/org/discovery.py", + "layer": "unknown", + "summary": "AgentDiscovery - 基于 OrganizationContext 的 Agent 发现与推荐", + "tags": [ + "org" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/prompts/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/prompts/__init__.py", + "layer": "service", + "summary": "AgentKit Prompts - Prompt 模板系统", + "tags": [ + "prompts" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/prompts/section.py", + "type": "file", + "name": "section.py", + "filePath": "src/agentkit/prompts/section.py", + "layer": "utility", + "summary": "PromptSection - 模块化 Prompt 段落", + "tags": [ + "prompts" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/prompts/template.py", + "type": "file", + "name": "template.py", + "filePath": "src/agentkit/prompts/template.py", + "layer": "utility", + "summary": "PromptTemplate - Prompt 模板渲染", + "tags": [ + "prompts" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/quality/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/quality/__init__.py", + "layer": "service", + "summary": "Quality Gate & Output Standardizer", + "tags": [ + "quality" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/quality/alignment.py", + "type": "file", + "name": "alignment.py", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard - 对齐守卫:约束注入 + 级联故障检测", + "tags": [ + "quality" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/quality/cascade_detector.py", + "type": "file", + "name": "cascade_detector.py", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "CascadeDetector - 独立的级联故障检测工具", + "tags": [ + "quality" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/quality/gate.py", + "type": "file", + "name": "gate.py", + "filePath": "src/agentkit/quality/gate.py", + "layer": "utility", + "summary": "QualityGate - 产出质量管理", + "tags": [ + "quality" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/quality/output.py", + "type": "file", + "name": "output.py", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "OutputStandardizer - 标准化输出", + "tags": [ + "quality" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/router/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/router/__init__.py", + "layer": "service", + "summary": "Intent Router - 两级意图路由:关键词匹配 → LLM 分类", + "tags": [ + "router" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/router/intent.py", + "type": "file", + "name": "intent.py", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter - 两级意图路由:关键词匹配 → LLM 分类", + "tags": [ + "router" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/server/__init__.py", + "layer": "service", + "summary": "AgentKit Server - FastAPI REST API", + "tags": [ + "server" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/server/app.py", + "type": "file", + "name": "app.py", + "filePath": "src/agentkit/server/app.py", + "layer": "api", + "summary": "FastAPI Application Factory", + "tags": [ + "server" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/client.py", + "type": "file", + "name": "client.py", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient - Python SDK for AgentKit Server", + "tags": [ + "server" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/client_config.py", + "type": "file", + "name": "client_config.py", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "Client-specific configuration with priority over defaults", + "tags": [ + "server" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/config.py", + "type": "file", + "name": "config.py", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "Server configuration loader - loads agentkit.yaml and .env", + "tags": [ + "server" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/middleware.py", + "type": "file", + "name": "middleware.py", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "Server middleware - Authentication and Rate Limiting", + "tags": [ + "server" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/server/routes/__init__.py", + "layer": "api", + "summary": "Server route modules", + "tags": [ + "server", + "routes" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/server/routes/agents.py", + "type": "file", + "name": "agents.py", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "Agent CRUD routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/chat.py", + "type": "file", + "name": "chat.py", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "Chat API routes — multi-turn conversation with Agent via REST and WebSocket.", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/evolution.py", + "type": "file", + "name": "evolution.py", + "filePath": "src/agentkit/server/routes/evolution.py", + "layer": "api", + "summary": "Evolution API routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/evolution_dashboard.py", + "type": "file", + "name": "evolution_dashboard.py", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "Evolution Dashboard API routes - 自进化仪表盘", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/health.py", + "type": "file", + "name": "health.py", + "filePath": "src/agentkit/server/routes/health.py", + "layer": "api", + "summary": "Health check route", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/kb_management.py", + "type": "file", + "name": "kb_management.py", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "Knowledge Base Management API routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/llm.py", + "type": "file", + "name": "llm.py", + "filePath": "src/agentkit/server/routes/llm.py", + "layer": "api", + "summary": "LLM usage routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/memory.py", + "type": "file", + "name": "memory.py", + "filePath": "src/agentkit/server/routes/memory.py", + "layer": "api", + "summary": "Memory API routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/metrics.py", + "type": "file", + "name": "metrics.py", + "filePath": "src/agentkit/server/routes/metrics.py", + "layer": "api", + "summary": "Metrics route — /api/v1/metrics", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/portal.py", + "type": "file", + "name": "portal.py", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "服务器模块 - FastAPI HTTP/WebSocket服务", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/settings.py", + "type": "file", + "name": "settings.py", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "Settings API routes with config hot-reload support.", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/skill_management.py", + "type": "file", + "name": "skill_management.py", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "Skill Management API routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/skills.py", + "type": "file", + "name": "skills.py", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "Skill registration routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/tasks.py", + "type": "file", + "name": "tasks.py", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "Task submission routes", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/terminal.py", + "type": "file", + "name": "terminal.py", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "Terminal API routes — interactive PTY sessions with whitelist security.", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/workflows.py", + "type": "file", + "name": "workflows.py", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "Workflow API routes - CRUD, execution, approval, and real-time progress", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/routes/ws.py", + "type": "file", + "name": "ws.py", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "WebSocket route for bidirectional real-time task communication.", + "tags": [ + "server", + "routes" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/runner.py", + "type": "file", + "name": "runner.py", + "filePath": "src/agentkit/server/runner.py", + "layer": "api", + "summary": "BackgroundRunner - Async task execution with lifecycle management", + "tags": [ + "server" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/server/task_store.py", + "type": "file", + "name": "task_store.py", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "TaskStore - Task state storage with TTL (InMemory / Redis backends)", + "tags": [ + "server" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/session/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/session/__init__.py", + "layer": "service", + "summary": "Session management - multi-turn conversation support for AgentKit.", + "tags": [ + "session" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/session/manager.py", + "type": "file", + "name": "manager.py", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager — high-level API for conversation session management.", + "tags": [ + "session" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/session/models.py", + "type": "file", + "name": "models.py", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Session and Message data models for multi-turn conversations.", + "tags": [ + "session" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/session/store.py", + "type": "file", + "name": "store.py", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "Session store backends — InMemory and Redis.", + "tags": [ + "session" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/skills/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/skills/__init__.py", + "layer": "service", + "summary": "Skill 系统 - 配置驱动的技能定义、注册与加载", + "tags": [ + "skills" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/skills/base.py", + "type": "file", + "name": "base.py", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill 基础类 - SkillConfig, IntentConfig, QualityGateConfig, Skill", + "tags": [ + "skills" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/skills/geo_pipeline.py", + "type": "file", + "name": "geo_pipeline.py", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline - GEO 端到端工作流编排", + "tags": [ + "skills" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/skills/loader.py", + "type": "file", + "name": "loader.py", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader - 从 YAML/SKILL.md 目录/Python 包批量加载 Skill", + "tags": [ + "skills" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/skills/pipeline.py", + "type": "file", + "name": "pipeline.py", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "SkillPipeline - 技能编排,将多个 Skill 串联为 Pipeline 执行", + "tags": [ + "skills" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/skills/registry.py", + "type": "file", + "name": "registry.py", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry - Skill 注册中心(v2: 版本管理、能力查询、依赖检查)", + "tags": [ + "skills" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/skills/schema.py", + "type": "file", + "name": "schema.py", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "SkillSpec - Skill 标准接口规范定义", + "tags": [ + "skills" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/skills/skill_md.py", + "type": "file", + "name": "skill_md.py", + "filePath": "src/agentkit/skills/skill_md.py", + "layer": "service", + "summary": "SKILL.md 解析器 - 从 Markdown 文件解析技能定义", + "tags": [ + "skills" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/telemetry/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/telemetry/__init__.py", + "layer": "service", + "summary": "Telemetry module — OpenTelemetry integration (optional)", + "tags": [ + "telemetry" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/telemetry/metrics.py", + "type": "file", + "name": "metrics.py", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "Metric definitions — no-op when OTel not installed", + "tags": [ + "telemetry" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/telemetry/setup.py", + "type": "file", + "name": "setup.py", + "filePath": "src/agentkit/telemetry/setup.py", + "layer": "utility", + "summary": "OTel initialization — called at app startup", + "tags": [ + "telemetry" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/telemetry/tracer.py", + "type": "file", + "name": "tracer.py", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OpenTelemetry tracer integration with no-op fallback.", + "tags": [ + "telemetry" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/telemetry/tracing.py", + "type": "file", + "name": "tracing.py", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "Tracing helpers — no-op when OTel not installed", + "tags": [ + "telemetry" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/tools/__init__.py", + "layer": "service", + "summary": "AgentKit Tools - 工具插件系统", + "tags": [ + "tools" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/tools/agent_tool.py", + "type": "file", + "name": "agent_tool.py", + "filePath": "src/agentkit/tools/agent_tool.py", + "layer": "utility", + "summary": "AgentTool - 将 Agent 包装为 Tool", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/ask_human.py", + "type": "file", + "name": "ask_human.py", + "filePath": "src/agentkit/tools/ask_human.py", + "layer": "utility", + "summary": "AskHumanTool — Human-in-the-Loop tool for Chat mode.", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/baidu_search.py", + "type": "file", + "name": "baidu_search.py", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool - 百度搜索工具,支持优雅降级", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/base.py", + "type": "file", + "name": "base.py", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool 抽象基类 - 统一工具接口", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/composition.py", + "type": "file", + "name": "composition.py", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "工具组合 - SequentialChain, ParallelFanOut, DynamicSelector", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/computer_use.py", + "type": "file", + "name": "computer_use.py", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool - Anthropic Computer Use API 集成", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/computer_use_recorder.py", + "type": "file", + "name": "computer_use_recorder.py", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder - Computer Use 操作录制与回放", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/computer_use_session.py", + "type": "file", + "name": "computer_use_session.py", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession - 虚拟桌面会话管理", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/function_tool.py", + "type": "file", + "name": "function_tool.py", + "filePath": "src/agentkit/tools/function_tool.py", + "layer": "utility", + "summary": "FunctionTool - 将普通 Python 函数包装为 Tool", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/headroom_retrieve.py", + "type": "file", + "name": "headroom_retrieve.py", + "filePath": "src/agentkit/tools/headroom_retrieve.py", + "layer": "utility", + "summary": "HeadroomRetrieveTool — CCR 可逆压缩检索工具", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/mcp_tool.py", + "type": "file", + "name": "mcp_tool.py", + "filePath": "src/agentkit/tools/mcp_tool.py", + "layer": "utility", + "summary": "MCPTool - 通过 MCP Client 调用远程工具", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/memory_tool.py", + "type": "file", + "name": "memory_tool.py", + "filePath": "src/agentkit/tools/memory_tool.py", + "layer": "utility", + "summary": "MemoryTool — Agent 可在对话中读写记忆的工具.", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/output_parser.py", + "type": "file", + "name": "output_parser.py", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "OutputParser - 结构化解析命令输出", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/pty_session.py", + "type": "file", + "name": "pty_session.py", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession - 伪终端会话,支持交互式命令", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/registry.py", + "type": "file", + "name": "registry.py", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry - 工具注册中心", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/schema_tools.py", + "type": "file", + "name": "schema_tools.py", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "Schema 工具集 - 结构化数据提取与生成", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/shell.py", + "type": "file", + "name": "shell.py", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool - Shell 命令执行工具", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/skill_install.py", + "type": "file", + "name": "skill_install.py", + "filePath": "src/agentkit/tools/skill_install.py", + "layer": "utility", + "summary": "SkillInstallTool - Agent 可调用的技能安装工具", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/terminal_session.py", + "type": "file", + "name": "terminal_session.py", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession - 终端会话状态管理", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/web_crawl.py", + "type": "file", + "name": "web_crawl.py", + "filePath": "src/agentkit/tools/web_crawl.py", + "layer": "utility", + "summary": "WebCrawlTool - 基于 Crawl4AI 的网页抓取工具,支持优雅降级", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/tools/web_search.py", + "type": "file", + "name": "web_search.py", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool — 通用网页搜索工具。", + "tags": [ + "tools" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/utils/__init__.py", + "type": "file", + "name": "__init__.py", + "filePath": "src/agentkit/utils/__init__.py", + "layer": "service", + "summary": "AgentKit utility modules.", + "tags": [ + "utils" + ], + "complexity": "simple" + }, + { + "id": "file:src/agentkit/utils/security.py", + "type": "file", + "name": "security.py", + "filePath": "src/agentkit/utils/security.py", + "layer": "unknown", + "summary": "Security utilities for URL validation.", + "tags": [ + "utils" + ], + "complexity": "moderate" + }, + { + "id": "file:src/agentkit/utils/vector_math.py", + "type": "file", + "name": "vector_math.py", + "filePath": "src/agentkit/utils/vector_math.py", + "layer": "unknown", + "summary": "Shared vector math utilities.", + "tags": [ + "utils" + ], + "complexity": "moderate" + }, + { + "id": "class:MessageBus", + "type": "class", + "name": "MessageBus", + "filePath": "src/agentkit/bus/interface.py", + "layer": "data", + "summary": "Agent 间消息总线抽象基类。", + "tags": [ + "MessageBus" + ], + "complexity": "moderate" + }, + { + "id": "func:MessageBus.publish", + "type": "function", + "name": "publish", + "filePath": "src/agentkit/bus/interface.py", + "layer": "data", + "summary": "MessageBus.publish(message) 异步方法", + "tags": [ + "MessageBus", + "publish" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.subscribe", + "type": "function", + "name": "subscribe", + "filePath": "src/agentkit/bus/interface.py", + "layer": "data", + "summary": "MessageBus.subscribe(agent_name, handler) 异步方法", + "tags": [ + "MessageBus", + "subscribe" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.unsubscribe", + "type": "function", + "name": "unsubscribe", + "filePath": "src/agentkit/bus/interface.py", + "layer": "data", + "summary": "MessageBus.unsubscribe(agent_name) 异步方法", + "tags": [ + "MessageBus", + "unsubscribe" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.request", + "type": "function", + "name": "request", + "filePath": "src/agentkit/bus/interface.py", + "layer": "data", + "summary": "MessageBus.request(message, timeout_seconds) 异步方法", + "tags": [ + "MessageBus", + "request" + ], + "complexity": "simple" + }, + { + "id": "class:InMemoryMessageBus", + "type": "class", + "name": "InMemoryMessageBus", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "基于 asyncio.Queue 的内存消息总线。", + "tags": [ + "InMemoryMessageBus" + ], + "complexity": "complex" + }, + { + "id": "func:InMemoryMessageBus.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.__init__(cascade_detector, alignment_guard) 方法", + "tags": [ + "InMemoryMessageBus", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus.publish", + "type": "function", + "name": "publish", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.publish(message) 异步方法", + "tags": [ + "InMemoryMessageBus", + "publish" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus.subscribe", + "type": "function", + "name": "subscribe", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.subscribe(agent_name, handler) 异步方法", + "tags": [ + "InMemoryMessageBus", + "subscribe" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus._consume_queue", + "type": "function", + "name": "_consume_queue", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus._consume_queue(agent_name, handler) 异步方法", + "tags": [ + "InMemoryMessageBus", + "_consume_queue" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus._try_resolve_pending", + "type": "function", + "name": "_try_resolve_pending", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus._try_resolve_pending(message) 方法", + "tags": [ + "InMemoryMessageBus", + "_try_resolve_pending" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus.unsubscribe", + "type": "function", + "name": "unsubscribe", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.unsubscribe(agent_name) 异步方法", + "tags": [ + "InMemoryMessageBus", + "unsubscribe" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus.request", + "type": "function", + "name": "request", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.request(message, timeout_seconds) 异步方法", + "tags": [ + "InMemoryMessageBus", + "request" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus.broadcast", + "type": "function", + "name": "broadcast", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.broadcast(message) 异步方法", + "tags": [ + "InMemoryMessageBus", + "broadcast" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.health_check() 异步方法", + "tags": [ + "InMemoryMessageBus", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryMessageBus.backend_type", + "type": "function", + "name": "backend_type", + "filePath": "src/agentkit/bus/memory_bus.py", + "layer": "data", + "summary": "InMemoryMessageBus.backend_type() 方法", + "tags": [ + "InMemoryMessageBus", + "backend_type" + ], + "complexity": "simple" + }, + { + "id": "class:AgentMessage", + "type": "class", + "name": "AgentMessage", + "filePath": "src/agentkit/bus/message.py", + "layer": "data", + "summary": "Agent 间通信消息。", + "tags": [ + "AgentMessage" + ], + "complexity": "moderate" + }, + { + "id": "func:AgentMessage.is_expired", + "type": "function", + "name": "is_expired", + "filePath": "src/agentkit/bus/message.py", + "layer": "data", + "summary": "AgentMessage.is_expired() 方法", + "tags": [ + "AgentMessage", + "is_expired" + ], + "complexity": "simple" + }, + { + "id": "func:AgentMessage.is_broadcast", + "type": "function", + "name": "is_broadcast", + "filePath": "src/agentkit/bus/message.py", + "layer": "data", + "summary": "AgentMessage.is_broadcast() 方法", + "tags": [ + "AgentMessage", + "is_broadcast" + ], + "complexity": "simple" + }, + { + "id": "func:AgentMessage.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/bus/message.py", + "layer": "data", + "summary": "AgentMessage.to_dict() 方法", + "tags": [ + "AgentMessage", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:AgentMessage.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/bus/message.py", + "layer": "data", + "summary": "AgentMessage.from_dict(cls, data) 方法", + "tags": [ + "AgentMessage", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:MessageBus", + "type": "class", + "name": "MessageBus", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "Agent 间通信总线协议。", + "tags": [ + "MessageBus" + ], + "complexity": "moderate" + }, + { + "id": "func:MessageBus.publish", + "type": "function", + "name": "publish", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "MessageBus.publish(message) 异步方法", + "tags": [ + "MessageBus", + "publish" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.subscribe", + "type": "function", + "name": "subscribe", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "MessageBus.subscribe(agent_name, handler) 异步方法", + "tags": [ + "MessageBus", + "subscribe" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.unsubscribe", + "type": "function", + "name": "unsubscribe", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "MessageBus.unsubscribe(agent_name) 异步方法", + "tags": [ + "MessageBus", + "unsubscribe" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.request", + "type": "function", + "name": "request", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "MessageBus.request(message, timeout) 异步方法", + "tags": [ + "MessageBus", + "request" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.broadcast", + "type": "function", + "name": "broadcast", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "MessageBus.broadcast(message) 异步方法", + "tags": [ + "MessageBus", + "broadcast" + ], + "complexity": "simple" + }, + { + "id": "func:MessageBus.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/bus/protocol.py", + "layer": "data", + "summary": "MessageBus.health_check() 异步方法", + "tags": [ + "MessageBus", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:RedisMessageBus", + "type": "class", + "name": "RedisMessageBus", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "基于 Redis Streams 的消息总线。", + "tags": [ + "RedisMessageBus" + ], + "complexity": "complex" + }, + { + "id": "func:RedisMessageBus.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.__init__(redis_url, consumer_group, max_retries) 方法", + "tags": [ + "RedisMessageBus", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus._get_redis", + "type": "function", + "name": "_get_redis", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus._get_redis() 异步方法", + "tags": [ + "RedisMessageBus", + "_get_redis" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus._stream_key", + "type": "function", + "name": "_stream_key", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus._stream_key(agent_name) 方法", + "tags": [ + "RedisMessageBus", + "_stream_key" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus._dead_letter_key", + "type": "function", + "name": "_dead_letter_key", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus._dead_letter_key(agent_name) 方法", + "tags": [ + "RedisMessageBus", + "_dead_letter_key" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus.publish", + "type": "function", + "name": "publish", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.publish(message) 异步方法", + "tags": [ + "RedisMessageBus", + "publish" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus.subscribe", + "type": "function", + "name": "subscribe", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.subscribe(agent_name, handler) 异步方法", + "tags": [ + "RedisMessageBus", + "subscribe" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus._consume_stream", + "type": "function", + "name": "_consume_stream", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus._consume_stream(agent_name) 异步方法", + "tags": [ + "RedisMessageBus", + "_consume_stream" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus._handle_failed_message", + "type": "function", + "name": "_handle_failed_message", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus._handle_failed_message(redis, stream_key, msg_id, fields, agent_name) 异步方法", + "tags": [ + "RedisMessageBus", + "_handle_failed_message" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus.unsubscribe", + "type": "function", + "name": "unsubscribe", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.unsubscribe(agent_name) 异步方法", + "tags": [ + "RedisMessageBus", + "unsubscribe" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus.request", + "type": "function", + "name": "request", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.request(message, timeout) 异步方法", + "tags": [ + "RedisMessageBus", + "request" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus.broadcast", + "type": "function", + "name": "broadcast", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.broadcast(message) 异步方法", + "tags": [ + "RedisMessageBus", + "broadcast" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.health_check() 异步方法", + "tags": [ + "RedisMessageBus", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:RedisMessageBus.backend_type", + "type": "function", + "name": "backend_type", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "RedisMessageBus.backend_type() 方法", + "tags": [ + "RedisMessageBus", + "backend_type" + ], + "complexity": "simple" + }, + { + "id": "class:ExecutionMode", + "type": "class", + "name": "ExecutionMode", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "How the downstream should execute this routing result.", + "tags": [ + "ExecutionMode" + ], + "complexity": "simple" + }, + { + "id": "class:SkillRoutingResult", + "type": "class", + "name": "SkillRoutingResult", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "Result of skill routing for a user message.", + "tags": [ + "SkillRoutingResult" + ], + "complexity": "simple" + }, + { + "id": "class:HeuristicClassifier", + "type": "class", + "name": "HeuristicClassifier", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "零成本本地启发式分类器,替代 LLM quick_classify。", + "tags": [ + "HeuristicClassifier" + ], + "complexity": "simple" + }, + { + "id": "func:HeuristicClassifier.classify", + "type": "function", + "name": "classify", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "HeuristicClassifier.classify(content) 方法", + "tags": [ + "HeuristicClassifier", + "classify" + ], + "complexity": "simple" + }, + { + "id": "class:CostAwareRouter", + "type": "class", + "name": "CostAwareRouter", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "三层成本感知路由器。", + "tags": [ + "CostAwareRouter" + ], + "complexity": "moderate" + }, + { + "id": "func:CostAwareRouter.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "CostAwareRouter.__init__(llm_gateway, model, org_context, auction_enabled, classifier, merged_llm_classify) 方法", + "tags": [ + "CostAwareRouter", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:CostAwareRouter._match_layer0", + "type": "function", + "name": "_match_layer0", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "CostAwareRouter._match_layer0(content) 方法", + "tags": [ + "CostAwareRouter", + "_match_layer0" + ], + "complexity": "simple" + }, + { + "id": "func:CostAwareRouter.quick_classify", + "type": "function", + "name": "quick_classify", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "CostAwareRouter.quick_classify(content) 异步方法", + "tags": [ + "CostAwareRouter", + "quick_classify" + ], + "complexity": "simple" + }, + { + "id": "func:CostAwareRouter._classify_merged", + "type": "function", + "name": "_classify_merged", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "CostAwareRouter._classify_merged(content, skill_registry, intent_router, default_tools, default_system_prompt, default_model, default_agent_name, agent_tool_registry, session_id, complexity) 异步方法", + "tags": [ + "CostAwareRouter", + "_classify_merged" + ], + "complexity": "simple" + }, + { + "id": "func:CostAwareRouter._route_layer2", + "type": "function", + "name": "_route_layer2", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "CostAwareRouter._route_layer2(content, skill_registry, intent_router, default_tools, default_system_prompt, default_model, default_agent_name, agent_tool_registry, session_id, complexity, trace) 异步方法", + "tags": [ + "CostAwareRouter", + "_route_layer2" + ], + "complexity": "simple" + }, + { + "id": "func:CostAwareRouter.route", + "type": "function", + "name": "route", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "CostAwareRouter.route(content, skill_registry, intent_router, default_tools, default_system_prompt, default_model, default_agent_name, agent_tool_registry, session_id, transparency) 异步方法", + "tags": [ + "CostAwareRouter", + "route" + ], + "complexity": "simple" + }, + { + "id": "class:AgentPool", + "type": "class", + "name": "AgentPool", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "运行时 Agent 实例池,管理 Agent 的创建、获取、删除", + "tags": [ + "AgentPool" + ], + "complexity": "moderate" + }, + { + "id": "func:AgentPool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "AgentPool.__init__(llm_gateway, skill_registry, tool_registry, compressor, message_bus) 方法", + "tags": [ + "AgentPool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AgentPool.create_agent", + "type": "function", + "name": "create_agent", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "AgentPool.create_agent(config) 异步方法", + "tags": [ + "AgentPool", + "create_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentPool.remove_agent", + "type": "function", + "name": "remove_agent", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "AgentPool.remove_agent(name) 异步方法", + "tags": [ + "AgentPool", + "remove_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentPool.get_agent", + "type": "function", + "name": "get_agent", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "AgentPool.get_agent(name) 方法", + "tags": [ + "AgentPool", + "get_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentPool.list_agents", + "type": "function", + "name": "list_agents", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "AgentPool.list_agents() 方法", + "tags": [ + "AgentPool", + "list_agents" + ], + "complexity": "simple" + }, + { + "id": "func:AgentPool.create_agent_from_skill", + "type": "function", + "name": "create_agent_from_skill", + "filePath": "src/agentkit/core/agent_pool.py", + "layer": "service", + "summary": "AgentPool.create_agent_from_skill(skill_name) 异步方法", + "tags": [ + "AgentPool", + "create_agent_from_skill" + ], + "complexity": "simple" + }, + { + "id": "class:BaseAgent", + "type": "class", + "name": "BaseAgent", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "所有 Agent 的基类,定义标准生命周期。", + "tags": [ + "BaseAgent" + ], + "complexity": "complex" + }, + { + "id": "func:BaseAgent.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.__init__(name, agent_type, version) 方法", + "tags": [ + "BaseAgent", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.status", + "type": "function", + "name": "status", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.status() 方法", + "tags": [ + "BaseAgent", + "status" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.config_version", + "type": "function", + "name": "config_version", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.config_version() 方法", + "tags": [ + "BaseAgent", + "config_version" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.is_distributed", + "type": "function", + "name": "is_distributed", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.is_distributed() 方法", + "tags": [ + "BaseAgent", + "is_distributed" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._acquire_status_lock", + "type": "function", + "name": "_acquire_status_lock", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._acquire_status_lock() 异步方法", + "tags": [ + "BaseAgent", + "_acquire_status_lock" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._release_status_lock", + "type": "function", + "name": "_release_status_lock", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._release_status_lock() 方法", + "tags": [ + "BaseAgent", + "_release_status_lock" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.tools", + "type": "function", + "name": "tools", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.tools() 方法", + "tags": [ + "BaseAgent", + "tools" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.memory", + "type": "function", + "name": "memory", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.memory() 方法", + "tags": [ + "BaseAgent", + "memory" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.llm_gateway", + "type": "function", + "name": "llm_gateway", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.llm_gateway() 方法", + "tags": [ + "BaseAgent", + "llm_gateway" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.llm_gateway", + "type": "function", + "name": "llm_gateway", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.llm_gateway(gateway) 方法", + "tags": [ + "BaseAgent", + "llm_gateway" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.skill", + "type": "function", + "name": "skill", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.skill() 方法", + "tags": [ + "BaseAgent", + "skill" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.skill", + "type": "function", + "name": "skill", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.skill(skill) 方法", + "tags": [ + "BaseAgent", + "skill" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.quality_gate", + "type": "function", + "name": "quality_gate", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.quality_gate() 方法", + "tags": [ + "BaseAgent", + "quality_gate" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.handle_task", + "type": "function", + "name": "handle_task", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.handle_task(task) 异步方法", + "tags": [ + "BaseAgent", + "handle_task" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.get_capabilities", + "type": "function", + "name": "get_capabilities", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.get_capabilities() 方法", + "tags": [ + "BaseAgent", + "get_capabilities" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.on_task_start", + "type": "function", + "name": "on_task_start", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.on_task_start(task) 异步方法", + "tags": [ + "BaseAgent", + "on_task_start" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.on_task_complete", + "type": "function", + "name": "on_task_complete", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.on_task_complete(task, output) 异步方法", + "tags": [ + "BaseAgent", + "on_task_complete" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.on_task_failed", + "type": "function", + "name": "on_task_failed", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.on_task_failed(task, error) 异步方法", + "tags": [ + "BaseAgent", + "on_task_failed" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.handle_task_with_feedback", + "type": "function", + "name": "handle_task_with_feedback", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.handle_task_with_feedback(task, feedback) 异步方法", + "tags": [ + "BaseAgent", + "handle_task_with_feedback" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._build_quality_feedback", + "type": "function", + "name": "_build_quality_feedback", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._build_quality_feedback(quality_result) 方法", + "tags": [ + "BaseAgent", + "_build_quality_feedback" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.use_tool", + "type": "function", + "name": "use_tool", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.use_tool(tool) 方法", + "tags": [ + "BaseAgent", + "use_tool" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.use_memory", + "type": "function", + "name": "use_memory", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.use_memory(memory) 方法", + "tags": [ + "BaseAgent", + "use_memory" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.use_memory_retriever", + "type": "function", + "name": "use_memory_retriever", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.use_memory_retriever(retriever) 方法", + "tags": [ + "BaseAgent", + "use_memory_retriever" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.set_registry", + "type": "function", + "name": "set_registry", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.set_registry(registry) 方法", + "tags": [ + "BaseAgent", + "set_registry" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.set_dispatcher", + "type": "function", + "name": "set_dispatcher", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.set_dispatcher(dispatcher) 方法", + "tags": [ + "BaseAgent", + "set_dispatcher" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.start", + "type": "function", + "name": "start", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.start(redis_url) 异步方法", + "tags": [ + "BaseAgent", + "start" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.stop", + "type": "function", + "name": "stop", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.stop() 异步方法", + "tags": [ + "BaseAgent", + "stop" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.execute(task) 异步方法", + "tags": [ + "BaseAgent", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.cancel_task", + "type": "function", + "name": "cancel_task", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.cancel_task(task_id) 方法", + "tags": [ + "BaseAgent", + "cancel_task" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.handoff", + "type": "function", + "name": "handoff", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.handoff(target_agent, task, reason, context) 异步方法", + "tags": [ + "BaseAgent", + "handoff" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.report_progress", + "type": "function", + "name": "report_progress", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.report_progress(task_id, progress, message) 异步方法", + "tags": [ + "BaseAgent", + "report_progress" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent.heartbeat", + "type": "function", + "name": "heartbeat", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent.heartbeat() 异步方法", + "tags": [ + "BaseAgent", + "heartbeat" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._heartbeat_loop", + "type": "function", + "name": "_heartbeat_loop", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._heartbeat_loop() 异步方法", + "tags": [ + "BaseAgent", + "_heartbeat_loop" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._listen_for_tasks", + "type": "function", + "name": "_listen_for_tasks", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._listen_for_tasks() 异步方法", + "tags": [ + "BaseAgent", + "_listen_for_tasks" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._execute_task_with_semaphore", + "type": "function", + "name": "_execute_task_with_semaphore", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._execute_task_with_semaphore(task) 异步方法", + "tags": [ + "BaseAgent", + "_execute_task_with_semaphore" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._execute_task", + "type": "function", + "name": "_execute_task", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._execute_task(task) 异步方法", + "tags": [ + "BaseAgent", + "_execute_task" + ], + "complexity": "simple" + }, + { + "id": "func:BaseAgent._validate_input", + "type": "function", + "name": "_validate_input", + "filePath": "src/agentkit/core/base.py", + "layer": "service", + "summary": "BaseAgent._validate_input(data, schema) 方法", + "tags": [ + "BaseAgent", + "_validate_input" + ], + "complexity": "simple" + }, + { + "id": "class:CompressionStrategy", + "type": "class", + "name": "CompressionStrategy", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "压缩策略协议 — 所有压缩器必须实现此接口", + "tags": [ + "CompressionStrategy" + ], + "complexity": "simple" + }, + { + "id": "func:CompressionStrategy.compress", + "type": "function", + "name": "compress", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "CompressionStrategy.compress(messages) 异步方法", + "tags": [ + "CompressionStrategy", + "compress" + ], + "complexity": "simple" + }, + { + "id": "func:CompressionStrategy.compress_tool_result", + "type": "function", + "name": "compress_tool_result", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "CompressionStrategy.compress_tool_result(tool_name, result) 异步方法", + "tags": [ + "CompressionStrategy", + "compress_tool_result" + ], + "complexity": "simple" + }, + { + "id": "func:CompressionStrategy.is_available", + "type": "function", + "name": "is_available", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "CompressionStrategy.is_available() 方法", + "tags": [ + "CompressionStrategy", + "is_available" + ], + "complexity": "simple" + }, + { + "id": "class:ContextCompressor", + "type": "class", + "name": "ContextCompressor", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "Compress long conversation histories to stay within token budgets", + "tags": [ + "ContextCompressor" + ], + "complexity": "complex" + }, + { + "id": "func:ContextCompressor.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor.__init__(llm_gateway, max_tokens, keep_recent, model) 方法", + "tags": [ + "ContextCompressor", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor.estimate_tokens", + "type": "function", + "name": "estimate_tokens", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor.estimate_tokens(messages) 方法", + "tags": [ + "ContextCompressor", + "estimate_tokens" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor.compress", + "type": "function", + "name": "compress", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor.compress(messages, _compression_depth) 异步方法", + "tags": [ + "ContextCompressor", + "compress" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor._summarize", + "type": "function", + "name": "_summarize", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor._summarize(messages, max_input_tokens) 异步方法", + "tags": [ + "ContextCompressor", + "_summarize" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor._simple_summary", + "type": "function", + "name": "_simple_summary", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor._simple_summary(messages) 方法", + "tags": [ + "ContextCompressor", + "_simple_summary" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor._compress_aggressive", + "type": "function", + "name": "_compress_aggressive", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor._compress_aggressive(messages, _compression_depth) 异步方法", + "tags": [ + "ContextCompressor", + "_compress_aggressive" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor._truncate", + "type": "function", + "name": "_truncate", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor._truncate(messages) 方法", + "tags": [ + "ContextCompressor", + "_truncate" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor.compress_tool_result", + "type": "function", + "name": "compress_tool_result", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor.compress_tool_result(tool_name, result) 异步方法", + "tags": [ + "ContextCompressor", + "compress_tool_result" + ], + "complexity": "simple" + }, + { + "id": "func:ContextCompressor.is_available", + "type": "function", + "name": "is_available", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "ContextCompressor.is_available() 方法", + "tags": [ + "ContextCompressor", + "is_available" + ], + "complexity": "simple" + }, + { + "id": "class:AgentConfig", + "type": "class", + "name": "AgentConfig", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "Agent 配置模型,从 YAML 或 Dict 构建", + "tags": [ + "AgentConfig" + ], + "complexity": "moderate" + }, + { + "id": "func:AgentConfig.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "AgentConfig.__init__(name, agent_type, version, description, task_mode, supported_tasks, max_concurrency, input_schema, output_schema, prompt, llm, tools, memory, custom_handler) 方法", + "tags": [ + "AgentConfig", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AgentConfig._validate", + "type": "function", + "name": "_validate", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "AgentConfig._validate() 方法", + "tags": [ + "AgentConfig", + "_validate" + ], + "complexity": "simple" + }, + { + "id": "func:AgentConfig.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "AgentConfig.from_dict(cls, data) 方法", + "tags": [ + "AgentConfig", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "func:AgentConfig.from_yaml", + "type": "function", + "name": "from_yaml", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "AgentConfig.from_yaml(cls, path) 方法", + "tags": [ + "AgentConfig", + "from_yaml" + ], + "complexity": "simple" + }, + { + "id": "func:AgentConfig.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "AgentConfig.to_dict() 方法", + "tags": [ + "AgentConfig", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:ConfigDrivenAgent", + "type": "class", + "name": "ConfigDrivenAgent", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "配置驱动的 Agent", + "tags": [ + "ConfigDrivenAgent" + ], + "complexity": "complex" + }, + { + "id": "func:ConfigDrivenAgent.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.__init__(config, tool_registry, llm_client, custom_handlers, llm_gateway, mcp_servers, compressor) 方法", + "tags": [ + "ConfigDrivenAgent", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.get_tools", + "type": "function", + "name": "get_tools", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.get_tools() 方法", + "tags": [ + "ConfigDrivenAgent", + "get_tools" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.get_model", + "type": "function", + "name": "get_model", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.get_model() 方法", + "tags": [ + "ConfigDrivenAgent", + "get_model" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.get_system_prompt", + "type": "function", + "name": "get_system_prompt", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.get_system_prompt() 方法", + "tags": [ + "ConfigDrivenAgent", + "get_system_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._build_tools_description", + "type": "function", + "name": "_build_tools_description", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._build_tools_description(tools) 方法", + "tags": [ + "ConfigDrivenAgent", + "_build_tools_description" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.get_react_config", + "type": "function", + "name": "get_react_config", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.get_react_config() 方法", + "tags": [ + "ConfigDrivenAgent", + "get_react_config" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.config", + "type": "function", + "name": "config", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.config() 方法", + "tags": [ + "ConfigDrivenAgent", + "config" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.prompt_template", + "type": "function", + "name": "prompt_template", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.prompt_template() 方法", + "tags": [ + "ConfigDrivenAgent", + "prompt_template" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.on_task_complete", + "type": "function", + "name": "on_task_complete", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.on_task_complete(task, output) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "on_task_complete" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.on_task_failed", + "type": "function", + "name": "on_task_failed", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.on_task_failed(task, error) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "on_task_failed" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._bind_tools", + "type": "function", + "name": "_bind_tools", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._bind_tools() 方法", + "tags": [ + "ConfigDrivenAgent", + "_bind_tools" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._auto_set_current_module", + "type": "function", + "name": "_auto_set_current_module", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._auto_set_current_module() 方法", + "tags": [ + "ConfigDrivenAgent", + "_auto_set_current_module" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._register_mcp_tools", + "type": "function", + "name": "_register_mcp_tools", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._register_mcp_tools() 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_register_mcp_tools" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.get_capabilities", + "type": "function", + "name": "get_capabilities", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.get_capabilities() 方法", + "tags": [ + "ConfigDrivenAgent", + "get_capabilities" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.handle_task", + "type": "function", + "name": "handle_task", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.handle_task(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "handle_task" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_react", + "type": "function", + "name": "_handle_react", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_react(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_react" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_rewoo", + "type": "function", + "name": "_handle_rewoo", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_rewoo(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_rewoo" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_plan_exec", + "type": "function", + "name": "_handle_plan_exec", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_plan_exec(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_plan_exec" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_reflexion", + "type": "function", + "name": "_handle_reflexion", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_reflexion(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_reflexion" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_direct", + "type": "function", + "name": "_handle_direct", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_direct(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_direct" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent.handle_task_with_feedback", + "type": "function", + "name": "handle_task_with_feedback", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent.handle_task_with_feedback(task, feedback) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "handle_task_with_feedback" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._wrap_llm_client", + "type": "function", + "name": "_wrap_llm_client", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._wrap_llm_client(llm_client) 方法", + "tags": [ + "ConfigDrivenAgent", + "_wrap_llm_client" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_llm_generate", + "type": "function", + "name": "_handle_llm_generate", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_llm_generate(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_llm_generate" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_tool_call", + "type": "function", + "name": "_handle_tool_call", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_tool_call(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_tool_call" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._handle_custom", + "type": "function", + "name": "_handle_custom", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._handle_custom(task) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_handle_custom" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._resolve_tool", + "type": "function", + "name": "_resolve_tool", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._resolve_tool(task) 方法", + "tags": [ + "ConfigDrivenAgent", + "_resolve_tool" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._call_llm", + "type": "function", + "name": "_call_llm", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._call_llm(messages) 异步方法", + "tags": [ + "ConfigDrivenAgent", + "_call_llm" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._parse_llm_response", + "type": "function", + "name": "_parse_llm_response", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._parse_llm_response(response) 方法", + "tags": [ + "ConfigDrivenAgent", + "_parse_llm_response" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigDrivenAgent._import_handler", + "type": "function", + "name": "_import_handler", + "filePath": "src/agentkit/core/config_driven.py", + "layer": "service", + "summary": "ConfigDrivenAgent._import_handler(dotted_path) 方法", + "tags": [ + "ConfigDrivenAgent", + "_import_handler" + ], + "complexity": "simple" + }, + { + "id": "class:TaskDispatcher", + "type": "class", + "name": "TaskDispatcher", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "任务分发器,通过 Redis Queue 将任务分发给 Agent", + "tags": [ + "TaskDispatcher" + ], + "complexity": "complex" + }, + { + "id": "func:TaskDispatcher.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher.__init__(redis_factory, session_factory, agent_model, task_model, task_log_model) 方法", + "tags": [ + "TaskDispatcher", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher._get_redis", + "type": "function", + "name": "_get_redis", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher._get_redis() 异步方法", + "tags": [ + "TaskDispatcher", + "_get_redis" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher.dispatch", + "type": "function", + "name": "dispatch", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher.dispatch(task, organization_id, created_by) 异步方法", + "tags": [ + "TaskDispatcher", + "dispatch" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher.cancel_task", + "type": "function", + "name": "cancel_task", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher.cancel_task(task_id) 异步方法", + "tags": [ + "TaskDispatcher", + "cancel_task" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher.get_task_status", + "type": "function", + "name": "get_task_status", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher.get_task_status(task_id) 异步方法", + "tags": [ + "TaskDispatcher", + "get_task_status" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher.handle_result", + "type": "function", + "name": "handle_result", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher.handle_result(result) 异步方法", + "tags": [ + "TaskDispatcher", + "handle_result" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher.handle_progress", + "type": "function", + "name": "handle_progress", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher.handle_progress(progress) 异步方法", + "tags": [ + "TaskDispatcher", + "handle_progress" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher.retry_failed_tasks", + "type": "function", + "name": "retry_failed_tasks", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher.retry_failed_tasks(max_retries) 异步方法", + "tags": [ + "TaskDispatcher", + "retry_failed_tasks" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher._write_log", + "type": "function", + "name": "_write_log", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher._write_log(db, task_id, agent_id, log_level, message, extra_metadata) 异步方法", + "tags": [ + "TaskDispatcher", + "_write_log" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher._trigger_callback", + "type": "function", + "name": "_trigger_callback", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher._trigger_callback(callback_url, result) 异步方法", + "tags": [ + "TaskDispatcher", + "_trigger_callback" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatcher._task_to_dict", + "type": "function", + "name": "_task_to_dict", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "TaskDispatcher._task_to_dict(task) 方法", + "tags": [ + "TaskDispatcher", + "_task_to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:AgentFrameworkError", + "type": "class", + "name": "AgentFrameworkError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "Agent 框架基础异常", + "tags": [ + "AgentFrameworkError" + ], + "complexity": "simple" + }, + { + "id": "func:AgentFrameworkError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentFrameworkError.__init__(message) 方法", + "tags": [ + "AgentFrameworkError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:AgentNotFoundError", + "type": "class", + "name": "AgentNotFoundError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentNotFoundError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "AgentNotFoundError" + ], + "complexity": "simple" + }, + { + "id": "func:AgentNotFoundError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentNotFoundError.__init__(agent_name) 方法", + "tags": [ + "AgentNotFoundError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:AgentAlreadyRegisteredError", + "type": "class", + "name": "AgentAlreadyRegisteredError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentAlreadyRegisteredError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "AgentAlreadyRegisteredError" + ], + "complexity": "simple" + }, + { + "id": "func:AgentAlreadyRegisteredError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentAlreadyRegisteredError.__init__(agent_name) 方法", + "tags": [ + "AgentAlreadyRegisteredError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:AgentUnavailableError", + "type": "class", + "name": "AgentUnavailableError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentUnavailableError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "AgentUnavailableError" + ], + "complexity": "simple" + }, + { + "id": "func:AgentUnavailableError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentUnavailableError.__init__(agent_name, status) 方法", + "tags": [ + "AgentUnavailableError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:TaskNotFoundError", + "type": "class", + "name": "TaskNotFoundError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskNotFoundError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "TaskNotFoundError" + ], + "complexity": "simple" + }, + { + "id": "func:TaskNotFoundError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskNotFoundError.__init__(task_id) 方法", + "tags": [ + "TaskNotFoundError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:TaskDispatchError", + "type": "class", + "name": "TaskDispatchError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskDispatchError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "TaskDispatchError" + ], + "complexity": "simple" + }, + { + "id": "func:TaskDispatchError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskDispatchError.__init__(task_id, reason) 方法", + "tags": [ + "TaskDispatchError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:TaskExecutionError", + "type": "class", + "name": "TaskExecutionError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskExecutionError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "TaskExecutionError" + ], + "complexity": "simple" + }, + { + "id": "func:TaskExecutionError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskExecutionError.__init__(task_id, agent_name, reason) 方法", + "tags": [ + "TaskExecutionError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:TaskTimeoutError", + "type": "class", + "name": "TaskTimeoutError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskTimeoutError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "TaskTimeoutError" + ], + "complexity": "simple" + }, + { + "id": "func:TaskTimeoutError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskTimeoutError.__init__(task_id, timeout_seconds) 方法", + "tags": [ + "TaskTimeoutError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:TaskCancelledError", + "type": "class", + "name": "TaskCancelledError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskCancelledError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "TaskCancelledError" + ], + "complexity": "simple" + }, + { + "id": "func:TaskCancelledError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "TaskCancelledError.__init__(task_id) 方法", + "tags": [ + "TaskCancelledError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:NoAvailableAgentError", + "type": "class", + "name": "NoAvailableAgentError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "NoAvailableAgentError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "NoAvailableAgentError" + ], + "complexity": "simple" + }, + { + "id": "func:NoAvailableAgentError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "NoAvailableAgentError.__init__(task_type) 方法", + "tags": [ + "NoAvailableAgentError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:ConfigValidationError", + "type": "class", + "name": "ConfigValidationError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "ConfigValidationError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "ConfigValidationError" + ], + "complexity": "simple" + }, + { + "id": "func:ConfigValidationError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "ConfigValidationError.__init__(agent_name, key, reason) 方法", + "tags": [ + "ConfigValidationError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:AgentNotReadyError", + "type": "class", + "name": "AgentNotReadyError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentNotReadyError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "AgentNotReadyError" + ], + "complexity": "simple" + }, + { + "id": "func:AgentNotReadyError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "AgentNotReadyError.__init__(agent_name) 方法", + "tags": [ + "AgentNotReadyError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:SkillNotFoundError", + "type": "class", + "name": "SkillNotFoundError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "SkillNotFoundError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "SkillNotFoundError" + ], + "complexity": "simple" + }, + { + "id": "func:SkillNotFoundError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "SkillNotFoundError.__init__(skill_name) 方法", + "tags": [ + "SkillNotFoundError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:ToolNotFoundError", + "type": "class", + "name": "ToolNotFoundError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "ToolNotFoundError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "ToolNotFoundError" + ], + "complexity": "simple" + }, + { + "id": "func:ToolNotFoundError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "ToolNotFoundError.__init__(tool_name) 方法", + "tags": [ + "ToolNotFoundError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:ToolExecutionError", + "type": "class", + "name": "ToolExecutionError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "ToolExecutionError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "ToolExecutionError" + ], + "complexity": "simple" + }, + { + "id": "func:ToolExecutionError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "ToolExecutionError.__init__(tool_name, reason) 方法", + "tags": [ + "ToolExecutionError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:SchemaValidationError", + "type": "class", + "name": "SchemaValidationError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "SchemaValidationError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "SchemaValidationError" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaValidationError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "SchemaValidationError.__init__(agent_name, detail) 方法", + "tags": [ + "SchemaValidationError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:HandoffError", + "type": "class", + "name": "HandoffError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "HandoffError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "HandoffError" + ], + "complexity": "simple" + }, + { + "id": "func:HandoffError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "HandoffError.__init__(source, target, reason) 方法", + "tags": [ + "HandoffError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionError", + "type": "class", + "name": "EvolutionError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "EvolutionError类,继承自AgentFrameworkError,包含方法: __init__", + "tags": [ + "EvolutionError" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "EvolutionError.__init__(agent_name, reason) 方法", + "tags": [ + "EvolutionError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:LLMError", + "type": "class", + "name": "LLMError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "LLM 基础异常", + "tags": [ + "LLMError" + ], + "complexity": "simple" + }, + { + "id": "func:LLMError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "LLMError.__init__(message) 方法", + "tags": [ + "LLMError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:LLMProviderError", + "type": "class", + "name": "LLMProviderError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "LLM Provider 特定异常", + "tags": [ + "LLMProviderError" + ], + "complexity": "simple" + }, + { + "id": "func:LLMProviderError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "LLMProviderError.__init__(provider, reason) 方法", + "tags": [ + "LLMProviderError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:ModelNotFoundError", + "type": "class", + "name": "ModelNotFoundError", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "模型别名未找到异常", + "tags": [ + "ModelNotFoundError" + ], + "complexity": "simple" + }, + { + "id": "func:ModelNotFoundError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/exceptions.py", + "layer": "service", + "summary": "ModelNotFoundError.__init__(model) 方法", + "tags": [ + "ModelNotFoundError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:GoalPlanner", + "type": "class", + "name": "GoalPlanner", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "目标分析与计划生成器", + "tags": [ + "GoalPlanner" + ], + "complexity": "complex" + }, + { + "id": "func:GoalPlanner.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner.__init__(llm_gateway, max_parallel) 方法", + "tags": [ + "GoalPlanner", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner.generate_plan", + "type": "function", + "name": "generate_plan", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner.generate_plan(goal, context, available_skills) 异步方法", + "tags": [ + "GoalPlanner", + "generate_plan" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._rule_based_decompose", + "type": "function", + "name": "_rule_based_decompose", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._rule_based_decompose(goal, context, available_skills) 方法", + "tags": [ + "GoalPlanner", + "_rule_based_decompose" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._extract_parallel_items", + "type": "function", + "name": "_extract_parallel_items", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._extract_parallel_items(goal) 方法", + "tags": [ + "GoalPlanner", + "_extract_parallel_items" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._extract_sequential_parts", + "type": "function", + "name": "_extract_sequential_parts", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._extract_sequential_parts(goal) 方法", + "tags": [ + "GoalPlanner", + "_extract_sequential_parts" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._decompose_parallel_goal", + "type": "function", + "name": "_decompose_parallel_goal", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._decompose_parallel_goal(goal, parallel_items, available_skills) 方法", + "tags": [ + "GoalPlanner", + "_decompose_parallel_goal" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._decompose_sequential_goal", + "type": "function", + "name": "_decompose_sequential_goal", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._decompose_sequential_goal(goal, sequential_parts, available_skills) 方法", + "tags": [ + "GoalPlanner", + "_decompose_sequential_goal" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._decompose_simple_goal", + "type": "function", + "name": "_decompose_simple_goal", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._decompose_simple_goal(goal, available_skills) 方法", + "tags": [ + "GoalPlanner", + "_decompose_simple_goal" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._infer_required_skills", + "type": "function", + "name": "_infer_required_skills", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._infer_required_skills(text, available_skills) 方法", + "tags": [ + "GoalPlanner", + "_infer_required_skills" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._identify_skill_gaps", + "type": "function", + "name": "_identify_skill_gaps", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._identify_skill_gaps(plan, available_skills) 方法", + "tags": [ + "GoalPlanner", + "_identify_skill_gaps" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._should_refine_with_llm", + "type": "function", + "name": "_should_refine_with_llm", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._should_refine_with_llm(plan) 方法", + "tags": [ + "GoalPlanner", + "_should_refine_with_llm" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._llm_refine_plan", + "type": "function", + "name": "_llm_refine_plan", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._llm_refine_plan(goal, initial_plan, context, available_skills) 异步方法", + "tags": [ + "GoalPlanner", + "_llm_refine_plan" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner._build_parallel_groups", + "type": "function", + "name": "_build_parallel_groups", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner._build_parallel_groups(steps) 方法", + "tags": [ + "GoalPlanner", + "_build_parallel_groups" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner.update_plan_from_feedback", + "type": "function", + "name": "update_plan_from_feedback", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner.update_plan_from_feedback(plan, modifications) 方法", + "tags": [ + "GoalPlanner", + "update_plan_from_feedback" + ], + "complexity": "simple" + }, + { + "id": "func:GoalPlanner.validate_plan", + "type": "function", + "name": "validate_plan", + "filePath": "src/agentkit/core/goal_planner.py", + "layer": "service", + "summary": "GoalPlanner.validate_plan(plan) 方法", + "tags": [ + "GoalPlanner", + "validate_plan" + ], + "complexity": "simple" + }, + { + "id": "class:HeadroomCompressor", + "type": "class", + "name": "HeadroomCompressor", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "基于 headroom-ai 的上下文压缩器", + "tags": [ + "HeadroomCompressor" + ], + "complexity": "complex" + }, + { + "id": "func:HeadroomCompressor.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor.__init__(config) 方法", + "tags": [ + "HeadroomCompressor", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor.is_available", + "type": "function", + "name": "is_available", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor.is_available() 方法", + "tags": [ + "HeadroomCompressor", + "is_available" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor.compress", + "type": "function", + "name": "compress", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor.compress(messages) 异步方法", + "tags": [ + "HeadroomCompressor", + "compress" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor.compress_tool_result", + "type": "function", + "name": "compress_tool_result", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor.compress_tool_result(tool_name, result) 异步方法", + "tags": [ + "HeadroomCompressor", + "compress_tool_result" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor._detect_content_type", + "type": "function", + "name": "_detect_content_type", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor._detect_content_type(content) 方法", + "tags": [ + "HeadroomCompressor", + "_detect_content_type" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor._compress_with_headroom", + "type": "function", + "name": "_compress_with_headroom", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor._compress_with_headroom(content, compressor) 方法", + "tags": [ + "HeadroomCompressor", + "_compress_with_headroom" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor._store_ccr", + "type": "function", + "name": "_store_ccr", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor._store_ccr(original) 方法", + "tags": [ + "HeadroomCompressor", + "_store_ccr" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor._evict_expired", + "type": "function", + "name": "_evict_expired", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor._evict_expired() 方法", + "tags": [ + "HeadroomCompressor", + "_evict_expired" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomCompressor.retrieve", + "type": "function", + "name": "retrieve", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "HeadroomCompressor.retrieve(ccr_hash, query) 方法", + "tags": [ + "HeadroomCompressor", + "retrieve" + ], + "complexity": "simple" + }, + { + "id": "class:StructuredFormatter", + "type": "class", + "name": "StructuredFormatter", + "filePath": "src/agentkit/core/logging.py", + "layer": "service", + "summary": "JSON structured log formatter.", + "tags": [ + "StructuredFormatter" + ], + "complexity": "simple" + }, + { + "id": "func:StructuredFormatter.format", + "type": "function", + "name": "format", + "filePath": "src/agentkit/core/logging.py", + "layer": "service", + "summary": "StructuredFormatter.format(record) 方法", + "tags": [ + "StructuredFormatter", + "format" + ], + "complexity": "simple" + }, + { + "id": "class:AgentRole", + "type": "class", + "name": "AgentRole", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Agent 角色枚举", + "tags": [ + "AgentRole" + ], + "complexity": "simple" + }, + { + "id": "class:SubTaskStatus", + "type": "class", + "name": "SubTaskStatus", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "子任务状态", + "tags": [ + "SubTaskStatus" + ], + "complexity": "simple" + }, + { + "id": "class:SubTask", + "type": "class", + "name": "SubTask", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "子任务定义", + "tags": [ + "SubTask" + ], + "complexity": "simple" + }, + { + "id": "class:OrchestrationPlan", + "type": "class", + "name": "OrchestrationPlan", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "编排计划", + "tags": [ + "OrchestrationPlan" + ], + "complexity": "simple" + }, + { + "id": "class:OrchestrationResult", + "type": "class", + "name": "OrchestrationResult", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "编排结果", + "tags": [ + "OrchestrationResult" + ], + "complexity": "simple" + }, + { + "id": "class:OrchestratorConfig", + "type": "class", + "name": "OrchestratorConfig", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator 配置", + "tags": [ + "OrchestratorConfig" + ], + "complexity": "simple" + }, + { + "id": "class:Orchestrator", + "type": "class", + "name": "Orchestrator", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "多 Agent 协作编排器", + "tags": [ + "Orchestrator" + ], + "complexity": "complex" + }, + { + "id": "func:Orchestrator.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator.__init__(agent_pool, workspace, llm_gateway, max_parallel, subtask_timeout, goal_planner, plan_executor, plan_checker, config, message_bus) 方法", + "tags": [ + "Orchestrator", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator.execute(task) 异步方法", + "tags": [ + "Orchestrator", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._decompose_task", + "type": "function", + "name": "_decompose_task", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._decompose_task(task) 异步方法", + "tags": [ + "Orchestrator", + "_decompose_task" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._llm_decompose", + "type": "function", + "name": "_llm_decompose", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._llm_decompose(task) 异步方法", + "tags": [ + "Orchestrator", + "_llm_decompose" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._build_parallel_groups", + "type": "function", + "name": "_build_parallel_groups", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._build_parallel_groups(subtasks) 方法", + "tags": [ + "Orchestrator", + "_build_parallel_groups" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._execute_plan", + "type": "function", + "name": "_execute_plan", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._execute_plan(plan, original_task) 异步方法", + "tags": [ + "Orchestrator", + "_execute_plan" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._execute_subtask", + "type": "function", + "name": "_execute_subtask", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._execute_subtask(subtask, input_data, original_task) 异步方法", + "tags": [ + "Orchestrator", + "_execute_subtask" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._inject_dependency_results", + "type": "function", + "name": "_inject_dependency_results", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._inject_dependency_results(subtask, subtask_results) 方法", + "tags": [ + "Orchestrator", + "_inject_dependency_results" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._aggregate_results", + "type": "function", + "name": "_aggregate_results", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._aggregate_results(plan, subtask_results, original_task) 异步方法", + "tags": [ + "Orchestrator", + "_aggregate_results" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._get_available_skill_names", + "type": "function", + "name": "_get_available_skill_names", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._get_available_skill_names() 方法", + "tags": [ + "Orchestrator", + "_get_available_skill_names" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._convert_execution_plan_to_subtasks", + "type": "function", + "name": "_convert_execution_plan_to_subtasks", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._convert_execution_plan_to_subtasks(execution_plan, parent_task_id, default_agent, default_task_type, original_input) 方法", + "tags": [ + "Orchestrator", + "_convert_execution_plan_to_subtasks" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._match_agent_for_skills", + "type": "function", + "name": "_match_agent_for_skills", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._match_agent_for_skills(required_skills) 方法", + "tags": [ + "Orchestrator", + "_match_agent_for_skills" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator.execute_adaptive", + "type": "function", + "name": "execute_adaptive", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator.execute_adaptive(task) 异步方法", + "tags": [ + "Orchestrator", + "execute_adaptive" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._evaluate_quality", + "type": "function", + "name": "_evaluate_quality", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._evaluate_quality(task, result) 异步方法", + "tags": [ + "Orchestrator", + "_evaluate_quality" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._rule_based_evaluate", + "type": "function", + "name": "_rule_based_evaluate", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._rule_based_evaluate(result) 方法", + "tags": [ + "Orchestrator", + "_rule_based_evaluate" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._llm_evaluate", + "type": "function", + "name": "_llm_evaluate", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._llm_evaluate(task, result) 异步方法", + "tags": [ + "Orchestrator", + "_llm_evaluate" + ], + "complexity": "simple" + }, + { + "id": "func:Orchestrator._reexecute_failed", + "type": "function", + "name": "_reexecute_failed", + "filePath": "src/agentkit/core/orchestrator.py", + "layer": "service", + "summary": "Orchestrator._reexecute_failed(task, previous_result, quality) 异步方法", + "tags": [ + "Orchestrator", + "_reexecute_failed" + ], + "complexity": "simple" + }, + { + "id": "class:CheckStatus", + "type": "class", + "name": "CheckStatus", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "检查结果状态", + "tags": [ + "CheckStatus" + ], + "complexity": "simple" + }, + { + "id": "class:CheckResult", + "type": "class", + "name": "CheckResult", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "单步检查结果", + "tags": [ + "CheckResult" + ], + "complexity": "simple" + }, + { + "id": "class:ReviewReport", + "type": "class", + "name": "ReviewReport", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "复盘报告", + "tags": [ + "ReviewReport" + ], + "complexity": "simple" + }, + { + "id": "func:ReviewReport.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "ReviewReport.to_dict() 方法", + "tags": [ + "ReviewReport", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:QualityGate", + "type": "class", + "name": "QualityGate", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "质量门控", + "tags": [ + "QualityGate" + ], + "complexity": "moderate" + }, + { + "id": "func:QualityGate.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "QualityGate.__init__(config, custom_validator) 方法", + "tags": [ + "QualityGate", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:QualityGate.check", + "type": "function", + "name": "check", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "QualityGate.check(step, exec_result) 方法", + "tags": [ + "QualityGate", + "check" + ], + "complexity": "simple" + }, + { + "id": "func:QualityGate._check_required_fields", + "type": "function", + "name": "_check_required_fields", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "QualityGate._check_required_fields(result) 方法", + "tags": [ + "QualityGate", + "_check_required_fields" + ], + "complexity": "simple" + }, + { + "id": "func:QualityGate._check_min_word_count", + "type": "function", + "name": "_check_min_word_count", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "QualityGate._check_min_word_count(result) 方法", + "tags": [ + "QualityGate", + "_check_min_word_count" + ], + "complexity": "simple" + }, + { + "id": "func:QualityGate._check_custom", + "type": "function", + "name": "_check_custom", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "QualityGate._check_custom(result) 方法", + "tags": [ + "QualityGate", + "_check_custom" + ], + "complexity": "simple" + }, + { + "id": "func:QualityGate._compute_quality_score", + "type": "function", + "name": "_compute_quality_score", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "QualityGate._compute_quality_score(failure_count) 方法", + "tags": [ + "QualityGate", + "_compute_quality_score" + ], + "complexity": "simple" + }, + { + "id": "class:RuleBasedStepReflector", + "type": "class", + "name": "RuleBasedStepReflector", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "基于规则的步骤反思器", + "tags": [ + "RuleBasedStepReflector" + ], + "complexity": "simple" + }, + { + "id": "func:RuleBasedStepReflector.reflect_step", + "type": "function", + "name": "reflect_step", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "RuleBasedStepReflector.reflect_step(step, exec_result) 异步方法", + "tags": [ + "RuleBasedStepReflector", + "reflect_step" + ], + "complexity": "simple" + }, + { + "id": "class:PlanChecker", + "type": "class", + "name": "PlanChecker", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "计划检查器", + "tags": [ + "PlanChecker" + ], + "complexity": "complex" + }, + { + "id": "func:PlanChecker.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker.__init__(quality_gate, quality_gate_config, custom_validator, reflector, experience_store, max_check_retries, quality_threshold, step_quality_configs) 方法", + "tags": [ + "PlanChecker", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker.check_step", + "type": "function", + "name": "check_step", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker.check_step(step, exec_result) 异步方法", + "tags": [ + "PlanChecker", + "check_step" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker.review_plan", + "type": "function", + "name": "review_plan", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker.review_plan(plan, plan_result, task_type, goal) 异步方法", + "tags": [ + "PlanChecker", + "review_plan" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker.should_retry", + "type": "function", + "name": "should_retry", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker.should_retry(check_result, retry_count) 方法", + "tags": [ + "PlanChecker", + "should_retry" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker.should_request_human", + "type": "function", + "name": "should_request_human", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker.should_request_human(check_result, retry_count) 方法", + "tags": [ + "PlanChecker", + "should_request_human" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker.make_step_complete_callback", + "type": "function", + "name": "make_step_complete_callback", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker.make_step_complete_callback() 方法", + "tags": [ + "PlanChecker", + "make_step_complete_callback" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker._collect_failure_reasons", + "type": "function", + "name": "_collect_failure_reasons", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker._collect_failure_reasons(plan_result) 方法", + "tags": [ + "PlanChecker", + "_collect_failure_reasons" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker._determine_outcome", + "type": "function", + "name": "_determine_outcome", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker._determine_outcome(plan_result) 方法", + "tags": [ + "PlanChecker", + "_determine_outcome" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker._generate_optimization_tips", + "type": "function", + "name": "_generate_optimization_tips", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker._generate_optimization_tips(plan_result, quality_scores) 方法", + "tags": [ + "PlanChecker", + "_generate_optimization_tips" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker._write_experience", + "type": "function", + "name": "_write_experience", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker._write_experience(report, plan, plan_result, task_type, goal) 异步方法", + "tags": [ + "PlanChecker", + "_write_experience" + ], + "complexity": "simple" + }, + { + "id": "func:PlanChecker.reset", + "type": "function", + "name": "reset", + "filePath": "src/agentkit/core/plan_checker.py", + "layer": "service", + "summary": "PlanChecker.reset() 方法", + "tags": [ + "PlanChecker", + "reset" + ], + "complexity": "simple" + }, + { + "id": "class:_StreamState", + "type": "class", + "name": "_StreamState", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "流式执行内部状态,用于在 execute_stream 中跨 yield 传递", + "tags": [ + "_StreamState" + ], + "complexity": "simple" + }, + { + "id": "class:PlanExecEngine", + "type": "class", + "name": "PlanExecEngine", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "Plan-and-Execute 执行引擎适配器", + "tags": [ + "PlanExecEngine" + ], + "complexity": "complex" + }, + { + "id": "func:PlanExecEngine.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine.__init__(llm_gateway, max_replans, default_timeout) 方法", + "tags": [ + "PlanExecEngine", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine.execute(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds) 异步方法", + "tags": [ + "PlanExecEngine", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine.execute_stream", + "type": "function", + "name": "execute_stream", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine.execute_stream(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds) 异步方法", + "tags": [ + "PlanExecEngine", + "execute_stream" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._execute_loop", + "type": "function", + "name": "_execute_loop", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._execute_loop(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token) 异步方法", + "tags": [ + "PlanExecEngine", + "_execute_loop" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._execute_with_replanning", + "type": "function", + "name": "_execute_with_replanning", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._execute_with_replanning(plan, messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, task_id, cancellation_token, trajectory, total_tokens) 异步方法", + "tags": [ + "PlanExecEngine", + "_execute_with_replanning" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._extract_goal", + "type": "function", + "name": "_extract_goal", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._extract_goal(messages) 方法", + "tags": [ + "PlanExecEngine", + "_extract_goal" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._extract_skill_names", + "type": "function", + "name": "_extract_skill_names", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._extract_skill_names(tools) 方法", + "tags": [ + "PlanExecEngine", + "_extract_skill_names" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._build_task_message", + "type": "function", + "name": "_build_task_message", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._build_task_message(messages, agent_name, task_type, task_id) 方法", + "tags": [ + "PlanExecEngine", + "_build_task_message" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._create_executor", + "type": "function", + "name": "_create_executor", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._create_executor(messages, model, system_prompt, tools) 方法", + "tags": [ + "PlanExecEngine", + "_create_executor" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._plan_to_pipeline", + "type": "function", + "name": "_plan_to_pipeline", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._plan_to_pipeline(plan, agent_name) 方法", + "tags": [ + "PlanExecEngine", + "_plan_to_pipeline" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._plan_result_to_pipeline_result", + "type": "function", + "name": "_plan_result_to_pipeline_result", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._plan_result_to_pipeline_result(plan, plan_result) 方法", + "tags": [ + "PlanExecEngine", + "_plan_result_to_pipeline_result" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._pipeline_to_plan", + "type": "function", + "name": "_pipeline_to_plan", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._pipeline_to_plan(pipeline, goal) 方法", + "tags": [ + "PlanExecEngine", + "_pipeline_to_plan" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._merge_completed_results", + "type": "function", + "name": "_merge_completed_results", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._merge_completed_results(plan, plan_result) 方法", + "tags": [ + "PlanExecEngine", + "_merge_completed_results" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecEngine._aggregate_output", + "type": "function", + "name": "_aggregate_output", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "PlanExecEngine._aggregate_output(plan, plan_result) 方法", + "tags": [ + "PlanExecEngine", + "_aggregate_output" + ], + "complexity": "simple" + }, + { + "id": "class:_LLMStepExecutor", + "type": "class", + "name": "_LLMStepExecutor", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "LLM 直接调用步骤执行器", + "tags": [ + "_LLMStepExecutor" + ], + "complexity": "simple" + }, + { + "id": "func:_LLMStepExecutor.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "_LLMStepExecutor.__init__(llm_gateway, messages, model, system_prompt, tools) 方法", + "tags": [ + "_LLMStepExecutor", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:_LLMStepExecutor.create_agent_from_skill", + "type": "function", + "name": "create_agent_from_skill", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "_LLMStepExecutor.create_agent_from_skill(skill_name) 异步方法", + "tags": [ + "_LLMStepExecutor", + "create_agent_from_skill" + ], + "complexity": "simple" + }, + { + "id": "func:_LLMStepExecutor.get_agent", + "type": "function", + "name": "get_agent", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "_LLMStepExecutor.get_agent(key) 方法", + "tags": [ + "_LLMStepExecutor", + "get_agent" + ], + "complexity": "simple" + }, + { + "id": "class:_LLMStepAgent", + "type": "class", + "name": "_LLMStepAgent", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "LLM 直接调用步骤 Agent", + "tags": [ + "_LLMStepAgent" + ], + "complexity": "simple" + }, + { + "id": "func:_LLMStepAgent.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "_LLMStepAgent.__init__(name, llm_gateway, messages, model, system_prompt, tools) 方法", + "tags": [ + "_LLMStepAgent", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:_LLMStepAgent.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/plan_exec_engine.py", + "layer": "service", + "summary": "_LLMStepAgent.execute(task_msg) 异步方法", + "tags": [ + "_LLMStepAgent", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:FailureAction", + "type": "class", + "name": "FailureAction", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "步骤失败后的处理策略", + "tags": [ + "FailureAction" + ], + "complexity": "simple" + }, + { + "id": "class:StepExecutionResult", + "type": "class", + "name": "StepExecutionResult", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "单个步骤的执行结果", + "tags": [ + "StepExecutionResult" + ], + "complexity": "simple" + }, + { + "id": "class:PlanExecutionResult", + "type": "class", + "name": "PlanExecutionResult", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "整个计划的执行结果", + "tags": [ + "PlanExecutionResult" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutionResult.completed_steps", + "type": "function", + "name": "completed_steps", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutionResult.completed_steps() 方法", + "tags": [ + "PlanExecutionResult", + "completed_steps" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutionResult.failed_steps", + "type": "function", + "name": "failed_steps", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutionResult.failed_steps() 方法", + "tags": [ + "PlanExecutionResult", + "failed_steps" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutionResult.skipped_steps", + "type": "function", + "name": "skipped_steps", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutionResult.skipped_steps() 方法", + "tags": [ + "PlanExecutionResult", + "skipped_steps" + ], + "complexity": "simple" + }, + { + "id": "class:PlanExecutor", + "type": "class", + "name": "PlanExecutor", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "执行计划执行器", + "tags": [ + "PlanExecutor" + ], + "complexity": "complex" + }, + { + "id": "func:PlanExecutor.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor.__init__(agent_pool, max_retries, step_timeout, max_parallel, base_retry_delay, max_retry_delay, on_step_complete, on_step_failed, on_human_intervention) 方法", + "tags": [ + "PlanExecutor", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor.execute(plan, original_task) 异步方法", + "tags": [ + "PlanExecutor", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._execute_step_with_retry", + "type": "function", + "name": "_execute_step_with_retry", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._execute_step_with_retry(step, input_data, original_task) 异步方法", + "tags": [ + "PlanExecutor", + "_execute_step_with_retry" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._execute_step_once", + "type": "function", + "name": "_execute_step_once", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._execute_step_once(step, input_data, original_task) 异步方法", + "tags": [ + "PlanExecutor", + "_execute_step_once" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._handle_step_failure", + "type": "function", + "name": "_handle_step_failure", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._handle_step_failure(step, exec_result, step_map, step_results, plan) 异步方法", + "tags": [ + "PlanExecutor", + "_handle_step_failure" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._default_failure_action", + "type": "function", + "name": "_default_failure_action", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._default_failure_action(step, exec_result) 方法", + "tags": [ + "PlanExecutor", + "_default_failure_action" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._skip_dependent_steps", + "type": "function", + "name": "_skip_dependent_steps", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._skip_dependent_steps(failed_step_id, step_map, step_results, plan) 方法", + "tags": [ + "PlanExecutor", + "_skip_dependent_steps" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._abort_remaining_steps", + "type": "function", + "name": "_abort_remaining_steps", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._abort_remaining_steps(step_map, step_results, plan) 方法", + "tags": [ + "PlanExecutor", + "_abort_remaining_steps" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._inject_dependency_results", + "type": "function", + "name": "_inject_dependency_results", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._inject_dependency_results(step, step_results) 方法", + "tags": [ + "PlanExecutor", + "_inject_dependency_results" + ], + "complexity": "simple" + }, + { + "id": "func:PlanExecutor._determine_overall_status", + "type": "function", + "name": "_determine_overall_status", + "filePath": "src/agentkit/core/plan_executor.py", + "layer": "service", + "summary": "PlanExecutor._determine_overall_status(plan, step_results) 方法", + "tags": [ + "PlanExecutor", + "_determine_overall_status" + ], + "complexity": "simple" + }, + { + "id": "class:PlanStepStatus", + "type": "class", + "name": "PlanStepStatus", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "计划步骤状态", + "tags": [ + "PlanStepStatus" + ], + "complexity": "simple" + }, + { + "id": "class:SkillGapLevel", + "type": "class", + "name": "SkillGapLevel", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "能力缺口严重程度", + "tags": [ + "SkillGapLevel" + ], + "complexity": "simple" + }, + { + "id": "class:SkillGap", + "type": "class", + "name": "SkillGap", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "能力缺口:某个步骤需要的 Skill 不可用", + "tags": [ + "SkillGap" + ], + "complexity": "simple" + }, + { + "id": "class:PlanStep", + "type": "class", + "name": "PlanStep", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "计划步骤", + "tags": [ + "PlanStep" + ], + "complexity": "simple" + }, + { + "id": "func:PlanStep.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "PlanStep.to_dict() 方法", + "tags": [ + "PlanStep", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:ExecutionPlan", + "type": "class", + "name": "ExecutionPlan", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "执行计划", + "tags": [ + "ExecutionPlan" + ], + "complexity": "moderate" + }, + { + "id": "func:ExecutionPlan.has_skill_gaps", + "type": "function", + "name": "has_skill_gaps", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "ExecutionPlan.has_skill_gaps() 方法", + "tags": [ + "ExecutionPlan", + "has_skill_gaps" + ], + "complexity": "simple" + }, + { + "id": "func:ExecutionPlan.get_step", + "type": "function", + "name": "get_step", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "ExecutionPlan.get_step(step_id) 方法", + "tags": [ + "ExecutionPlan", + "get_step" + ], + "complexity": "simple" + }, + { + "id": "func:ExecutionPlan.to_readable", + "type": "function", + "name": "to_readable", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "ExecutionPlan.to_readable() 方法", + "tags": [ + "ExecutionPlan", + "to_readable" + ], + "complexity": "simple" + }, + { + "id": "func:ExecutionPlan.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/plan_schema.py", + "layer": "service", + "summary": "ExecutionPlan.to_dict() 方法", + "tags": [ + "ExecutionPlan", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:TaskStatus", + "type": "class", + "name": "TaskStatus", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "任务状态枚举", + "tags": [ + "TaskStatus" + ], + "complexity": "simple" + }, + { + "id": "class:AgentStatus", + "type": "class", + "name": "AgentStatus", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "Agent 状态枚举", + "tags": [ + "AgentStatus" + ], + "complexity": "simple" + }, + { + "id": "class:AgentCapability", + "type": "class", + "name": "AgentCapability", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "Agent 能力声明", + "tags": [ + "AgentCapability" + ], + "complexity": "simple" + }, + { + "id": "func:AgentCapability.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "AgentCapability.to_dict() 方法", + "tags": [ + "AgentCapability", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:AgentCapability.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "AgentCapability.from_dict(cls, data) 方法", + "tags": [ + "AgentCapability", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:TaskMessage", + "type": "class", + "name": "TaskMessage", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "任务消息 - 从调度器发往 Agent", + "tags": [ + "TaskMessage" + ], + "complexity": "simple" + }, + { + "id": "func:TaskMessage.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "TaskMessage.to_dict() 方法", + "tags": [ + "TaskMessage", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:TaskMessage.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "TaskMessage.from_dict(cls, data) 方法", + "tags": [ + "TaskMessage", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:TaskResult", + "type": "class", + "name": "TaskResult", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "任务结果 - 从 Agent 返回", + "tags": [ + "TaskResult" + ], + "complexity": "simple" + }, + { + "id": "func:TaskResult.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "TaskResult.to_dict() 方法", + "tags": [ + "TaskResult", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:TaskResult.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "TaskResult.from_dict(cls, data) 方法", + "tags": [ + "TaskResult", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:TaskProgress", + "type": "class", + "name": "TaskProgress", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "进度上报 - Agent 执行过程中上报", + "tags": [ + "TaskProgress" + ], + "complexity": "simple" + }, + { + "id": "func:TaskProgress.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "TaskProgress.to_dict() 方法", + "tags": [ + "TaskProgress", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:TaskProgress.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "TaskProgress.from_dict(cls, data) 方法", + "tags": [ + "TaskProgress", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:HandoffMessage", + "type": "class", + "name": "HandoffMessage", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "任务转交消息 - Agent 间 Handoff", + "tags": [ + "HandoffMessage" + ], + "complexity": "simple" + }, + { + "id": "func:HandoffMessage.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "HandoffMessage.to_dict() 方法", + "tags": [ + "HandoffMessage", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:HandoffMessage.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "HandoffMessage.from_dict(cls, data) 方法", + "tags": [ + "HandoffMessage", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionEvent", + "type": "class", + "name": "EvolutionEvent", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "进化事件 - 记录 Agent 的自我进化变更", + "tags": [ + "EvolutionEvent" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionEvent.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "EvolutionEvent.to_dict() 方法", + "tags": [ + "EvolutionEvent", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:CancellationToken", + "type": "class", + "name": "CancellationToken", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "协作式取消令牌,用于通知 ReAct 循环和 Agent 停止执行。", + "tags": [ + "CancellationToken" + ], + "complexity": "simple" + }, + { + "id": "func:CancellationToken.cancel", + "type": "function", + "name": "cancel", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "CancellationToken.cancel() 方法", + "tags": [ + "CancellationToken", + "cancel" + ], + "complexity": "simple" + }, + { + "id": "func:CancellationToken.is_cancelled", + "type": "function", + "name": "is_cancelled", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "CancellationToken.is_cancelled() 方法", + "tags": [ + "CancellationToken", + "is_cancelled" + ], + "complexity": "simple" + }, + { + "id": "func:CancellationToken.check", + "type": "function", + "name": "check", + "filePath": "src/agentkit/core/protocol.py", + "layer": "service", + "summary": "CancellationToken.check() 方法", + "tags": [ + "CancellationToken", + "check" + ], + "complexity": "simple" + }, + { + "id": "class:ReActStep", + "type": "class", + "name": "ReActStep", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReAct 单步记录", + "tags": [ + "ReActStep" + ], + "complexity": "simple" + }, + { + "id": "class:ReActResult", + "type": "class", + "name": "ReActResult", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReAct 执行结果", + "tags": [ + "ReActResult" + ], + "complexity": "simple" + }, + { + "id": "class:ReActEvent", + "type": "class", + "name": "ReActEvent", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReAct 执行事件", + "tags": [ + "ReActEvent" + ], + "complexity": "simple" + }, + { + "id": "class:ReActEngine", + "type": "class", + "name": "ReActEngine", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReAct 推理-行动循环引擎", + "tags": [ + "ReActEngine" + ], + "complexity": "complex" + }, + { + "id": "func:ReActEngine.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine.__init__(llm_gateway, max_steps, default_timeout, parallel_tools) 方法", + "tags": [ + "ReActEngine", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine.reset", + "type": "function", + "name": "reset", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine.reset() 方法", + "tags": [ + "ReActEngine", + "reset" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine.execute(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds, confirmation_handler) 异步方法", + "tags": [ + "ReActEngine", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._execute_loop", + "type": "function", + "name": "_execute_loop", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._execute_loop(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, confirmation_handler) 异步方法", + "tags": [ + "ReActEngine", + "_execute_loop" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine.execute_stream", + "type": "function", + "name": "execute_stream", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine.execute_stream(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds, confirmation_handler) 异步方法", + "tags": [ + "ReActEngine", + "execute_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._build_tool_schemas", + "type": "function", + "name": "_build_tool_schemas", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._build_tool_schemas(tools) 方法", + "tags": [ + "ReActEngine", + "_build_tool_schemas" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._build_response_from_stream", + "type": "function", + "name": "_build_response_from_stream", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._build_response_from_stream(content, tool_calls, usage, model) 方法", + "tags": [ + "ReActEngine", + "_build_response_from_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._find_tool", + "type": "function", + "name": "_find_tool", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._find_tool(name, tools) 方法", + "tags": [ + "ReActEngine", + "_find_tool" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._should_compress", + "type": "function", + "name": "_should_compress", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._should_compress(conversation, compressor) 方法", + "tags": [ + "ReActEngine", + "_should_compress" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._build_tool_result_message", + "type": "function", + "name": "_build_tool_result_message", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._build_tool_result_message(tool_call_id, result, compressor, tool_name) 异步方法", + "tags": [ + "ReActEngine", + "_build_tool_result_message" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._execute_tool", + "type": "function", + "name": "_execute_tool", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._execute_tool(tool_name, arguments, tools) 异步方法", + "tags": [ + "ReActEngine", + "_execute_tool" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._execute_tool_with_confirmation", + "type": "function", + "name": "_execute_tool_with_confirmation", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._execute_tool_with_confirmation(tc, tools, step, confirmation_handler) 异步方法", + "tags": [ + "ReActEngine", + "_execute_tool_with_confirmation" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._should_execute_parallel", + "type": "function", + "name": "_should_execute_parallel", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._should_execute_parallel(tool_calls) 方法", + "tags": [ + "ReActEngine", + "_should_execute_parallel" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._get_parallelizable_indices", + "type": "function", + "name": "_get_parallelizable_indices", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._get_parallelizable_indices(tool_calls) 方法", + "tags": [ + "ReActEngine", + "_get_parallelizable_indices" + ], + "complexity": "simple" + }, + { + "id": "func:ReActEngine._parse_text_tool_calls", + "type": "function", + "name": "_parse_text_tool_calls", + "filePath": "src/agentkit/core/react.py", + "layer": "service", + "summary": "ReActEngine._parse_text_tool_calls(content) 方法", + "tags": [ + "ReActEngine", + "_parse_text_tool_calls" + ], + "complexity": "simple" + }, + { + "id": "class:ReflexionReflection", + "type": "class", + "name": "ReflexionReflection", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "单次反思记录", + "tags": [ + "ReflexionReflection" + ], + "complexity": "simple" + }, + { + "id": "class:ReflexionResult", + "type": "class", + "name": "ReflexionResult", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "Reflexion 执行结果", + "tags": [ + "ReflexionResult" + ], + "complexity": "simple" + }, + { + "id": "class:ReflexionEngine", + "type": "class", + "name": "ReflexionEngine", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "Reflexion 执行引擎", + "tags": [ + "ReflexionEngine" + ], + "complexity": "moderate" + }, + { + "id": "func:ReflexionEngine.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine.__init__(llm_gateway, max_steps, max_reflections, quality_threshold, default_timeout) 方法", + "tags": [ + "ReflexionEngine", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ReflexionEngine.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine.execute(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds, evaluate_model, reflect_model) 异步方法", + "tags": [ + "ReflexionEngine", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:ReflexionEngine._execute_loop", + "type": "function", + "name": "_execute_loop", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine._execute_loop(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, evaluate_model, reflect_model) 异步方法", + "tags": [ + "ReflexionEngine", + "_execute_loop" + ], + "complexity": "simple" + }, + { + "id": "func:ReflexionEngine.execute_stream", + "type": "function", + "name": "execute_stream", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine.execute_stream(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds, evaluate_model, reflect_model) 异步方法", + "tags": [ + "ReflexionEngine", + "execute_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReflexionEngine._evaluate", + "type": "function", + "name": "_evaluate", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine._evaluate(react_result, messages, evaluate_model, agent_name, task_type) 异步方法", + "tags": [ + "ReflexionEngine", + "_evaluate" + ], + "complexity": "simple" + }, + { + "id": "func:ReflexionEngine._parse_evaluation_score", + "type": "function", + "name": "_parse_evaluation_score", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine._parse_evaluation_score(content) 方法", + "tags": [ + "ReflexionEngine", + "_parse_evaluation_score" + ], + "complexity": "simple" + }, + { + "id": "func:ReflexionEngine._reflect", + "type": "function", + "name": "_reflect", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine._reflect(react_result, score, messages, reflect_model, agent_name, task_type) 异步方法", + "tags": [ + "ReflexionEngine", + "_reflect" + ], + "complexity": "simple" + }, + { + "id": "func:ReflexionEngine._build_reflection_prompt", + "type": "function", + "name": "_build_reflection_prompt", + "filePath": "src/agentkit/core/reflexion.py", + "layer": "service", + "summary": "ReflexionEngine._build_reflection_prompt(original_prompt, reflection_text, attempt) 方法", + "tags": [ + "ReflexionEngine", + "_build_reflection_prompt" + ], + "complexity": "simple" + }, + { + "id": "class:AgentRegistry", + "type": "class", + "name": "AgentRegistry", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "Agent 注册中心,管理 Agent 的注册、发现、状态", + "tags": [ + "AgentRegistry" + ], + "complexity": "complex" + }, + { + "id": "func:AgentRegistry.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.__init__(session_factory, agent_model, load_balancer) 方法", + "tags": [ + "AgentRegistry", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry.register", + "type": "function", + "name": "register", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.register(capability, endpoint) 异步方法", + "tags": [ + "AgentRegistry", + "register" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry.unregister", + "type": "function", + "name": "unregister", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.unregister(agent_name) 异步方法", + "tags": [ + "AgentRegistry", + "unregister" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry.update_heartbeat", + "type": "function", + "name": "update_heartbeat", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.update_heartbeat(agent_name) 异步方法", + "tags": [ + "AgentRegistry", + "update_heartbeat" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry.get_agent", + "type": "function", + "name": "get_agent", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.get_agent(agent_name) 异步方法", + "tags": [ + "AgentRegistry", + "get_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry.list_agents", + "type": "function", + "name": "list_agents", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.list_agents(agent_type, status) 异步方法", + "tags": [ + "AgentRegistry", + "list_agents" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry.get_available_agent", + "type": "function", + "name": "get_available_agent", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.get_available_agent(task_type) 异步方法", + "tags": [ + "AgentRegistry", + "get_available_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry.check_health", + "type": "function", + "name": "check_health", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry.check_health() 异步方法", + "tags": [ + "AgentRegistry", + "check_health" + ], + "complexity": "simple" + }, + { + "id": "func:AgentRegistry._agent_to_dict", + "type": "function", + "name": "_agent_to_dict", + "filePath": "src/agentkit/core/registry.py", + "layer": "service", + "summary": "AgentRegistry._agent_to_dict(agent) 方法", + "tags": [ + "AgentRegistry", + "_agent_to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:_FallbackFailedError", + "type": "class", + "name": "_FallbackFailedError", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "Internal signal: a fallback strategy failed, try the next one.", + "tags": [ + "_FallbackFailedError" + ], + "complexity": "simple" + }, + { + "id": "func:_FallbackFailedError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "_FallbackFailedError.__init__(strategy) 方法", + "tags": [ + "_FallbackFailedError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:ReWOOPlanStep", + "type": "class", + "name": "ReWOOPlanStep", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOO 计划中的单步", + "tags": [ + "ReWOOPlanStep" + ], + "complexity": "simple" + }, + { + "id": "class:ReWOOPlan", + "type": "class", + "name": "ReWOOPlan", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOO 执行计划", + "tags": [ + "ReWOOPlan" + ], + "complexity": "simple" + }, + { + "id": "class:ReWOOStep", + "type": "class", + "name": "ReWOOStep", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOO 执行步骤,扩展 ReActStep 增加 plan_step_id", + "tags": [ + "ReWOOStep" + ], + "complexity": "simple" + }, + { + "id": "class:ReWOOEngine", + "type": "class", + "name": "ReWOOEngine", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOO (Reasoning Without Observation Others) 执行引擎", + "tags": [ + "ReWOOEngine" + ], + "complexity": "complex" + }, + { + "id": "func:ReWOOEngine.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine.__init__(llm_gateway, max_plan_steps, default_timeout, fallback_strategies) 方法", + "tags": [ + "ReWOOEngine", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine.execute(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds, confirmation_handler) 异步方法", + "tags": [ + "ReWOOEngine", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._execute_rewoo", + "type": "function", + "name": "_execute_rewoo", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._execute_rewoo(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, confirmation_handler) 异步方法", + "tags": [ + "ReWOOEngine", + "_execute_rewoo" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine.execute_stream", + "type": "function", + "name": "execute_stream", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine.execute_stream(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, timeout_seconds, confirmation_handler) 异步方法", + "tags": [ + "ReWOOEngine", + "execute_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._try_fallback_strategies_stream", + "type": "function", + "name": "_try_fallback_strategies_stream", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._try_fallback_strategies_stream(strategies, messages, tools, model, agent_name, task_type, system_prompt, effective_system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, total_tokens, confirmation_handler) 异步方法", + "tags": [ + "ReWOOEngine", + "_try_fallback_strategies_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_simplified_rewoo_stream", + "type": "function", + "name": "_fallback_simplified_rewoo_stream", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_simplified_rewoo_stream(messages, tools, model, agent_name, task_type, effective_system_prompt, compressor, cancellation_token) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_simplified_rewoo_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_react_stream", + "type": "function", + "name": "_fallback_react_stream", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_react_stream(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, confirmation_handler) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_react_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_direct_stream", + "type": "function", + "name": "_fallback_direct_stream", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_direct_stream(messages, model, agent_name, task_type, effective_system_prompt, compressor, total_tokens) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_direct_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_plan_exec_stream", + "type": "function", + "name": "_fallback_plan_exec_stream", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_plan_exec_stream(messages, tools, model, agent_name, task_type, effective_system_prompt, compressor, cancellation_token) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_plan_exec_stream" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._try_fallback_strategies", + "type": "function", + "name": "_try_fallback_strategies", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._try_fallback_strategies(strategies, messages, tools, model, agent_name, task_type, system_prompt, effective_system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, trajectory, total_tokens, confirmation_handler) 异步方法", + "tags": [ + "ReWOOEngine", + "_try_fallback_strategies" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_simplified_rewoo", + "type": "function", + "name": "_fallback_simplified_rewoo", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_simplified_rewoo(messages, tools, model, agent_name, task_type, effective_system_prompt, compressor, cancellation_token) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_simplified_rewoo" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_react", + "type": "function", + "name": "_fallback_react", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_react(messages, tools, model, agent_name, task_type, system_prompt, trace_recorder, memory_retriever, task_id, compressor, retrieval_config, cancellation_token, confirmation_handler) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_react" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_direct", + "type": "function", + "name": "_fallback_direct", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_direct(messages, model, agent_name, task_type, effective_system_prompt, compressor, cancellation_token, trajectory, total_tokens, trace_recorder) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_direct" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._fallback_plan_exec", + "type": "function", + "name": "_fallback_plan_exec", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._fallback_plan_exec(messages, tools, model, agent_name, task_type, effective_system_prompt, compressor, cancellation_token) 异步方法", + "tags": [ + "ReWOOEngine", + "_fallback_plan_exec" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._plan_phase", + "type": "function", + "name": "_plan_phase", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._plan_phase(messages, tools, tool_schemas, model, agent_name, task_type, system_prompt, compressor, cancellation_token, max_steps) 异步方法", + "tags": [ + "ReWOOEngine", + "_plan_phase" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._synthesis_phase", + "type": "function", + "name": "_synthesis_phase", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._synthesis_phase(messages, tool_results, model, agent_name, task_type, system_prompt, compressor, cancellation_token) 异步方法", + "tags": [ + "ReWOOEngine", + "_synthesis_phase" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._build_tool_schemas", + "type": "function", + "name": "_build_tool_schemas", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._build_tool_schemas(tools) 方法", + "tags": [ + "ReWOOEngine", + "_build_tool_schemas" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._build_tool_descriptions", + "type": "function", + "name": "_build_tool_descriptions", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._build_tool_descriptions(tools) 方法", + "tags": [ + "ReWOOEngine", + "_build_tool_descriptions" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._parse_plan", + "type": "function", + "name": "_parse_plan", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._parse_plan(content) 方法", + "tags": [ + "ReWOOEngine", + "_parse_plan" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._find_tool", + "type": "function", + "name": "_find_tool", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._find_tool(name, tools) 方法", + "tags": [ + "ReWOOEngine", + "_find_tool" + ], + "complexity": "simple" + }, + { + "id": "func:ReWOOEngine._execute_tool", + "type": "function", + "name": "_execute_tool", + "filePath": "src/agentkit/core/rewoo.py", + "layer": "service", + "summary": "ReWOOEngine._execute_tool(tool_name, arguments, tools) 异步方法", + "tags": [ + "ReWOOEngine", + "_execute_tool" + ], + "complexity": "simple" + }, + { + "id": "class:SharedWorkspace", + "type": "class", + "name": "SharedWorkspace", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "Agent 间共享工作空间", + "tags": [ + "SharedWorkspace" + ], + "complexity": "complex" + }, + { + "id": "func:SharedWorkspace.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace.__init__(redis_client, prefix) 方法", + "tags": [ + "SharedWorkspace", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace._make_key", + "type": "function", + "name": "_make_key", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace._make_key(key) 方法", + "tags": [ + "SharedWorkspace", + "_make_key" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace.write", + "type": "function", + "name": "write", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace.write(key, value, agent_id, ttl) 异步方法", + "tags": [ + "SharedWorkspace", + "write" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace.read", + "type": "function", + "name": "read", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace.read(key) 异步方法", + "tags": [ + "SharedWorkspace", + "read" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace.delete", + "type": "function", + "name": "delete", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace.delete(key) 异步方法", + "tags": [ + "SharedWorkspace", + "delete" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace.lock", + "type": "function", + "name": "lock", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace.lock(key, agent_id, timeout) 异步方法", + "tags": [ + "SharedWorkspace", + "lock" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace.unlock", + "type": "function", + "name": "unlock", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace.unlock(key, agent_id) 异步方法", + "tags": [ + "SharedWorkspace", + "unlock" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace._get_version", + "type": "function", + "name": "_get_version", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace._get_version(key) 异步方法", + "tags": [ + "SharedWorkspace", + "_get_version" + ], + "complexity": "simple" + }, + { + "id": "func:SharedWorkspace.list_keys", + "type": "function", + "name": "list_keys", + "filePath": "src/agentkit/core/shared_workspace.py", + "layer": "service", + "summary": "SharedWorkspace.list_keys() 异步方法", + "tags": [ + "SharedWorkspace", + "list_keys" + ], + "complexity": "simple" + }, + { + "id": "class:StandaloneRunner", + "type": "class", + "name": "StandaloneRunner", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "自动发现并启动配置驱动的 Agent", + "tags": [ + "StandaloneRunner" + ], + "complexity": "complex" + }, + { + "id": "func:StandaloneRunner.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.__init__(config_dir, tool_registry, llm_client, custom_handlers) 方法", + "tags": [ + "StandaloneRunner", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.agents", + "type": "function", + "name": "agents", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.agents() 方法", + "tags": [ + "StandaloneRunner", + "agents" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.add_tool", + "type": "function", + "name": "add_tool", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.add_tool(tool) 方法", + "tags": [ + "StandaloneRunner", + "add_tool" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.add_custom_handler", + "type": "function", + "name": "add_custom_handler", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.add_custom_handler(name, handler) 方法", + "tags": [ + "StandaloneRunner", + "add_custom_handler" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.discover_configs", + "type": "function", + "name": "discover_configs", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.discover_configs() 方法", + "tags": [ + "StandaloneRunner", + "discover_configs" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.build_agents", + "type": "function", + "name": "build_agents", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.build_agents() 方法", + "tags": [ + "StandaloneRunner", + "build_agents" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.start_all", + "type": "function", + "name": "start_all", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.start_all(redis_url) 异步方法", + "tags": [ + "StandaloneRunner", + "start_all" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.stop_all", + "type": "function", + "name": "stop_all", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.stop_all() 异步方法", + "tags": [ + "StandaloneRunner", + "stop_all" + ], + "complexity": "simple" + }, + { + "id": "func:StandaloneRunner.execute_task", + "type": "function", + "name": "execute_task", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "StandaloneRunner.execute_task(agent_name, task) 异步方法", + "tags": [ + "StandaloneRunner", + "execute_task" + ], + "complexity": "simple" + }, + { + "id": "class:TraceStep", + "type": "class", + "name": "TraceStep", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "单步执行轨迹", + "tags": [ + "TraceStep" + ], + "complexity": "simple" + }, + { + "id": "func:TraceStep.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceStep.to_dict() 方法", + "tags": [ + "TraceStep", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:ExecutionTrace", + "type": "class", + "name": "ExecutionTrace", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "完整执行轨迹", + "tags": [ + "ExecutionTrace" + ], + "complexity": "simple" + }, + { + "id": "func:ExecutionTrace.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "ExecutionTrace.to_dict() 方法", + "tags": [ + "ExecutionTrace", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:TraceRecorder", + "type": "class", + "name": "TraceRecorder", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "执行轨迹记录器", + "tags": [ + "TraceRecorder" + ], + "complexity": "moderate" + }, + { + "id": "func:TraceRecorder.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceRecorder.__init__(task_id, agent_name, skill_name, on_trace_complete) 方法", + "tags": [ + "TraceRecorder", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:TraceRecorder.start_trace", + "type": "function", + "name": "start_trace", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceRecorder.start_trace(task_id, agent_name, skill_name) 方法", + "tags": [ + "TraceRecorder", + "start_trace" + ], + "complexity": "simple" + }, + { + "id": "func:TraceRecorder.record_step", + "type": "function", + "name": "record_step", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceRecorder.record_step(step, action, tool_name, input_data, output_data, duration_ms, tokens_used, error) 方法", + "tags": [ + "TraceRecorder", + "record_step" + ], + "complexity": "simple" + }, + { + "id": "func:TraceRecorder.end_trace", + "type": "function", + "name": "end_trace", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceRecorder.end_trace(outcome, quality_score) 方法", + "tags": [ + "TraceRecorder", + "end_trace" + ], + "complexity": "simple" + }, + { + "id": "func:TraceRecorder.get_trace", + "type": "function", + "name": "get_trace", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceRecorder.get_trace() 方法", + "tags": [ + "TraceRecorder", + "get_trace" + ], + "complexity": "simple" + }, + { + "id": "func:TraceRecorder.start_step_timer", + "type": "function", + "name": "start_step_timer", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceRecorder.start_step_timer() 方法", + "tags": [ + "TraceRecorder", + "start_step_timer" + ], + "complexity": "simple" + }, + { + "id": "func:TraceRecorder.elapsed_ms", + "type": "function", + "name": "elapsed_ms", + "filePath": "src/agentkit/core/trace.py", + "layer": "service", + "summary": "TraceRecorder.elapsed_ms() 方法", + "tags": [ + "TraceRecorder", + "elapsed_ms" + ], + "complexity": "simple" + }, + { + "id": "class:EvalSample", + "type": "class", + "name": "EvalSample", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "评估样本", + "tags": [ + "EvalSample" + ], + "complexity": "simple" + }, + { + "id": "class:EvalMetrics", + "type": "class", + "name": "EvalMetrics", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "评估指标", + "tags": [ + "EvalMetrics" + ], + "complexity": "simple" + }, + { + "id": "func:EvalMetrics.average", + "type": "function", + "name": "average", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "EvalMetrics.average() 方法", + "tags": [ + "EvalMetrics", + "average" + ], + "complexity": "simple" + }, + { + "id": "func:EvalMetrics.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "EvalMetrics.to_dict() 方法", + "tags": [ + "EvalMetrics", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:EvalResult", + "type": "class", + "name": "EvalResult", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "评估结果", + "tags": [ + "EvalResult" + ], + "complexity": "simple" + }, + { + "id": "class:EvalDatasetBuilder", + "type": "class", + "name": "EvalDatasetBuilder", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "评估数据集构建器", + "tags": [ + "EvalDatasetBuilder" + ], + "complexity": "simple" + }, + { + "id": "func:EvalDatasetBuilder.from_traces", + "type": "function", + "name": "from_traces", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "EvalDatasetBuilder.from_traces(traces) 方法", + "tags": [ + "EvalDatasetBuilder", + "from_traces" + ], + "complexity": "simple" + }, + { + "id": "func:EvalDatasetBuilder.from_dict_list", + "type": "function", + "name": "from_dict_list", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "EvalDatasetBuilder.from_dict_list(data) 方法", + "tags": [ + "EvalDatasetBuilder", + "from_dict_list" + ], + "complexity": "simple" + }, + { + "id": "class:RagasEvaluator", + "type": "class", + "name": "RagasEvaluator", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "Ragas 评估器", + "tags": [ + "RagasEvaluator" + ], + "complexity": "moderate" + }, + { + "id": "func:RagasEvaluator.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "RagasEvaluator.__init__(llm_gateway, use_ragas_lib) 方法", + "tags": [ + "RagasEvaluator", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RagasEvaluator.evaluate", + "type": "function", + "name": "evaluate", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "RagasEvaluator.evaluate(samples, metrics) 异步方法", + "tags": [ + "RagasEvaluator", + "evaluate" + ], + "complexity": "simple" + }, + { + "id": "func:RagasEvaluator._evaluate_with_ragas", + "type": "function", + "name": "_evaluate_with_ragas", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "RagasEvaluator._evaluate_with_ragas(samples, metrics) 异步方法", + "tags": [ + "RagasEvaluator", + "_evaluate_with_ragas" + ], + "complexity": "simple" + }, + { + "id": "func:RagasEvaluator._evaluate_builtin", + "type": "function", + "name": "_evaluate_builtin", + "filePath": "src/agentkit/evaluation/ragas_evaluator.py", + "layer": "utility", + "summary": "RagasEvaluator._evaluate_builtin(samples, metrics) 异步方法", + "tags": [ + "RagasEvaluator", + "_evaluate_builtin" + ], + "complexity": "simple" + }, + { + "id": "class:ABTestConfig", + "type": "class", + "name": "ABTestConfig", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "A/B 测试配置", + "tags": [ + "ABTestConfig" + ], + "complexity": "simple" + }, + { + "id": "class:ABTestResult", + "type": "class", + "name": "ABTestResult", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "A/B 测试结果", + "tags": [ + "ABTestResult" + ], + "complexity": "simple" + }, + { + "id": "class:ABTester", + "type": "class", + "name": "ABTester", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "A/B 测试框架", + "tags": [ + "ABTester" + ], + "complexity": "moderate" + }, + { + "id": "func:ABTester.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester.__init__(evolution_store, min_samples) 方法", + "tags": [ + "ABTester", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ABTester.create_test", + "type": "function", + "name": "create_test", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester.create_test(config) 方法", + "tags": [ + "ABTester", + "create_test" + ], + "complexity": "simple" + }, + { + "id": "func:ABTester.assign_group", + "type": "function", + "name": "assign_group", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester.assign_group(test_id, task_id) 方法", + "tags": [ + "ABTester", + "assign_group" + ], + "complexity": "simple" + }, + { + "id": "func:ABTester.record_result", + "type": "function", + "name": "record_result", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester.record_result(test_id, group, metric) 方法", + "tags": [ + "ABTester", + "record_result" + ], + "complexity": "simple" + }, + { + "id": "func:ABTester.persist_results", + "type": "function", + "name": "persist_results", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester.persist_results(test_id) 异步方法", + "tags": [ + "ABTester", + "persist_results" + ], + "complexity": "simple" + }, + { + "id": "func:ABTester.evaluate", + "type": "function", + "name": "evaluate", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester.evaluate(test_id) 异步方法", + "tags": [ + "ABTester", + "evaluate" + ], + "complexity": "simple" + }, + { + "id": "func:ABTester._normal_cdf", + "type": "function", + "name": "_normal_cdf", + "filePath": "src/agentkit/evolution/ab_tester.py", + "layer": "utility", + "summary": "ABTester._normal_cdf(x) 方法", + "tags": [ + "ABTester", + "_normal_cdf" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionStore", + "type": "class", + "name": "EvolutionStore", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "进化日志存储", + "tags": [ + "EvolutionStore" + ], + "complexity": "moderate" + }, + { + "id": "func:EvolutionStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "EvolutionStore.__init__(session_factory, evolution_model) 方法", + "tags": [ + "EvolutionStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionStore.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "EvolutionStore.record(event) 异步方法", + "tags": [ + "EvolutionStore", + "record" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionStore.rollback", + "type": "function", + "name": "rollback", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "EvolutionStore.rollback(event_id) 异步方法", + "tags": [ + "EvolutionStore", + "rollback" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionStore.list_events", + "type": "function", + "name": "list_events", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "EvolutionStore.list_events(agent_name, change_type, status) 异步方法", + "tags": [ + "EvolutionStore", + "list_events" + ], + "complexity": "simple" + }, + { + "id": "class:PersistentEvolutionStore", + "type": "class", + "name": "PersistentEvolutionStore", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "SQLite 持久化进化存储", + "tags": [ + "PersistentEvolutionStore" + ], + "complexity": "complex" + }, + { + "id": "func:PersistentEvolutionStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.__init__(db_path) 方法", + "tags": [ + "PersistentEvolutionStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._run_sync", + "type": "function", + "name": "_run_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._run_sync(func) 方法", + "tags": [ + "PersistentEvolutionStore", + "_run_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.close() 异步方法", + "tags": [ + "PersistentEvolutionStore", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.__aenter__() 异步方法", + "tags": [ + "PersistentEvolutionStore", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.__aexit__(exc_type, exc_val, exc_tb) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._retry_locked", + "type": "function", + "name": "_retry_locked", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._retry_locked(func) 方法", + "tags": [ + "PersistentEvolutionStore", + "_retry_locked" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._record_sync", + "type": "function", + "name": "_record_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._record_sync(event) 方法", + "tags": [ + "PersistentEvolutionStore", + "_record_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.record(event) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "record" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._rollback_sync", + "type": "function", + "name": "_rollback_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._rollback_sync(event_id) 方法", + "tags": [ + "PersistentEvolutionStore", + "_rollback_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.rollback", + "type": "function", + "name": "rollback", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.rollback(event_id) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "rollback" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._list_events_sync", + "type": "function", + "name": "_list_events_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._list_events_sync(agent_name, change_type, status) 方法", + "tags": [ + "PersistentEvolutionStore", + "_list_events_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.list_events", + "type": "function", + "name": "list_events", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.list_events(agent_name, change_type, status) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "list_events" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._record_skill_version_sync", + "type": "function", + "name": "_record_skill_version_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._record_skill_version_sync(skill_name, version, content, parent_version) 方法", + "tags": [ + "PersistentEvolutionStore", + "_record_skill_version_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.record_skill_version", + "type": "function", + "name": "record_skill_version", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.record_skill_version(skill_name, version, content, parent_version) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "record_skill_version" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._list_skill_versions_sync", + "type": "function", + "name": "_list_skill_versions_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._list_skill_versions_sync(skill_name) 方法", + "tags": [ + "PersistentEvolutionStore", + "_list_skill_versions_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.list_skill_versions", + "type": "function", + "name": "list_skill_versions", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.list_skill_versions(skill_name) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "list_skill_versions" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._record_ab_test_result_sync", + "type": "function", + "name": "_record_ab_test_result_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._record_ab_test_result_sync(test_id, variant, score, sample_count) 方法", + "tags": [ + "PersistentEvolutionStore", + "_record_ab_test_result_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.record_ab_test_result", + "type": "function", + "name": "record_ab_test_result", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.record_ab_test_result(test_id, variant, score, sample_count) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "record_ab_test_result" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore._get_ab_test_results_sync", + "type": "function", + "name": "_get_ab_test_results_sync", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore._get_ab_test_results_sync(test_id) 方法", + "tags": [ + "PersistentEvolutionStore", + "_get_ab_test_results_sync" + ], + "complexity": "simple" + }, + { + "id": "func:PersistentEvolutionStore.get_ab_test_results", + "type": "function", + "name": "get_ab_test_results", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "PersistentEvolutionStore.get_ab_test_results(test_id) 异步方法", + "tags": [ + "PersistentEvolutionStore", + "get_ab_test_results" + ], + "complexity": "simple" + }, + { + "id": "class:InMemoryEvolutionStore", + "type": "class", + "name": "InMemoryEvolutionStore", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "基于内存字典的进化存储(用于测试和轻量场景)", + "tags": [ + "InMemoryEvolutionStore" + ], + "complexity": "moderate" + }, + { + "id": "func:InMemoryEvolutionStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.__init__() 方法", + "tags": [ + "InMemoryEvolutionStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryEvolutionStore.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.record(event) 异步方法", + "tags": [ + "InMemoryEvolutionStore", + "record" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryEvolutionStore.rollback", + "type": "function", + "name": "rollback", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.rollback(event_id) 异步方法", + "tags": [ + "InMemoryEvolutionStore", + "rollback" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryEvolutionStore.list_events", + "type": "function", + "name": "list_events", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.list_events(agent_name, change_type, status) 异步方法", + "tags": [ + "InMemoryEvolutionStore", + "list_events" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryEvolutionStore.record_skill_version", + "type": "function", + "name": "record_skill_version", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.record_skill_version(skill_name, version, content, parent_version) 异步方法", + "tags": [ + "InMemoryEvolutionStore", + "record_skill_version" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryEvolutionStore.list_skill_versions", + "type": "function", + "name": "list_skill_versions", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.list_skill_versions(skill_name) 异步方法", + "tags": [ + "InMemoryEvolutionStore", + "list_skill_versions" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryEvolutionStore.record_ab_test_result", + "type": "function", + "name": "record_ab_test_result", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.record_ab_test_result(test_id, variant, score, sample_count) 异步方法", + "tags": [ + "InMemoryEvolutionStore", + "record_ab_test_result" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryEvolutionStore.get_ab_test_results", + "type": "function", + "name": "get_ab_test_results", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "InMemoryEvolutionStore.get_ab_test_results(test_id) 异步方法", + "tags": [ + "InMemoryEvolutionStore", + "get_ab_test_results" + ], + "complexity": "simple" + }, + { + "id": "class:TaskExperience", + "type": "class", + "name": "TaskExperience", + "filePath": "src/agentkit/evolution/experience_schema.py", + "layer": "utility", + "summary": "任务执行经验", + "tags": [ + "TaskExperience" + ], + "complexity": "simple" + }, + { + "id": "func:TaskExperience.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/evolution/experience_schema.py", + "layer": "utility", + "summary": "TaskExperience.to_dict() 方法", + "tags": [ + "TaskExperience", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:TaskExperience.text_for_embedding", + "type": "function", + "name": "text_for_embedding", + "filePath": "src/agentkit/evolution/experience_schema.py", + "layer": "utility", + "summary": "TaskExperience.text_for_embedding() 方法", + "tags": [ + "TaskExperience", + "text_for_embedding" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionMetrics", + "type": "class", + "name": "EvolutionMetrics", + "filePath": "src/agentkit/evolution/experience_schema.py", + "layer": "utility", + "summary": "进化指标趋势", + "tags": [ + "EvolutionMetrics" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMetrics.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/evolution/experience_schema.py", + "layer": "utility", + "summary": "EvolutionMetrics.to_dict() 方法", + "tags": [ + "EvolutionMetrics", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:ExperienceStore", + "type": "class", + "name": "ExperienceStore", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "任务经验存储 - PostgreSQL + pgvector 混合存储", + "tags": [ + "ExperienceStore" + ], + "complexity": "moderate" + }, + { + "id": "func:ExperienceStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "ExperienceStore.__init__(session_factory, experience_model, embedder, decay_rate, alpha, retrieve_limit, pgvector_enabled, table_name) 方法", + "tags": [ + "ExperienceStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ExperienceStore.record_experience", + "type": "function", + "name": "record_experience", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "ExperienceStore.record_experience(experience) 异步方法", + "tags": [ + "ExperienceStore", + "record_experience" + ], + "complexity": "simple" + }, + { + "id": "func:ExperienceStore.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "ExperienceStore.search(query, top_k, task_type, search_multiplier) 异步方法", + "tags": [ + "ExperienceStore", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:ExperienceStore._search_pgvector", + "type": "function", + "name": "_search_pgvector", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "ExperienceStore._search_pgvector(db, query, top_k, task_type, search_multiplier) 异步方法", + "tags": [ + "ExperienceStore", + "_search_pgvector" + ], + "complexity": "simple" + }, + { + "id": "func:ExperienceStore._search_client_side", + "type": "function", + "name": "_search_client_side", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "ExperienceStore._search_client_side(db, query, top_k, task_type, search_multiplier) 异步方法", + "tags": [ + "ExperienceStore", + "_search_client_side" + ], + "complexity": "simple" + }, + { + "id": "func:ExperienceStore.get_metrics", + "type": "function", + "name": "get_metrics", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "ExperienceStore.get_metrics(task_type, time_window) 异步方法", + "tags": [ + "ExperienceStore", + "get_metrics" + ], + "complexity": "simple" + }, + { + "id": "class:InMemoryExperienceStore", + "type": "class", + "name": "InMemoryExperienceStore", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "基于内存字典的任务经验存储(用于测试和轻量场景)", + "tags": [ + "InMemoryExperienceStore" + ], + "complexity": "moderate" + }, + { + "id": "func:InMemoryExperienceStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "InMemoryExperienceStore.__init__(embedder, decay_rate, alpha) 方法", + "tags": [ + "InMemoryExperienceStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryExperienceStore.record_experience", + "type": "function", + "name": "record_experience", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "InMemoryExperienceStore.record_experience(experience) 异步方法", + "tags": [ + "InMemoryExperienceStore", + "record_experience" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryExperienceStore.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "InMemoryExperienceStore.search(query, top_k, task_type, search_multiplier) 异步方法", + "tags": [ + "InMemoryExperienceStore", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryExperienceStore.get_metrics", + "type": "function", + "name": "get_metrics", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "InMemoryExperienceStore.get_metrics(task_type, time_window) 异步方法", + "tags": [ + "InMemoryExperienceStore", + "get_metrics" + ], + "complexity": "simple" + }, + { + "id": "class:FitnessWeights", + "type": "class", + "name": "FitnessWeights", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "适应度权重配置", + "tags": [ + "FitnessWeights" + ], + "complexity": "simple" + }, + { + "id": "func:FitnessWeights.__post_init__", + "type": "function", + "name": "__post_init__", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "FitnessWeights.__post_init__() 方法", + "tags": [ + "FitnessWeights", + "__post_init__" + ], + "complexity": "simple" + }, + { + "id": "class:MultiObjectiveFitness", + "type": "class", + "name": "MultiObjectiveFitness", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "多目标适应度评估器", + "tags": [ + "MultiObjectiveFitness" + ], + "complexity": "moderate" + }, + { + "id": "func:MultiObjectiveFitness.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "MultiObjectiveFitness.__init__(weights, max_latency_ms, max_cost_tokens) 方法", + "tags": [ + "MultiObjectiveFitness", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MultiObjectiveFitness.evaluate", + "type": "function", + "name": "evaluate", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "MultiObjectiveFitness.evaluate(accuracy, latency_ms, cost_tokens, custom) 方法", + "tags": [ + "MultiObjectiveFitness", + "evaluate" + ], + "complexity": "simple" + }, + { + "id": "func:MultiObjectiveFitness.weighted_score", + "type": "function", + "name": "weighted_score", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "MultiObjectiveFitness.weighted_score(score) 方法", + "tags": [ + "MultiObjectiveFitness", + "weighted_score" + ], + "complexity": "simple" + }, + { + "id": "func:MultiObjectiveFitness.pareto_rank", + "type": "function", + "name": "pareto_rank", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "MultiObjectiveFitness.pareto_rank(scores) 方法", + "tags": [ + "MultiObjectiveFitness", + "pareto_rank" + ], + "complexity": "simple" + }, + { + "id": "func:MultiObjectiveFitness.crowding_distance", + "type": "function", + "name": "crowding_distance", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "MultiObjectiveFitness.crowding_distance(scores) 方法", + "tags": [ + "MultiObjectiveFitness", + "crowding_distance" + ], + "complexity": "simple" + }, + { + "id": "class:ExtendedStrategyConfig", + "type": "class", + "name": "ExtendedStrategyConfig", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "扩展的策略配置", + "tags": [ + "ExtendedStrategyConfig" + ], + "complexity": "simple" + }, + { + "id": "class:ExtendedStrategyTuner", + "type": "class", + "name": "ExtendedStrategyTuner", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "多维策略调优器", + "tags": [ + "ExtendedStrategyTuner" + ], + "complexity": "moderate" + }, + { + "id": "func:ExtendedStrategyTuner.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "ExtendedStrategyTuner.__init__(param_ranges) 方法", + "tags": [ + "ExtendedStrategyTuner", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ExtendedStrategyTuner.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "ExtendedStrategyTuner.record(config, metric) 方法", + "tags": [ + "ExtendedStrategyTuner", + "record" + ], + "complexity": "simple" + }, + { + "id": "func:ExtendedStrategyTuner.suggest", + "type": "function", + "name": "suggest", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "ExtendedStrategyTuner.suggest(current) 异步方法", + "tags": [ + "ExtendedStrategyTuner", + "suggest" + ], + "complexity": "simple" + }, + { + "id": "func:ExtendedStrategyTuner._optimize_param", + "type": "function", + "name": "_optimize_param", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "ExtendedStrategyTuner._optimize_param(param_name, best_value, noise_std) 方法", + "tags": [ + "ExtendedStrategyTuner", + "_optimize_param" + ], + "complexity": "simple" + }, + { + "id": "func:ExtendedStrategyTuner._suggest_retrieval_mode", + "type": "function", + "name": "_suggest_retrieval_mode", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "ExtendedStrategyTuner._suggest_retrieval_mode(current_mode) 方法", + "tags": [ + "ExtendedStrategyTuner", + "_suggest_retrieval_mode" + ], + "complexity": "simple" + }, + { + "id": "func:ExtendedStrategyTuner.history_size", + "type": "function", + "name": "history_size", + "filePath": "src/agentkit/evolution/fitness.py", + "layer": "utility", + "summary": "ExtendedStrategyTuner.history_size() 方法", + "tags": [ + "ExtendedStrategyTuner", + "history_size" + ], + "complexity": "simple" + }, + { + "id": "class:FitnessScore", + "type": "class", + "name": "FitnessScore", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "多目标适应度评分", + "tags": [ + "FitnessScore" + ], + "complexity": "simple" + }, + { + "id": "func:FitnessScore.normalized", + "type": "function", + "name": "normalized", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "FitnessScore.normalized() 方法", + "tags": [ + "FitnessScore", + "normalized" + ], + "complexity": "simple" + }, + { + "id": "func:FitnessScore.dominates", + "type": "function", + "name": "dominates", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "FitnessScore.dominates(other) 方法", + "tags": [ + "FitnessScore", + "dominates" + ], + "complexity": "simple" + }, + { + "id": "class:PromptChromosome", + "type": "class", + "name": "PromptChromosome", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "Prompt 染色体 — 一个完整的 Prompt 变体", + "tags": [ + "PromptChromosome" + ], + "complexity": "simple" + }, + { + "id": "func:PromptChromosome.to_module", + "type": "function", + "name": "to_module", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "PromptChromosome.to_module(name) 方法", + "tags": [ + "PromptChromosome", + "to_module" + ], + "complexity": "simple" + }, + { + "id": "func:PromptChromosome.from_module", + "type": "function", + "name": "from_module", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "PromptChromosome.from_module(cls, module) 方法", + "tags": [ + "PromptChromosome", + "from_module" + ], + "complexity": "simple" + }, + { + "id": "class:CrossoverOperator", + "type": "class", + "name": "CrossoverOperator", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "交叉算子", + "tags": [ + "CrossoverOperator" + ], + "complexity": "moderate" + }, + { + "id": "func:CrossoverOperator.crossover", + "type": "function", + "name": "crossover", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "CrossoverOperator.crossover(parent_a, parent_b, crossover_rate) 方法", + "tags": [ + "CrossoverOperator", + "crossover" + ], + "complexity": "simple" + }, + { + "id": "func:CrossoverOperator._crossover_text", + "type": "function", + "name": "_crossover_text", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "CrossoverOperator._crossover_text(text_a, text_b, rate) 方法", + "tags": [ + "CrossoverOperator", + "_crossover_text" + ], + "complexity": "simple" + }, + { + "id": "func:CrossoverOperator._crossover_demos", + "type": "function", + "name": "_crossover_demos", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "CrossoverOperator._crossover_demos(demos_a, demos_b, rate) 方法", + "tags": [ + "CrossoverOperator", + "_crossover_demos" + ], + "complexity": "simple" + }, + { + "id": "func:CrossoverOperator._crossover_constraints", + "type": "function", + "name": "_crossover_constraints", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "CrossoverOperator._crossover_constraints(constraints_a, constraints_b, rate) 方法", + "tags": [ + "CrossoverOperator", + "_crossover_constraints" + ], + "complexity": "simple" + }, + { + "id": "class:MutationOperator", + "type": "class", + "name": "MutationOperator", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "变异算子", + "tags": [ + "MutationOperator" + ], + "complexity": "moderate" + }, + { + "id": "func:MutationOperator.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "MutationOperator.__init__(llm_gateway) 方法", + "tags": [ + "MutationOperator", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MutationOperator.mutate", + "type": "function", + "name": "mutate", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "MutationOperator.mutate(chromosome, mutation_rate) 异步方法", + "tags": [ + "MutationOperator", + "mutate" + ], + "complexity": "simple" + }, + { + "id": "func:MutationOperator._mutate_instructions", + "type": "function", + "name": "_mutate_instructions", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "MutationOperator._mutate_instructions(instructions) 异步方法", + "tags": [ + "MutationOperator", + "_mutate_instructions" + ], + "complexity": "simple" + }, + { + "id": "func:MutationOperator._mutate_demos", + "type": "function", + "name": "_mutate_demos", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "MutationOperator._mutate_demos(demos) 方法", + "tags": [ + "MutationOperator", + "_mutate_demos" + ], + "complexity": "simple" + }, + { + "id": "func:MutationOperator._mutate_constraints", + "type": "function", + "name": "_mutate_constraints", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "MutationOperator._mutate_constraints(constraints) 方法", + "tags": [ + "MutationOperator", + "_mutate_constraints" + ], + "complexity": "simple" + }, + { + "id": "class:GEPAPopulation", + "type": "class", + "name": "GEPAPopulation", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPA 种群管理", + "tags": [ + "GEPAPopulation" + ], + "complexity": "complex" + }, + { + "id": "func:GEPAPopulation.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.__init__(population_size, elite_size, tournament_size) 方法", + "tags": [ + "GEPAPopulation", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.generation", + "type": "function", + "name": "generation", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.generation() 方法", + "tags": [ + "GEPAPopulation", + "generation" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.individuals", + "type": "function", + "name": "individuals", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.individuals() 方法", + "tags": [ + "GEPAPopulation", + "individuals" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.size", + "type": "function", + "name": "size", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.size() 方法", + "tags": [ + "GEPAPopulation", + "size" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.initialize", + "type": "function", + "name": "initialize", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.initialize(seed) 方法", + "tags": [ + "GEPAPopulation", + "initialize" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.add", + "type": "function", + "name": "add", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.add(chromosome) 方法", + "tags": [ + "GEPAPopulation", + "add" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.get_elite", + "type": "function", + "name": "get_elite", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.get_elite() 方法", + "tags": [ + "GEPAPopulation", + "get_elite" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.get_pareto_front", + "type": "function", + "name": "get_pareto_front", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.get_pareto_front() 方法", + "tags": [ + "GEPAPopulation", + "get_pareto_front" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.tournament_select", + "type": "function", + "name": "tournament_select", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.tournament_select() 方法", + "tags": [ + "GEPAPopulation", + "tournament_select" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.evolve", + "type": "function", + "name": "evolve", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.evolve(crossover, mutation, crossover_rate, mutation_rate) 方法", + "tags": [ + "GEPAPopulation", + "evolve" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.get_best", + "type": "function", + "name": "get_best", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.get_best() 方法", + "tags": [ + "GEPAPopulation", + "get_best" + ], + "complexity": "simple" + }, + { + "id": "func:GEPAPopulation.get_statistics", + "type": "function", + "name": "get_statistics", + "filePath": "src/agentkit/evolution/genetic.py", + "layer": "utility", + "summary": "GEPAPopulation.get_statistics() 方法", + "tags": [ + "GEPAPopulation", + "get_statistics" + ], + "complexity": "simple" + }, + { + "id": "class:SoulEvolutionConfig", + "type": "class", + "name": "SoulEvolutionConfig", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "Soul 进化多维触发配置", + "tags": [ + "SoulEvolutionConfig" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionLogEntry", + "type": "class", + "name": "EvolutionLogEntry", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "进化日志条目", + "tags": [ + "EvolutionLogEntry" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionMixin", + "type": "class", + "name": "EvolutionMixin", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "进化混入类,将进化引擎集成到 Agent 生命周期。", + "tags": [ + "EvolutionMixin" + ], + "complexity": "complex" + }, + { + "id": "func:EvolutionMixin.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin.__init__(reflector, prompt_optimizer, strategy_tuner, ab_tester, evolution_store, reflector_type, llm_gateway, auxiliary_model, strategy_tuning_enabled, evolution_config) 方法", + "tags": [ + "EvolutionMixin", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin._create_reflector", + "type": "function", + "name": "_create_reflector", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin._create_reflector(reflector_type, llm_gateway, auxiliary_model) 方法", + "tags": [ + "EvolutionMixin", + "_create_reflector" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin.evolve_after_task", + "type": "function", + "name": "evolve_after_task", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin.evolve_after_task(task, result, memory_store) 异步方法", + "tags": [ + "EvolutionMixin", + "evolve_after_task" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin._optimize_with_context", + "type": "function", + "name": "_optimize_with_context", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin._optimize_with_context(module, reflection) 异步方法", + "tags": [ + "EvolutionMixin", + "_optimize_with_context" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin._run_ab_test", + "type": "function", + "name": "_run_ab_test", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin._run_ab_test(task, result, optimized, reflection) 异步方法", + "tags": [ + "EvolutionMixin", + "_run_ab_test" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin._run_strategy_tuning", + "type": "function", + "name": "_run_strategy_tuning", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin._run_strategy_tuning(task, result, reflection) 异步方法", + "tags": [ + "EvolutionMixin", + "_run_strategy_tuning" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin.get_evolution_history", + "type": "function", + "name": "get_evolution_history", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin.get_evolution_history() 方法", + "tags": [ + "EvolutionMixin", + "get_evolution_history" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin.set_current_module", + "type": "function", + "name": "set_current_module", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin.set_current_module(module) 方法", + "tags": [ + "EvolutionMixin", + "set_current_module" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin._apply_change", + "type": "function", + "name": "_apply_change", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin._apply_change(task, result, optimized, reflection) 异步方法", + "tags": [ + "EvolutionMixin", + "_apply_change" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin._rollback_change", + "type": "function", + "name": "_rollback_change", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin._rollback_change(log_entry) 异步方法", + "tags": [ + "EvolutionMixin", + "_rollback_change" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin.record_reflection", + "type": "function", + "name": "record_reflection", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin.record_reflection(pattern, reflection, task_type, score) 方法", + "tags": [ + "EvolutionMixin", + "record_reflection" + ], + "complexity": "simple" + }, + { + "id": "func:EvolutionMixin.evolve_soul", + "type": "function", + "name": "evolve_soul", + "filePath": "src/agentkit/evolution/lifecycle.py", + "layer": "utility", + "summary": "EvolutionMixin.evolve_soul(task, result, memory_store, reflection, task_type, score) 异步方法", + "tags": [ + "EvolutionMixin", + "evolve_soul" + ], + "complexity": "simple" + }, + { + "id": "class:LLMReflector", + "type": "class", + "name": "LLMReflector", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLM 驱动的反思器,通过 LLM 分析执行轨迹生成结构化反思", + "tags": [ + "LLMReflector" + ], + "complexity": "moderate" + }, + { + "id": "func:LLMReflector.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLMReflector.__init__(llm_gateway, model) 方法", + "tags": [ + "LLMReflector", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:LLMReflector._sanitize_for_prompt", + "type": "function", + "name": "_sanitize_for_prompt", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLMReflector._sanitize_for_prompt(value, max_length) 方法", + "tags": [ + "LLMReflector", + "_sanitize_for_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:LLMReflector.reflect", + "type": "function", + "name": "reflect", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLMReflector.reflect(task, result, trace) 异步方法", + "tags": [ + "LLMReflector", + "reflect" + ], + "complexity": "simple" + }, + { + "id": "func:LLMReflector._build_reflection_prompt", + "type": "function", + "name": "_build_reflection_prompt", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLMReflector._build_reflection_prompt(task, result, trace) 方法", + "tags": [ + "LLMReflector", + "_build_reflection_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:LLMReflector._parse_reflection_response", + "type": "function", + "name": "_parse_reflection_response", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLMReflector._parse_reflection_response(response_content, task, result) 方法", + "tags": [ + "LLMReflector", + "_parse_reflection_response" + ], + "complexity": "simple" + }, + { + "id": "func:LLMReflector._build_reflection_from_data", + "type": "function", + "name": "_build_reflection_from_data", + "filePath": "src/agentkit/evolution/llm_reflector.py", + "layer": "utility", + "summary": "LLMReflector._build_reflection_from_data(data, task) 方法", + "tags": [ + "LLMReflector", + "_build_reflection_from_data" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionEventModel", + "type": "class", + "name": "EvolutionEventModel", + "filePath": "src/agentkit/evolution/models.py", + "layer": "utility", + "summary": "进化事件 ORM 模型", + "tags": [ + "EvolutionEventModel" + ], + "complexity": "simple" + }, + { + "id": "class:SkillVersionModel", + "type": "class", + "name": "SkillVersionModel", + "filePath": "src/agentkit/evolution/models.py", + "layer": "utility", + "summary": "技能版本 ORM 模型", + "tags": [ + "SkillVersionModel" + ], + "complexity": "simple" + }, + { + "id": "class:ABTestResultModel", + "type": "class", + "name": "ABTestResultModel", + "filePath": "src/agentkit/evolution/models.py", + "layer": "utility", + "summary": "A/B 测试结果 ORM 模型", + "tags": [ + "ABTestResultModel" + ], + "complexity": "simple" + }, + { + "id": "class:ExecutionPath", + "type": "class", + "name": "ExecutionPath", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "执行路径数据模型", + "tags": [ + "ExecutionPath" + ], + "complexity": "simple" + }, + { + "id": "class:PathUpdateResult", + "type": "class", + "name": "PathUpdateResult", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "路径更新结果", + "tags": [ + "PathUpdateResult" + ], + "complexity": "simple" + }, + { + "id": "class:PathOptimizer", + "type": "class", + "name": "PathOptimizer", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "执行路径优化器", + "tags": [ + "PathOptimizer" + ], + "complexity": "moderate" + }, + { + "id": "func:PathOptimizer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "PathOptimizer.__init__(experience_store, min_sample_count, success_rate_threshold, duration_improvement_threshold) 方法", + "tags": [ + "PathOptimizer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PathOptimizer.get_recommended_path", + "type": "function", + "name": "get_recommended_path", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "PathOptimizer.get_recommended_path(task_type) 方法", + "tags": [ + "PathOptimizer", + "get_recommended_path" + ], + "complexity": "simple" + }, + { + "id": "func:PathOptimizer.evaluate_and_update", + "type": "function", + "name": "evaluate_and_update", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "PathOptimizer.evaluate_and_update(task_type, new_path) 异步方法", + "tags": [ + "PathOptimizer", + "evaluate_and_update" + ], + "complexity": "simple" + }, + { + "id": "func:PathOptimizer._compare_and_decide", + "type": "function", + "name": "_compare_and_decide", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "PathOptimizer._compare_and_decide(task_type, current, new) 方法", + "tags": [ + "PathOptimizer", + "_compare_and_decide" + ], + "complexity": "simple" + }, + { + "id": "func:PathOptimizer._apply_update", + "type": "function", + "name": "_apply_update", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "PathOptimizer._apply_update(task_type, old, new, reason) 方法", + "tags": [ + "PathOptimizer", + "_apply_update" + ], + "complexity": "simple" + }, + { + "id": "func:PathOptimizer.get_pending_paths", + "type": "function", + "name": "get_pending_paths", + "filePath": "src/agentkit/evolution/path_optimizer.py", + "layer": "utility", + "summary": "PathOptimizer.get_pending_paths(task_type) 方法", + "tags": [ + "PathOptimizer", + "get_pending_paths" + ], + "complexity": "simple" + }, + { + "id": "class:WarningLevel", + "type": "class", + "name": "WarningLevel", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "预警级别", + "tags": [ + "WarningLevel" + ], + "complexity": "simple" + }, + { + "id": "class:PitfallWarning", + "type": "class", + "name": "PitfallWarning", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "避坑预警", + "tags": [ + "PitfallWarning" + ], + "complexity": "simple" + }, + { + "id": "class:ExperienceStoreProtocol", + "type": "class", + "name": "ExperienceStoreProtocol", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "ExperienceStore 协议接口,用于类型标注", + "tags": [ + "ExperienceStoreProtocol" + ], + "complexity": "simple" + }, + { + "id": "func:ExperienceStoreProtocol.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "ExperienceStoreProtocol.search(query, top_k, task_type, search_multiplier) 异步方法", + "tags": [ + "ExperienceStoreProtocol", + "search" + ], + "complexity": "simple" + }, + { + "id": "class:PitfallDetector", + "type": "class", + "name": "PitfallDetector", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "避坑检测器", + "tags": [ + "PitfallDetector" + ], + "complexity": "moderate" + }, + { + "id": "func:PitfallDetector.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "PitfallDetector.__init__(experience_store, similarity_threshold, max_search_results) 方法", + "tags": [ + "PitfallDetector", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PitfallDetector.check_pitfalls", + "type": "function", + "name": "check_pitfalls", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "PitfallDetector.check_pitfalls(task_type, planned_steps) 异步方法", + "tags": [ + "PitfallDetector", + "check_pitfalls" + ], + "complexity": "simple" + }, + { + "id": "func:PitfallDetector._search_experiences", + "type": "function", + "name": "_search_experiences", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "PitfallDetector._search_experiences(task_type) 异步方法", + "tags": [ + "PitfallDetector", + "_search_experiences" + ], + "complexity": "simple" + }, + { + "id": "func:PitfallDetector._extract_step_failure_stats", + "type": "function", + "name": "_extract_step_failure_stats", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "PitfallDetector._extract_step_failure_stats(failed_experiences) 方法", + "tags": [ + "PitfallDetector", + "_extract_step_failure_stats" + ], + "complexity": "simple" + }, + { + "id": "func:PitfallDetector._match_and_warn", + "type": "function", + "name": "_match_and_warn", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "PitfallDetector._match_and_warn(planned_steps, step_failure_stats) 方法", + "tags": [ + "PitfallDetector", + "_match_and_warn" + ], + "complexity": "simple" + }, + { + "id": "class:_StepFailureStats", + "type": "class", + "name": "_StepFailureStats", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "步骤级别的失败统计(内部使用)", + "tags": [ + "_StepFailureStats" + ], + "complexity": "simple" + }, + { + "id": "class:Signature", + "type": "class", + "name": "Signature", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "Prompt 签名 - 定义输入/输出字段", + "tags": [ + "Signature" + ], + "complexity": "simple" + }, + { + "id": "func:Signature.to_prompt_prefix", + "type": "function", + "name": "to_prompt_prefix", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "Signature.to_prompt_prefix() 方法", + "tags": [ + "Signature", + "to_prompt_prefix" + ], + "complexity": "simple" + }, + { + "id": "class:Module", + "type": "class", + "name": "Module", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "可组合的 Prompt 策略模块", + "tags": [ + "Module" + ], + "complexity": "simple" + }, + { + "id": "func:Module.render", + "type": "function", + "name": "render", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "Module.render() 方法", + "tags": [ + "Module", + "render" + ], + "complexity": "simple" + }, + { + "id": "class:BootstrapPromptOptimizer", + "type": "class", + "name": "BootstrapPromptOptimizer", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "基于 few-shot + failure patterns 的规则优化器", + "tags": [ + "BootstrapPromptOptimizer" + ], + "complexity": "moderate" + }, + { + "id": "func:BootstrapPromptOptimizer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "BootstrapPromptOptimizer.__init__(max_demos, min_examples_for_optimization) 方法", + "tags": [ + "BootstrapPromptOptimizer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:BootstrapPromptOptimizer.add_example", + "type": "function", + "name": "add_example", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "BootstrapPromptOptimizer.add_example(input_data, output_data, quality_score) 方法", + "tags": [ + "BootstrapPromptOptimizer", + "add_example" + ], + "complexity": "simple" + }, + { + "id": "func:BootstrapPromptOptimizer.optimize", + "type": "function", + "name": "optimize", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "BootstrapPromptOptimizer.optimize(module) 异步方法", + "tags": [ + "BootstrapPromptOptimizer", + "optimize" + ], + "complexity": "simple" + }, + { + "id": "func:BootstrapPromptOptimizer.example_count", + "type": "function", + "name": "example_count", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "BootstrapPromptOptimizer.example_count() 方法", + "tags": [ + "BootstrapPromptOptimizer", + "example_count" + ], + "complexity": "simple" + }, + { + "id": "class:LLMPromptOptimizer", + "type": "class", + "name": "LLMPromptOptimizer", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "LLM 驱动的 Prompt 优化器", + "tags": [ + "LLMPromptOptimizer" + ], + "complexity": "moderate" + }, + { + "id": "func:LLMPromptOptimizer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "LLMPromptOptimizer.__init__(llm_gateway, model, max_demos, min_examples_for_optimization) 方法", + "tags": [ + "LLMPromptOptimizer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:LLMPromptOptimizer.add_example", + "type": "function", + "name": "add_example", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "LLMPromptOptimizer.add_example(input_data, output_data, quality_score) 方法", + "tags": [ + "LLMPromptOptimizer", + "add_example" + ], + "complexity": "simple" + }, + { + "id": "func:LLMPromptOptimizer.optimize", + "type": "function", + "name": "optimize", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "LLMPromptOptimizer.optimize(module, trace, reflection) 异步方法", + "tags": [ + "LLMPromptOptimizer", + "optimize" + ], + "complexity": "simple" + }, + { + "id": "func:LLMPromptOptimizer._llm_optimize_instruction", + "type": "function", + "name": "_llm_optimize_instruction", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "LLMPromptOptimizer._llm_optimize_instruction(module, trace, reflection) 异步方法", + "tags": [ + "LLMPromptOptimizer", + "_llm_optimize_instruction" + ], + "complexity": "simple" + }, + { + "id": "func:LLMPromptOptimizer._build_optimization_prompt", + "type": "function", + "name": "_build_optimization_prompt", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "LLMPromptOptimizer._build_optimization_prompt(module, trace, reflection) 方法", + "tags": [ + "LLMPromptOptimizer", + "_build_optimization_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:LLMPromptOptimizer.example_count", + "type": "function", + "name": "example_count", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "LLMPromptOptimizer.example_count() 方法", + "tags": [ + "LLMPromptOptimizer", + "example_count" + ], + "complexity": "simple" + }, + { + "id": "class:Reflection", + "type": "class", + "name": "Reflection", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "反思结果", + "tags": [ + "Reflection" + ], + "complexity": "simple" + }, + { + "id": "class:RuleBasedReflector", + "type": "class", + "name": "RuleBasedReflector", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "基于规则的执行反思器", + "tags": [ + "RuleBasedReflector" + ], + "complexity": "moderate" + }, + { + "id": "func:RuleBasedReflector.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "RuleBasedReflector.__init__(quality_scorer, pattern_extractor) 方法", + "tags": [ + "RuleBasedReflector", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RuleBasedReflector.reflect", + "type": "function", + "name": "reflect", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "RuleBasedReflector.reflect(task, result) 异步方法", + "tags": [ + "RuleBasedReflector", + "reflect" + ], + "complexity": "simple" + }, + { + "id": "func:RuleBasedReflector._score_quality", + "type": "function", + "name": "_score_quality", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "RuleBasedReflector._score_quality(task, result) 异步方法", + "tags": [ + "RuleBasedReflector", + "_score_quality" + ], + "complexity": "simple" + }, + { + "id": "func:RuleBasedReflector._extract_patterns", + "type": "function", + "name": "_extract_patterns", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "RuleBasedReflector._extract_patterns(task, result, outcome) 异步方法", + "tags": [ + "RuleBasedReflector", + "_extract_patterns" + ], + "complexity": "simple" + }, + { + "id": "func:RuleBasedReflector._generate_insights", + "type": "function", + "name": "_generate_insights", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "RuleBasedReflector._generate_insights(outcome, quality_score, patterns) 方法", + "tags": [ + "RuleBasedReflector", + "_generate_insights" + ], + "complexity": "simple" + }, + { + "id": "func:RuleBasedReflector._generate_suggestions", + "type": "function", + "name": "_generate_suggestions", + "filePath": "src/agentkit/evolution/reflector.py", + "layer": "utility", + "summary": "RuleBasedReflector._generate_suggestions(outcome, quality_score, patterns) 方法", + "tags": [ + "RuleBasedReflector", + "_generate_suggestions" + ], + "complexity": "simple" + }, + { + "id": "class:StrategyConfig", + "type": "class", + "name": "StrategyConfig", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "策略配置", + "tags": [ + "StrategyConfig" + ], + "complexity": "simple" + }, + { + "id": "class:StrategyTuner", + "type": "class", + "name": "StrategyTuner", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "策略调优器", + "tags": [ + "StrategyTuner" + ], + "complexity": "moderate" + }, + { + "id": "func:StrategyTuner.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "StrategyTuner.__init__(param_ranges) 方法", + "tags": [ + "StrategyTuner", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:StrategyTuner.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "StrategyTuner.record(config, metric) 方法", + "tags": [ + "StrategyTuner", + "record" + ], + "complexity": "simple" + }, + { + "id": "func:StrategyTuner.suggest", + "type": "function", + "name": "suggest", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "StrategyTuner.suggest(current) 异步方法", + "tags": [ + "StrategyTuner", + "suggest" + ], + "complexity": "simple" + }, + { + "id": "func:StrategyTuner._optimize_param_1d", + "type": "function", + "name": "_optimize_param_1d", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "StrategyTuner._optimize_param_1d(param_name, get_value, best_value, noise_std) 方法", + "tags": [ + "StrategyTuner", + "_optimize_param_1d" + ], + "complexity": "simple" + }, + { + "id": "func:StrategyTuner._clamp", + "type": "function", + "name": "_clamp", + "filePath": "src/agentkit/evolution/strategy_tuner.py", + "layer": "utility", + "summary": "StrategyTuner._clamp(value, min_val, max_val) 方法", + "tags": [ + "StrategyTuner", + "_clamp" + ], + "complexity": "simple" + }, + { + "id": "class:ProviderConfig", + "type": "class", + "name": "ProviderConfig", + "filePath": "src/agentkit/llm/config.py", + "layer": "utility", + "summary": "Provider 配置", + "tags": [ + "ProviderConfig" + ], + "complexity": "simple" + }, + { + "id": "class:LLMConfig", + "type": "class", + "name": "LLMConfig", + "filePath": "src/agentkit/llm/config.py", + "layer": "utility", + "summary": "LLM 配置", + "tags": [ + "LLMConfig" + ], + "complexity": "simple" + }, + { + "id": "func:LLMConfig.from_yaml", + "type": "function", + "name": "from_yaml", + "filePath": "src/agentkit/llm/config.py", + "layer": "utility", + "summary": "LLMConfig.from_yaml(cls, path) 方法", + "tags": [ + "LLMConfig", + "from_yaml" + ], + "complexity": "simple" + }, + { + "id": "func:LLMConfig.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/llm/config.py", + "layer": "utility", + "summary": "LLMConfig.from_dict(cls, data) 方法", + "tags": [ + "LLMConfig", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:LLMGateway", + "type": "class", + "name": "LLMGateway", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLM 网关 - Provider 注册、模型别名解析、Fallback、Usage 追踪", + "tags": [ + "LLMGateway" + ], + "complexity": "complex" + }, + { + "id": "func:LLMGateway.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway.__init__(config) 方法", + "tags": [ + "LLMGateway", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway.register_provider", + "type": "function", + "name": "register_provider", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway.register_provider(name, provider) 方法", + "tags": [ + "LLMGateway", + "register_provider" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway.has_providers", + "type": "function", + "name": "has_providers", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway.has_providers() 方法", + "tags": [ + "LLMGateway", + "has_providers" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway.chat(messages, model, agent_name, task_type, tools, tool_choice) 异步方法", + "tags": [ + "LLMGateway", + "chat" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway.chat_stream", + "type": "function", + "name": "chat_stream", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway.chat_stream(messages, model, agent_name, task_type, tools, tool_choice) 异步方法", + "tags": [ + "LLMGateway", + "chat_stream" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway._get_models_to_try", + "type": "function", + "name": "_get_models_to_try", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway._get_models_to_try(resolved_model) 方法", + "tags": [ + "LLMGateway", + "_get_models_to_try" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway._resolve_model_alias", + "type": "function", + "name": "_resolve_model_alias", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway._resolve_model_alias(model) 方法", + "tags": [ + "LLMGateway", + "_resolve_model_alias" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway._resolve_model", + "type": "function", + "name": "_resolve_model", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway._resolve_model(model) 方法", + "tags": [ + "LLMGateway", + "_resolve_model" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway._get_fallback_model", + "type": "function", + "name": "_get_fallback_model", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway._get_fallback_model(model) 方法", + "tags": [ + "LLMGateway", + "_get_fallback_model" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway._calculate_cost", + "type": "function", + "name": "_calculate_cost", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway._calculate_cost(model, usage) 方法", + "tags": [ + "LLMGateway", + "_calculate_cost" + ], + "complexity": "simple" + }, + { + "id": "func:LLMGateway.get_usage", + "type": "function", + "name": "get_usage", + "filePath": "src/agentkit/llm/gateway.py", + "layer": "utility", + "summary": "LLMGateway.get_usage(agent_name, start_time, end_time) 方法", + "tags": [ + "LLMGateway", + "get_usage" + ], + "complexity": "simple" + }, + { + "id": "class:TokenUsage", + "type": "class", + "name": "TokenUsage", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "Token 使用量", + "tags": [ + "TokenUsage" + ], + "complexity": "simple" + }, + { + "id": "func:TokenUsage.total_tokens", + "type": "function", + "name": "total_tokens", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "TokenUsage.total_tokens() 方法", + "tags": [ + "TokenUsage", + "total_tokens" + ], + "complexity": "simple" + }, + { + "id": "class:ToolCall", + "type": "class", + "name": "ToolCall", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "工具调用", + "tags": [ + "ToolCall" + ], + "complexity": "simple" + }, + { + "id": "class:LLMRequest", + "type": "class", + "name": "LLMRequest", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLM 请求", + "tags": [ + "LLMRequest" + ], + "complexity": "simple" + }, + { + "id": "func:LLMRequest.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLMRequest.__init__(messages, model, tools, tool_choice, temperature, max_tokens) 方法", + "tags": [ + "LLMRequest", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:StreamChunk", + "type": "class", + "name": "StreamChunk", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLM 流式响应块", + "tags": [ + "StreamChunk" + ], + "complexity": "simple" + }, + { + "id": "class:LLMResponse", + "type": "class", + "name": "LLMResponse", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLM 响应", + "tags": [ + "LLMResponse" + ], + "complexity": "simple" + }, + { + "id": "func:LLMResponse.has_tool_calls", + "type": "function", + "name": "has_tool_calls", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLMResponse.has_tool_calls() 方法", + "tags": [ + "LLMResponse", + "has_tool_calls" + ], + "complexity": "simple" + }, + { + "id": "class:LLMProvider", + "type": "class", + "name": "LLMProvider", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLM Provider 抽象基类", + "tags": [ + "LLMProvider" + ], + "complexity": "simple" + }, + { + "id": "func:LLMProvider.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLMProvider.chat(request) 异步方法", + "tags": [ + "LLMProvider", + "chat" + ], + "complexity": "simple" + }, + { + "id": "func:LLMProvider.chat_stream", + "type": "function", + "name": "chat_stream", + "filePath": "src/agentkit/llm/protocol.py", + "layer": "utility", + "summary": "LLMProvider.chat_stream(request) 异步方法", + "tags": [ + "LLMProvider", + "chat_stream" + ], + "complexity": "simple" + }, + { + "id": "class:_AnthropicStreamContext", + "type": "class", + "name": "_AnthropicStreamContext", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "Wraps an httpx streaming response context manager for use with retry/circuit breaker.", + "tags": [ + "_AnthropicStreamContext" + ], + "complexity": "simple" + }, + { + "id": "func:_AnthropicStreamContext.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "_AnthropicStreamContext.__init__(response_ctx, response) 方法", + "tags": [ + "_AnthropicStreamContext", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:_AnthropicStreamContext.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "_AnthropicStreamContext.__aenter__() 异步方法", + "tags": [ + "_AnthropicStreamContext", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:_AnthropicStreamContext.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "_AnthropicStreamContext.__aexit__(exc_type, exc_val, exc_tb) 异步方法", + "tags": [ + "_AnthropicStreamContext", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "class:AnthropicProvider", + "type": "class", + "name": "AnthropicProvider", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "Anthropic Messages API 原生 Provider", + "tags": [ + "AnthropicProvider" + ], + "complexity": "complex" + }, + { + "id": "func:AnthropicProvider.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider.__init__(api_key, model, max_tokens, base_url, timeout, thinking_enabled, retry_config, circuit_breaker_config, max_connections, max_keepalive_connections, keepalive_expiry) 方法", + "tags": [ + "AnthropicProvider", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._get_client", + "type": "function", + "name": "_get_client", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._get_client() 方法", + "tags": [ + "AnthropicProvider", + "_get_client" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider.close() 异步方法", + "tags": [ + "AnthropicProvider", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._build_headers", + "type": "function", + "name": "_build_headers", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._build_headers() 方法", + "tags": [ + "AnthropicProvider", + "_build_headers" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._convert_messages", + "type": "function", + "name": "_convert_messages", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._convert_messages(messages) 方法", + "tags": [ + "AnthropicProvider", + "_convert_messages" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._convert_tools", + "type": "function", + "name": "_convert_tools", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._convert_tools(tools) 方法", + "tags": [ + "AnthropicProvider", + "_convert_tools" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._convert_tool_choice", + "type": "function", + "name": "_convert_tool_choice", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._convert_tool_choice(tool_choice) 方法", + "tags": [ + "AnthropicProvider", + "_convert_tool_choice" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._parse_response", + "type": "function", + "name": "_parse_response", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._parse_response(data, model) 方法", + "tags": [ + "AnthropicProvider", + "_parse_response" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._handle_error", + "type": "function", + "name": "_handle_error", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._handle_error(status_code, resp_body) 方法", + "tags": [ + "AnthropicProvider", + "_handle_error" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider.chat(request) 异步方法", + "tags": [ + "AnthropicProvider", + "chat" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._chat_impl", + "type": "function", + "name": "_chat_impl", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._chat_impl(request) 异步方法", + "tags": [ + "AnthropicProvider", + "_chat_impl" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider.chat_stream", + "type": "function", + "name": "chat_stream", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider.chat_stream(request) 异步方法", + "tags": [ + "AnthropicProvider", + "chat_stream" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._open_stream", + "type": "function", + "name": "_open_stream", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._open_stream(request) 异步方法", + "tags": [ + "AnthropicProvider", + "_open_stream" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider._iterate_stream", + "type": "function", + "name": "_iterate_stream", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider._iterate_stream(response, request) 异步方法", + "tags": [ + "AnthropicProvider", + "_iterate_stream" + ], + "complexity": "simple" + }, + { + "id": "func:AnthropicProvider.get_model_info", + "type": "function", + "name": "get_model_info", + "filePath": "src/agentkit/llm/providers/anthropic.py", + "layer": "utility", + "summary": "AnthropicProvider.get_model_info() 方法", + "tags": [ + "AnthropicProvider", + "get_model_info" + ], + "complexity": "simple" + }, + { + "id": "class:DoubaoProvider", + "type": "class", + "name": "DoubaoProvider", + "filePath": "src/agentkit/llm/providers/doubao.py", + "layer": "utility", + "summary": "字节豆包 Provider", + "tags": [ + "DoubaoProvider" + ], + "complexity": "simple" + }, + { + "id": "func:DoubaoProvider.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/doubao.py", + "layer": "utility", + "summary": "DoubaoProvider.__init__(api_key, base_url, default_model) 方法", + "tags": [ + "DoubaoProvider", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:DoubaoProvider.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/providers/doubao.py", + "layer": "utility", + "summary": "DoubaoProvider.chat(request) 异步方法", + "tags": [ + "DoubaoProvider", + "chat" + ], + "complexity": "simple" + }, + { + "id": "class:_GeminiStreamContext", + "type": "class", + "name": "_GeminiStreamContext", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "Wraps an httpx streaming response context manager for use with retry/circuit breaker.", + "tags": [ + "_GeminiStreamContext" + ], + "complexity": "simple" + }, + { + "id": "func:_GeminiStreamContext.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "_GeminiStreamContext.__init__(response_ctx, response) 方法", + "tags": [ + "_GeminiStreamContext", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:_GeminiStreamContext.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "_GeminiStreamContext.__aenter__() 异步方法", + "tags": [ + "_GeminiStreamContext", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:_GeminiStreamContext.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "_GeminiStreamContext.__aexit__(exc_type, exc_val, exc_tb) 异步方法", + "tags": [ + "_GeminiStreamContext", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "class:GeminiProvider", + "type": "class", + "name": "GeminiProvider", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "Google Gemini API 原生 Provider", + "tags": [ + "GeminiProvider" + ], + "complexity": "complex" + }, + { + "id": "func:GeminiProvider.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider.__init__(api_key, model, max_output_tokens, base_url, timeout, safety_settings, retry_config, circuit_breaker_config, max_connections, max_keepalive_connections, keepalive_expiry) 方法", + "tags": [ + "GeminiProvider", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._get_client", + "type": "function", + "name": "_get_client", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._get_client() 方法", + "tags": [ + "GeminiProvider", + "_get_client" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider.close() 异步方法", + "tags": [ + "GeminiProvider", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._convert_messages", + "type": "function", + "name": "_convert_messages", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._convert_messages(messages) 方法", + "tags": [ + "GeminiProvider", + "_convert_messages" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._convert_tools", + "type": "function", + "name": "_convert_tools", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._convert_tools(tools) 方法", + "tags": [ + "GeminiProvider", + "_convert_tools" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._convert_tool_choice", + "type": "function", + "name": "_convert_tool_choice", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._convert_tool_choice(tool_choice) 方法", + "tags": [ + "GeminiProvider", + "_convert_tool_choice" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._parse_response", + "type": "function", + "name": "_parse_response", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._parse_response(data, model) 方法", + "tags": [ + "GeminiProvider", + "_parse_response" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._handle_error", + "type": "function", + "name": "_handle_error", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._handle_error(status_code, resp_body) 方法", + "tags": [ + "GeminiProvider", + "_handle_error" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider.chat(request) 异步方法", + "tags": [ + "GeminiProvider", + "chat" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._chat_impl", + "type": "function", + "name": "_chat_impl", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._chat_impl(request) 异步方法", + "tags": [ + "GeminiProvider", + "_chat_impl" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider.chat_stream", + "type": "function", + "name": "chat_stream", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider.chat_stream(request) 异步方法", + "tags": [ + "GeminiProvider", + "chat_stream" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._open_stream", + "type": "function", + "name": "_open_stream", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._open_stream(request) 异步方法", + "tags": [ + "GeminiProvider", + "_open_stream" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider._iterate_stream", + "type": "function", + "name": "_iterate_stream", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider._iterate_stream(response, request) 异步方法", + "tags": [ + "GeminiProvider", + "_iterate_stream" + ], + "complexity": "simple" + }, + { + "id": "func:GeminiProvider.get_model_info", + "type": "function", + "name": "get_model_info", + "filePath": "src/agentkit/llm/providers/gemini.py", + "layer": "utility", + "summary": "GeminiProvider.get_model_info() 方法", + "tags": [ + "GeminiProvider", + "get_model_info" + ], + "complexity": "simple" + }, + { + "id": "class:_StreamContext", + "type": "class", + "name": "_StreamContext", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "Wraps an httpx streaming response context manager for use with retry/circuit breaker.", + "tags": [ + "_StreamContext" + ], + "complexity": "simple" + }, + { + "id": "func:_StreamContext.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "_StreamContext.__init__(response_ctx, response) 方法", + "tags": [ + "_StreamContext", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:_StreamContext.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "_StreamContext.__aenter__() 异步方法", + "tags": [ + "_StreamContext", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:_StreamContext.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "_StreamContext.__aexit__(exc_type, exc_val, exc_tb) 异步方法", + "tags": [ + "_StreamContext", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "class:OpenAICompatibleProvider", + "type": "class", + "name": "OpenAICompatibleProvider", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAI 兼容 API Provider", + "tags": [ + "OpenAICompatibleProvider" + ], + "complexity": "moderate" + }, + { + "id": "func:OpenAICompatibleProvider.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAICompatibleProvider.__init__(api_key, base_url, default_model, retry_config, circuit_breaker_config, max_connections, max_keepalive_connections, keepalive_expiry) 方法", + "tags": [ + "OpenAICompatibleProvider", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAICompatibleProvider.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAICompatibleProvider.close() 异步方法", + "tags": [ + "OpenAICompatibleProvider", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAICompatibleProvider.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAICompatibleProvider.chat(request) 异步方法", + "tags": [ + "OpenAICompatibleProvider", + "chat" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAICompatibleProvider._chat_impl", + "type": "function", + "name": "_chat_impl", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAICompatibleProvider._chat_impl(request) 异步方法", + "tags": [ + "OpenAICompatibleProvider", + "_chat_impl" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAICompatibleProvider.chat_stream", + "type": "function", + "name": "chat_stream", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAICompatibleProvider.chat_stream(request) 异步方法", + "tags": [ + "OpenAICompatibleProvider", + "chat_stream" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAICompatibleProvider._open_stream", + "type": "function", + "name": "_open_stream", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAICompatibleProvider._open_stream(request) 异步方法", + "tags": [ + "OpenAICompatibleProvider", + "_open_stream" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAICompatibleProvider._iterate_stream", + "type": "function", + "name": "_iterate_stream", + "filePath": "src/agentkit/llm/providers/openai.py", + "layer": "utility", + "summary": "OpenAICompatibleProvider._iterate_stream(response, request) 异步方法", + "tags": [ + "OpenAICompatibleProvider", + "_iterate_stream" + ], + "complexity": "simple" + }, + { + "id": "class:UsageRecord", + "type": "class", + "name": "UsageRecord", + "filePath": "src/agentkit/llm/providers/tracker.py", + "layer": "utility", + "summary": "使用量记录", + "tags": [ + "UsageRecord" + ], + "complexity": "simple" + }, + { + "id": "class:UsageSummary", + "type": "class", + "name": "UsageSummary", + "filePath": "src/agentkit/llm/providers/tracker.py", + "layer": "utility", + "summary": "使用量汇总", + "tags": [ + "UsageSummary" + ], + "complexity": "simple" + }, + { + "id": "class:UsageTracker", + "type": "class", + "name": "UsageTracker", + "filePath": "src/agentkit/llm/providers/tracker.py", + "layer": "utility", + "summary": "使用量追踪器", + "tags": [ + "UsageTracker" + ], + "complexity": "simple" + }, + { + "id": "func:UsageTracker.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/tracker.py", + "layer": "utility", + "summary": "UsageTracker.__init__() 方法", + "tags": [ + "UsageTracker", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:UsageTracker.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/llm/providers/tracker.py", + "layer": "utility", + "summary": "UsageTracker.record(agent_name, model, usage, cost, latency_ms) 方法", + "tags": [ + "UsageTracker", + "record" + ], + "complexity": "simple" + }, + { + "id": "func:UsageTracker.get_usage", + "type": "function", + "name": "get_usage", + "filePath": "src/agentkit/llm/providers/tracker.py", + "layer": "utility", + "summary": "UsageTracker.get_usage(agent_name, start_time, end_time) 方法", + "tags": [ + "UsageTracker", + "get_usage" + ], + "complexity": "simple" + }, + { + "id": "class:WenxinProvider", + "type": "class", + "name": "WenxinProvider", + "filePath": "src/agentkit/llm/providers/wenxin.py", + "layer": "utility", + "summary": "百度文心 ERNIE Provider", + "tags": [ + "WenxinProvider" + ], + "complexity": "simple" + }, + { + "id": "func:WenxinProvider.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/wenxin.py", + "layer": "utility", + "summary": "WenxinProvider.__init__(api_key, access_key, secret_key, base_url, default_model) 方法", + "tags": [ + "WenxinProvider", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:WenxinProvider.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/providers/wenxin.py", + "layer": "utility", + "summary": "WenxinProvider.chat(request) 异步方法", + "tags": [ + "WenxinProvider", + "chat" + ], + "complexity": "simple" + }, + { + "id": "func:WenxinProvider._ensure_access_token", + "type": "function", + "name": "_ensure_access_token", + "filePath": "src/agentkit/llm/providers/wenxin.py", + "layer": "utility", + "summary": "WenxinProvider._ensure_access_token() 异步方法", + "tags": [ + "WenxinProvider", + "_ensure_access_token" + ], + "complexity": "simple" + }, + { + "id": "class:YuanbaoProvider", + "type": "class", + "name": "YuanbaoProvider", + "filePath": "src/agentkit/llm/providers/yuanbao.py", + "layer": "utility", + "summary": "腾讯混元/元宝 Provider", + "tags": [ + "YuanbaoProvider" + ], + "complexity": "simple" + }, + { + "id": "func:YuanbaoProvider.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/providers/yuanbao.py", + "layer": "utility", + "summary": "YuanbaoProvider.__init__(api_key, base_url, default_model, enable_enhancement) 方法", + "tags": [ + "YuanbaoProvider", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:YuanbaoProvider.chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/llm/providers/yuanbao.py", + "layer": "utility", + "summary": "YuanbaoProvider.chat(request) 异步方法", + "tags": [ + "YuanbaoProvider", + "chat" + ], + "complexity": "simple" + }, + { + "id": "class:RetryConfig", + "type": "class", + "name": "RetryConfig", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "Retry policy configuration", + "tags": [ + "RetryConfig" + ], + "complexity": "simple" + }, + { + "id": "class:CircuitState", + "type": "class", + "name": "CircuitState", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "Circuit breaker states", + "tags": [ + "CircuitState" + ], + "complexity": "simple" + }, + { + "id": "class:CircuitBreakerConfig", + "type": "class", + "name": "CircuitBreakerConfig", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "Circuit breaker configuration", + "tags": [ + "CircuitBreakerConfig" + ], + "complexity": "simple" + }, + { + "id": "class:CircuitOpenError", + "type": "class", + "name": "CircuitOpenError", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "Raised when the circuit breaker is open", + "tags": [ + "CircuitOpenError" + ], + "complexity": "simple" + }, + { + "id": "func:CircuitOpenError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "CircuitOpenError.__init__(provider) 方法", + "tags": [ + "CircuitOpenError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:RetryPolicy", + "type": "class", + "name": "RetryPolicy", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "Retry with exponential backoff for transient failures", + "tags": [ + "RetryPolicy" + ], + "complexity": "simple" + }, + { + "id": "func:RetryPolicy.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "RetryPolicy.__init__(config) 方法", + "tags": [ + "RetryPolicy", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RetryPolicy.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "RetryPolicy.execute(fn) 异步方法", + "tags": [ + "RetryPolicy", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:CircuitBreaker", + "type": "class", + "name": "CircuitBreaker", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "Circuit breaker to prevent cascading failures", + "tags": [ + "CircuitBreaker" + ], + "complexity": "moderate" + }, + { + "id": "func:CircuitBreaker.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "CircuitBreaker.__init__(config, provider) 方法", + "tags": [ + "CircuitBreaker", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:CircuitBreaker.state", + "type": "function", + "name": "state", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "CircuitBreaker.state() 方法", + "tags": [ + "CircuitBreaker", + "state" + ], + "complexity": "simple" + }, + { + "id": "func:CircuitBreaker._on_success", + "type": "function", + "name": "_on_success", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "CircuitBreaker._on_success() 方法", + "tags": [ + "CircuitBreaker", + "_on_success" + ], + "complexity": "simple" + }, + { + "id": "func:CircuitBreaker._on_failure", + "type": "function", + "name": "_on_failure", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "CircuitBreaker._on_failure() 方法", + "tags": [ + "CircuitBreaker", + "_on_failure" + ], + "complexity": "simple" + }, + { + "id": "func:CircuitBreaker.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "CircuitBreaker.execute(fn) 异步方法", + "tags": [ + "CircuitBreaker", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:Bid", + "type": "class", + "name": "Bid", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "Agent 竞价信息", + "tags": [ + "Bid" + ], + "complexity": "simple" + }, + { + "id": "func:Bid.__post_init__", + "type": "function", + "name": "__post_init__", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "Bid.__post_init__() 方法", + "tags": [ + "Bid", + "__post_init__" + ], + "complexity": "simple" + }, + { + "id": "class:AuctionResult", + "type": "class", + "name": "AuctionResult", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "拍卖结果", + "tags": [ + "AuctionResult" + ], + "complexity": "simple" + }, + { + "id": "class:AuctionHouse", + "type": "class", + "name": "AuctionHouse", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "Auction-based agent selection mechanism.", + "tags": [ + "AuctionHouse" + ], + "complexity": "moderate" + }, + { + "id": "func:AuctionHouse.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "AuctionHouse.__init__(wealth_tracker) 方法", + "tags": [ + "AuctionHouse", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AuctionHouse.run_auction", + "type": "function", + "name": "run_auction", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "AuctionHouse.run_auction(task_description, bidders) 异步方法", + "tags": [ + "AuctionHouse", + "run_auction" + ], + "complexity": "simple" + }, + { + "id": "func:AuctionHouse.score_bid", + "type": "function", + "name": "score_bid", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "AuctionHouse.score_bid(bid) 方法", + "tags": [ + "AuctionHouse", + "score_bid" + ], + "complexity": "simple" + }, + { + "id": "func:AuctionHouse.filter_by_capabilities", + "type": "function", + "name": "filter_by_capabilities", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "AuctionHouse.filter_by_capabilities(bidders, required_capabilities) 方法", + "tags": [ + "AuctionHouse", + "filter_by_capabilities" + ], + "complexity": "simple" + }, + { + "id": "func:AuctionHouse.run_vickrey_auction", + "type": "function", + "name": "run_vickrey_auction", + "filePath": "src/agentkit/marketplace/auction.py", + "layer": "unknown", + "summary": "AuctionHouse.run_vickrey_auction(task_description, bidders, required_capabilities) 异步方法", + "tags": [ + "AuctionHouse", + "run_vickrey_auction" + ], + "complexity": "simple" + }, + { + "id": "class:WealthTracker", + "type": "class", + "name": "WealthTracker", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "Track agent wealth for auction mechanism.", + "tags": [ + "WealthTracker" + ], + "complexity": "moderate" + }, + { + "id": "func:WealthTracker.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.__init__(initial_wealth) 方法", + "tags": [ + "WealthTracker", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:WealthTracker.get_wealth", + "type": "function", + "name": "get_wealth", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.get_wealth(agent_name) 方法", + "tags": [ + "WealthTracker", + "get_wealth" + ], + "complexity": "simple" + }, + { + "id": "func:WealthTracker.reward", + "type": "function", + "name": "reward", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.reward(agent_name, amount) 方法", + "tags": [ + "WealthTracker", + "reward" + ], + "complexity": "simple" + }, + { + "id": "func:WealthTracker.penalize", + "type": "function", + "name": "penalize", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.penalize(agent_name, amount) 方法", + "tags": [ + "WealthTracker", + "penalize" + ], + "complexity": "simple" + }, + { + "id": "func:WealthTracker.is_bankrupt", + "type": "function", + "name": "is_bankrupt", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.is_bankrupt(agent_name) 方法", + "tags": [ + "WealthTracker", + "is_bankrupt" + ], + "complexity": "simple" + }, + { + "id": "func:WealthTracker.reset", + "type": "function", + "name": "reset", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.reset(agent_name) 方法", + "tags": [ + "WealthTracker", + "reset" + ], + "complexity": "simple" + }, + { + "id": "func:WealthTracker.get_rankings", + "type": "function", + "name": "get_rankings", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.get_rankings() 方法", + "tags": [ + "WealthTracker", + "get_rankings" + ], + "complexity": "simple" + }, + { + "id": "func:WealthTracker.get_wealth_factor", + "type": "function", + "name": "get_wealth_factor", + "filePath": "src/agentkit/marketplace/wealth.py", + "layer": "unknown", + "summary": "WealthTracker.get_wealth_factor(agent_name) 方法", + "tags": [ + "WealthTracker", + "get_wealth_factor" + ], + "complexity": "simple" + }, + { + "id": "class:MCPClient", + "type": "class", + "name": "MCPClient", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCP Client - 连接外部 MCP Server 并调用工具", + "tags": [ + "MCPClient" + ], + "complexity": "moderate" + }, + { + "id": "func:MCPClient.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCPClient.__init__(server_url, timeout, transport) 方法", + "tags": [ + "MCPClient", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MCPClient.from_transport", + "type": "function", + "name": "from_transport", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCPClient.from_transport(cls, transport) 方法", + "tags": [ + "MCPClient", + "from_transport" + ], + "complexity": "simple" + }, + { + "id": "func:MCPClient.list_tools", + "type": "function", + "name": "list_tools", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCPClient.list_tools() 异步方法", + "tags": [ + "MCPClient", + "list_tools" + ], + "complexity": "simple" + }, + { + "id": "func:MCPClient.call_tool", + "type": "function", + "name": "call_tool", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCPClient.call_tool(tool_name, arguments) 异步方法", + "tags": [ + "MCPClient", + "call_tool" + ], + "complexity": "simple" + }, + { + "id": "func:MCPClient.as_tool", + "type": "function", + "name": "as_tool", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCPClient.as_tool(tool_name, description) 方法", + "tags": [ + "MCPClient", + "as_tool" + ], + "complexity": "simple" + }, + { + "id": "class:MCPTool", + "type": "class", + "name": "MCPTool", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCP 工具 - 通过 MCP Client 调用远程工具", + "tags": [ + "MCPTool" + ], + "complexity": "simple" + }, + { + "id": "func:MCPTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCPTool.__init__(name, description, client, input_schema, output_schema, version, tags) 方法", + "tags": [ + "MCPTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MCPTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/mcp/client.py", + "layer": "utility", + "summary": "MCPTool.execute() 异步方法", + "tags": [ + "MCPTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:MCPManager", + "type": "class", + "name": "MCPManager", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "管理 MCP Server 连接和工具发现", + "tags": [ + "MCPManager" + ], + "complexity": "complex" + }, + { + "id": "func:MCPManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager.__init__(configs, tool_registry) 方法", + "tags": [ + "MCPManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager.start_all", + "type": "function", + "name": "start_all", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager.start_all() 异步方法", + "tags": [ + "MCPManager", + "start_all" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager._start_server_safe", + "type": "function", + "name": "_start_server_safe", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager._start_server_safe(name, config) 异步方法", + "tags": [ + "MCPManager", + "_start_server_safe" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager._start_server", + "type": "function", + "name": "_start_server", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager._start_server(name, config) 异步方法", + "tags": [ + "MCPManager", + "_start_server" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager.stop_all", + "type": "function", + "name": "stop_all", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager.stop_all() 异步方法", + "tags": [ + "MCPManager", + "stop_all" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager.is_available", + "type": "function", + "name": "is_available", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager.is_available(server_name) 方法", + "tags": [ + "MCPManager", + "is_available" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager.get_server_tools", + "type": "function", + "name": "get_server_tools", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager.get_server_tools(server_name) 方法", + "tags": [ + "MCPManager", + "get_server_tools" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager.list_all_tools", + "type": "function", + "name": "list_all_tools", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager.list_all_tools() 方法", + "tags": [ + "MCPManager", + "list_all_tools" + ], + "complexity": "simple" + }, + { + "id": "func:MCPManager.get_tool_registry", + "type": "function", + "name": "get_tool_registry", + "filePath": "src/agentkit/mcp/manager.py", + "layer": "utility", + "summary": "MCPManager.get_tool_registry() 方法", + "tags": [ + "MCPManager", + "get_tool_registry" + ], + "complexity": "simple" + }, + { + "id": "class:MCPServer", + "type": "class", + "name": "MCPServer", + "filePath": "src/agentkit/mcp/server.py", + "layer": "utility", + "summary": "MCP Server - 暴露 Agent 能力为 MCP 工具", + "tags": [ + "MCPServer" + ], + "complexity": "moderate" + }, + { + "id": "func:MCPServer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/server.py", + "layer": "utility", + "summary": "MCPServer.__init__(tool_registry, host, port) 方法", + "tags": [ + "MCPServer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MCPServer._create_app", + "type": "function", + "name": "_create_app", + "filePath": "src/agentkit/mcp/server.py", + "layer": "utility", + "summary": "MCPServer._create_app() 方法", + "tags": [ + "MCPServer", + "_create_app" + ], + "complexity": "simple" + }, + { + "id": "func:MCPServer.start", + "type": "function", + "name": "start", + "filePath": "src/agentkit/mcp/server.py", + "layer": "utility", + "summary": "MCPServer.start() 异步方法", + "tags": [ + "MCPServer", + "start" + ], + "complexity": "simple" + }, + { + "id": "func:MCPServer.get_app", + "type": "function", + "name": "get_app", + "filePath": "src/agentkit/mcp/server.py", + "layer": "utility", + "summary": "MCPServer.get_app() 方法", + "tags": [ + "MCPServer", + "get_app" + ], + "complexity": "simple" + }, + { + "id": "class:TransportError", + "type": "class", + "name": "TransportError", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "传输层错误", + "tags": [ + "TransportError" + ], + "complexity": "simple" + }, + { + "id": "func:TransportError.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "TransportError.__init__(message, cause) 方法", + "tags": [ + "TransportError", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "class:Transport", + "type": "class", + "name": "Transport", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "传输层抽象基类", + "tags": [ + "Transport" + ], + "complexity": "moderate" + }, + { + "id": "func:Transport.connect", + "type": "function", + "name": "connect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "Transport.connect() 异步方法", + "tags": [ + "Transport", + "connect" + ], + "complexity": "simple" + }, + { + "id": "func:Transport.disconnect", + "type": "function", + "name": "disconnect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "Transport.disconnect() 异步方法", + "tags": [ + "Transport", + "disconnect" + ], + "complexity": "simple" + }, + { + "id": "func:Transport.send_request", + "type": "function", + "name": "send_request", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "Transport.send_request(method, params) 异步方法", + "tags": [ + "Transport", + "send_request" + ], + "complexity": "simple" + }, + { + "id": "func:Transport.receive_response", + "type": "function", + "name": "receive_response", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "Transport.receive_response() 异步方法", + "tags": [ + "Transport", + "receive_response" + ], + "complexity": "simple" + }, + { + "id": "class:HTTPTransport", + "type": "class", + "name": "HTTPTransport", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "Streamable HTTP 传输", + "tags": [ + "HTTPTransport" + ], + "complexity": "moderate" + }, + { + "id": "func:HTTPTransport.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "HTTPTransport.__init__(endpoint, headers, timeout) 方法", + "tags": [ + "HTTPTransport", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:HTTPTransport.is_connected", + "type": "function", + "name": "is_connected", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "HTTPTransport.is_connected() 方法", + "tags": [ + "HTTPTransport", + "is_connected" + ], + "complexity": "simple" + }, + { + "id": "func:HTTPTransport.connect", + "type": "function", + "name": "connect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "HTTPTransport.connect() 异步方法", + "tags": [ + "HTTPTransport", + "connect" + ], + "complexity": "simple" + }, + { + "id": "func:HTTPTransport.disconnect", + "type": "function", + "name": "disconnect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "HTTPTransport.disconnect() 异步方法", + "tags": [ + "HTTPTransport", + "disconnect" + ], + "complexity": "simple" + }, + { + "id": "func:HTTPTransport._next_request_id", + "type": "function", + "name": "_next_request_id", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "HTTPTransport._next_request_id() 方法", + "tags": [ + "HTTPTransport", + "_next_request_id" + ], + "complexity": "simple" + }, + { + "id": "func:HTTPTransport.send_request", + "type": "function", + "name": "send_request", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "HTTPTransport.send_request(method, params) 异步方法", + "tags": [ + "HTTPTransport", + "send_request" + ], + "complexity": "simple" + }, + { + "id": "func:HTTPTransport.receive_response", + "type": "function", + "name": "receive_response", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "HTTPTransport.receive_response() 异步方法", + "tags": [ + "HTTPTransport", + "receive_response" + ], + "complexity": "simple" + }, + { + "id": "class:SSETransport", + "type": "class", + "name": "SSETransport", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "Server-Sent Events 传输", + "tags": [ + "SSETransport" + ], + "complexity": "moderate" + }, + { + "id": "func:SSETransport.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport.__init__(endpoint, sse_path, message_path, headers, timeout) 方法", + "tags": [ + "SSETransport", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SSETransport.is_connected", + "type": "function", + "name": "is_connected", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport.is_connected() 方法", + "tags": [ + "SSETransport", + "is_connected" + ], + "complexity": "simple" + }, + { + "id": "func:SSETransport.connect", + "type": "function", + "name": "connect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport.connect() 异步方法", + "tags": [ + "SSETransport", + "connect" + ], + "complexity": "simple" + }, + { + "id": "func:SSETransport.disconnect", + "type": "function", + "name": "disconnect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport.disconnect() 异步方法", + "tags": [ + "SSETransport", + "disconnect" + ], + "complexity": "simple" + }, + { + "id": "func:SSETransport._listen_sse", + "type": "function", + "name": "_listen_sse", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport._listen_sse() 异步方法", + "tags": [ + "SSETransport", + "_listen_sse" + ], + "complexity": "simple" + }, + { + "id": "func:SSETransport._next_request_id", + "type": "function", + "name": "_next_request_id", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport._next_request_id() 方法", + "tags": [ + "SSETransport", + "_next_request_id" + ], + "complexity": "simple" + }, + { + "id": "func:SSETransport.send_request", + "type": "function", + "name": "send_request", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport.send_request(method, params) 异步方法", + "tags": [ + "SSETransport", + "send_request" + ], + "complexity": "simple" + }, + { + "id": "func:SSETransport.receive_response", + "type": "function", + "name": "receive_response", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "SSETransport.receive_response() 异步方法", + "tags": [ + "SSETransport", + "receive_response" + ], + "complexity": "simple" + }, + { + "id": "class:StdioTransport", + "type": "class", + "name": "StdioTransport", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "Stdio 传输", + "tags": [ + "StdioTransport" + ], + "complexity": "complex" + }, + { + "id": "func:StdioTransport.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport.__init__(command, args, env, timeout) 方法", + "tags": [ + "StdioTransport", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport.is_connected", + "type": "function", + "name": "is_connected", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport.is_connected() 方法", + "tags": [ + "StdioTransport", + "is_connected" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport._next_request_id", + "type": "function", + "name": "_next_request_id", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport._next_request_id() 方法", + "tags": [ + "StdioTransport", + "_next_request_id" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport.connect", + "type": "function", + "name": "connect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport.connect() 异步方法", + "tags": [ + "StdioTransport", + "connect" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport.disconnect", + "type": "function", + "name": "disconnect", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport.disconnect() 异步方法", + "tags": [ + "StdioTransport", + "disconnect" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport._cleanup", + "type": "function", + "name": "_cleanup", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport._cleanup() 异步方法", + "tags": [ + "StdioTransport", + "_cleanup" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport.send_request", + "type": "function", + "name": "send_request", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport.send_request(method, params) 异步方法", + "tags": [ + "StdioTransport", + "send_request" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport._send_request_internal", + "type": "function", + "name": "_send_request_internal", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport._send_request_internal(method, params) 异步方法", + "tags": [ + "StdioTransport", + "_send_request_internal" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport._send_notification", + "type": "function", + "name": "_send_notification", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport._send_notification(method, params) 异步方法", + "tags": [ + "StdioTransport", + "_send_notification" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport._write_message", + "type": "function", + "name": "_write_message", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport._write_message(message) 异步方法", + "tags": [ + "StdioTransport", + "_write_message" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport.receive_response", + "type": "function", + "name": "receive_response", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport.receive_response() 异步方法", + "tags": [ + "StdioTransport", + "receive_response" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport._read_stdout", + "type": "function", + "name": "_read_stdout", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport._read_stdout() 异步方法", + "tags": [ + "StdioTransport", + "_read_stdout" + ], + "complexity": "simple" + }, + { + "id": "func:StdioTransport._read_stderr", + "type": "function", + "name": "_read_stderr", + "filePath": "src/agentkit/mcp/transport.py", + "layer": "utility", + "summary": "StdioTransport._read_stderr() 异步方法", + "tags": [ + "StdioTransport", + "_read_stderr" + ], + "complexity": "simple" + }, + { + "id": "class:KBAdapter", + "type": "class", + "name": "KBAdapter", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "知识库适配器抽象基类", + "tags": [ + "KBAdapter" + ], + "complexity": "complex" + }, + { + "id": "func:KBAdapter.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.__init__(source_id, source_name, source_type, timeout) 方法", + "tags": [ + "KBAdapter", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.source_id", + "type": "function", + "name": "source_id", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.source_id() 方法", + "tags": [ + "KBAdapter", + "source_id" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.source_name", + "type": "function", + "name": "source_name", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.source_name() 方法", + "tags": [ + "KBAdapter", + "source_name" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.source_type", + "type": "function", + "name": "source_type", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.source_type() 方法", + "tags": [ + "KBAdapter", + "source_type" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter._get_client", + "type": "function", + "name": "_get_client", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter._get_client() 方法", + "tags": [ + "KBAdapter", + "_get_client" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter._make_client", + "type": "function", + "name": "_make_client", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter._make_client() 方法", + "tags": [ + "KBAdapter", + "_make_client" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.ingest", + "type": "function", + "name": "ingest", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.ingest(documents) 异步方法", + "tags": [ + "KBAdapter", + "ingest" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter._ingest_one", + "type": "function", + "name": "_ingest_one", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter._ingest_one(document) 异步方法", + "tags": [ + "KBAdapter", + "_ingest_one" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.query", + "type": "function", + "name": "query", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.query(text, top_k) 异步方法", + "tags": [ + "KBAdapter", + "query" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.delete_by_id", + "type": "function", + "name": "delete_by_id", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.delete_by_id(id) 异步方法", + "tags": [ + "KBAdapter", + "delete_by_id" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.list_sources() 异步方法", + "tags": [ + "KBAdapter", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.health_check() 异步方法", + "tags": [ + "KBAdapter", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.search(query, top_k) 异步方法", + "tags": [ + "KBAdapter", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.get_document", + "type": "function", + "name": "get_document", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.get_document(doc_id) 异步方法", + "tags": [ + "KBAdapter", + "get_document" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.authenticate", + "type": "function", + "name": "authenticate", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.authenticate() 异步方法", + "tags": [ + "KBAdapter", + "authenticate" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.close() 异步方法", + "tags": [ + "KBAdapter", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.__aenter__() 异步方法", + "tags": [ + "KBAdapter", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:KBAdapter.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/memory/adapters/base.py", + "layer": "data", + "summary": "KBAdapter.__aexit__() 异步方法", + "tags": [ + "KBAdapter", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "class:ConfluenceAdapter", + "type": "class", + "name": "ConfluenceAdapter", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "Confluence 知识库适配器", + "tags": [ + "ConfluenceAdapter" + ], + "complexity": "moderate" + }, + { + "id": "func:ConfluenceAdapter.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter.__init__(base_url, username, api_token, space_keys, timeout) 方法", + "tags": [ + "ConfluenceAdapter", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ConfluenceAdapter._make_client", + "type": "function", + "name": "_make_client", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter._make_client() 方法", + "tags": [ + "ConfluenceAdapter", + "_make_client" + ], + "complexity": "simple" + }, + { + "id": "func:ConfluenceAdapter.authenticate", + "type": "function", + "name": "authenticate", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter.authenticate() 异步方法", + "tags": [ + "ConfluenceAdapter", + "authenticate" + ], + "complexity": "simple" + }, + { + "id": "func:ConfluenceAdapter.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter.search(query, top_k) 异步方法", + "tags": [ + "ConfluenceAdapter", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:ConfluenceAdapter.get_document", + "type": "function", + "name": "get_document", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter.get_document(doc_id) 异步方法", + "tags": [ + "ConfluenceAdapter", + "get_document" + ], + "complexity": "simple" + }, + { + "id": "func:ConfluenceAdapter.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter.list_sources() 异步方法", + "tags": [ + "ConfluenceAdapter", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:ConfluenceAdapter.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "ConfluenceAdapter.health_check() 异步方法", + "tags": [ + "ConfluenceAdapter", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:FeishuKBAdapter", + "type": "class", + "name": "FeishuKBAdapter", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "飞书知识库适配器", + "tags": [ + "FeishuKBAdapter" + ], + "complexity": "moderate" + }, + { + "id": "func:FeishuKBAdapter.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter.__init__(app_id, app_secret, base_url, space_ids, timeout) 方法", + "tags": [ + "FeishuKBAdapter", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:FeishuKBAdapter._make_client", + "type": "function", + "name": "_make_client", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter._make_client() 方法", + "tags": [ + "FeishuKBAdapter", + "_make_client" + ], + "complexity": "simple" + }, + { + "id": "func:FeishuKBAdapter._get_access_token", + "type": "function", + "name": "_get_access_token", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter._get_access_token() 异步方法", + "tags": [ + "FeishuKBAdapter", + "_get_access_token" + ], + "complexity": "simple" + }, + { + "id": "func:FeishuKBAdapter.authenticate", + "type": "function", + "name": "authenticate", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter.authenticate() 异步方法", + "tags": [ + "FeishuKBAdapter", + "authenticate" + ], + "complexity": "simple" + }, + { + "id": "func:FeishuKBAdapter.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter.search(query, top_k) 异步方法", + "tags": [ + "FeishuKBAdapter", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:FeishuKBAdapter.get_document", + "type": "function", + "name": "get_document", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter.get_document(doc_id) 异步方法", + "tags": [ + "FeishuKBAdapter", + "get_document" + ], + "complexity": "simple" + }, + { + "id": "func:FeishuKBAdapter.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter.list_sources() 异步方法", + "tags": [ + "FeishuKBAdapter", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:FeishuKBAdapter.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/adapters/feishu.py", + "layer": "data", + "summary": "FeishuKBAdapter.health_check() 异步方法", + "tags": [ + "FeishuKBAdapter", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:GenericHTTPAdapter", + "type": "class", + "name": "GenericHTTPAdapter", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "通用 HTTP 知识库适配器", + "tags": [ + "GenericHTTPAdapter" + ], + "complexity": "complex" + }, + { + "id": "func:GenericHTTPAdapter.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.__init__(endpoint_url, auth_config, headers, source_id, source_name, timeout) 方法", + "tags": [ + "GenericHTTPAdapter", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter._make_client", + "type": "function", + "name": "_make_client", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter._make_client() 方法", + "tags": [ + "GenericHTTPAdapter", + "_make_client" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.search(query, top_k) 异步方法", + "tags": [ + "GenericHTTPAdapter", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter.ingest", + "type": "function", + "name": "ingest", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.ingest(documents) 异步方法", + "tags": [ + "GenericHTTPAdapter", + "ingest" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter.delete_by_id", + "type": "function", + "name": "delete_by_id", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.delete_by_id(id) 异步方法", + "tags": [ + "GenericHTTPAdapter", + "delete_by_id" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter.get_document", + "type": "function", + "name": "get_document", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.get_document(doc_id) 异步方法", + "tags": [ + "GenericHTTPAdapter", + "get_document" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.list_sources() 异步方法", + "tags": [ + "GenericHTTPAdapter", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.health_check() 异步方法", + "tags": [ + "GenericHTTPAdapter", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:GenericHTTPAdapter.authenticate", + "type": "function", + "name": "authenticate", + "filePath": "src/agentkit/memory/adapters/generic_http.py", + "layer": "data", + "summary": "GenericHTTPAdapter.authenticate() 异步方法", + "tags": [ + "GenericHTTPAdapter", + "authenticate" + ], + "complexity": "simple" + }, + { + "id": "class:MemoryItem", + "type": "class", + "name": "MemoryItem", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "记忆条目", + "tags": [ + "MemoryItem" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryItem.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "MemoryItem.to_dict() 方法", + "tags": [ + "MemoryItem", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:Memory", + "type": "class", + "name": "Memory", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "记忆抽象基类", + "tags": [ + "Memory" + ], + "complexity": "moderate" + }, + { + "id": "func:Memory.store", + "type": "function", + "name": "store", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "Memory.store(key, value, metadata) 异步方法", + "tags": [ + "Memory", + "store" + ], + "complexity": "simple" + }, + { + "id": "func:Memory.retrieve", + "type": "function", + "name": "retrieve", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "Memory.retrieve(key) 异步方法", + "tags": [ + "Memory", + "retrieve" + ], + "complexity": "simple" + }, + { + "id": "func:Memory.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "Memory.search(query, top_k, filters) 异步方法", + "tags": [ + "Memory", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:Memory.delete", + "type": "function", + "name": "delete", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "Memory.delete(key) 异步方法", + "tags": [ + "Memory", + "delete" + ], + "complexity": "simple" + }, + { + "id": "func:Memory.store_batch", + "type": "function", + "name": "store_batch", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "Memory.store_batch(items) 异步方法", + "tags": [ + "Memory", + "store_batch" + ], + "complexity": "simple" + }, + { + "id": "func:Memory.get_context", + "type": "function", + "name": "get_context", + "filePath": "src/agentkit/memory/base.py", + "layer": "data", + "summary": "Memory.get_context(query, token_budget) 异步方法", + "tags": [ + "Memory", + "get_context" + ], + "complexity": "simple" + }, + { + "id": "class:Chunk", + "type": "class", + "name": "Chunk", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "文档分块", + "tags": [ + "Chunk" + ], + "complexity": "simple" + }, + { + "id": "func:Chunk.__post_init__", + "type": "function", + "name": "__post_init__", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "Chunk.__post_init__() 方法", + "tags": [ + "Chunk", + "__post_init__" + ], + "complexity": "simple" + }, + { + "id": "func:Chunk.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "Chunk.to_dict() 方法", + "tags": [ + "Chunk", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:TextChunker", + "type": "class", + "name": "TextChunker", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "按字符数分块,带重叠", + "tags": [ + "TextChunker" + ], + "complexity": "moderate" + }, + { + "id": "func:TextChunker.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "TextChunker.__init__(chunk_size, chunk_overlap, separator) 方法", + "tags": [ + "TextChunker", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:TextChunker.chunk", + "type": "function", + "name": "chunk", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "TextChunker.chunk(text, source_doc_id, metadata) 方法", + "tags": [ + "TextChunker", + "chunk" + ], + "complexity": "simple" + }, + { + "id": "func:TextChunker._split_by_separator", + "type": "function", + "name": "_split_by_separator", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "TextChunker._split_by_separator(text) 方法", + "tags": [ + "TextChunker", + "_split_by_separator" + ], + "complexity": "simple" + }, + { + "id": "func:TextChunker._merge_and_split", + "type": "function", + "name": "_merge_and_split", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "TextChunker._merge_and_split(segments) 方法", + "tags": [ + "TextChunker", + "_merge_and_split" + ], + "complexity": "simple" + }, + { + "id": "func:TextChunker._split_large_segment", + "type": "function", + "name": "_split_large_segment", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "TextChunker._split_large_segment(segment) 方法", + "tags": [ + "TextChunker", + "_split_large_segment" + ], + "complexity": "simple" + }, + { + "id": "func:TextChunker._get_overlap_segments", + "type": "function", + "name": "_get_overlap_segments", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "TextChunker._get_overlap_segments(overlap_text, segments) 方法", + "tags": [ + "TextChunker", + "_get_overlap_segments" + ], + "complexity": "simple" + }, + { + "id": "class:StructuralChunker", + "type": "class", + "name": "StructuralChunker", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "按文档结构分块", + "tags": [ + "StructuralChunker" + ], + "complexity": "simple" + }, + { + "id": "func:StructuralChunker.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "StructuralChunker.__init__(chunk_size, chunk_overlap, heading_levels) 方法", + "tags": [ + "StructuralChunker", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:StructuralChunker.chunk", + "type": "function", + "name": "chunk", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "StructuralChunker.chunk(text, source_doc_id, metadata) 方法", + "tags": [ + "StructuralChunker", + "chunk" + ], + "complexity": "simple" + }, + { + "id": "func:StructuralChunker._split_by_headings", + "type": "function", + "name": "_split_by_headings", + "filePath": "src/agentkit/memory/chunking.py", + "layer": "data", + "summary": "StructuralChunker._split_by_headings(text) 方法", + "tags": [ + "StructuralChunker", + "_split_by_headings" + ], + "complexity": "simple" + }, + { + "id": "class:ContextualChunk", + "type": "class", + "name": "ContextualChunk", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "带上下文前缀的文档块", + "tags": [ + "ContextualChunk" + ], + "complexity": "simple" + }, + { + "id": "func:ContextualChunk.content", + "type": "function", + "name": "content", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunk.content() 方法", + "tags": [ + "ContextualChunk", + "content" + ], + "complexity": "simple" + }, + { + "id": "class:ContextualChunker", + "type": "class", + "name": "ContextualChunker", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "上下文增强分块器", + "tags": [ + "ContextualChunker" + ], + "complexity": "moderate" + }, + { + "id": "func:ContextualChunker.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunker.__init__(llm_gateway, cache, batch_size, max_context_length, prompt_template) 方法", + "tags": [ + "ContextualChunker", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ContextualChunker.enhance_chunks", + "type": "function", + "name": "enhance_chunks", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunker.enhance_chunks(document, chunks, metadata) 异步方法", + "tags": [ + "ContextualChunker", + "enhance_chunks" + ], + "complexity": "simple" + }, + { + "id": "func:ContextualChunker._process_batch", + "type": "function", + "name": "_process_batch", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunker._process_batch(document, chunks, start_index, metadata) 异步方法", + "tags": [ + "ContextualChunker", + "_process_batch" + ], + "complexity": "simple" + }, + { + "id": "func:ContextualChunker._generate_context", + "type": "function", + "name": "_generate_context", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunker._generate_context(document, chunk) 异步方法", + "tags": [ + "ContextualChunker", + "_generate_context" + ], + "complexity": "simple" + }, + { + "id": "func:ContextualChunker._make_cache_key", + "type": "function", + "name": "_make_cache_key", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunker._make_cache_key(document, chunk) 方法", + "tags": [ + "ContextualChunker", + "_make_cache_key" + ], + "complexity": "simple" + }, + { + "id": "func:ContextualChunker.clear_cache", + "type": "function", + "name": "clear_cache", + "filePath": "src/agentkit/memory/contextual_retrieval.py", + "layer": "data", + "summary": "ContextualChunker.clear_cache() 方法", + "tags": [ + "ContextualChunker", + "clear_cache" + ], + "complexity": "simple" + }, + { + "id": "class:Document", + "type": "class", + "name": "Document", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "解析后的文档统一格式", + "tags": [ + "Document" + ], + "complexity": "simple" + }, + { + "id": "func:Document.__post_init__", + "type": "function", + "name": "__post_init__", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "Document.__post_init__() 方法", + "tags": [ + "Document", + "__post_init__" + ], + "complexity": "simple" + }, + { + "id": "func:Document.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "Document.to_dict() 方法", + "tags": [ + "Document", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:DocumentLoader", + "type": "class", + "name": "DocumentLoader", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "多格式文档解析器", + "tags": [ + "DocumentLoader" + ], + "complexity": "moderate" + }, + { + "id": "func:DocumentLoader.load", + "type": "function", + "name": "load", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader.load(file_path) 方法", + "tags": [ + "DocumentLoader", + "load" + ], + "complexity": "simple" + }, + { + "id": "func:DocumentLoader.load_bytes", + "type": "function", + "name": "load_bytes", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader.load_bytes(content, filename) 方法", + "tags": [ + "DocumentLoader", + "load_bytes" + ], + "complexity": "simple" + }, + { + "id": "func:DocumentLoader._parse_pdf", + "type": "function", + "name": "_parse_pdf", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader._parse_pdf(content, filename) 方法", + "tags": [ + "DocumentLoader", + "_parse_pdf" + ], + "complexity": "simple" + }, + { + "id": "func:DocumentLoader._parse_docx", + "type": "function", + "name": "_parse_docx", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader._parse_docx(content, filename) 方法", + "tags": [ + "DocumentLoader", + "_parse_docx" + ], + "complexity": "simple" + }, + { + "id": "func:DocumentLoader._parse_markdown", + "type": "function", + "name": "_parse_markdown", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader._parse_markdown(content, filename) 方法", + "tags": [ + "DocumentLoader", + "_parse_markdown" + ], + "complexity": "simple" + }, + { + "id": "func:DocumentLoader._parse_html", + "type": "function", + "name": "_parse_html", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader._parse_html(content, filename) 方法", + "tags": [ + "DocumentLoader", + "_parse_html" + ], + "complexity": "simple" + }, + { + "id": "func:DocumentLoader._parse_text", + "type": "function", + "name": "_parse_text", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "DocumentLoader._parse_text(content, filename) 方法", + "tags": [ + "DocumentLoader", + "_parse_text" + ], + "complexity": "simple" + }, + { + "id": "class:EmbeddingCache", + "type": "class", + "name": "EmbeddingCache", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "LRU cache for embedding vectors with TTL support.", + "tags": [ + "EmbeddingCache" + ], + "complexity": "moderate" + }, + { + "id": "func:EmbeddingCache.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "EmbeddingCache.__init__(max_size, ttl) 方法", + "tags": [ + "EmbeddingCache", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:EmbeddingCache._make_key", + "type": "function", + "name": "_make_key", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "EmbeddingCache._make_key(text) 方法", + "tags": [ + "EmbeddingCache", + "_make_key" + ], + "complexity": "simple" + }, + { + "id": "func:EmbeddingCache.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "EmbeddingCache.get(text) 方法", + "tags": [ + "EmbeddingCache", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:EmbeddingCache.put", + "type": "function", + "name": "put", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "EmbeddingCache.put(text, embedding) 方法", + "tags": [ + "EmbeddingCache", + "put" + ], + "complexity": "simple" + }, + { + "id": "func:EmbeddingCache.clear", + "type": "function", + "name": "clear", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "EmbeddingCache.clear() 方法", + "tags": [ + "EmbeddingCache", + "clear" + ], + "complexity": "simple" + }, + { + "id": "class:Embedder", + "type": "class", + "name": "Embedder", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "文本嵌入抽象基类", + "tags": [ + "Embedder" + ], + "complexity": "simple" + }, + { + "id": "func:Embedder.embed", + "type": "function", + "name": "embed", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "Embedder.embed(text) 异步方法", + "tags": [ + "Embedder", + "embed" + ], + "complexity": "simple" + }, + { + "id": "func:Embedder.get_dimension", + "type": "function", + "name": "get_dimension", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "Embedder.get_dimension() 方法", + "tags": [ + "Embedder", + "get_dimension" + ], + "complexity": "simple" + }, + { + "id": "class:OpenAIEmbedder", + "type": "class", + "name": "OpenAIEmbedder", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAI Embeddings API 实现", + "tags": [ + "OpenAIEmbedder" + ], + "complexity": "moderate" + }, + { + "id": "func:OpenAIEmbedder.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAIEmbedder.__init__(api_key, model, base_url, cache) 方法", + "tags": [ + "OpenAIEmbedder", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAIEmbedder._get_client", + "type": "function", + "name": "_get_client", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAIEmbedder._get_client() 方法", + "tags": [ + "OpenAIEmbedder", + "_get_client" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAIEmbedder.aclose", + "type": "function", + "name": "aclose", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAIEmbedder.aclose() 异步方法", + "tags": [ + "OpenAIEmbedder", + "aclose" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAIEmbedder.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAIEmbedder.__aenter__() 异步方法", + "tags": [ + "OpenAIEmbedder", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAIEmbedder.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAIEmbedder.__aexit__(exc_type, exc_val, exc_tb) 异步方法", + "tags": [ + "OpenAIEmbedder", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAIEmbedder.embed", + "type": "function", + "name": "embed", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAIEmbedder.embed(text) 异步方法", + "tags": [ + "OpenAIEmbedder", + "embed" + ], + "complexity": "simple" + }, + { + "id": "func:OpenAIEmbedder.get_dimension", + "type": "function", + "name": "get_dimension", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "OpenAIEmbedder.get_dimension() 方法", + "tags": [ + "OpenAIEmbedder", + "get_dimension" + ], + "complexity": "simple" + }, + { + "id": "class:MockEmbedder", + "type": "class", + "name": "MockEmbedder", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "Mock Embedder - 生成确定性伪嵌入向量,用于测试", + "tags": [ + "MockEmbedder" + ], + "complexity": "simple" + }, + { + "id": "func:MockEmbedder.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "MockEmbedder.__init__(dimension) 方法", + "tags": [ + "MockEmbedder", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MockEmbedder.embed", + "type": "function", + "name": "embed", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "MockEmbedder.embed(text) 异步方法", + "tags": [ + "MockEmbedder", + "embed" + ], + "complexity": "simple" + }, + { + "id": "func:MockEmbedder.get_dimension", + "type": "function", + "name": "get_dimension", + "filePath": "src/agentkit/memory/embedder.py", + "layer": "data", + "summary": "MockEmbedder.get_dimension() 方法", + "tags": [ + "MockEmbedder", + "get_dimension" + ], + "complexity": "simple" + }, + { + "id": "class:EpisodicMemory", + "type": "class", + "name": "EpisodicMemory", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "Episodic Memory - 记录每次任务的输入/输出/效果/反思", + "tags": [ + "EpisodicMemory" + ], + "complexity": "complex" + }, + { + "id": "func:EpisodicMemory.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory.__init__(session_factory, episodic_model, embedder, decay_rate, alpha, retrieve_limit, pgvector_enabled, table_name) 方法", + "tags": [ + "EpisodicMemory", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory.store", + "type": "function", + "name": "store", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory.store(key, value, metadata) 异步方法", + "tags": [ + "EpisodicMemory", + "store" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory.retrieve", + "type": "function", + "name": "retrieve", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory.retrieve(key) 异步方法", + "tags": [ + "EpisodicMemory", + "retrieve" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory._retrieve_pgvector", + "type": "function", + "name": "_retrieve_pgvector", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory._retrieve_pgvector(db, query_embedding) 异步方法", + "tags": [ + "EpisodicMemory", + "_retrieve_pgvector" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory._retrieve_client_side", + "type": "function", + "name": "_retrieve_client_side", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory._retrieve_client_side(db, query_embedding) 异步方法", + "tags": [ + "EpisodicMemory", + "_retrieve_client_side" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory.search(query, top_k, filters, search_multiplier) 异步方法", + "tags": [ + "EpisodicMemory", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory._search_pgvector", + "type": "function", + "name": "_search_pgvector", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory._search_pgvector(db, query, top_k, filters, search_multiplier) 异步方法", + "tags": [ + "EpisodicMemory", + "_search_pgvector" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory._search_client_side", + "type": "function", + "name": "_search_client_side", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory._search_client_side(db, query, top_k, filters, search_multiplier) 异步方法", + "tags": [ + "EpisodicMemory", + "_search_client_side" + ], + "complexity": "simple" + }, + { + "id": "func:EpisodicMemory.delete", + "type": "function", + "name": "delete", + "filePath": "src/agentkit/memory/episodic.py", + "layer": "data", + "summary": "EpisodicMemory.delete(key) 异步方法", + "tags": [ + "EpisodicMemory", + "delete" + ], + "complexity": "simple" + }, + { + "id": "class:HttpRAGService", + "type": "class", + "name": "HttpRAGService", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HTTP 客户端,调用业务系统的知识库检索 API", + "tags": [ + "HttpRAGService" + ], + "complexity": "complex" + }, + { + "id": "func:HttpRAGService.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.__init__(base_url, api_key, knowledge_base_ids, timeout, contextual_chunking, llm_gateway) 方法", + "tags": [ + "HttpRAGService", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService._get_client", + "type": "function", + "name": "_get_client", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService._get_client() 方法", + "tags": [ + "HttpRAGService", + "_get_client" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.search(query, knowledge_base_ids, top_k) 异步方法", + "tags": [ + "HttpRAGService", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService.enhanced_search", + "type": "function", + "name": "enhanced_search", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.enhanced_search(query, knowledge_base_ids, top_k, use_rerank, use_compression) 异步方法", + "tags": [ + "HttpRAGService", + "enhanced_search" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService.ingest", + "type": "function", + "name": "ingest", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.ingest(key, value, metadata) 异步方法", + "tags": [ + "HttpRAGService", + "ingest" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.health_check() 异步方法", + "tags": [ + "HttpRAGService", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.close() 异步方法", + "tags": [ + "HttpRAGService", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.__aenter__() 异步方法", + "tags": [ + "HttpRAGService", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:HttpRAGService.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/memory/http_rag.py", + "layer": "data", + "summary": "HttpRAGService.__aexit__() 异步方法", + "tags": [ + "HttpRAGService", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "class:Document", + "type": "class", + "name": "Document", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "知识库文档", + "tags": [ + "Document" + ], + "complexity": "simple" + }, + { + "id": "class:QueryResult", + "type": "class", + "name": "QueryResult", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "知识库检索结果", + "tags": [ + "QueryResult" + ], + "complexity": "simple" + }, + { + "id": "class:SourceInfo", + "type": "class", + "name": "SourceInfo", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "知识库信息源描述", + "tags": [ + "SourceInfo" + ], + "complexity": "simple" + }, + { + "id": "class:KnowledgeBase", + "type": "class", + "name": "KnowledgeBase", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "知识库协议 - 统一的外部知识库接口", + "tags": [ + "KnowledgeBase" + ], + "complexity": "moderate" + }, + { + "id": "func:KnowledgeBase.ingest", + "type": "function", + "name": "ingest", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "KnowledgeBase.ingest(documents) 异步方法", + "tags": [ + "KnowledgeBase", + "ingest" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeBase.query", + "type": "function", + "name": "query", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "KnowledgeBase.query(text, top_k) 异步方法", + "tags": [ + "KnowledgeBase", + "query" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeBase.delete_by_id", + "type": "function", + "name": "delete_by_id", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "KnowledgeBase.delete_by_id(id) 异步方法", + "tags": [ + "KnowledgeBase", + "delete_by_id" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeBase.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "KnowledgeBase.list_sources() 异步方法", + "tags": [ + "KnowledgeBase", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeBase.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/knowledge_base.py", + "layer": "data", + "summary": "KnowledgeBase.health_check() 异步方法", + "tags": [ + "KnowledgeBase", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:LocalRAGService", + "type": "class", + "name": "LocalRAGService", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "基于 pgvector 的本地 RAG 服务", + "tags": [ + "LocalRAGService" + ], + "complexity": "complex" + }, + { + "id": "func:LocalRAGService.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService.__init__(session_factory, embedder, chunk_size, chunk_overlap, table_name, pgvector_enabled) 方法", + "tags": [ + "LocalRAGService", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService.ingest", + "type": "function", + "name": "ingest", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService.ingest(documents) 异步方法", + "tags": [ + "LocalRAGService", + "ingest" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService.query", + "type": "function", + "name": "query", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService.query(text, top_k) 异步方法", + "tags": [ + "LocalRAGService", + "query" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService.delete_by_id", + "type": "function", + "name": "delete_by_id", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService.delete_by_id(id) 异步方法", + "tags": [ + "LocalRAGService", + "delete_by_id" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService.list_sources() 异步方法", + "tags": [ + "LocalRAGService", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService.health_check() 异步方法", + "tags": [ + "LocalRAGService", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService._chunk_document", + "type": "function", + "name": "_chunk_document", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService._chunk_document(doc) 方法", + "tags": [ + "LocalRAGService", + "_chunk_document" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService._store_chunks", + "type": "function", + "name": "_store_chunks", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService._store_chunks(doc, chunks) 异步方法", + "tags": [ + "LocalRAGService", + "_store_chunks" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService._query_pgvector", + "type": "function", + "name": "_query_pgvector", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService._query_pgvector(db, query_embedding, top_k) 异步方法", + "tags": [ + "LocalRAGService", + "_query_pgvector" + ], + "complexity": "simple" + }, + { + "id": "func:LocalRAGService._query_client_side", + "type": "function", + "name": "_query_client_side", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "LocalRAGService._query_client_side(db, query_embedding, top_k) 异步方法", + "tags": [ + "LocalRAGService", + "_query_client_side" + ], + "complexity": "simple" + }, + { + "id": "class:InMemoryLocalRAGService", + "type": "class", + "name": "InMemoryLocalRAGService", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "基于内存的本地 RAG 服务", + "tags": [ + "InMemoryLocalRAGService" + ], + "complexity": "moderate" + }, + { + "id": "func:InMemoryLocalRAGService.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "InMemoryLocalRAGService.__init__(embedder, chunk_size, chunk_overlap) 方法", + "tags": [ + "InMemoryLocalRAGService", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryLocalRAGService.ingest", + "type": "function", + "name": "ingest", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "InMemoryLocalRAGService.ingest(documents) 异步方法", + "tags": [ + "InMemoryLocalRAGService", + "ingest" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryLocalRAGService.query", + "type": "function", + "name": "query", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "InMemoryLocalRAGService.query(text, top_k) 异步方法", + "tags": [ + "InMemoryLocalRAGService", + "query" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryLocalRAGService.delete_by_id", + "type": "function", + "name": "delete_by_id", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "InMemoryLocalRAGService.delete_by_id(id) 异步方法", + "tags": [ + "InMemoryLocalRAGService", + "delete_by_id" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryLocalRAGService.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "InMemoryLocalRAGService.list_sources() 异步方法", + "tags": [ + "InMemoryLocalRAGService", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryLocalRAGService.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "InMemoryLocalRAGService.health_check() 异步方法", + "tags": [ + "InMemoryLocalRAGService", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryLocalRAGService._chunk_document", + "type": "function", + "name": "_chunk_document", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "InMemoryLocalRAGService._chunk_document(doc) 方法", + "tags": [ + "InMemoryLocalRAGService", + "_chunk_document" + ], + "complexity": "simple" + }, + { + "id": "class:EpisodeModel", + "type": "class", + "name": "EpisodeModel", + "filePath": "src/agentkit/memory/models.py", + "layer": "data", + "summary": "Episodic memory ORM model", + "tags": [ + "EpisodeModel" + ], + "complexity": "simple" + }, + { + "id": "class:MultiSourceRetriever", + "type": "class", + "name": "MultiSourceRetriever", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "多源混合检索器", + "tags": [ + "MultiSourceRetriever" + ], + "complexity": "complex" + }, + { + "id": "func:MultiSourceRetriever.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever.__init__(sources) 方法", + "tags": [ + "MultiSourceRetriever", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever.register_source", + "type": "function", + "name": "register_source", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever.register_source(name, knowledge_base) 方法", + "tags": [ + "MultiSourceRetriever", + "register_source" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever.unregister_source", + "type": "function", + "name": "unregister_source", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever.unregister_source(name) 方法", + "tags": [ + "MultiSourceRetriever", + "unregister_source" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever.search(query, top_k, sources, weights) 异步方法", + "tags": [ + "MultiSourceRetriever", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever.list_all_sources", + "type": "function", + "name": "list_all_sources", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever.list_all_sources() 异步方法", + "tags": [ + "MultiSourceRetriever", + "list_all_sources" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever.get_source_names", + "type": "function", + "name": "get_source_names", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever.get_source_names() 方法", + "tags": [ + "MultiSourceRetriever", + "get_source_names" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever._resolve_sources", + "type": "function", + "name": "_resolve_sources", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever._resolve_sources(sources) 方法", + "tags": [ + "MultiSourceRetriever", + "_resolve_sources" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever._query_sources", + "type": "function", + "name": "_query_sources", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever._query_sources(query, top_k, target_sources, weights) 异步方法", + "tags": [ + "MultiSourceRetriever", + "_query_sources" + ], + "complexity": "simple" + }, + { + "id": "func:MultiSourceRetriever._deduplicate", + "type": "function", + "name": "_deduplicate", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "MultiSourceRetriever._deduplicate(results) 方法", + "tags": [ + "MultiSourceRetriever", + "_deduplicate" + ], + "complexity": "simple" + }, + { + "id": "class:MemoryFile", + "type": "class", + "name": "MemoryFile", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "单个记忆文件的管理器,支持 section 级别 CRUD 和容量控制.", + "tags": [ + "MemoryFile" + ], + "complexity": "complex" + }, + { + "id": "func:MemoryFile.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.__init__(path, char_budget, protected_sections) 方法", + "tags": [ + "MemoryFile", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.read", + "type": "function", + "name": "read", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.read() 方法", + "tags": [ + "MemoryFile", + "read" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.write", + "type": "function", + "name": "write", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.write(content) 方法", + "tags": [ + "MemoryFile", + "write" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.read_section", + "type": "function", + "name": "read_section", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.read_section(name) 方法", + "tags": [ + "MemoryFile", + "read_section" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.add_section", + "type": "function", + "name": "add_section", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.add_section(name, content) 方法", + "tags": [ + "MemoryFile", + "add_section" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.replace_section", + "type": "function", + "name": "replace_section", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.replace_section(name, old_text, new_text) 方法", + "tags": [ + "MemoryFile", + "replace_section" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.remove_section", + "type": "function", + "name": "remove_section", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.remove_section(name) 方法", + "tags": [ + "MemoryFile", + "remove_section" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.list_sections", + "type": "function", + "name": "list_sections", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.list_sections() 方法", + "tags": [ + "MemoryFile", + "list_sections" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile.trim_to_budget", + "type": "function", + "name": "trim_to_budget", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile.trim_to_budget(protected_sections) 方法", + "tags": [ + "MemoryFile", + "trim_to_budget" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryFile._trim_content", + "type": "function", + "name": "_trim_content", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryFile._trim_content(content, protected_sections) 方法", + "tags": [ + "MemoryFile", + "_trim_content" + ], + "complexity": "simple" + }, + { + "id": "class:MemorySnapshot", + "type": "class", + "name": "MemorySnapshot", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "一次加载的所有记忆文件快照.", + "tags": [ + "MemorySnapshot" + ], + "complexity": "simple" + }, + { + "id": "func:MemorySnapshot.is_empty", + "type": "function", + "name": "is_empty", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemorySnapshot.is_empty() 方法", + "tags": [ + "MemorySnapshot", + "is_empty" + ], + "complexity": "simple" + }, + { + "id": "class:MemoryStore", + "type": "class", + "name": "MemoryStore", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "管理 SOUL/USER/MEMORY/DAILY 四类记忆文件.", + "tags": [ + "MemoryStore" + ], + "complexity": "complex" + }, + { + "id": "func:MemoryStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.__init__(base_dir, on_change) 方法", + "tags": [ + "MemoryStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.get_file", + "type": "function", + "name": "get_file", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.get_file(file_key) 方法", + "tags": [ + "MemoryStore", + "get_file" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.ensure_defaults", + "type": "function", + "name": "ensure_defaults", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.ensure_defaults() 方法", + "tags": [ + "MemoryStore", + "ensure_defaults" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.load_all", + "type": "function", + "name": "load_all", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.load_all() 方法", + "tags": [ + "MemoryStore", + "load_all" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.load_daily_logs", + "type": "function", + "name": "load_daily_logs", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.load_daily_logs(days) 方法", + "tags": [ + "MemoryStore", + "load_daily_logs" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.archive_old_dailies", + "type": "function", + "name": "archive_old_dailies", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.archive_old_dailies(keep_days) 方法", + "tags": [ + "MemoryStore", + "archive_old_dailies" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.build_system_prompt", + "type": "function", + "name": "build_system_prompt", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.build_system_prompt(snapshot, base_prompt) 方法", + "tags": [ + "MemoryStore", + "build_system_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.refresh_system_prompt", + "type": "function", + "name": "refresh_system_prompt", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.refresh_system_prompt() 方法", + "tags": [ + "MemoryStore", + "refresh_system_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryStore.notify_change", + "type": "function", + "name": "notify_change", + "filePath": "src/agentkit/memory/profile.py", + "layer": "data", + "summary": "MemoryStore.notify_change() 方法", + "tags": [ + "MemoryStore", + "notify_change" + ], + "complexity": "simple" + }, + { + "id": "class:TransformedQuery", + "type": "class", + "name": "TransformedQuery", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "改写后的查询", + "tags": [ + "TransformedQuery" + ], + "complexity": "simple" + }, + { + "id": "class:QueryTransformerBase", + "type": "class", + "name": "QueryTransformerBase", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "查询改写抽象基类", + "tags": [ + "QueryTransformerBase" + ], + "complexity": "simple" + }, + { + "id": "func:QueryTransformerBase.transform", + "type": "function", + "name": "transform", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "QueryTransformerBase.transform(query) 异步方法", + "tags": [ + "QueryTransformerBase", + "transform" + ], + "complexity": "simple" + }, + { + "id": "class:LLMQueryTransformer", + "type": "class", + "name": "LLMQueryTransformer", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "基于 LLM 的查询改写", + "tags": [ + "LLMQueryTransformer" + ], + "complexity": "simple" + }, + { + "id": "func:LLMQueryTransformer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "LLMQueryTransformer.__init__(llm_gateway, max_sub_queries) 方法", + "tags": [ + "LLMQueryTransformer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:LLMQueryTransformer.transform", + "type": "function", + "name": "transform", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "LLMQueryTransformer.transform(query) 异步方法", + "tags": [ + "LLMQueryTransformer", + "transform" + ], + "complexity": "simple" + }, + { + "id": "class:RuleQueryTransformer", + "type": "class", + "name": "RuleQueryTransformer", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "基于规则的查询改写", + "tags": [ + "RuleQueryTransformer" + ], + "complexity": "simple" + }, + { + "id": "func:RuleQueryTransformer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "RuleQueryTransformer.__init__(synonyms, max_sub_queries) 方法", + "tags": [ + "RuleQueryTransformer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RuleQueryTransformer.transform", + "type": "function", + "name": "transform", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "RuleQueryTransformer.transform(query) 异步方法", + "tags": [ + "RuleQueryTransformer", + "transform" + ], + "complexity": "simple" + }, + { + "id": "class:NoOpQueryTransformer", + "type": "class", + "name": "NoOpQueryTransformer", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "不做任何改写,原样返回", + "tags": [ + "NoOpQueryTransformer" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpQueryTransformer.transform", + "type": "function", + "name": "transform", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "NoOpQueryTransformer.transform(query) 异步方法", + "tags": [ + "NoOpQueryTransformer", + "transform" + ], + "complexity": "simple" + }, + { + "id": "class:LoopState", + "type": "class", + "name": "LoopState", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "自纠正循环状态", + "tags": [ + "LoopState" + ], + "complexity": "simple" + }, + { + "id": "class:CorrectionAttempt", + "type": "class", + "name": "CorrectionAttempt", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "一次纠正尝试的记录", + "tags": [ + "CorrectionAttempt" + ], + "complexity": "simple" + }, + { + "id": "class:RAGLoopResult", + "type": "class", + "name": "RAGLoopResult", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "自纠正循环的最终结果", + "tags": [ + "RAGLoopResult" + ], + "complexity": "simple" + }, + { + "id": "class:RAGSelfCorrectionLoop", + "type": "class", + "name": "RAGSelfCorrectionLoop", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "CRAG 自纠正循环", + "tags": [ + "RAGSelfCorrectionLoop" + ], + "complexity": "moderate" + }, + { + "id": "func:RAGSelfCorrectionLoop.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "RAGSelfCorrectionLoop.__init__(retriever, scorer, query_transformer, max_retries, min_items_for_correct) 方法", + "tags": [ + "RAGSelfCorrectionLoop", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RAGSelfCorrectionLoop.retrieve_with_correction", + "type": "function", + "name": "retrieve_with_correction", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "RAGSelfCorrectionLoop.retrieve_with_correction(query, top_k, token_budget, filters) 异步方法", + "tags": [ + "RAGSelfCorrectionLoop", + "retrieve_with_correction" + ], + "complexity": "simple" + }, + { + "id": "func:RAGSelfCorrectionLoop._determine_next_state", + "type": "function", + "name": "_determine_next_state", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "RAGSelfCorrectionLoop._determine_next_state(evaluation, items) 方法", + "tags": [ + "RAGSelfCorrectionLoop", + "_determine_next_state" + ], + "complexity": "simple" + }, + { + "id": "func:RAGSelfCorrectionLoop._rewrite_query", + "type": "function", + "name": "_rewrite_query", + "filePath": "src/agentkit/memory/rag_loop.py", + "layer": "data", + "summary": "RAGSelfCorrectionLoop._rewrite_query(original_query, current_query, evaluation) 异步方法", + "tags": [ + "RAGSelfCorrectionLoop", + "_rewrite_query" + ], + "complexity": "simple" + }, + { + "id": "class:RelevanceVerdict", + "type": "class", + "name": "RelevanceVerdict", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "相关性判定结果", + "tags": [ + "RelevanceVerdict" + ], + "complexity": "simple" + }, + { + "id": "class:RelevanceScore", + "type": "class", + "name": "RelevanceScore", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "单个文档的相关性评分", + "tags": [ + "RelevanceScore" + ], + "complexity": "simple" + }, + { + "id": "class:RetrievalEvaluation", + "type": "class", + "name": "RetrievalEvaluation", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "一次检索的整体评估结果", + "tags": [ + "RetrievalEvaluation" + ], + "complexity": "simple" + }, + { + "id": "class:RelevanceScorer", + "type": "class", + "name": "RelevanceScorer", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "检索结果相关性评估器", + "tags": [ + "RelevanceScorer" + ], + "complexity": "moderate" + }, + { + "id": "func:RelevanceScorer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer.__init__(correct_threshold, ambiguous_threshold, keyword_weight, coverage_weight, retrieval_weight, length_weight, min_doc_length, max_doc_length) 方法", + "tags": [ + "RelevanceScorer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RelevanceScorer.score_item", + "type": "function", + "name": "score_item", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer.score_item(query, item) 方法", + "tags": [ + "RelevanceScorer", + "score_item" + ], + "complexity": "simple" + }, + { + "id": "func:RelevanceScorer.evaluate", + "type": "function", + "name": "evaluate", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer.evaluate(query, items) 方法", + "tags": [ + "RelevanceScorer", + "evaluate" + ], + "complexity": "simple" + }, + { + "id": "func:RelevanceScorer._determine_verdict", + "type": "function", + "name": "_determine_verdict", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer._determine_verdict(score) 方法", + "tags": [ + "RelevanceScorer", + "_determine_verdict" + ], + "complexity": "simple" + }, + { + "id": "func:RelevanceScorer._tokenize", + "type": "function", + "name": "_tokenize", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer._tokenize(text) 方法", + "tags": [ + "RelevanceScorer", + "_tokenize" + ], + "complexity": "simple" + }, + { + "id": "func:RelevanceScorer._jaccard_similarity", + "type": "function", + "name": "_jaccard_similarity", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer._jaccard_similarity(set_a, set_b) 方法", + "tags": [ + "RelevanceScorer", + "_jaccard_similarity" + ], + "complexity": "simple" + }, + { + "id": "func:RelevanceScorer._query_coverage", + "type": "function", + "name": "_query_coverage", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer._query_coverage(query_terms, doc_terms) 方法", + "tags": [ + "RelevanceScorer", + "_query_coverage" + ], + "complexity": "simple" + }, + { + "id": "func:RelevanceScorer._length_score", + "type": "function", + "name": "_length_score", + "filePath": "src/agentkit/memory/relevance_scorer.py", + "layer": "data", + "summary": "RelevanceScorer._length_score(length) 方法", + "tags": [ + "RelevanceScorer", + "_length_score" + ], + "complexity": "simple" + }, + { + "id": "class:MemoryRetriever", + "type": "class", + "name": "MemoryRetriever", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "混合检索器 - 并行查询三层记忆,按权重融合排序", + "tags": [ + "MemoryRetriever" + ], + "complexity": "complex" + }, + { + "id": "func:MemoryRetriever.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever.__init__(working_memory, episodic_memory, semantic_memory, weights, query_transformer, context_template, enable_self_correction, max_correction_retries, knowledge_sources) 方法", + "tags": [ + "MemoryRetriever", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever.retrieve", + "type": "function", + "name": "retrieve", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever.retrieve(query, top_k, token_budget, filters, _skip_correction, sources, source_weights) 异步方法", + "tags": [ + "MemoryRetriever", + "retrieve" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever._search_layers", + "type": "function", + "name": "_search_layers", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever._search_layers(query, top_k, filters) 异步方法", + "tags": [ + "MemoryRetriever", + "_search_layers" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever._retrieve_from_sources", + "type": "function", + "name": "_retrieve_from_sources", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever._retrieve_from_sources(query, top_k, token_budget, sources, source_weights) 异步方法", + "tags": [ + "MemoryRetriever", + "_retrieve_from_sources" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever.multi_source_retriever", + "type": "function", + "name": "multi_source_retriever", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever.multi_source_retriever() 方法", + "tags": [ + "MemoryRetriever", + "multi_source_retriever" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever.get_context_string", + "type": "function", + "name": "get_context_string", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever.get_context_string(query, top_k, token_budget) 异步方法", + "tags": [ + "MemoryRetriever", + "get_context_string" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever._format_structured_header", + "type": "function", + "name": "_format_structured_header", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever._format_structured_header(item) 方法", + "tags": [ + "MemoryRetriever", + "_format_structured_header" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever.store_episode", + "type": "function", + "name": "store_episode", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever.store_episode(key, value, metadata) 异步方法", + "tags": [ + "MemoryRetriever", + "store_episode" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryRetriever.create_retrieve_tool", + "type": "function", + "name": "create_retrieve_tool", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "MemoryRetriever.create_retrieve_tool(max_calls) 方法", + "tags": [ + "MemoryRetriever", + "create_retrieve_tool" + ], + "complexity": "simple" + }, + { + "id": "class:RetrieveKnowledgeTool", + "type": "class", + "name": "RetrieveKnowledgeTool", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "Built-in tool for knowledge base retrieval during ReAct reasoning.", + "tags": [ + "RetrieveKnowledgeTool" + ], + "complexity": "simple" + }, + { + "id": "func:RetrieveKnowledgeTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "RetrieveKnowledgeTool.__init__(retriever, max_calls) 方法", + "tags": [ + "RetrieveKnowledgeTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RetrieveKnowledgeTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "RetrieveKnowledgeTool.execute() 异步方法", + "tags": [ + "RetrieveKnowledgeTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:SemanticMemory", + "type": "class", + "name": "SemanticMemory", + "filePath": "src/agentkit/memory/semantic.py", + "layer": "data", + "summary": "Semantic Memory - 知识库检索", + "tags": [ + "SemanticMemory" + ], + "complexity": "moderate" + }, + { + "id": "func:SemanticMemory.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/semantic.py", + "layer": "data", + "summary": "SemanticMemory.__init__(rag_service, graph_service, knowledge_base_ids, search_mode, use_rerank, use_compression, kb_weights) 方法", + "tags": [ + "SemanticMemory", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SemanticMemory.store", + "type": "function", + "name": "store", + "filePath": "src/agentkit/memory/semantic.py", + "layer": "data", + "summary": "SemanticMemory.store(key, value, metadata) 异步方法", + "tags": [ + "SemanticMemory", + "store" + ], + "complexity": "simple" + }, + { + "id": "func:SemanticMemory.retrieve", + "type": "function", + "name": "retrieve", + "filePath": "src/agentkit/memory/semantic.py", + "layer": "data", + "summary": "SemanticMemory.retrieve(key) 异步方法", + "tags": [ + "SemanticMemory", + "retrieve" + ], + "complexity": "simple" + }, + { + "id": "func:SemanticMemory.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/semantic.py", + "layer": "data", + "summary": "SemanticMemory.search(query, top_k, filters) 异步方法", + "tags": [ + "SemanticMemory", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:SemanticMemory.delete", + "type": "function", + "name": "delete", + "filePath": "src/agentkit/memory/semantic.py", + "layer": "data", + "summary": "SemanticMemory.delete(key) 异步方法", + "tags": [ + "SemanticMemory", + "delete" + ], + "complexity": "simple" + }, + { + "id": "class:WorkingMemory", + "type": "class", + "name": "WorkingMemory", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "Working Memory - 当前任务的上下文和中间状态", + "tags": [ + "WorkingMemory" + ], + "complexity": "moderate" + }, + { + "id": "func:WorkingMemory.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "WorkingMemory.__init__(redis, key_prefix, default_ttl) 方法", + "tags": [ + "WorkingMemory", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:WorkingMemory._make_key", + "type": "function", + "name": "_make_key", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "WorkingMemory._make_key(key) 方法", + "tags": [ + "WorkingMemory", + "_make_key" + ], + "complexity": "simple" + }, + { + "id": "func:WorkingMemory.store", + "type": "function", + "name": "store", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "WorkingMemory.store(key, value, metadata) 异步方法", + "tags": [ + "WorkingMemory", + "store" + ], + "complexity": "simple" + }, + { + "id": "func:WorkingMemory.retrieve", + "type": "function", + "name": "retrieve", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "WorkingMemory.retrieve(key) 异步方法", + "tags": [ + "WorkingMemory", + "retrieve" + ], + "complexity": "simple" + }, + { + "id": "func:WorkingMemory.search", + "type": "function", + "name": "search", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "WorkingMemory.search(query, top_k, filters) 异步方法", + "tags": [ + "WorkingMemory", + "search" + ], + "complexity": "simple" + }, + { + "id": "func:WorkingMemory.delete", + "type": "function", + "name": "delete", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "WorkingMemory.delete(key) 异步方法", + "tags": [ + "WorkingMemory", + "delete" + ], + "complexity": "simple" + }, + { + "id": "func:WorkingMemory.clear", + "type": "function", + "name": "clear", + "filePath": "src/agentkit/memory/working.py", + "layer": "data", + "summary": "WorkingMemory.clear(prefix) 异步方法", + "tags": [ + "WorkingMemory", + "clear" + ], + "complexity": "simple" + }, + { + "id": "class:CompletedStep", + "type": "class", + "name": "CompletedStep", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "Record of a completed step with its compensation", + "tags": [ + "CompletedStep" + ], + "complexity": "simple" + }, + { + "id": "class:CompensationResult", + "type": "class", + "name": "CompensationResult", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "Result of compensation execution", + "tags": [ + "CompensationResult" + ], + "complexity": "simple" + }, + { + "id": "class:SagaOrchestrator", + "type": "class", + "name": "SagaOrchestrator", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "Orchestrates LIFO compensation for failed pipelines", + "tags": [ + "SagaOrchestrator" + ], + "complexity": "moderate" + }, + { + "id": "func:SagaOrchestrator.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "SagaOrchestrator.__init__(execute_skill_func) 方法", + "tags": [ + "SagaOrchestrator", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SagaOrchestrator.record_completed", + "type": "function", + "name": "record_completed", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "SagaOrchestrator.record_completed(step_name, result, compensate_action) 方法", + "tags": [ + "SagaOrchestrator", + "record_completed" + ], + "complexity": "simple" + }, + { + "id": "func:SagaOrchestrator.compensate", + "type": "function", + "name": "compensate", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "SagaOrchestrator.compensate() 异步方法", + "tags": [ + "SagaOrchestrator", + "compensate" + ], + "complexity": "simple" + }, + { + "id": "func:SagaOrchestrator.clear", + "type": "function", + "name": "clear", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "SagaOrchestrator.clear() 方法", + "tags": [ + "SagaOrchestrator", + "clear" + ], + "complexity": "simple" + }, + { + "id": "func:SagaOrchestrator.completed_steps", + "type": "function", + "name": "completed_steps", + "filePath": "src/agentkit/orchestrator/compensation.py", + "layer": "service", + "summary": "SagaOrchestrator.completed_steps() 方法", + "tags": [ + "SagaOrchestrator", + "completed_steps" + ], + "complexity": "simple" + }, + { + "id": "class:DynamicPipeline", + "type": "class", + "name": "DynamicPipeline", + "filePath": "src/agentkit/orchestrator/dynamic_pipeline.py", + "layer": "service", + "summary": "动态 Pipeline 组合器", + "tags": [ + "DynamicPipeline" + ], + "complexity": "moderate" + }, + { + "id": "func:DynamicPipeline.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/dynamic_pipeline.py", + "layer": "service", + "summary": "DynamicPipeline.__init__(engine, loader) 方法", + "tags": [ + "DynamicPipeline", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:DynamicPipeline.execute_conditional", + "type": "function", + "name": "execute_conditional", + "filePath": "src/agentkit/orchestrator/dynamic_pipeline.py", + "layer": "service", + "summary": "DynamicPipeline.execute_conditional(pipelines, condition_key, context) 异步方法", + "tags": [ + "DynamicPipeline", + "execute_conditional" + ], + "complexity": "simple" + }, + { + "id": "func:DynamicPipeline.execute_nested", + "type": "function", + "name": "execute_nested", + "filePath": "src/agentkit/orchestrator/dynamic_pipeline.py", + "layer": "service", + "summary": "DynamicPipeline.execute_nested(parent, sub_pipeline_map, context) 异步方法", + "tags": [ + "DynamicPipeline", + "execute_nested" + ], + "complexity": "simple" + }, + { + "id": "func:DynamicPipeline.execute_loop", + "type": "function", + "name": "execute_loop", + "filePath": "src/agentkit/orchestrator/dynamic_pipeline.py", + "layer": "service", + "summary": "DynamicPipeline.execute_loop(pipeline, max_iterations, exit_condition, context) 异步方法", + "tags": [ + "DynamicPipeline", + "execute_loop" + ], + "complexity": "simple" + }, + { + "id": "class:HandoffManager", + "type": "class", + "name": "HandoffManager", + "filePath": "src/agentkit/orchestrator/handoff.py", + "layer": "service", + "summary": "Handoff 管理器", + "tags": [ + "HandoffManager" + ], + "complexity": "moderate" + }, + { + "id": "func:HandoffManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/handoff.py", + "layer": "service", + "summary": "HandoffManager.__init__(redis, dispatcher) 方法", + "tags": [ + "HandoffManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:HandoffManager.register_handler", + "type": "function", + "name": "register_handler", + "filePath": "src/agentkit/orchestrator/handoff.py", + "layer": "service", + "summary": "HandoffManager.register_handler(agent_name, handler) 方法", + "tags": [ + "HandoffManager", + "register_handler" + ], + "complexity": "simple" + }, + { + "id": "func:HandoffManager.send_handoff", + "type": "function", + "name": "send_handoff", + "filePath": "src/agentkit/orchestrator/handoff.py", + "layer": "service", + "summary": "HandoffManager.send_handoff(handoff) 异步方法", + "tags": [ + "HandoffManager", + "send_handoff" + ], + "complexity": "simple" + }, + { + "id": "func:HandoffManager.listen_for_handoffs", + "type": "function", + "name": "listen_for_handoffs", + "filePath": "src/agentkit/orchestrator/handoff.py", + "layer": "service", + "summary": "HandoffManager.listen_for_handoffs(agent_name) 异步方法", + "tags": [ + "HandoffManager", + "listen_for_handoffs" + ], + "complexity": "simple" + }, + { + "id": "func:HandoffManager._handle_handoff", + "type": "function", + "name": "_handle_handoff", + "filePath": "src/agentkit/orchestrator/handoff.py", + "layer": "service", + "summary": "HandoffManager._handle_handoff(handoff) 异步方法", + "tags": [ + "HandoffManager", + "_handle_handoff" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineEngine", + "type": "class", + "name": "PipelineEngine", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "Pipeline 执行引擎", + "tags": [ + "PipelineEngine" + ], + "complexity": "complex" + }, + { + "id": "func:PipelineEngine.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine.__init__(dispatcher, state_manager, llm_gateway) 方法", + "tags": [ + "PipelineEngine", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine.execute(pipeline, context, adaptive_config) 异步方法", + "tags": [ + "PipelineEngine", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._adaptive_loop", + "type": "function", + "name": "_adaptive_loop", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._adaptive_loop(pipeline, context, failed_result, adaptive_config) 异步方法", + "tags": [ + "PipelineEngine", + "_adaptive_loop" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._execute_pipeline", + "type": "function", + "name": "_execute_pipeline", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._execute_pipeline(pipeline, context) 异步方法", + "tags": [ + "PipelineEngine", + "_execute_pipeline" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._execute_stage", + "type": "function", + "name": "_execute_stage", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._execute_stage(stage, pipeline_result, saga) 异步方法", + "tags": [ + "PipelineEngine", + "_execute_stage" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._topological_group", + "type": "function", + "name": "_topological_group", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._topological_group(stages) 方法", + "tags": [ + "PipelineEngine", + "_topological_group" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._resolve_variables", + "type": "function", + "name": "_resolve_variables", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._resolve_variables(template, context) 方法", + "tags": [ + "PipelineEngine", + "_resolve_variables" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._get_nested", + "type": "function", + "name": "_get_nested", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._get_nested(data, path) 方法", + "tags": [ + "PipelineEngine", + "_get_nested" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._evaluate_condition", + "type": "function", + "name": "_evaluate_condition", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._evaluate_condition(condition, variables) 方法", + "tags": [ + "PipelineEngine", + "_evaluate_condition" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._execute_stage_with_adversarial", + "type": "function", + "name": "_execute_stage_with_adversarial", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._execute_stage_with_adversarial(stage, pipeline_result, saga, started_at) 异步方法", + "tags": [ + "PipelineEngine", + "_execute_stage_with_adversarial" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._execute_agent_stage", + "type": "function", + "name": "_execute_agent_stage", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._execute_agent_stage(agent_name, action, input_data, stage, started_at, timeout_seconds) 异步方法", + "tags": [ + "PipelineEngine", + "_execute_agent_stage" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._execute_verifier", + "type": "function", + "name": "_execute_verifier", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._execute_verifier(verifier_name, worker_output, stage, started_at) 异步方法", + "tags": [ + "PipelineEngine", + "_execute_verifier" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._build_feedback_context", + "type": "function", + "name": "_build_feedback_context", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._build_feedback_context(feedback, feedback_mode) 方法", + "tags": [ + "PipelineEngine", + "_build_feedback_context" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineEngine._escalate", + "type": "function", + "name": "_escalate", + "filePath": "src/agentkit/orchestrator/pipeline_engine.py", + "layer": "service", + "summary": "PipelineEngine._escalate(stage, worker_result, adversarial_state, started_at) 异步方法", + "tags": [ + "PipelineEngine", + "_escalate" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineLoader", + "type": "class", + "name": "PipelineLoader", + "filePath": "src/agentkit/orchestrator/pipeline_loader.py", + "layer": "service", + "summary": "Pipeline YAML 加载器", + "tags": [ + "PipelineLoader" + ], + "complexity": "moderate" + }, + { + "id": "func:PipelineLoader.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/pipeline_loader.py", + "layer": "service", + "summary": "PipelineLoader.__init__(pipelines_dir) 方法", + "tags": [ + "PipelineLoader", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineLoader.load", + "type": "function", + "name": "load", + "filePath": "src/agentkit/orchestrator/pipeline_loader.py", + "layer": "service", + "summary": "PipelineLoader.load(pipeline_name) 方法", + "tags": [ + "PipelineLoader", + "load" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineLoader.load_from_yaml", + "type": "function", + "name": "load_from_yaml", + "filePath": "src/agentkit/orchestrator/pipeline_loader.py", + "layer": "service", + "summary": "PipelineLoader.load_from_yaml(yaml_content, pipeline_name) 方法", + "tags": [ + "PipelineLoader", + "load_from_yaml" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineLoader.validate_dag", + "type": "function", + "name": "validate_dag", + "filePath": "src/agentkit/orchestrator/pipeline_loader.py", + "layer": "service", + "summary": "PipelineLoader.validate_dag(stages) 方法", + "tags": [ + "PipelineLoader", + "validate_dag" + ], + "complexity": "simple" + }, + { + "id": "class:Base", + "type": "class", + "name": "Base", + "filePath": "src/agentkit/orchestrator/pipeline_models.py", + "layer": "service", + "summary": "Base类,继承自DeclarativeBase", + "tags": [ + "Base" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineExecutionModel", + "type": "class", + "name": "PipelineExecutionModel", + "filePath": "src/agentkit/orchestrator/pipeline_models.py", + "layer": "service", + "summary": "Pipeline execution record — persisted final state.", + "tags": [ + "PipelineExecutionModel" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStepHistoryModel", + "type": "class", + "name": "PipelineStepHistoryModel", + "filePath": "src/agentkit/orchestrator/pipeline_models.py", + "layer": "service", + "summary": "Step execution history — audit trail.", + "tags": [ + "PipelineStepHistoryModel" + ], + "complexity": "simple" + }, + { + "id": "class:StageStatus", + "type": "class", + "name": "StageStatus", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "StageStatus类,继承自str, Enum", + "tags": [ + "StageStatus" + ], + "complexity": "simple" + }, + { + "id": "class:ReviewIssue", + "type": "class", + "name": "ReviewIssue", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "单条审查问题", + "tags": [ + "ReviewIssue" + ], + "complexity": "simple" + }, + { + "id": "class:ReviewFeedback", + "type": "class", + "name": "ReviewFeedback", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "Verifier 返回的结构化审查反馈", + "tags": [ + "ReviewFeedback" + ], + "complexity": "simple" + }, + { + "id": "class:AdversarialState", + "type": "class", + "name": "AdversarialState", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "对抗轮次状态追踪", + "tags": [ + "AdversarialState" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStage", + "type": "class", + "name": "PipelineStage", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "PipelineStage类,继承自BaseModel", + "tags": [ + "PipelineStage" + ], + "complexity": "simple" + }, + { + "id": "class:Pipeline", + "type": "class", + "name": "Pipeline", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "Pipeline类,继承自BaseModel", + "tags": [ + "Pipeline" + ], + "complexity": "simple" + }, + { + "id": "class:StageResult", + "type": "class", + "name": "StageResult", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "StageResult类,继承自BaseModel", + "tags": [ + "StageResult" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineResult", + "type": "class", + "name": "PipelineResult", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "PipelineResult类,继承自BaseModel", + "tags": [ + "PipelineResult" + ], + "complexity": "simple" + }, + { + "id": "class:AdaptiveConfig", + "type": "class", + "name": "AdaptiveConfig", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "Configuration for adaptive pipeline execution with reflection-replanning.", + "tags": [ + "AdaptiveConfig" + ], + "complexity": "simple" + }, + { + "id": "class:ReflectionReport", + "type": "class", + "name": "ReflectionReport", + "filePath": "src/agentkit/orchestrator/pipeline_schema.py", + "layer": "service", + "summary": "Structured report from pipeline reflection analysis.", + "tags": [ + "ReflectionReport" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStateMemory", + "type": "class", + "name": "PipelineStateMemory", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "In-memory pipeline state storage (testing / fallback).", + "tags": [ + "PipelineStateMemory" + ], + "complexity": "complex" + }, + { + "id": "func:PipelineStateMemory.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.__init__() 方法", + "tags": [ + "PipelineStateMemory", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.create_execution", + "type": "function", + "name": "create_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.create_execution(pipeline_name, steps, input_data, tenant_id) 异步方法", + "tags": [ + "PipelineStateMemory", + "create_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.update_step", + "type": "function", + "name": "update_step", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.update_step(execution_id, step_name, status, output, error, duration_ms) 异步方法", + "tags": [ + "PipelineStateMemory", + "update_step" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.complete_execution", + "type": "function", + "name": "complete_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.complete_execution(execution_id, final_output) 异步方法", + "tags": [ + "PipelineStateMemory", + "complete_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.fail_execution", + "type": "function", + "name": "fail_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.fail_execution(execution_id, step_name, error) 异步方法", + "tags": [ + "PipelineStateMemory", + "fail_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.get_execution", + "type": "function", + "name": "get_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.get_execution(execution_id) 异步方法", + "tags": [ + "PipelineStateMemory", + "get_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.list_executions", + "type": "function", + "name": "list_executions", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.list_executions(status, limit, offset) 异步方法", + "tags": [ + "PipelineStateMemory", + "list_executions" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.get_step_history", + "type": "function", + "name": "get_step_history", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.get_step_history(execution_id) 异步方法", + "tags": [ + "PipelineStateMemory", + "get_step_history" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateMemory.get_execution_sync", + "type": "function", + "name": "get_execution_sync", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateMemory.get_execution_sync(execution_id) 方法", + "tags": [ + "PipelineStateMemory", + "get_execution_sync" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStateRedis", + "type": "class", + "name": "PipelineStateRedis", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "Redis-backed pipeline state storage (hot state).", + "tags": [ + "PipelineStateRedis" + ], + "complexity": "complex" + }, + { + "id": "func:PipelineStateRedis.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.__init__(redis_url) 方法", + "tags": [ + "PipelineStateRedis", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis._get_redis", + "type": "function", + "name": "_get_redis", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis._get_redis() 异步方法", + "tags": [ + "PipelineStateRedis", + "_get_redis" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis._safe_redis_call", + "type": "function", + "name": "_safe_redis_call", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis._safe_redis_call(fn) 异步方法", + "tags": [ + "PipelineStateRedis", + "_safe_redis_call" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis._key", + "type": "function", + "name": "_key", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis._key(execution_id) 方法", + "tags": [ + "PipelineStateRedis", + "_key" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.create_execution", + "type": "function", + "name": "create_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.create_execution(pipeline_name, steps, input_data, tenant_id) 异步方法", + "tags": [ + "PipelineStateRedis", + "create_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.update_step", + "type": "function", + "name": "update_step", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.update_step(execution_id, step_name, status, output, error, duration_ms) 异步方法", + "tags": [ + "PipelineStateRedis", + "update_step" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.complete_execution", + "type": "function", + "name": "complete_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.complete_execution(execution_id, final_output) 异步方法", + "tags": [ + "PipelineStateRedis", + "complete_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.fail_execution", + "type": "function", + "name": "fail_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.fail_execution(execution_id, step_name, error) 异步方法", + "tags": [ + "PipelineStateRedis", + "fail_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.get_execution", + "type": "function", + "name": "get_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.get_execution(execution_id) 异步方法", + "tags": [ + "PipelineStateRedis", + "get_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.list_executions", + "type": "function", + "name": "list_executions", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.list_executions(status, limit, offset) 异步方法", + "tags": [ + "PipelineStateRedis", + "list_executions" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.get_step_history", + "type": "function", + "name": "get_step_history", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.get_step_history(execution_id) 异步方法", + "tags": [ + "PipelineStateRedis", + "get_step_history" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.health_check() 异步方法", + "tags": [ + "PipelineStateRedis", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateRedis.using_fallback", + "type": "function", + "name": "using_fallback", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateRedis.using_fallback() 方法", + "tags": [ + "PipelineStateRedis", + "using_fallback" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStatePG", + "type": "class", + "name": "PipelineStatePG", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PostgreSQL cold persistence for pipeline execution records.", + "tags": [ + "PipelineStatePG" + ], + "complexity": "moderate" + }, + { + "id": "func:PipelineStatePG.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStatePG.__init__(session_factory) 方法", + "tags": [ + "PipelineStatePG", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStatePG.enabled", + "type": "function", + "name": "enabled", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStatePG.enabled() 方法", + "tags": [ + "PipelineStatePG", + "enabled" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStatePG.persist_execution", + "type": "function", + "name": "persist_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStatePG.persist_execution(state) 异步方法", + "tags": [ + "PipelineStatePG", + "persist_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStatePG.persist_step_history", + "type": "function", + "name": "persist_step_history", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStatePG.persist_step_history(execution_id, steps) 异步方法", + "tags": [ + "PipelineStatePG", + "persist_step_history" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStatePG.query_executions", + "type": "function", + "name": "query_executions", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStatePG.query_executions(pipeline_name, status, limit, offset) 异步方法", + "tags": [ + "PipelineStatePG", + "query_executions" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStatePG.get_execution", + "type": "function", + "name": "get_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStatePG.get_execution(execution_id) 异步方法", + "tags": [ + "PipelineStatePG", + "get_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStatePG._model_to_dict", + "type": "function", + "name": "_model_to_dict", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStatePG._model_to_dict(model) 方法", + "tags": [ + "PipelineStatePG", + "_model_to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStateManager", + "type": "class", + "name": "PipelineStateManager", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "Unified pipeline state manager — Redis hot + PG cold.", + "tags": [ + "PipelineStateManager" + ], + "complexity": "complex" + }, + { + "id": "func:PipelineStateManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.__init__(redis_url, session_factory) 方法", + "tags": [ + "PipelineStateManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.hot_store", + "type": "function", + "name": "hot_store", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.hot_store() 方法", + "tags": [ + "PipelineStateManager", + "hot_store" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.cold_store", + "type": "function", + "name": "cold_store", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.cold_store() 方法", + "tags": [ + "PipelineStateManager", + "cold_store" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.create_execution", + "type": "function", + "name": "create_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.create_execution(pipeline_name, steps, input_data, tenant_id) 异步方法", + "tags": [ + "PipelineStateManager", + "create_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.update_step", + "type": "function", + "name": "update_step", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.update_step(execution_id, step_name, status, output, error, duration_ms) 异步方法", + "tags": [ + "PipelineStateManager", + "update_step" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.complete_execution", + "type": "function", + "name": "complete_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.complete_execution(execution_id, final_output) 异步方法", + "tags": [ + "PipelineStateManager", + "complete_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.fail_execution", + "type": "function", + "name": "fail_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.fail_execution(execution_id, step_name, error) 异步方法", + "tags": [ + "PipelineStateManager", + "fail_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.get_execution", + "type": "function", + "name": "get_execution", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.get_execution(execution_id) 异步方法", + "tags": [ + "PipelineStateManager", + "get_execution" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.list_executions", + "type": "function", + "name": "list_executions", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.list_executions(status, limit, offset) 异步方法", + "tags": [ + "PipelineStateManager", + "list_executions" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.get_step_history", + "type": "function", + "name": "get_step_history", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.get_step_history(execution_id) 异步方法", + "tags": [ + "PipelineStateManager", + "get_step_history" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineStateManager.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/orchestrator/pipeline_state.py", + "layer": "service", + "summary": "PipelineStateManager.health_check() 异步方法", + "tags": [ + "PipelineStateManager", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineReflector", + "type": "class", + "name": "PipelineReflector", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "分析 Pipeline 执行失败原因,生成结构化反思报告。", + "tags": [ + "PipelineReflector" + ], + "complexity": "moderate" + }, + { + "id": "func:PipelineReflector.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector.__init__(llm_gateway) 方法", + "tags": [ + "PipelineReflector", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReflector.reflect", + "type": "function", + "name": "reflect", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector.reflect(pipeline, result, reflection_number) 异步方法", + "tags": [ + "PipelineReflector", + "reflect" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReflector._find_failure", + "type": "function", + "name": "_find_failure", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector._find_failure(result) 方法", + "tags": [ + "PipelineReflector", + "_find_failure" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReflector._collect_completed_outputs", + "type": "function", + "name": "_collect_completed_outputs", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector._collect_completed_outputs(result) 方法", + "tags": [ + "PipelineReflector", + "_collect_completed_outputs" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReflector._llm_reflect", + "type": "function", + "name": "_llm_reflect", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector._llm_reflect(pipeline, failed_stage, error_message, completed_outputs, reflection_number) 异步方法", + "tags": [ + "PipelineReflector", + "_llm_reflect" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReflector._build_reflection_prompt", + "type": "function", + "name": "_build_reflection_prompt", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector._build_reflection_prompt(pipeline, failed_stage, error_message, completed_outputs, reflection_number) 方法", + "tags": [ + "PipelineReflector", + "_build_reflection_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReflector._parse_reflection_response", + "type": "function", + "name": "_parse_reflection_response", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector._parse_reflection_response(content, failed_stage, reflection_number) 方法", + "tags": [ + "PipelineReflector", + "_parse_reflection_response" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReflector._rule_based_reflect", + "type": "function", + "name": "_rule_based_reflect", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReflector._rule_based_reflect(failed_stage, error_message, reflection_number) 方法", + "tags": [ + "PipelineReflector", + "_rule_based_reflect" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineReplanner", + "type": "class", + "name": "PipelineReplanner", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "基于反思报告生成修正后的 Pipeline。", + "tags": [ + "PipelineReplanner" + ], + "complexity": "moderate" + }, + { + "id": "func:PipelineReplanner.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReplanner.__init__(llm_gateway) 方法", + "tags": [ + "PipelineReplanner", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReplanner.replan", + "type": "function", + "name": "replan", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReplanner.replan(pipeline, result, report) 异步方法", + "tags": [ + "PipelineReplanner", + "replan" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReplanner._llm_replan", + "type": "function", + "name": "_llm_replan", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReplanner._llm_replan(pipeline, result, report) 异步方法", + "tags": [ + "PipelineReplanner", + "_llm_replan" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReplanner._parse_pipeline_response", + "type": "function", + "name": "_parse_pipeline_response", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReplanner._parse_pipeline_response(content, original) 方法", + "tags": [ + "PipelineReplanner", + "_parse_pipeline_response" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReplanner._rule_based_replan", + "type": "function", + "name": "_rule_based_replan", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReplanner._rule_based_replan(pipeline, result, report) 方法", + "tags": [ + "PipelineReplanner", + "_rule_based_replan" + ], + "complexity": "simple" + }, + { + "id": "func:PipelineReplanner._adjust_failed_stage", + "type": "function", + "name": "_adjust_failed_stage", + "filePath": "src/agentkit/orchestrator/reflection.py", + "layer": "service", + "summary": "PipelineReplanner._adjust_failed_stage(stage, report) 方法", + "tags": [ + "PipelineReplanner", + "_adjust_failed_stage" + ], + "complexity": "simple" + }, + { + "id": "class:StepRetryPolicy", + "type": "class", + "name": "StepRetryPolicy", + "filePath": "src/agentkit/orchestrator/retry.py", + "layer": "service", + "summary": "Retry policy for pipeline steps", + "tags": [ + "StepRetryPolicy" + ], + "complexity": "simple" + }, + { + "id": "func:StepRetryPolicy.calculate_delay", + "type": "function", + "name": "calculate_delay", + "filePath": "src/agentkit/orchestrator/retry.py", + "layer": "service", + "summary": "StepRetryPolicy.calculate_delay(attempt) 方法", + "tags": [ + "StepRetryPolicy", + "calculate_delay" + ], + "complexity": "simple" + }, + { + "id": "class:WorkflowStage", + "type": "class", + "name": "WorkflowStage", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "A workflow stage extending PipelineStage with type and config.", + "tags": [ + "WorkflowStage" + ], + "complexity": "simple" + }, + { + "id": "class:WorkflowDefinition", + "type": "class", + "name": "WorkflowDefinition", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "Workflow definition extending Pipeline with workflow-specific fields.", + "tags": [ + "WorkflowDefinition" + ], + "complexity": "simple" + }, + { + "id": "class:WorkflowExecution", + "type": "class", + "name": "WorkflowExecution", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "Runtime state of a workflow execution.", + "tags": [ + "WorkflowExecution" + ], + "complexity": "simple" + }, + { + "id": "class:WorkflowSummary", + "type": "class", + "name": "WorkflowSummary", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "Summary for listing workflows.", + "tags": [ + "WorkflowSummary" + ], + "complexity": "simple" + }, + { + "id": "class:CreateWorkflowRequest", + "type": "class", + "name": "CreateWorkflowRequest", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "Request body for creating/updating a workflow.", + "tags": [ + "CreateWorkflowRequest" + ], + "complexity": "simple" + }, + { + "id": "class:ExecuteWorkflowRequest", + "type": "class", + "name": "ExecuteWorkflowRequest", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "Request body for executing a workflow.", + "tags": [ + "ExecuteWorkflowRequest" + ], + "complexity": "simple" + }, + { + "id": "class:ApproveRequest", + "type": "class", + "name": "ApproveRequest", + "filePath": "src/agentkit/orchestrator/workflow_schema.py", + "layer": "service", + "summary": "Request body for approving a paused approval node.", + "tags": [ + "ApproveRequest" + ], + "complexity": "simple" + }, + { + "id": "class:AgentProfile", + "type": "class", + "name": "AgentProfile", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "Agent 档案 - 描述组织中一个 Agent 的能力与状态", + "tags": [ + "AgentProfile" + ], + "complexity": "simple" + }, + { + "id": "class:OrganizationContext", + "type": "class", + "name": "OrganizationContext", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "组织上下文 - 管理 Agent 档案与能力矩阵,支持基于能力的 Agent 发现", + "tags": [ + "OrganizationContext" + ], + "complexity": "complex" + }, + { + "id": "func:OrganizationContext.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.__init__() 方法", + "tags": [ + "OrganizationContext", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.register_agent", + "type": "function", + "name": "register_agent", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.register_agent(profile) 方法", + "tags": [ + "OrganizationContext", + "register_agent" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.unregister_agent", + "type": "function", + "name": "unregister_agent", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.unregister_agent(name) 方法", + "tags": [ + "OrganizationContext", + "unregister_agent" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.get_agent_profile", + "type": "function", + "name": "get_agent_profile", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.get_agent_profile(name) 方法", + "tags": [ + "OrganizationContext", + "get_agent_profile" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.list_agents", + "type": "function", + "name": "list_agents", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.list_agents() 方法", + "tags": [ + "OrganizationContext", + "list_agents" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.find_best_agent", + "type": "function", + "name": "find_best_agent", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.find_best_agent(required_capabilities, exclude) 方法", + "tags": [ + "OrganizationContext", + "find_best_agent" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.update_load", + "type": "function", + "name": "update_load", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.update_load(name, delta) 方法", + "tags": [ + "OrganizationContext", + "update_load" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.set_availability", + "type": "function", + "name": "set_availability", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.set_availability(name, available) 方法", + "tags": [ + "OrganizationContext", + "set_availability" + ], + "complexity": "simple" + }, + { + "id": "func:OrganizationContext.from_agent_pool", + "type": "function", + "name": "from_agent_pool", + "filePath": "src/agentkit/org/context.py", + "layer": "unknown", + "summary": "OrganizationContext.from_agent_pool(cls, agent_pool, skill_registry) 方法", + "tags": [ + "OrganizationContext", + "from_agent_pool" + ], + "complexity": "simple" + }, + { + "id": "class:AgentDiscovery", + "type": "class", + "name": "AgentDiscovery", + "filePath": "src/agentkit/org/discovery.py", + "layer": "unknown", + "summary": "Agent 发现 - 提供多种维度的 Agent 查询与推荐", + "tags": [ + "AgentDiscovery" + ], + "complexity": "moderate" + }, + { + "id": "func:AgentDiscovery.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/org/discovery.py", + "layer": "unknown", + "summary": "AgentDiscovery.__init__(org_context) 方法", + "tags": [ + "AgentDiscovery", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AgentDiscovery.discover_by_capability", + "type": "function", + "name": "discover_by_capability", + "filePath": "src/agentkit/org/discovery.py", + "layer": "unknown", + "summary": "AgentDiscovery.discover_by_capability(required_capabilities) 方法", + "tags": [ + "AgentDiscovery", + "discover_by_capability" + ], + "complexity": "simple" + }, + { + "id": "func:AgentDiscovery.discover_by_execution_mode", + "type": "function", + "name": "discover_by_execution_mode", + "filePath": "src/agentkit/org/discovery.py", + "layer": "unknown", + "summary": "AgentDiscovery.discover_by_execution_mode(mode) 方法", + "tags": [ + "AgentDiscovery", + "discover_by_execution_mode" + ], + "complexity": "simple" + }, + { + "id": "func:AgentDiscovery.discover_available", + "type": "function", + "name": "discover_available", + "filePath": "src/agentkit/org/discovery.py", + "layer": "unknown", + "summary": "AgentDiscovery.discover_available() 方法", + "tags": [ + "AgentDiscovery", + "discover_available" + ], + "complexity": "simple" + }, + { + "id": "func:AgentDiscovery.recommend_agent", + "type": "function", + "name": "recommend_agent", + "filePath": "src/agentkit/org/discovery.py", + "layer": "unknown", + "summary": "AgentDiscovery.recommend_agent(required_capabilities, preferred_mode) 方法", + "tags": [ + "AgentDiscovery", + "recommend_agent" + ], + "complexity": "simple" + }, + { + "id": "class:PromptSection", + "type": "class", + "name": "PromptSection", + "filePath": "src/agentkit/prompts/section.py", + "layer": "utility", + "summary": "Prompt 段落定义", + "tags": [ + "PromptSection" + ], + "complexity": "simple" + }, + { + "id": "func:PromptSection.render", + "type": "function", + "name": "render", + "filePath": "src/agentkit/prompts/section.py", + "layer": "utility", + "summary": "PromptSection.render(variables) 方法", + "tags": [ + "PromptSection", + "render" + ], + "complexity": "simple" + }, + { + "id": "class:PromptTemplate", + "type": "class", + "name": "PromptTemplate", + "filePath": "src/agentkit/prompts/template.py", + "layer": "utility", + "summary": "Prompt 模板", + "tags": [ + "PromptTemplate" + ], + "complexity": "moderate" + }, + { + "id": "func:PromptTemplate.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/prompts/template.py", + "layer": "utility", + "summary": "PromptTemplate.__init__(sections, name, version) 方法", + "tags": [ + "PromptTemplate", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PromptTemplate.render", + "type": "function", + "name": "render", + "filePath": "src/agentkit/prompts/template.py", + "layer": "utility", + "summary": "PromptTemplate.render(variables, context_budget) 方法", + "tags": [ + "PromptTemplate", + "render" + ], + "complexity": "simple" + }, + { + "id": "func:PromptTemplate.sections", + "type": "function", + "name": "sections", + "filePath": "src/agentkit/prompts/template.py", + "layer": "utility", + "summary": "PromptTemplate.sections() 方法", + "tags": [ + "PromptTemplate", + "sections" + ], + "complexity": "simple" + }, + { + "id": "func:PromptTemplate.render_cached", + "type": "function", + "name": "render_cached", + "filePath": "src/agentkit/prompts/template.py", + "layer": "utility", + "summary": "PromptTemplate.render_cached(variables) 方法", + "tags": [ + "PromptTemplate", + "render_cached" + ], + "complexity": "simple" + }, + { + "id": "func:PromptTemplate.clear_cache", + "type": "function", + "name": "clear_cache", + "filePath": "src/agentkit/prompts/template.py", + "layer": "utility", + "summary": "PromptTemplate.clear_cache() 方法", + "tags": [ + "PromptTemplate", + "clear_cache" + ], + "complexity": "simple" + }, + { + "id": "class:AlignmentConfig", + "type": "class", + "name": "AlignmentConfig", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "对齐守卫配置", + "tags": [ + "AlignmentConfig" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentConfig.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentConfig.from_dict(cls, data) 方法", + "tags": [ + "AlignmentConfig", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:AlignmentCheckResult", + "type": "class", + "name": "AlignmentCheckResult", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "对齐检查结果", + "tags": [ + "AlignmentCheckResult" + ], + "complexity": "simple" + }, + { + "id": "class:CascadeAlert", + "type": "class", + "name": "CascadeAlert", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "级联故障告警", + "tags": [ + "CascadeAlert" + ], + "complexity": "simple" + }, + { + "id": "class:ConstraintInjector", + "type": "class", + "name": "ConstraintInjector", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "将全局约束注入到任务 input_data 中", + "tags": [ + "ConstraintInjector" + ], + "complexity": "simple" + }, + { + "id": "func:ConstraintInjector.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "ConstraintInjector.__init__(config) 方法", + "tags": [ + "ConstraintInjector", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ConstraintInjector.inject", + "type": "function", + "name": "inject", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "ConstraintInjector.inject(input_data) 方法", + "tags": [ + "ConstraintInjector", + "inject" + ], + "complexity": "simple" + }, + { + "id": "class:AlignmentGuard", + "type": "class", + "name": "AlignmentGuard", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "对齐守卫 — 扩展 QualityGate,增加约束注入和级联检测", + "tags": [ + "AlignmentGuard" + ], + "complexity": "complex" + }, + { + "id": "func:AlignmentGuard.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard.__init__(config, llm_gateway) 方法", + "tags": [ + "AlignmentGuard", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard.inject_constraints", + "type": "function", + "name": "inject_constraints", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard.inject_constraints(input_data) 方法", + "tags": [ + "AlignmentGuard", + "inject_constraints" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard.check_output", + "type": "function", + "name": "check_output", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard.check_output(output, constraints) 异步方法", + "tags": [ + "AlignmentGuard", + "check_output" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard._rule_check", + "type": "function", + "name": "_rule_check", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard._rule_check(output, constraints) 方法", + "tags": [ + "AlignmentGuard", + "_rule_check" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard._is_positive_mention", + "type": "function", + "name": "_is_positive_mention", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard._is_positive_mention(content, keyword) 方法", + "tags": [ + "AlignmentGuard", + "_is_positive_mention" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard._extract_text", + "type": "function", + "name": "_extract_text", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard._extract_text(output) 方法", + "tags": [ + "AlignmentGuard", + "_extract_text" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard._llm_check", + "type": "function", + "name": "_llm_check", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard._llm_check(output, constraints) 异步方法", + "tags": [ + "AlignmentGuard", + "_llm_check" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard.record_interaction", + "type": "function", + "name": "record_interaction", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard.record_interaction(session_id) 方法", + "tags": [ + "AlignmentGuard", + "record_interaction" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard.record_loop_depth", + "type": "function", + "name": "record_loop_depth", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard.record_loop_depth(session_id, depth) 方法", + "tags": [ + "AlignmentGuard", + "record_loop_depth" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard.reset_session", + "type": "function", + "name": "reset_session", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard.reset_session(session_id) 方法", + "tags": [ + "AlignmentGuard", + "reset_session" + ], + "complexity": "simple" + }, + { + "id": "func:AlignmentGuard.get_interaction_count", + "type": "function", + "name": "get_interaction_count", + "filePath": "src/agentkit/quality/alignment.py", + "layer": "utility", + "summary": "AlignmentGuard.get_interaction_count(session_id) 方法", + "tags": [ + "AlignmentGuard", + "get_interaction_count" + ], + "complexity": "simple" + }, + { + "id": "class:CascadeAlert", + "type": "class", + "name": "CascadeAlert", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "级联故障告警", + "tags": [ + "CascadeAlert" + ], + "complexity": "simple" + }, + { + "id": "class:CascadeDetector", + "type": "class", + "name": "CascadeDetector", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "检测多 agent 交互中的级联故障", + "tags": [ + "CascadeDetector" + ], + "complexity": "moderate" + }, + { + "id": "func:CascadeDetector.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "CascadeDetector.__init__(max_interactions, max_depth) 方法", + "tags": [ + "CascadeDetector", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:CascadeDetector.check_interaction", + "type": "function", + "name": "check_interaction", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "CascadeDetector.check_interaction(session_id) 方法", + "tags": [ + "CascadeDetector", + "check_interaction" + ], + "complexity": "simple" + }, + { + "id": "func:CascadeDetector.check_depth", + "type": "function", + "name": "check_depth", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "CascadeDetector.check_depth(session_id, depth) 方法", + "tags": [ + "CascadeDetector", + "check_depth" + ], + "complexity": "simple" + }, + { + "id": "func:CascadeDetector.reset", + "type": "function", + "name": "reset", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "CascadeDetector.reset(session_id) 方法", + "tags": [ + "CascadeDetector", + "reset" + ], + "complexity": "simple" + }, + { + "id": "func:CascadeDetector.get_stats", + "type": "function", + "name": "get_stats", + "filePath": "src/agentkit/quality/cascade_detector.py", + "layer": "utility", + "summary": "CascadeDetector.get_stats(session_id) 方法", + "tags": [ + "CascadeDetector", + "get_stats" + ], + "complexity": "simple" + }, + { + "id": "class:QualityCheck", + "type": "class", + "name": "QualityCheck", + "filePath": "src/agentkit/quality/gate.py", + "layer": "utility", + "summary": "单条质量检查结果", + "tags": [ + "QualityCheck" + ], + "complexity": "simple" + }, + { + "id": "class:QualityResult", + "type": "class", + "name": "QualityResult", + "filePath": "src/agentkit/quality/gate.py", + "layer": "utility", + "summary": "质量检查汇总结果", + "tags": [ + "QualityResult" + ], + "complexity": "simple" + }, + { + "id": "class:QualityGate", + "type": "class", + "name": "QualityGate", + "filePath": "src/agentkit/quality/gate.py", + "layer": "utility", + "summary": "产出质量管理 — 多维度质量检查", + "tags": [ + "QualityGate" + ], + "complexity": "simple" + }, + { + "id": "func:QualityGate.validate", + "type": "function", + "name": "validate", + "filePath": "src/agentkit/quality/gate.py", + "layer": "utility", + "summary": "QualityGate.validate(output, skill) 异步方法", + "tags": [ + "QualityGate", + "validate" + ], + "complexity": "simple" + }, + { + "id": "func:QualityGate._import_validator", + "type": "function", + "name": "_import_validator", + "filePath": "src/agentkit/quality/gate.py", + "layer": "utility", + "summary": "QualityGate._import_validator(dotted_path) 方法", + "tags": [ + "QualityGate", + "_import_validator" + ], + "complexity": "simple" + }, + { + "id": "class:OutputMetadata", + "type": "class", + "name": "OutputMetadata", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "输出元数据", + "tags": [ + "OutputMetadata" + ], + "complexity": "simple" + }, + { + "id": "class:StandardOutput", + "type": "class", + "name": "StandardOutput", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "标准化输出", + "tags": [ + "StandardOutput" + ], + "complexity": "simple" + }, + { + "id": "class:OutputStandardizer", + "type": "class", + "name": "OutputStandardizer", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "标准化输出 — Schema 验证 + 类型归一化 + 元数据", + "tags": [ + "OutputStandardizer" + ], + "complexity": "moderate" + }, + { + "id": "func:OutputStandardizer.standardize", + "type": "function", + "name": "standardize", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "OutputStandardizer.standardize(raw_output, skill, quality_result) 异步方法", + "tags": [ + "OutputStandardizer", + "standardize" + ], + "complexity": "simple" + }, + { + "id": "func:OutputStandardizer._validate_schema", + "type": "function", + "name": "_validate_schema", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "OutputStandardizer._validate_schema(output, schema) 方法", + "tags": [ + "OutputStandardizer", + "_validate_schema" + ], + "complexity": "simple" + }, + { + "id": "func:OutputStandardizer._normalize_types", + "type": "function", + "name": "_normalize_types", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "OutputStandardizer._normalize_types(output, schema) 方法", + "tags": [ + "OutputStandardizer", + "_normalize_types" + ], + "complexity": "simple" + }, + { + "id": "func:OutputStandardizer._calculate_quality_score", + "type": "function", + "name": "_calculate_quality_score", + "filePath": "src/agentkit/quality/output.py", + "layer": "utility", + "summary": "OutputStandardizer._calculate_quality_score(quality_result) 方法", + "tags": [ + "OutputStandardizer", + "_calculate_quality_score" + ], + "complexity": "simple" + }, + { + "id": "class:RoutingResult", + "type": "class", + "name": "RoutingResult", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "路由结果", + "tags": [ + "RoutingResult" + ], + "complexity": "simple" + }, + { + "id": "class:IntentRouter", + "type": "class", + "name": "IntentRouter", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "两级意图路由:关键词匹配 → LLM 分类", + "tags": [ + "IntentRouter" + ], + "complexity": "moderate" + }, + { + "id": "func:IntentRouter.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter.__init__(llm_gateway, model) 方法", + "tags": [ + "IntentRouter", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:IntentRouter.route", + "type": "function", + "name": "route", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter.route(input_data, skills) 异步方法", + "tags": [ + "IntentRouter", + "route" + ], + "complexity": "simple" + }, + { + "id": "func:IntentRouter._match_keywords", + "type": "function", + "name": "_match_keywords", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter._match_keywords(input_data, skills) 方法", + "tags": [ + "IntentRouter", + "_match_keywords" + ], + "complexity": "simple" + }, + { + "id": "func:IntentRouter._classify_with_llm", + "type": "function", + "name": "_classify_with_llm", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter._classify_with_llm(input_data, skills) 异步方法", + "tags": [ + "IntentRouter", + "_classify_with_llm" + ], + "complexity": "simple" + }, + { + "id": "func:IntentRouter._build_classification_prompt", + "type": "function", + "name": "_build_classification_prompt", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter._build_classification_prompt(input_data, skills) 方法", + "tags": [ + "IntentRouter", + "_build_classification_prompt" + ], + "complexity": "simple" + }, + { + "id": "func:IntentRouter._parse_llm_response", + "type": "function", + "name": "_parse_llm_response", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter._parse_llm_response(content, skills) 方法", + "tags": [ + "IntentRouter", + "_parse_llm_response" + ], + "complexity": "simple" + }, + { + "id": "func:IntentRouter._extract_skill_name_from_text", + "type": "function", + "name": "_extract_skill_name_from_text", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter._extract_skill_name_from_text(text, valid_names) 方法", + "tags": [ + "IntentRouter", + "_extract_skill_name_from_text" + ], + "complexity": "simple" + }, + { + "id": "func:IntentRouter._extract_string_values", + "type": "function", + "name": "_extract_string_values", + "filePath": "src/agentkit/router/intent.py", + "layer": "service", + "summary": "IntentRouter._extract_string_values(data) 方法", + "tags": [ + "IntentRouter", + "_extract_string_values" + ], + "complexity": "simple" + }, + { + "id": "class:AgentKitClient", + "type": "class", + "name": "AgentKitClient", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "Python SDK for AgentKit Server", + "tags": [ + "AgentKitClient" + ], + "complexity": "complex" + }, + { + "id": "func:AgentKitClient.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.__init__(base_url) 方法", + "tags": [ + "AgentKitClient", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.create_agent", + "type": "function", + "name": "create_agent", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.create_agent(skill_name, config) 异步方法", + "tags": [ + "AgentKitClient", + "create_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.list_agents", + "type": "function", + "name": "list_agents", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.list_agents() 异步方法", + "tags": [ + "AgentKitClient", + "list_agents" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.get_agent", + "type": "function", + "name": "get_agent", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.get_agent(name) 异步方法", + "tags": [ + "AgentKitClient", + "get_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.delete_agent", + "type": "function", + "name": "delete_agent", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.delete_agent(name) 异步方法", + "tags": [ + "AgentKitClient", + "delete_agent" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.submit_task", + "type": "function", + "name": "submit_task", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.submit_task(input_data, skill_name, agent_name) 异步方法", + "tags": [ + "AgentKitClient", + "submit_task" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.register_skill", + "type": "function", + "name": "register_skill", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.register_skill(config) 异步方法", + "tags": [ + "AgentKitClient", + "register_skill" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.list_skills", + "type": "function", + "name": "list_skills", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.list_skills() 异步方法", + "tags": [ + "AgentKitClient", + "list_skills" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.get_usage", + "type": "function", + "name": "get_usage", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.get_usage(agent_name) 异步方法", + "tags": [ + "AgentKitClient", + "get_usage" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.health", + "type": "function", + "name": "health", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.health() 异步方法", + "tags": [ + "AgentKitClient", + "health" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.submit_task_async", + "type": "function", + "name": "submit_task_async", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.submit_task_async(input_data, skill_name, agent_name) 异步方法", + "tags": [ + "AgentKitClient", + "submit_task_async" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.get_task_status", + "type": "function", + "name": "get_task_status", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.get_task_status(task_id) 异步方法", + "tags": [ + "AgentKitClient", + "get_task_status" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.cancel_task", + "type": "function", + "name": "cancel_task", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.cancel_task(task_id) 异步方法", + "tags": [ + "AgentKitClient", + "cancel_task" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.list_tasks", + "type": "function", + "name": "list_tasks", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.list_tasks(status, limit) 异步方法", + "tags": [ + "AgentKitClient", + "list_tasks" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.stream_task", + "type": "function", + "name": "stream_task", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.stream_task(input_data, skill_name, agent_name) 异步方法", + "tags": [ + "AgentKitClient", + "stream_task" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.close() 异步方法", + "tags": [ + "AgentKitClient", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.__aenter__", + "type": "function", + "name": "__aenter__", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.__aenter__() 异步方法", + "tags": [ + "AgentKitClient", + "__aenter__" + ], + "complexity": "simple" + }, + { + "id": "func:AgentKitClient.__aexit__", + "type": "function", + "name": "__aexit__", + "filePath": "src/agentkit/server/client.py", + "layer": "api", + "summary": "AgentKitClient.__aexit__() 异步方法", + "tags": [ + "AgentKitClient", + "__aexit__" + ], + "complexity": "simple" + }, + { + "id": "class:ClientConfig", + "type": "class", + "name": "ClientConfig", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "Manages client-specific configuration overrides", + "tags": [ + "ClientConfig" + ], + "complexity": "complex" + }, + { + "id": "func:ClientConfig.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig.__init__(config_dir) 方法", + "tags": [ + "ClientConfig", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig.clients", + "type": "function", + "name": "clients", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig.clients() 方法", + "tags": [ + "ClientConfig", + "clients" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig._load_clients", + "type": "function", + "name": "_load_clients", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig._load_clients() 方法", + "tags": [ + "ClientConfig", + "_load_clients" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig.reload", + "type": "function", + "name": "reload", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig.reload() 方法", + "tags": [ + "ClientConfig", + "reload" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig.identify_client", + "type": "function", + "name": "identify_client", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig.identify_client(api_key) 方法", + "tags": [ + "ClientConfig", + "identify_client" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig.get_client_config", + "type": "function", + "name": "get_client_config", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig.get_client_config(client_name) 方法", + "tags": [ + "ClientConfig", + "get_client_config" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig.get_skills_dir", + "type": "function", + "name": "get_skills_dir", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig.get_skills_dir(client_name) 方法", + "tags": [ + "ClientConfig", + "get_skills_dir" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig._load_default_config", + "type": "function", + "name": "_load_default_config", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig._load_default_config() 方法", + "tags": [ + "ClientConfig", + "_load_default_config" + ], + "complexity": "simple" + }, + { + "id": "func:ClientConfig.validate_api_key", + "type": "function", + "name": "validate_api_key", + "filePath": "src/agentkit/server/client_config.py", + "layer": "api", + "summary": "ClientConfig.validate_api_key(api_key) 方法", + "tags": [ + "ClientConfig", + "validate_api_key" + ], + "complexity": "simple" + }, + { + "id": "class:MCPServerConfig", + "type": "class", + "name": "MCPServerConfig", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "Configuration for a single MCP Server connection", + "tags": [ + "MCPServerConfig" + ], + "complexity": "simple" + }, + { + "id": "func:MCPServerConfig.validate", + "type": "function", + "name": "validate", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "MCPServerConfig.validate() 方法", + "tags": [ + "MCPServerConfig", + "validate" + ], + "complexity": "simple" + }, + { + "id": "func:MCPServerConfig.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "MCPServerConfig.from_dict(cls, data) 方法", + "tags": [ + "MCPServerConfig", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:ServerConfig", + "type": "class", + "name": "ServerConfig", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "Server configuration loaded from agentkit.yaml", + "tags": [ + "ServerConfig" + ], + "complexity": "complex" + }, + { + "id": "func:ServerConfig.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.__init__(host, port, workers, api_key, rate_limit, llm_config, skill_paths, auto_discover_skills, log_level, log_format, task_store, cors_origins, memory, mcp_servers, telemetry, compression, session, bus, marketplace, alignment, router, on_change) 方法", + "tags": [ + "ServerConfig", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig.has_llm_provider", + "type": "function", + "name": "has_llm_provider", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.has_llm_provider() 方法", + "tags": [ + "ServerConfig", + "has_llm_provider" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig.from_yaml", + "type": "function", + "name": "from_yaml", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.from_yaml(cls, path) 方法", + "tags": [ + "ServerConfig", + "from_yaml" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.from_dict(cls, data) 方法", + "tags": [ + "ServerConfig", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig._build_llm_config", + "type": "function", + "name": "_build_llm_config", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig._build_llm_config(data) 方法", + "tags": [ + "ServerConfig", + "_build_llm_config" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig._build_mcp_configs", + "type": "function", + "name": "_build_mcp_configs", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig._build_mcp_configs(data) 方法", + "tags": [ + "ServerConfig", + "_build_mcp_configs" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig.load_skill_configs", + "type": "function", + "name": "load_skill_configs", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.load_skill_configs() 方法", + "tags": [ + "ServerConfig", + "load_skill_configs" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig.load_dotenv", + "type": "function", + "name": "load_dotenv", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.load_dotenv(dotenv_path) 方法", + "tags": [ + "ServerConfig", + "load_dotenv" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig.watch_config", + "type": "function", + "name": "watch_config", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.watch_config(config_path) 方法", + "tags": [ + "ServerConfig", + "watch_config" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig.stop_watching", + "type": "function", + "name": "stop_watching", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig.stop_watching() 方法", + "tags": [ + "ServerConfig", + "stop_watching" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig._watch_with_watchfiles", + "type": "function", + "name": "_watch_with_watchfiles", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig._watch_with_watchfiles(path) 异步方法", + "tags": [ + "ServerConfig", + "_watch_with_watchfiles" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig._poll_config_loop", + "type": "function", + "name": "_poll_config_loop", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig._poll_config_loop(path) 异步方法", + "tags": [ + "ServerConfig", + "_poll_config_loop" + ], + "complexity": "simple" + }, + { + "id": "func:ServerConfig._try_reload_config", + "type": "function", + "name": "_try_reload_config", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "ServerConfig._try_reload_config(path) 方法", + "tags": [ + "ServerConfig", + "_try_reload_config" + ], + "complexity": "simple" + }, + { + "id": "class:APIKeyAuthMiddleware", + "type": "class", + "name": "APIKeyAuthMiddleware", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "API Key authentication middleware.", + "tags": [ + "APIKeyAuthMiddleware" + ], + "complexity": "simple" + }, + { + "id": "func:APIKeyAuthMiddleware.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "APIKeyAuthMiddleware.__init__(app, api_key) 方法", + "tags": [ + "APIKeyAuthMiddleware", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:APIKeyAuthMiddleware.dispatch", + "type": "function", + "name": "dispatch", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "APIKeyAuthMiddleware.dispatch(request, call_next) 异步方法", + "tags": [ + "APIKeyAuthMiddleware", + "dispatch" + ], + "complexity": "simple" + }, + { + "id": "class:RateLimiter", + "type": "class", + "name": "RateLimiter", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "Fixed-window rate limiter.", + "tags": [ + "RateLimiter" + ], + "complexity": "simple" + }, + { + "id": "func:RateLimiter.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "RateLimiter.__init__(max_requests, window_seconds) 方法", + "tags": [ + "RateLimiter", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RateLimiter.is_allowed", + "type": "function", + "name": "is_allowed", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "RateLimiter.is_allowed(key) 方法", + "tags": [ + "RateLimiter", + "is_allowed" + ], + "complexity": "simple" + }, + { + "id": "func:RateLimiter.max_requests", + "type": "function", + "name": "max_requests", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "RateLimiter.max_requests() 方法", + "tags": [ + "RateLimiter", + "max_requests" + ], + "complexity": "simple" + }, + { + "id": "class:RateLimitMiddleware", + "type": "class", + "name": "RateLimitMiddleware", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "Rate limiting middleware.", + "tags": [ + "RateLimitMiddleware" + ], + "complexity": "simple" + }, + { + "id": "func:RateLimitMiddleware.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "RateLimitMiddleware.__init__(app, max_requests, window_seconds) 方法", + "tags": [ + "RateLimitMiddleware", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RateLimitMiddleware.dispatch", + "type": "function", + "name": "dispatch", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "RateLimitMiddleware.dispatch(request, call_next) 异步方法", + "tags": [ + "RateLimitMiddleware", + "dispatch" + ], + "complexity": "simple" + }, + { + "id": "class:CreateAgentRequest", + "type": "class", + "name": "CreateAgentRequest", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "CreateAgentRequest类,继承自BaseModel", + "tags": [ + "CreateAgentRequest" + ], + "complexity": "simple" + }, + { + "id": "class:CreateSessionRequest", + "type": "class", + "name": "CreateSessionRequest", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "CreateSessionRequest类,继承自BaseModel", + "tags": [ + "CreateSessionRequest" + ], + "complexity": "simple" + }, + { + "id": "class:SendMessageRequest", + "type": "class", + "name": "SendMessageRequest", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "SendMessageRequest类,继承自BaseModel", + "tags": [ + "SendMessageRequest" + ], + "complexity": "simple" + }, + { + "id": "class:SessionResponse", + "type": "class", + "name": "SessionResponse", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "SessionResponse类,继承自BaseModel", + "tags": [ + "SessionResponse" + ], + "complexity": "simple" + }, + { + "id": "class:MessageResponse", + "type": "class", + "name": "MessageResponse", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "MessageResponse类,继承自BaseModel", + "tags": [ + "MessageResponse" + ], + "complexity": "simple" + }, + { + "id": "class:ChatConnectionManager", + "type": "class", + "name": "ChatConnectionManager", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "Track active WebSocket connections per session_id.", + "tags": [ + "ChatConnectionManager" + ], + "complexity": "moderate" + }, + { + "id": "func:ChatConnectionManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "ChatConnectionManager.__init__() 方法", + "tags": [ + "ChatConnectionManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ChatConnectionManager.add", + "type": "function", + "name": "add", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "ChatConnectionManager.add(session_id, ws, pending) 方法", + "tags": [ + "ChatConnectionManager", + "add" + ], + "complexity": "simple" + }, + { + "id": "func:ChatConnectionManager.remove", + "type": "function", + "name": "remove", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "ChatConnectionManager.remove(session_id, ws) 方法", + "tags": [ + "ChatConnectionManager", + "remove" + ], + "complexity": "simple" + }, + { + "id": "func:ChatConnectionManager.get_connections", + "type": "function", + "name": "get_connections", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "ChatConnectionManager.get_connections(session_id) 方法", + "tags": [ + "ChatConnectionManager", + "get_connections" + ], + "complexity": "simple" + }, + { + "id": "func:ChatConnectionManager.send_json", + "type": "function", + "name": "send_json", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "ChatConnectionManager.send_json(session_id, message) 异步方法", + "tags": [ + "ChatConnectionManager", + "send_json" + ], + "complexity": "simple" + }, + { + "id": "class:TriggerEvolutionRequest", + "type": "class", + "name": "TriggerEvolutionRequest", + "filePath": "src/agentkit/server/routes/evolution.py", + "layer": "api", + "summary": "TriggerEvolutionRequest类,继承自BaseModel", + "tags": [ + "TriggerEvolutionRequest" + ], + "complexity": "simple" + }, + { + "id": "class:DashboardExperience", + "type": "class", + "name": "DashboardExperience", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "仪表盘展示用的经验记录", + "tags": [ + "DashboardExperience" + ], + "complexity": "simple" + }, + { + "id": "class:DashboardOptimization", + "type": "class", + "name": "DashboardOptimization", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "仪表盘展示用的路径优化记录", + "tags": [ + "DashboardOptimization" + ], + "complexity": "simple" + }, + { + "id": "class:RecordExperienceRequest", + "type": "class", + "name": "RecordExperienceRequest", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "记录经验请求体", + "tags": [ + "RecordExperienceRequest" + ], + "complexity": "simple" + }, + { + "id": "class:RecordOptimizationRequest", + "type": "class", + "name": "RecordOptimizationRequest", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "记录路径优化请求体", + "tags": [ + "RecordOptimizationRequest" + ], + "complexity": "simple" + }, + { + "id": "class:UsageRecordResponse", + "type": "class", + "name": "UsageRecordResponse", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "单条用量记录", + "tags": [ + "UsageRecordResponse" + ], + "complexity": "simple" + }, + { + "id": "class:UsageSummaryResponse", + "type": "class", + "name": "UsageSummaryResponse", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "用量汇总", + "tags": [ + "UsageSummaryResponse" + ], + "complexity": "simple" + }, + { + "id": "class:KnowledgeSource", + "type": "class", + "name": "KnowledgeSource", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSource类", + "tags": [ + "KnowledgeSource" + ], + "complexity": "simple" + }, + { + "id": "class:UploadedDocument", + "type": "class", + "name": "UploadedDocument", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "UploadedDocument类", + "tags": [ + "UploadedDocument" + ], + "complexity": "simple" + }, + { + "id": "class:KnowledgeSourceStore", + "type": "class", + "name": "KnowledgeSourceStore", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore类,包含方法: __init__, add_source, get_source, remove_source, list_sources 等9个方法", + "tags": [ + "KnowledgeSourceStore" + ], + "complexity": "complex" + }, + { + "id": "func:KnowledgeSourceStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.__init__(max_sources) 方法", + "tags": [ + "KnowledgeSourceStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.add_source", + "type": "function", + "name": "add_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.add_source(name, source_type, config) 方法", + "tags": [ + "KnowledgeSourceStore", + "add_source" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.get_source", + "type": "function", + "name": "get_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.get_source(source_id) 方法", + "tags": [ + "KnowledgeSourceStore", + "get_source" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.remove_source", + "type": "function", + "name": "remove_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.remove_source(source_id) 方法", + "tags": [ + "KnowledgeSourceStore", + "remove_source" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.list_sources() 方法", + "tags": [ + "KnowledgeSourceStore", + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.add_document", + "type": "function", + "name": "add_document", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.add_document(doc) 方法", + "tags": [ + "KnowledgeSourceStore", + "add_document" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.list_documents", + "type": "function", + "name": "list_documents", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.list_documents(source_id) 方法", + "tags": [ + "KnowledgeSourceStore", + "list_documents" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.delete_document", + "type": "function", + "name": "delete_document", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.delete_document(document_id) 方法", + "tags": [ + "KnowledgeSourceStore", + "delete_document" + ], + "complexity": "simple" + }, + { + "id": "func:KnowledgeSourceStore.update_source", + "type": "function", + "name": "update_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "KnowledgeSourceStore.update_source(source_id, data) 方法", + "tags": [ + "KnowledgeSourceStore", + "update_source" + ], + "complexity": "simple" + }, + { + "id": "class:AddSourceRequest", + "type": "class", + "name": "AddSourceRequest", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "AddSourceRequest类,继承自BaseModel", + "tags": [ + "AddSourceRequest" + ], + "complexity": "simple" + }, + { + "id": "class:SearchRequest", + "type": "class", + "name": "SearchRequest", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "SearchRequest类,继承自BaseModel", + "tags": [ + "SearchRequest" + ], + "complexity": "simple" + }, + { + "id": "class:SearchResult", + "type": "class", + "name": "SearchResult", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "SearchResult类,继承自BaseModel", + "tags": [ + "SearchResult" + ], + "complexity": "simple" + }, + { + "id": "class:UpdateSourceRequest", + "type": "class", + "name": "UpdateSourceRequest", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "UpdateSourceRequest类,继承自BaseModel", + "tags": [ + "UpdateSourceRequest" + ], + "complexity": "simple" + }, + { + "id": "class:ChatMessage", + "type": "class", + "name": "ChatMessage", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ChatMessage类", + "tags": [ + "ChatMessage" + ], + "complexity": "simple" + }, + { + "id": "class:Conversation", + "type": "class", + "name": "Conversation", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "Conversation类", + "tags": [ + "Conversation" + ], + "complexity": "simple" + }, + { + "id": "class:ConversationStore", + "type": "class", + "name": "ConversationStore", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ConversationStore类,包含方法: __init__, get_or_create, add_message, get_history, list_conversations", + "tags": [ + "ConversationStore" + ], + "complexity": "moderate" + }, + { + "id": "func:ConversationStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ConversationStore.__init__(max_conversations) 方法", + "tags": [ + "ConversationStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ConversationStore.get_or_create", + "type": "function", + "name": "get_or_create", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ConversationStore.get_or_create(conversation_id) 方法", + "tags": [ + "ConversationStore", + "get_or_create" + ], + "complexity": "simple" + }, + { + "id": "func:ConversationStore.add_message", + "type": "function", + "name": "add_message", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ConversationStore.add_message(conversation_id, role, content, metadata) 方法", + "tags": [ + "ConversationStore", + "add_message" + ], + "complexity": "simple" + }, + { + "id": "func:ConversationStore.get_history", + "type": "function", + "name": "get_history", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ConversationStore.get_history(conversation_id, limit) 方法", + "tags": [ + "ConversationStore", + "get_history" + ], + "complexity": "simple" + }, + { + "id": "func:ConversationStore.list_conversations", + "type": "function", + "name": "list_conversations", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ConversationStore.list_conversations(limit) 方法", + "tags": [ + "ConversationStore", + "list_conversations" + ], + "complexity": "simple" + }, + { + "id": "class:ChatRequest", + "type": "class", + "name": "ChatRequest", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ChatRequest类,继承自BaseModel", + "tags": [ + "ChatRequest" + ], + "complexity": "simple" + }, + { + "id": "class:ChatResponse", + "type": "class", + "name": "ChatResponse", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "ChatResponse类,继承自BaseModel", + "tags": [ + "ChatResponse" + ], + "complexity": "simple" + }, + { + "id": "class:CapabilityInfo", + "type": "class", + "name": "CapabilityInfo", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "CapabilityInfo类,继承自BaseModel", + "tags": [ + "CapabilityInfo" + ], + "complexity": "simple" + }, + { + "id": "class:CapabilitiesResponse", + "type": "class", + "name": "CapabilitiesResponse", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "CapabilitiesResponse类,继承自BaseModel", + "tags": [ + "CapabilitiesResponse" + ], + "complexity": "simple" + }, + { + "id": "class:LlmProviderResponse", + "type": "class", + "name": "LlmProviderResponse", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "LlmProviderResponse类,继承自BaseModel", + "tags": [ + "LlmProviderResponse" + ], + "complexity": "simple" + }, + { + "id": "class:LlmConfigResponse", + "type": "class", + "name": "LlmConfigResponse", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "LlmConfigResponse类,继承自BaseModel", + "tags": [ + "LlmConfigResponse" + ], + "complexity": "simple" + }, + { + "id": "class:LlmProviderUpdate", + "type": "class", + "name": "LlmProviderUpdate", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "LlmProviderUpdate类,继承自BaseModel", + "tags": [ + "LlmProviderUpdate" + ], + "complexity": "simple" + }, + { + "id": "class:LlmConfigUpdate", + "type": "class", + "name": "LlmConfigUpdate", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "LlmConfigUpdate类,继承自BaseModel", + "tags": [ + "LlmConfigUpdate" + ], + "complexity": "simple" + }, + { + "id": "class:SkillsConfigResponse", + "type": "class", + "name": "SkillsConfigResponse", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "SkillsConfigResponse类,继承自BaseModel", + "tags": [ + "SkillsConfigResponse" + ], + "complexity": "simple" + }, + { + "id": "class:SkillsConfigUpdate", + "type": "class", + "name": "SkillsConfigUpdate", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "SkillsConfigUpdate类,继承自BaseModel", + "tags": [ + "SkillsConfigUpdate" + ], + "complexity": "simple" + }, + { + "id": "class:KbConfigResponse", + "type": "class", + "name": "KbConfigResponse", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "KbConfigResponse类,继承自BaseModel", + "tags": [ + "KbConfigResponse" + ], + "complexity": "simple" + }, + { + "id": "class:KbConfigUpdate", + "type": "class", + "name": "KbConfigUpdate", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "KbConfigUpdate类,继承自BaseModel", + "tags": [ + "KbConfigUpdate" + ], + "complexity": "simple" + }, + { + "id": "class:GeneralConfigResponse", + "type": "class", + "name": "GeneralConfigResponse", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "GeneralConfigResponse类,继承自BaseModel", + "tags": [ + "GeneralConfigResponse" + ], + "complexity": "simple" + }, + { + "id": "class:GeneralConfigUpdate", + "type": "class", + "name": "GeneralConfigUpdate", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "GeneralConfigUpdate类,继承自BaseModel", + "tags": [ + "GeneralConfigUpdate" + ], + "complexity": "simple" + }, + { + "id": "class:SkillInfo", + "type": "class", + "name": "SkillInfo", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "SkillInfo类,继承自BaseModel", + "tags": [ + "SkillInfo" + ], + "complexity": "simple" + }, + { + "id": "class:SkillDetail", + "type": "class", + "name": "SkillDetail", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "SkillDetail类,继承自BaseModel", + "tags": [ + "SkillDetail" + ], + "complexity": "simple" + }, + { + "id": "class:CapabilityInfo", + "type": "class", + "name": "CapabilityInfo", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "CapabilityInfo类,继承自BaseModel", + "tags": [ + "CapabilityInfo" + ], + "complexity": "simple" + }, + { + "id": "class:RegisterSkillRequest", + "type": "class", + "name": "RegisterSkillRequest", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "RegisterSkillRequest类,继承自BaseModel", + "tags": [ + "RegisterSkillRequest" + ], + "complexity": "simple" + }, + { + "id": "class:CreatePipelineRequest", + "type": "class", + "name": "CreatePipelineRequest", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "CreatePipelineRequest类,继承自BaseModel", + "tags": [ + "CreatePipelineRequest" + ], + "complexity": "simple" + }, + { + "id": "class:ExecutePipelineRequest", + "type": "class", + "name": "ExecutePipelineRequest", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "ExecutePipelineRequest类,继承自BaseModel", + "tags": [ + "ExecutePipelineRequest" + ], + "complexity": "simple" + }, + { + "id": "class:InstallSkillRequest", + "type": "class", + "name": "InstallSkillRequest", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "InstallSkillRequest类,继承自BaseModel", + "tags": [ + "InstallSkillRequest" + ], + "complexity": "simple" + }, + { + "id": "class:SubmitTaskRequest", + "type": "class", + "name": "SubmitTaskRequest", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "SubmitTaskRequest类,继承自BaseModel", + "tags": [ + "SubmitTaskRequest" + ], + "complexity": "simple" + }, + { + "id": "class:TerminalSessionState", + "type": "class", + "name": "TerminalSessionState", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "Per-session state for a terminal connection.", + "tags": [ + "TerminalSessionState" + ], + "complexity": "simple" + }, + { + "id": "class:ExecuteRequest", + "type": "class", + "name": "ExecuteRequest", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "ExecuteRequest类,继承自BaseModel", + "tags": [ + "ExecuteRequest" + ], + "complexity": "simple" + }, + { + "id": "class:ExecuteResponse", + "type": "class", + "name": "ExecuteResponse", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "ExecuteResponse类,继承自BaseModel", + "tags": [ + "ExecuteResponse" + ], + "complexity": "simple" + }, + { + "id": "class:SessionInfo", + "type": "class", + "name": "SessionInfo", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "SessionInfo类,继承自BaseModel", + "tags": [ + "SessionInfo" + ], + "complexity": "simple" + }, + { + "id": "class:HistoryResponse", + "type": "class", + "name": "HistoryResponse", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "HistoryResponse类,继承自BaseModel", + "tags": [ + "HistoryResponse" + ], + "complexity": "simple" + }, + { + "id": "class:WorkflowStore", + "type": "class", + "name": "WorkflowStore", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "In-memory workflow store with async-safe mutation methods.", + "tags": [ + "WorkflowStore" + ], + "complexity": "complex" + }, + { + "id": "func:WorkflowStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.__init__(max_workflows, max_executions) 方法", + "tags": [ + "WorkflowStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore._evict_execution", + "type": "function", + "name": "_evict_execution", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore._evict_execution(execution_id) 方法", + "tags": [ + "WorkflowStore", + "_evict_execution" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.save", + "type": "function", + "name": "save", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.save(workflow) 异步方法", + "tags": [ + "WorkflowStore", + "save" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.get(workflow_id) 方法", + "tags": [ + "WorkflowStore", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.list", + "type": "function", + "name": "list", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.list(limit) 方法", + "tags": [ + "WorkflowStore", + "list" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.delete", + "type": "function", + "name": "delete", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.delete(workflow_id) 异步方法", + "tags": [ + "WorkflowStore", + "delete" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.create_execution", + "type": "function", + "name": "create_execution", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.create_execution(workflow_id) 异步方法", + "tags": [ + "WorkflowStore", + "create_execution" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.get_execution", + "type": "function", + "name": "get_execution", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.get_execution(execution_id) 方法", + "tags": [ + "WorkflowStore", + "get_execution" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.update_execution", + "type": "function", + "name": "update_execution", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.update_execution(execution_id) 异步方法", + "tags": [ + "WorkflowStore", + "update_execution" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.get_execution_lock", + "type": "function", + "name": "get_execution_lock", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.get_execution_lock(execution_id) 方法", + "tags": [ + "WorkflowStore", + "get_execution_lock" + ], + "complexity": "simple" + }, + { + "id": "func:WorkflowStore.list_executions", + "type": "function", + "name": "list_executions", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "WorkflowStore.list_executions(workflow_id, limit, offset) 方法", + "tags": [ + "WorkflowStore", + "list_executions" + ], + "complexity": "simple" + }, + { + "id": "class:ConnectionManager", + "type": "class", + "name": "ConnectionManager", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "Track active WebSocket connections per task_id for fan-out.", + "tags": [ + "ConnectionManager" + ], + "complexity": "moderate" + }, + { + "id": "func:ConnectionManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "ConnectionManager.__init__() 方法", + "tags": [ + "ConnectionManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ConnectionManager.add", + "type": "function", + "name": "add", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "ConnectionManager.add(task_id, ws, token) 方法", + "tags": [ + "ConnectionManager", + "add" + ], + "complexity": "simple" + }, + { + "id": "func:ConnectionManager.remove", + "type": "function", + "name": "remove", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "ConnectionManager.remove(task_id, ws) 方法", + "tags": [ + "ConnectionManager", + "remove" + ], + "complexity": "simple" + }, + { + "id": "func:ConnectionManager.get_tokens", + "type": "function", + "name": "get_tokens", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "ConnectionManager.get_tokens(task_id) 方法", + "tags": [ + "ConnectionManager", + "get_tokens" + ], + "complexity": "simple" + }, + { + "id": "func:ConnectionManager.broadcast", + "type": "function", + "name": "broadcast", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "ConnectionManager.broadcast(task_id, message) 异步方法", + "tags": [ + "ConnectionManager", + "broadcast" + ], + "complexity": "simple" + }, + { + "id": "func:ConnectionManager.has_connections", + "type": "function", + "name": "has_connections", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "ConnectionManager.has_connections(task_id) 方法", + "tags": [ + "ConnectionManager", + "has_connections" + ], + "complexity": "simple" + }, + { + "id": "class:BackgroundRunner", + "type": "class", + "name": "BackgroundRunner", + "filePath": "src/agentkit/server/runner.py", + "layer": "api", + "summary": "Runs tasks in background asyncio tasks with lifecycle management.", + "tags": [ + "BackgroundRunner" + ], + "complexity": "moderate" + }, + { + "id": "func:BackgroundRunner.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/runner.py", + "layer": "api", + "summary": "BackgroundRunner.__init__(task_store, max_concurrent) 方法", + "tags": [ + "BackgroundRunner", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:BackgroundRunner.active_count", + "type": "function", + "name": "active_count", + "filePath": "src/agentkit/server/runner.py", + "layer": "api", + "summary": "BackgroundRunner.active_count() 方法", + "tags": [ + "BackgroundRunner", + "active_count" + ], + "complexity": "simple" + }, + { + "id": "func:BackgroundRunner.submit", + "type": "function", + "name": "submit", + "filePath": "src/agentkit/server/runner.py", + "layer": "api", + "summary": "BackgroundRunner.submit(agent, input_data, skill_name, quality_gate, output_standardizer, skill) 异步方法", + "tags": [ + "BackgroundRunner", + "submit" + ], + "complexity": "simple" + }, + { + "id": "func:BackgroundRunner._run_task", + "type": "function", + "name": "_run_task", + "filePath": "src/agentkit/server/runner.py", + "layer": "api", + "summary": "BackgroundRunner._run_task(task_id, agent, input_data, quality_gate, output_standardizer, skill) 异步方法", + "tags": [ + "BackgroundRunner", + "_run_task" + ], + "complexity": "simple" + }, + { + "id": "func:BackgroundRunner.cancel", + "type": "function", + "name": "cancel", + "filePath": "src/agentkit/server/runner.py", + "layer": "api", + "summary": "BackgroundRunner.cancel(task_id) 异步方法", + "tags": [ + "BackgroundRunner", + "cancel" + ], + "complexity": "simple" + }, + { + "id": "class:TaskRecord", + "type": "class", + "name": "TaskRecord", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "Stored task record with full lifecycle data", + "tags": [ + "TaskRecord" + ], + "complexity": "simple" + }, + { + "id": "func:TaskRecord.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "TaskRecord.to_dict() 方法", + "tags": [ + "TaskRecord", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:TaskRecord.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "TaskRecord.from_dict(cls, data) 方法", + "tags": [ + "TaskRecord", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:InMemoryTaskStore", + "type": "class", + "name": "InMemoryTaskStore", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "In-memory task state storage with automatic TTL cleanup.", + "tags": [ + "InMemoryTaskStore" + ], + "complexity": "complex" + }, + { + "id": "func:InMemoryTaskStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.__init__(ttl_seconds, max_records) 方法", + "tags": [ + "InMemoryTaskStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.backend_type", + "type": "function", + "name": "backend_type", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.backend_type() 方法", + "tags": [ + "InMemoryTaskStore", + "backend_type" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.start_cleanup", + "type": "function", + "name": "start_cleanup", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.start_cleanup() 异步方法", + "tags": [ + "InMemoryTaskStore", + "start_cleanup" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.stop_cleanup", + "type": "function", + "name": "stop_cleanup", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.stop_cleanup() 异步方法", + "tags": [ + "InMemoryTaskStore", + "stop_cleanup" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore._cleanup_loop", + "type": "function", + "name": "_cleanup_loop", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore._cleanup_loop() 异步方法", + "tags": [ + "InMemoryTaskStore", + "_cleanup_loop" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore._cleanup_expired", + "type": "function", + "name": "_cleanup_expired", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore._cleanup_expired() 方法", + "tags": [ + "InMemoryTaskStore", + "_cleanup_expired" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.create", + "type": "function", + "name": "create", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.create(task_id, agent_name, input_data, skill_name) 方法", + "tags": [ + "InMemoryTaskStore", + "create" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.get(task_id) 方法", + "tags": [ + "InMemoryTaskStore", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.update_status", + "type": "function", + "name": "update_status", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.update_status(task_id, status) 方法", + "tags": [ + "InMemoryTaskStore", + "update_status" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.list_tasks", + "type": "function", + "name": "list_tasks", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.list_tasks(status, limit) 方法", + "tags": [ + "InMemoryTaskStore", + "list_tasks" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.count_by_status", + "type": "function", + "name": "count_by_status", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.count_by_status() 方法", + "tags": [ + "InMemoryTaskStore", + "count_by_status" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.size", + "type": "function", + "name": "size", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.size() 方法", + "tags": [ + "InMemoryTaskStore", + "size" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryTaskStore.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "InMemoryTaskStore.health_check() 异步方法", + "tags": [ + "InMemoryTaskStore", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:RedisTaskStore", + "type": "class", + "name": "RedisTaskStore", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "Redis-backed task state storage with TTL.", + "tags": [ + "RedisTaskStore" + ], + "complexity": "complex" + }, + { + "id": "func:RedisTaskStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.__init__(redis_url, ttl_seconds, max_records) 方法", + "tags": [ + "RedisTaskStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.backend_type", + "type": "function", + "name": "backend_type", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.backend_type() 方法", + "tags": [ + "RedisTaskStore", + "backend_type" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore._get_redis", + "type": "function", + "name": "_get_redis", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore._get_redis() 异步方法", + "tags": [ + "RedisTaskStore", + "_get_redis" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore._key", + "type": "function", + "name": "_key", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore._key(task_id) 方法", + "tags": [ + "RedisTaskStore", + "_key" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.start_cleanup", + "type": "function", + "name": "start_cleanup", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.start_cleanup() 异步方法", + "tags": [ + "RedisTaskStore", + "start_cleanup" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.stop_cleanup", + "type": "function", + "name": "stop_cleanup", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.stop_cleanup() 异步方法", + "tags": [ + "RedisTaskStore", + "stop_cleanup" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.create", + "type": "function", + "name": "create", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.create(task_id, agent_name, input_data, skill_name) 异步方法", + "tags": [ + "RedisTaskStore", + "create" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.get(task_id) 异步方法", + "tags": [ + "RedisTaskStore", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.update_status", + "type": "function", + "name": "update_status", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.update_status(task_id, status, reset_ttl) 异步方法", + "tags": [ + "RedisTaskStore", + "update_status" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.list_tasks", + "type": "function", + "name": "list_tasks", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.list_tasks(status, limit) 异步方法", + "tags": [ + "RedisTaskStore", + "list_tasks" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.count_by_status", + "type": "function", + "name": "count_by_status", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.count_by_status() 异步方法", + "tags": [ + "RedisTaskStore", + "count_by_status" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.size", + "type": "function", + "name": "size", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.size() 异步方法", + "tags": [ + "RedisTaskStore", + "size" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore.health_check() 异步方法", + "tags": [ + "RedisTaskStore", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore._count_keys", + "type": "function", + "name": "_count_keys", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore._count_keys(redis) 异步方法", + "tags": [ + "RedisTaskStore", + "_count_keys" + ], + "complexity": "simple" + }, + { + "id": "func:RedisTaskStore._evict_oldest_completed", + "type": "function", + "name": "_evict_oldest_completed", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "RedisTaskStore._evict_oldest_completed(redis) 异步方法", + "tags": [ + "RedisTaskStore", + "_evict_oldest_completed" + ], + "complexity": "simple" + }, + { + "id": "class:AsyncWriteQueue", + "type": "class", + "name": "AsyncWriteQueue", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "Background pending-buffer queue for non-blocking session persistence.", + "tags": [ + "AsyncWriteQueue" + ], + "complexity": "moderate" + }, + { + "id": "func:AsyncWriteQueue.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue.__init__(store, max_buffer_size) 方法", + "tags": [ + "AsyncWriteQueue", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AsyncWriteQueue._ensure_started", + "type": "function", + "name": "_ensure_started", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue._ensure_started() 方法", + "tags": [ + "AsyncWriteQueue", + "_ensure_started" + ], + "complexity": "simple" + }, + { + "id": "func:AsyncWriteQueue._writer_loop", + "type": "function", + "name": "_writer_loop", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue._writer_loop() 异步方法", + "tags": [ + "AsyncWriteQueue", + "_writer_loop" + ], + "complexity": "simple" + }, + { + "id": "func:AsyncWriteQueue.enqueue", + "type": "function", + "name": "enqueue", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue.enqueue(message, session) 方法", + "tags": [ + "AsyncWriteQueue", + "enqueue" + ], + "complexity": "simple" + }, + { + "id": "func:AsyncWriteQueue.buffered_messages", + "type": "function", + "name": "buffered_messages", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue.buffered_messages(session_id) 方法", + "tags": [ + "AsyncWriteQueue", + "buffered_messages" + ], + "complexity": "simple" + }, + { + "id": "func:AsyncWriteQueue.pending_count", + "type": "function", + "name": "pending_count", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue.pending_count() 方法", + "tags": [ + "AsyncWriteQueue", + "pending_count" + ], + "complexity": "simple" + }, + { + "id": "func:AsyncWriteQueue.flush", + "type": "function", + "name": "flush", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue.flush() 异步方法", + "tags": [ + "AsyncWriteQueue", + "flush" + ], + "complexity": "simple" + }, + { + "id": "func:AsyncWriteQueue.stop", + "type": "function", + "name": "stop", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "AsyncWriteQueue.stop() 异步方法", + "tags": [ + "AsyncWriteQueue", + "stop" + ], + "complexity": "simple" + }, + { + "id": "class:SessionManager", + "type": "class", + "name": "SessionManager", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "Manages conversation sessions and their messages.", + "tags": [ + "SessionManager" + ], + "complexity": "complex" + }, + { + "id": "func:SessionManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.__init__(store) 方法", + "tags": [ + "SessionManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.store", + "type": "function", + "name": "store", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.store() 方法", + "tags": [ + "SessionManager", + "store" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.create_session", + "type": "function", + "name": "create_session", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.create_session(agent_name, metadata) 异步方法", + "tags": [ + "SessionManager", + "create_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.get_session", + "type": "function", + "name": "get_session", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.get_session(session_id) 异步方法", + "tags": [ + "SessionManager", + "get_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.pause_session", + "type": "function", + "name": "pause_session", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.pause_session(session_id) 异步方法", + "tags": [ + "SessionManager", + "pause_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.resume_session", + "type": "function", + "name": "resume_session", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.resume_session(session_id) 异步方法", + "tags": [ + "SessionManager", + "resume_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.close_session", + "type": "function", + "name": "close_session", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.close_session(session_id) 异步方法", + "tags": [ + "SessionManager", + "close_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.delete_session", + "type": "function", + "name": "delete_session", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.delete_session(session_id) 异步方法", + "tags": [ + "SessionManager", + "delete_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.list_sessions(agent_name, limit) 异步方法", + "tags": [ + "SessionManager", + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.append_message", + "type": "function", + "name": "append_message", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.append_message(session_id, role, content, tool_call_id, agent_name, metadata) 异步方法", + "tags": [ + "SessionManager", + "append_message" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.get_messages", + "type": "function", + "name": "get_messages", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.get_messages(session_id, limit, offset) 异步方法", + "tags": [ + "SessionManager", + "get_messages" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.get_chat_messages", + "type": "function", + "name": "get_chat_messages", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.get_chat_messages(session_id) 异步方法", + "tags": [ + "SessionManager", + "get_chat_messages" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.count_messages", + "type": "function", + "name": "count_messages", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.count_messages(session_id) 异步方法", + "tags": [ + "SessionManager", + "count_messages" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.health_check() 异步方法", + "tags": [ + "SessionManager", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.flush", + "type": "function", + "name": "flush", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.flush() 异步方法", + "tags": [ + "SessionManager", + "flush" + ], + "complexity": "simple" + }, + { + "id": "func:SessionManager.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/session/manager.py", + "layer": "data", + "summary": "SessionManager.close() 异步方法", + "tags": [ + "SessionManager", + "close" + ], + "complexity": "simple" + }, + { + "id": "class:SessionStatus", + "type": "class", + "name": "SessionStatus", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Session lifecycle states.", + "tags": [ + "SessionStatus" + ], + "complexity": "simple" + }, + { + "id": "class:MessageRole", + "type": "class", + "name": "MessageRole", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Message role — mirrors OpenAI chat message roles.", + "tags": [ + "MessageRole" + ], + "complexity": "simple" + }, + { + "id": "class:Message", + "type": "class", + "name": "Message", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "A single message within a conversation session.", + "tags": [ + "Message" + ], + "complexity": "simple" + }, + { + "id": "func:Message.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Message.to_dict() 方法", + "tags": [ + "Message", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:Message.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Message.from_dict(cls, data) 方法", + "tags": [ + "Message", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "func:Message.to_chat_message", + "type": "function", + "name": "to_chat_message", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Message.to_chat_message() 方法", + "tags": [ + "Message", + "to_chat_message" + ], + "complexity": "simple" + }, + { + "id": "class:Session", + "type": "class", + "name": "Session", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "A conversation session binding a user to an Agent.", + "tags": [ + "Session" + ], + "complexity": "moderate" + }, + { + "id": "func:Session.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Session.to_dict() 方法", + "tags": [ + "Session", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:Session.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Session.from_dict(cls, data) 方法", + "tags": [ + "Session", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "func:Session.new_session_id", + "type": "function", + "name": "new_session_id", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Session.new_session_id() 方法", + "tags": [ + "Session", + "new_session_id" + ], + "complexity": "simple" + }, + { + "id": "func:Session.new_message_id", + "type": "function", + "name": "new_message_id", + "filePath": "src/agentkit/session/models.py", + "layer": "data", + "summary": "Session.new_message_id() 方法", + "tags": [ + "Session", + "new_message_id" + ], + "complexity": "simple" + }, + { + "id": "class:SessionStore", + "type": "class", + "name": "SessionStore", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "Protocol for session persistence backends.", + "tags": [ + "SessionStore" + ], + "complexity": "complex" + }, + { + "id": "func:SessionStore.save_session", + "type": "function", + "name": "save_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.save_session(session) 异步方法", + "tags": [ + "SessionStore", + "save_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.get_session", + "type": "function", + "name": "get_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.get_session(session_id) 异步方法", + "tags": [ + "SessionStore", + "get_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.update_session_status", + "type": "function", + "name": "update_session_status", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.update_session_status(session_id, status) 异步方法", + "tags": [ + "SessionStore", + "update_session_status" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.delete_session", + "type": "function", + "name": "delete_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.delete_session(session_id) 异步方法", + "tags": [ + "SessionStore", + "delete_session" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.list_sessions(agent_name, limit) 异步方法", + "tags": [ + "SessionStore", + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.append_message", + "type": "function", + "name": "append_message", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.append_message(message) 异步方法", + "tags": [ + "SessionStore", + "append_message" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.get_messages", + "type": "function", + "name": "get_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.get_messages(session_id, limit, offset) 异步方法", + "tags": [ + "SessionStore", + "get_messages" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.count_messages", + "type": "function", + "name": "count_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.count_messages(session_id) 异步方法", + "tags": [ + "SessionStore", + "count_messages" + ], + "complexity": "simple" + }, + { + "id": "func:SessionStore.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "SessionStore.health_check() 异步方法", + "tags": [ + "SessionStore", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:InMemorySessionStore", + "type": "class", + "name": "InMemorySessionStore", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "In-memory session store for development and testing.", + "tags": [ + "InMemorySessionStore" + ], + "complexity": "complex" + }, + { + "id": "func:InMemorySessionStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.__init__(max_sessions, max_messages_per_session) 方法", + "tags": [ + "InMemorySessionStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.save_session", + "type": "function", + "name": "save_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.save_session(session) 异步方法", + "tags": [ + "InMemorySessionStore", + "save_session" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.get_session", + "type": "function", + "name": "get_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.get_session(session_id) 异步方法", + "tags": [ + "InMemorySessionStore", + "get_session" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.update_session_status", + "type": "function", + "name": "update_session_status", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.update_session_status(session_id, status) 异步方法", + "tags": [ + "InMemorySessionStore", + "update_session_status" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.delete_session", + "type": "function", + "name": "delete_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.delete_session(session_id) 异步方法", + "tags": [ + "InMemorySessionStore", + "delete_session" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.list_sessions(agent_name, limit) 异步方法", + "tags": [ + "InMemorySessionStore", + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.append_message", + "type": "function", + "name": "append_message", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.append_message(message) 异步方法", + "tags": [ + "InMemorySessionStore", + "append_message" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.get_messages", + "type": "function", + "name": "get_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.get_messages(session_id, limit, offset) 异步方法", + "tags": [ + "InMemorySessionStore", + "get_messages" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.count_messages", + "type": "function", + "name": "count_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.count_messages(session_id) 异步方法", + "tags": [ + "InMemorySessionStore", + "count_messages" + ], + "complexity": "simple" + }, + { + "id": "func:InMemorySessionStore.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "InMemorySessionStore.health_check() 异步方法", + "tags": [ + "InMemorySessionStore", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:RedisSessionStore", + "type": "class", + "name": "RedisSessionStore", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "Redis-backed session store for production use.", + "tags": [ + "RedisSessionStore" + ], + "complexity": "complex" + }, + { + "id": "func:RedisSessionStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.__init__(redis_url, ttl_seconds) 方法", + "tags": [ + "RedisSessionStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore._get_redis", + "type": "function", + "name": "_get_redis", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore._get_redis() 异步方法", + "tags": [ + "RedisSessionStore", + "_get_redis" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore._session_key", + "type": "function", + "name": "_session_key", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore._session_key(session_id) 方法", + "tags": [ + "RedisSessionStore", + "_session_key" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore._messages_key", + "type": "function", + "name": "_messages_key", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore._messages_key(session_id) 方法", + "tags": [ + "RedisSessionStore", + "_messages_key" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.save_session", + "type": "function", + "name": "save_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.save_session(session) 异步方法", + "tags": [ + "RedisSessionStore", + "save_session" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.get_session", + "type": "function", + "name": "get_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.get_session(session_id) 异步方法", + "tags": [ + "RedisSessionStore", + "get_session" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.update_session_status", + "type": "function", + "name": "update_session_status", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.update_session_status(session_id, status) 异步方法", + "tags": [ + "RedisSessionStore", + "update_session_status" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.delete_session", + "type": "function", + "name": "delete_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.delete_session(session_id) 异步方法", + "tags": [ + "RedisSessionStore", + "delete_session" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.list_sessions(agent_name, limit) 异步方法", + "tags": [ + "RedisSessionStore", + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.append_message", + "type": "function", + "name": "append_message", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.append_message(message) 异步方法", + "tags": [ + "RedisSessionStore", + "append_message" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.get_messages", + "type": "function", + "name": "get_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.get_messages(session_id, limit, offset) 异步方法", + "tags": [ + "RedisSessionStore", + "get_messages" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.count_messages", + "type": "function", + "name": "count_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.count_messages(session_id) 异步方法", + "tags": [ + "RedisSessionStore", + "count_messages" + ], + "complexity": "simple" + }, + { + "id": "func:RedisSessionStore.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "RedisSessionStore.health_check() 异步方法", + "tags": [ + "RedisSessionStore", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:FileSessionStore", + "type": "class", + "name": "FileSessionStore", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "File-based session store — persists sessions to ~/.agentkit/sessions/.", + "tags": [ + "FileSessionStore" + ], + "complexity": "complex" + }, + { + "id": "func:FileSessionStore.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.__init__(data_dir) 方法", + "tags": [ + "FileSessionStore", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore._session_path", + "type": "function", + "name": "_session_path", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore._session_path(session_id) 方法", + "tags": [ + "FileSessionStore", + "_session_path" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore._read_session_file", + "type": "function", + "name": "_read_session_file", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore._read_session_file(session_id) 方法", + "tags": [ + "FileSessionStore", + "_read_session_file" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore._write_session_file", + "type": "function", + "name": "_write_session_file", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore._write_session_file(session_id, data) 方法", + "tags": [ + "FileSessionStore", + "_write_session_file" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.save_session", + "type": "function", + "name": "save_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.save_session(session) 异步方法", + "tags": [ + "FileSessionStore", + "save_session" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.get_session", + "type": "function", + "name": "get_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.get_session(session_id) 异步方法", + "tags": [ + "FileSessionStore", + "get_session" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.update_session_status", + "type": "function", + "name": "update_session_status", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.update_session_status(session_id, status) 异步方法", + "tags": [ + "FileSessionStore", + "update_session_status" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.delete_session", + "type": "function", + "name": "delete_session", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.delete_session(session_id) 异步方法", + "tags": [ + "FileSessionStore", + "delete_session" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.list_sessions(agent_name, limit) 异步方法", + "tags": [ + "FileSessionStore", + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.append_message", + "type": "function", + "name": "append_message", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.append_message(message) 异步方法", + "tags": [ + "FileSessionStore", + "append_message" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.get_messages", + "type": "function", + "name": "get_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.get_messages(session_id, limit, offset) 异步方法", + "tags": [ + "FileSessionStore", + "get_messages" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.count_messages", + "type": "function", + "name": "count_messages", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.count_messages(session_id) 异步方法", + "tags": [ + "FileSessionStore", + "count_messages" + ], + "complexity": "simple" + }, + { + "id": "func:FileSessionStore.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "FileSessionStore.health_check() 异步方法", + "tags": [ + "FileSessionStore", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "class:EvolutionConfig", + "type": "class", + "name": "EvolutionConfig", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Evolution configuration", + "tags": [ + "EvolutionConfig" + ], + "complexity": "simple" + }, + { + "id": "class:IntentConfig", + "type": "class", + "name": "IntentConfig", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "意图配置", + "tags": [ + "IntentConfig" + ], + "complexity": "simple" + }, + { + "id": "class:QualityGateConfig", + "type": "class", + "name": "QualityGateConfig", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "质量门控配置", + "tags": [ + "QualityGateConfig" + ], + "complexity": "simple" + }, + { + "id": "class:SkillConfig", + "type": "class", + "name": "SkillConfig", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "扩展 AgentConfig,新增 intent、quality_gate、execution_mode 等 v2 字段", + "tags": [ + "SkillConfig" + ], + "complexity": "moderate" + }, + { + "id": "func:SkillConfig.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "SkillConfig.__init__(name, agent_type, version, description, task_mode, supported_tasks, max_concurrency, input_schema, output_schema, prompt, llm, tools, memory, custom_handler, intent, quality_gate, execution_mode, max_steps, evolution, skill_md_path, disclosure_level, dependencies, capabilities, alignment) 方法", + "tags": [ + "SkillConfig", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SkillConfig._validate_v2", + "type": "function", + "name": "_validate_v2", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "SkillConfig._validate_v2() 方法", + "tags": [ + "SkillConfig", + "_validate_v2" + ], + "complexity": "simple" + }, + { + "id": "func:SkillConfig._parse_dependencies", + "type": "function", + "name": "_parse_dependencies", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "SkillConfig._parse_dependencies(raw) 方法", + "tags": [ + "SkillConfig", + "_parse_dependencies" + ], + "complexity": "simple" + }, + { + "id": "func:SkillConfig._parse_capabilities", + "type": "function", + "name": "_parse_capabilities", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "SkillConfig._parse_capabilities(raw) 方法", + "tags": [ + "SkillConfig", + "_parse_capabilities" + ], + "complexity": "simple" + }, + { + "id": "func:SkillConfig.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "SkillConfig.from_dict(cls, data) 方法", + "tags": [ + "SkillConfig", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "func:SkillConfig.from_yaml", + "type": "function", + "name": "from_yaml", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "SkillConfig.from_yaml(cls, path) 方法", + "tags": [ + "SkillConfig", + "from_yaml" + ], + "complexity": "simple" + }, + { + "id": "func:SkillConfig.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "SkillConfig.to_dict() 方法", + "tags": [ + "SkillConfig", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:Skill", + "type": "class", + "name": "Skill", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill 封装 SkillConfig + 绑定 Tools", + "tags": [ + "Skill" + ], + "complexity": "complex" + }, + { + "id": "func:Skill.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.__init__(config, tools) 方法", + "tags": [ + "Skill", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.name", + "type": "function", + "name": "name", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.name() 方法", + "tags": [ + "Skill", + "name" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.version", + "type": "function", + "name": "version", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.version() 方法", + "tags": [ + "Skill", + "version" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.config", + "type": "function", + "name": "config", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.config() 方法", + "tags": [ + "Skill", + "config" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.tools", + "type": "function", + "name": "tools", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.tools() 方法", + "tags": [ + "Skill", + "tools" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.capabilities", + "type": "function", + "name": "capabilities", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.capabilities() 方法", + "tags": [ + "Skill", + "capabilities" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.dependencies", + "type": "function", + "name": "dependencies", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.dependencies() 方法", + "tags": [ + "Skill", + "dependencies" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.bind_tool", + "type": "function", + "name": "bind_tool", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.bind_tool(tool) 方法", + "tags": [ + "Skill", + "bind_tool" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.unbind_tool", + "type": "function", + "name": "unbind_tool", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.unbind_tool(tool_name) 方法", + "tags": [ + "Skill", + "unbind_tool" + ], + "complexity": "simple" + }, + { + "id": "func:Skill.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/skills/base.py", + "layer": "service", + "summary": "Skill.to_dict() 方法", + "tags": [ + "Skill", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStep", + "type": "class", + "name": "PipelineStep", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "Pipeline 步骤定义", + "tags": [ + "PipelineStep" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineStepResult", + "type": "class", + "name": "PipelineStepResult", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "步骤执行结果", + "tags": [ + "PipelineStepResult" + ], + "complexity": "simple" + }, + { + "id": "class:PipelineResult", + "type": "class", + "name": "PipelineResult", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "Pipeline 执行结果", + "tags": [ + "PipelineResult" + ], + "complexity": "simple" + }, + { + "id": "class:GEOPipeline", + "type": "class", + "name": "GEOPipeline", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEO 端到端工作流编排", + "tags": [ + "GEOPipeline" + ], + "complexity": "complex" + }, + { + "id": "func:GEOPipeline.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline.__init__(name, steps, skill_registry, agent_pool, workspace) 方法", + "tags": [ + "GEOPipeline", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline.from_config", + "type": "function", + "name": "from_config", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline.from_config(cls, config, skill_registry, agent_pool, workspace) 方法", + "tags": [ + "GEOPipeline", + "from_config" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline.execute(input_data) 异步方法", + "tags": [ + "GEOPipeline", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline._execute_step", + "type": "function", + "name": "_execute_step", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline._execute_step(step, input_data, step_outputs, execution_id, saga) 异步方法", + "tags": [ + "GEOPipeline", + "_execute_step" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline._execute_skill", + "type": "function", + "name": "_execute_skill", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline._execute_skill(skill_name, input_data) 异步方法", + "tags": [ + "GEOPipeline", + "_execute_skill" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline._build_execution_groups", + "type": "function", + "name": "_build_execution_groups", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline._build_execution_groups() 方法", + "tags": [ + "GEOPipeline", + "_build_execution_groups" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline._map_input", + "type": "function", + "name": "_map_input", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline._map_input(step, input_data, step_outputs) 方法", + "tags": [ + "GEOPipeline", + "_map_input" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline._resolve_mapping_path", + "type": "function", + "name": "_resolve_mapping_path", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline._resolve_mapping_path(path, input_data, step_outputs) 方法", + "tags": [ + "GEOPipeline", + "_resolve_mapping_path" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline._evaluate_condition", + "type": "function", + "name": "_evaluate_condition", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline._evaluate_condition(condition, input_data, step_outputs) 方法", + "tags": [ + "GEOPipeline", + "_evaluate_condition" + ], + "complexity": "simple" + }, + { + "id": "func:GEOPipeline._build_final_output", + "type": "function", + "name": "_build_final_output", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "GEOPipeline._build_final_output(step_outputs, input_data) 方法", + "tags": [ + "GEOPipeline", + "_build_final_output" + ], + "complexity": "simple" + }, + { + "id": "class:SkillLoader", + "type": "class", + "name": "SkillLoader", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "从 YAML/SKILL.md 目录/Python 包批量加载 Skill 并注册到 SkillRegistry", + "tags": [ + "SkillLoader" + ], + "complexity": "moderate" + }, + { + "id": "func:SkillLoader.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader.__init__(skill_registry, tool_registry) 方法", + "tags": [ + "SkillLoader", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SkillLoader.load_from_directory", + "type": "function", + "name": "load_from_directory", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader.load_from_directory(directory) 方法", + "tags": [ + "SkillLoader", + "load_from_directory" + ], + "complexity": "simple" + }, + { + "id": "func:SkillLoader.load_from_file", + "type": "function", + "name": "load_from_file", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader.load_from_file(path) 方法", + "tags": [ + "SkillLoader", + "load_from_file" + ], + "complexity": "simple" + }, + { + "id": "func:SkillLoader._load_skill_from_file", + "type": "function", + "name": "_load_skill_from_file", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader._load_skill_from_file(path) 方法", + "tags": [ + "SkillLoader", + "_load_skill_from_file" + ], + "complexity": "simple" + }, + { + "id": "func:SkillLoader.load_from_skill_md", + "type": "function", + "name": "load_from_skill_md", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader.load_from_skill_md(path, disclosure_level) 方法", + "tags": [ + "SkillLoader", + "load_from_skill_md" + ], + "complexity": "simple" + }, + { + "id": "func:SkillLoader.load_from_entry_points", + "type": "function", + "name": "load_from_entry_points", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader.load_from_entry_points(group) 方法", + "tags": [ + "SkillLoader", + "load_from_entry_points" + ], + "complexity": "simple" + }, + { + "id": "func:SkillLoader._bind_tools", + "type": "function", + "name": "_bind_tools", + "filePath": "src/agentkit/skills/loader.py", + "layer": "service", + "summary": "SkillLoader._bind_tools(config) 方法", + "tags": [ + "SkillLoader", + "_bind_tools" + ], + "complexity": "simple" + }, + { + "id": "class:SkillPipeline", + "type": "class", + "name": "SkillPipeline", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "将多个 Skill 串联为 Pipeline 执行", + "tags": [ + "SkillPipeline" + ], + "complexity": "moderate" + }, + { + "id": "func:SkillPipeline.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "SkillPipeline.__init__(name, steps, skill_registry) 方法", + "tags": [ + "SkillPipeline", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SkillPipeline.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "SkillPipeline.execute(input_data, agent_factory) 异步方法", + "tags": [ + "SkillPipeline", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:SkillPipeline._execute_skill", + "type": "function", + "name": "_execute_skill", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "SkillPipeline._execute_skill(skill_name, input_data, agent_factory) 异步方法", + "tags": [ + "SkillPipeline", + "_execute_skill" + ], + "complexity": "simple" + }, + { + "id": "func:SkillPipeline._evaluate_condition", + "type": "function", + "name": "_evaluate_condition", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "SkillPipeline._evaluate_condition(condition, current_input, results) 方法", + "tags": [ + "SkillPipeline", + "_evaluate_condition" + ], + "complexity": "simple" + }, + { + "id": "func:SkillPipeline._resolve_path", + "type": "function", + "name": "_resolve_path", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "SkillPipeline._resolve_path(path, data) 方法", + "tags": [ + "SkillPipeline", + "_resolve_path" + ], + "complexity": "simple" + }, + { + "id": "func:SkillPipeline._map_input", + "type": "function", + "name": "_map_input", + "filePath": "src/agentkit/skills/pipeline.py", + "layer": "service", + "summary": "SkillPipeline._map_input(current_input, mapping, results) 方法", + "tags": [ + "SkillPipeline", + "_map_input" + ], + "complexity": "simple" + }, + { + "id": "class:SkillRegistry", + "type": "class", + "name": "SkillRegistry", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "Skill 注册中心,管理 Skill 的注册、发现、更新", + "tags": [ + "SkillRegistry" + ], + "complexity": "complex" + }, + { + "id": "func:SkillRegistry.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.__init__() 方法", + "tags": [ + "SkillRegistry", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.register", + "type": "function", + "name": "register", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.register(skill) 方法", + "tags": [ + "SkillRegistry", + "register" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.unregister", + "type": "function", + "name": "unregister", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.unregister(name, version) 方法", + "tags": [ + "SkillRegistry", + "unregister" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.get(name, version) 方法", + "tags": [ + "SkillRegistry", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.list_skills", + "type": "function", + "name": "list_skills", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.list_skills() 方法", + "tags": [ + "SkillRegistry", + "list_skills" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.update_skill", + "type": "function", + "name": "update_skill", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.update_skill(name, config) 方法", + "tags": [ + "SkillRegistry", + "update_skill" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.has_skill", + "type": "function", + "name": "has_skill", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.has_skill(name, version) 方法", + "tags": [ + "SkillRegistry", + "has_skill" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.get_versions", + "type": "function", + "name": "get_versions", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.get_versions(name) 方法", + "tags": [ + "SkillRegistry", + "get_versions" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.query_by_capability", + "type": "function", + "name": "query_by_capability", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.query_by_capability(tag) 方法", + "tags": [ + "SkillRegistry", + "query_by_capability" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.health_check(name) 方法", + "tags": [ + "SkillRegistry", + "health_check" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry._check_skill_dependencies", + "type": "function", + "name": "_check_skill_dependencies", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry._check_skill_dependencies(skill) 方法", + "tags": [ + "SkillRegistry", + "_check_skill_dependencies" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry._check_version_constraint", + "type": "function", + "name": "_check_version_constraint", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry._check_version_constraint(actual_version, constraint) 方法", + "tags": [ + "SkillRegistry", + "_check_version_constraint" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.register_pipeline", + "type": "function", + "name": "register_pipeline", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.register_pipeline(pipeline) 方法", + "tags": [ + "SkillRegistry", + "register_pipeline" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.get_pipeline", + "type": "function", + "name": "get_pipeline", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.get_pipeline(name) 方法", + "tags": [ + "SkillRegistry", + "get_pipeline" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.list_pipelines", + "type": "function", + "name": "list_pipelines", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.list_pipelines() 方法", + "tags": [ + "SkillRegistry", + "list_pipelines" + ], + "complexity": "simple" + }, + { + "id": "func:SkillRegistry.unregister_pipeline", + "type": "function", + "name": "unregister_pipeline", + "filePath": "src/agentkit/skills/registry.py", + "layer": "service", + "summary": "SkillRegistry.unregister_pipeline(name) 方法", + "tags": [ + "SkillRegistry", + "unregister_pipeline" + ], + "complexity": "simple" + }, + { + "id": "class:DependencyDecl", + "type": "class", + "name": "DependencyDecl", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "依赖声明 - 声明 Skill/Tool 依赖", + "tags": [ + "DependencyDecl" + ], + "complexity": "simple" + }, + { + "id": "class:CapabilityTag", + "type": "class", + "name": "CapabilityTag", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "能力标签 - 用于 Skill 能力查询", + "tags": [ + "CapabilityTag" + ], + "complexity": "simple" + }, + { + "id": "class:SkillSpec", + "type": "class", + "name": "SkillSpec", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "Skill 标准接口规范", + "tags": [ + "SkillSpec" + ], + "complexity": "moderate" + }, + { + "id": "func:SkillSpec.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "SkillSpec.from_dict(cls, data) 方法", + "tags": [ + "SkillSpec", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "func:SkillSpec.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "SkillSpec.to_dict() 方法", + "tags": [ + "SkillSpec", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:SkillSpec.capability_tags", + "type": "function", + "name": "capability_tags", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "SkillSpec.capability_tags() 方法", + "tags": [ + "SkillSpec", + "capability_tags" + ], + "complexity": "simple" + }, + { + "id": "func:SkillSpec.required_dependencies", + "type": "function", + "name": "required_dependencies", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "SkillSpec.required_dependencies() 方法", + "tags": [ + "SkillSpec", + "required_dependencies" + ], + "complexity": "simple" + }, + { + "id": "func:SkillSpec.skill_dependencies", + "type": "function", + "name": "skill_dependencies", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "SkillSpec.skill_dependencies() 方法", + "tags": [ + "SkillSpec", + "skill_dependencies" + ], + "complexity": "simple" + }, + { + "id": "func:SkillSpec.tool_dependencies", + "type": "function", + "name": "tool_dependencies", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "SkillSpec.tool_dependencies() 方法", + "tags": [ + "SkillSpec", + "tool_dependencies" + ], + "complexity": "simple" + }, + { + "id": "class:HealthCheckResult", + "type": "class", + "name": "HealthCheckResult", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "依赖健康检查结果", + "tags": [ + "HealthCheckResult" + ], + "complexity": "simple" + }, + { + "id": "func:HealthCheckResult.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/skills/schema.py", + "layer": "service", + "summary": "HealthCheckResult.to_dict() 方法", + "tags": [ + "HealthCheckResult", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:SkillMdParser", + "type": "class", + "name": "SkillMdParser", + "filePath": "src/agentkit/skills/skill_md.py", + "layer": "service", + "summary": "解析 SKILL.md 文件为 SkillConfig", + "tags": [ + "SkillMdParser" + ], + "complexity": "simple" + }, + { + "id": "func:SkillMdParser.parse", + "type": "function", + "name": "parse", + "filePath": "src/agentkit/skills/skill_md.py", + "layer": "service", + "summary": "SkillMdParser.parse(file_path) 方法", + "tags": [ + "SkillMdParser", + "parse" + ], + "complexity": "simple" + }, + { + "id": "func:SkillMdParser.to_skill_config", + "type": "function", + "name": "to_skill_config", + "filePath": "src/agentkit/skills/skill_md.py", + "layer": "service", + "summary": "SkillMdParser.to_skill_config(frontmatter, sections, file_path, disclosure_level) 方法", + "tags": [ + "SkillMdParser", + "to_skill_config" + ], + "complexity": "simple" + }, + { + "id": "class:_NoOpCounter", + "type": "class", + "name": "_NoOpCounter", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "No-op counter used when OTel is not installed.", + "tags": [ + "_NoOpCounter" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpCounter.add", + "type": "function", + "name": "add", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "_NoOpCounter.add() 方法", + "tags": [ + "_NoOpCounter", + "add" + ], + "complexity": "simple" + }, + { + "id": "class:_NoOpHistogram", + "type": "class", + "name": "_NoOpHistogram", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "No-op histogram used when OTel is not installed.", + "tags": [ + "_NoOpHistogram" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpHistogram.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "_NoOpHistogram.record() 方法", + "tags": [ + "_NoOpHistogram", + "record" + ], + "complexity": "simple" + }, + { + "id": "class:_NoOpUpDownCounter", + "type": "class", + "name": "_NoOpUpDownCounter", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "No-op up-down counter used when OTel is not installed.", + "tags": [ + "_NoOpUpDownCounter" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpUpDownCounter.add", + "type": "function", + "name": "add", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "_NoOpUpDownCounter.add() 方法", + "tags": [ + "_NoOpUpDownCounter", + "add" + ], + "complexity": "simple" + }, + { + "id": "class:TelemetryConfig", + "type": "class", + "name": "TelemetryConfig", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "Telemetry configuration.", + "tags": [ + "TelemetryConfig" + ], + "complexity": "simple" + }, + { + "id": "class:NoOpSpan", + "type": "class", + "name": "NoOpSpan", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "No-op span when telemetry is disabled.", + "tags": [ + "NoOpSpan" + ], + "complexity": "moderate" + }, + { + "id": "func:NoOpSpan.__enter__", + "type": "function", + "name": "__enter__", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpSpan.__enter__() 方法", + "tags": [ + "NoOpSpan", + "__enter__" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpSpan.__exit__", + "type": "function", + "name": "__exit__", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpSpan.__exit__() 方法", + "tags": [ + "NoOpSpan", + "__exit__" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpSpan.set_attribute", + "type": "function", + "name": "set_attribute", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpSpan.set_attribute(key, value) 方法", + "tags": [ + "NoOpSpan", + "set_attribute" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpSpan.add_event", + "type": "function", + "name": "add_event", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpSpan.add_event(name, attributes) 方法", + "tags": [ + "NoOpSpan", + "add_event" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpSpan.record_exception", + "type": "function", + "name": "record_exception", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpSpan.record_exception(exception) 方法", + "tags": [ + "NoOpSpan", + "record_exception" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpSpan.is_recording", + "type": "function", + "name": "is_recording", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpSpan.is_recording() 方法", + "tags": [ + "NoOpSpan", + "is_recording" + ], + "complexity": "simple" + }, + { + "id": "class:NoOpTracer", + "type": "class", + "name": "NoOpTracer", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "No-op tracer when telemetry is disabled.", + "tags": [ + "NoOpTracer" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpTracer.start_span", + "type": "function", + "name": "start_span", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpTracer.start_span(name, attributes) 方法", + "tags": [ + "NoOpTracer", + "start_span" + ], + "complexity": "simple" + }, + { + "id": "func:NoOpTracer.start_as_current_span", + "type": "function", + "name": "start_as_current_span", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "NoOpTracer.start_as_current_span(name, attributes) 方法", + "tags": [ + "NoOpTracer", + "start_as_current_span" + ], + "complexity": "simple" + }, + { + "id": "class:OTelSpan", + "type": "class", + "name": "OTelSpan", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "Wrapper around OpenTelemetry Span.", + "tags": [ + "OTelSpan" + ], + "complexity": "moderate" + }, + { + "id": "func:OTelSpan.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelSpan.__init__(span) 方法", + "tags": [ + "OTelSpan", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:OTelSpan.__enter__", + "type": "function", + "name": "__enter__", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelSpan.__enter__() 方法", + "tags": [ + "OTelSpan", + "__enter__" + ], + "complexity": "simple" + }, + { + "id": "func:OTelSpan.__exit__", + "type": "function", + "name": "__exit__", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelSpan.__exit__() 方法", + "tags": [ + "OTelSpan", + "__exit__" + ], + "complexity": "simple" + }, + { + "id": "func:OTelSpan.set_attribute", + "type": "function", + "name": "set_attribute", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelSpan.set_attribute(key, value) 方法", + "tags": [ + "OTelSpan", + "set_attribute" + ], + "complexity": "simple" + }, + { + "id": "func:OTelSpan.add_event", + "type": "function", + "name": "add_event", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelSpan.add_event(name, attributes) 方法", + "tags": [ + "OTelSpan", + "add_event" + ], + "complexity": "simple" + }, + { + "id": "func:OTelSpan.record_exception", + "type": "function", + "name": "record_exception", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelSpan.record_exception(exception) 方法", + "tags": [ + "OTelSpan", + "record_exception" + ], + "complexity": "simple" + }, + { + "id": "func:OTelSpan.is_recording", + "type": "function", + "name": "is_recording", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelSpan.is_recording() 方法", + "tags": [ + "OTelSpan", + "is_recording" + ], + "complexity": "simple" + }, + { + "id": "class:OTelTracer", + "type": "class", + "name": "OTelTracer", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "Wrapper around OpenTelemetry Tracer.", + "tags": [ + "OTelTracer" + ], + "complexity": "simple" + }, + { + "id": "func:OTelTracer.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelTracer.__init__(tracer) 方法", + "tags": [ + "OTelTracer", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:OTelTracer.start_span", + "type": "function", + "name": "start_span", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelTracer.start_span(name, attributes) 方法", + "tags": [ + "OTelTracer", + "start_span" + ], + "complexity": "simple" + }, + { + "id": "func:OTelTracer.start_as_current_span", + "type": "function", + "name": "start_as_current_span", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "OTelTracer.start_as_current_span(name, attributes) 方法", + "tags": [ + "OTelTracer", + "start_as_current_span" + ], + "complexity": "simple" + }, + { + "id": "class:_NoOpSpan", + "type": "class", + "name": "_NoOpSpan", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "No-op span context manager used when OTel is not installed.", + "tags": [ + "_NoOpSpan" + ], + "complexity": "moderate" + }, + { + "id": "func:_NoOpSpan.__enter__", + "type": "function", + "name": "__enter__", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "_NoOpSpan.__enter__() 方法", + "tags": [ + "_NoOpSpan", + "__enter__" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpSpan.__exit__", + "type": "function", + "name": "__exit__", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "_NoOpSpan.__exit__() 方法", + "tags": [ + "_NoOpSpan", + "__exit__" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpSpan.set_attribute", + "type": "function", + "name": "set_attribute", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "_NoOpSpan.set_attribute() 方法", + "tags": [ + "_NoOpSpan", + "set_attribute" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpSpan.add_event", + "type": "function", + "name": "add_event", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "_NoOpSpan.add_event() 方法", + "tags": [ + "_NoOpSpan", + "add_event" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpSpan.set_status", + "type": "function", + "name": "set_status", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "_NoOpSpan.set_status() 方法", + "tags": [ + "_NoOpSpan", + "set_status" + ], + "complexity": "simple" + }, + { + "id": "func:_NoOpSpan.record_exception", + "type": "function", + "name": "record_exception", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "_NoOpSpan.record_exception() 方法", + "tags": [ + "_NoOpSpan", + "record_exception" + ], + "complexity": "simple" + }, + { + "id": "class:AgentTool", + "type": "class", + "name": "AgentTool", + "filePath": "src/agentkit/tools/agent_tool.py", + "layer": "utility", + "summary": "将另一个 Agent 包装为 Tool", + "tags": [ + "AgentTool" + ], + "complexity": "simple" + }, + { + "id": "func:AgentTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/agent_tool.py", + "layer": "utility", + "summary": "AgentTool.__init__(name, description, agent_name, task_type, input_mapping, output_mapping, timeout_seconds, version, tags) 方法", + "tags": [ + "AgentTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AgentTool.set_dispatcher", + "type": "function", + "name": "set_dispatcher", + "filePath": "src/agentkit/tools/agent_tool.py", + "layer": "utility", + "summary": "AgentTool.set_dispatcher(dispatcher) 方法", + "tags": [ + "AgentTool", + "set_dispatcher" + ], + "complexity": "simple" + }, + { + "id": "func:AgentTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/agent_tool.py", + "layer": "utility", + "summary": "AgentTool.execute() 异步方法", + "tags": [ + "AgentTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:AskHumanTool", + "type": "class", + "name": "AskHumanTool", + "filePath": "src/agentkit/tools/ask_human.py", + "layer": "utility", + "summary": "Tool that asks the human user a question and waits for a reply.", + "tags": [ + "AskHumanTool" + ], + "complexity": "moderate" + }, + { + "id": "func:AskHumanTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/ask_human.py", + "layer": "utility", + "summary": "AskHumanTool.__init__(timeout) 方法", + "tags": [ + "AskHumanTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:AskHumanTool.configure", + "type": "function", + "name": "configure", + "filePath": "src/agentkit/tools/ask_human.py", + "layer": "utility", + "summary": "AskHumanTool.configure(pending_replies, ask_callback) 方法", + "tags": [ + "AskHumanTool", + "configure" + ], + "complexity": "simple" + }, + { + "id": "func:AskHumanTool.parameters", + "type": "function", + "name": "parameters", + "filePath": "src/agentkit/tools/ask_human.py", + "layer": "utility", + "summary": "AskHumanTool.parameters() 方法", + "tags": [ + "AskHumanTool", + "parameters" + ], + "complexity": "simple" + }, + { + "id": "func:AskHumanTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/ask_human.py", + "layer": "utility", + "summary": "AskHumanTool.execute() 异步方法", + "tags": [ + "AskHumanTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:BaiduSearchTool", + "type": "class", + "name": "BaiduSearchTool", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "百度搜索工具 - 执行关键词搜索,返回搜索结果", + "tags": [ + "BaiduSearchTool" + ], + "complexity": "moderate" + }, + { + "id": "func:BaiduSearchTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool.__init__(name, description, input_schema, output_schema, version, tags, api_key, api_url) 方法", + "tags": [ + "BaiduSearchTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:BaiduSearchTool._default_input_schema", + "type": "function", + "name": "_default_input_schema", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool._default_input_schema() 方法", + "tags": [ + "BaiduSearchTool", + "_default_input_schema" + ], + "complexity": "simple" + }, + { + "id": "func:BaiduSearchTool._default_output_schema", + "type": "function", + "name": "_default_output_schema", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool._default_output_schema() 方法", + "tags": [ + "BaiduSearchTool", + "_default_output_schema" + ], + "complexity": "simple" + }, + { + "id": "func:BaiduSearchTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool.execute() 异步方法", + "tags": [ + "BaiduSearchTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:BaiduSearchTool._search_via_api", + "type": "function", + "name": "_search_via_api", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool._search_via_api(query, max_results) 异步方法", + "tags": [ + "BaiduSearchTool", + "_search_via_api" + ], + "complexity": "simple" + }, + { + "id": "func:BaiduSearchTool._search_via_scrape", + "type": "function", + "name": "_search_via_scrape", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool._search_via_scrape(query, max_results) 异步方法", + "tags": [ + "BaiduSearchTool", + "_search_via_scrape" + ], + "complexity": "simple" + }, + { + "id": "func:BaiduSearchTool._parse_baidu_html", + "type": "function", + "name": "_parse_baidu_html", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool._parse_baidu_html(html, max_results) 方法", + "tags": [ + "BaiduSearchTool", + "_parse_baidu_html" + ], + "complexity": "simple" + }, + { + "id": "func:BaiduSearchTool._parse_baidu_html_alt", + "type": "function", + "name": "_parse_baidu_html_alt", + "filePath": "src/agentkit/tools/baidu_search.py", + "layer": "utility", + "summary": "BaiduSearchTool._parse_baidu_html_alt(html, max_results) 方法", + "tags": [ + "BaiduSearchTool", + "_parse_baidu_html_alt" + ], + "complexity": "simple" + }, + { + "id": "class:Tool", + "type": "class", + "name": "Tool", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "工具抽象基类", + "tags": [ + "Tool" + ], + "complexity": "moderate" + }, + { + "id": "func:Tool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.__init__(name, description, input_schema, output_schema, version, tags) 方法", + "tags": [ + "Tool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:Tool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.execute() 异步方法", + "tags": [ + "Tool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:Tool.before_execute", + "type": "function", + "name": "before_execute", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.before_execute() 异步方法", + "tags": [ + "Tool", + "before_execute" + ], + "complexity": "simple" + }, + { + "id": "func:Tool.after_execute", + "type": "function", + "name": "after_execute", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.after_execute(result) 异步方法", + "tags": [ + "Tool", + "after_execute" + ], + "complexity": "simple" + }, + { + "id": "func:Tool.on_error", + "type": "function", + "name": "on_error", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.on_error(error) 异步方法", + "tags": [ + "Tool", + "on_error" + ], + "complexity": "simple" + }, + { + "id": "func:Tool.safe_execute", + "type": "function", + "name": "safe_execute", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.safe_execute() 异步方法", + "tags": [ + "Tool", + "safe_execute" + ], + "complexity": "simple" + }, + { + "id": "func:Tool.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.to_dict() 方法", + "tags": [ + "Tool", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:Tool.__repr__", + "type": "function", + "name": "__repr__", + "filePath": "src/agentkit/tools/base.py", + "layer": "utility", + "summary": "Tool.__repr__() 方法", + "tags": [ + "Tool", + "__repr__" + ], + "complexity": "simple" + }, + { + "id": "class:SequentialChain", + "type": "class", + "name": "SequentialChain", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "顺序链 - 依次执行多个工具,前一个输出作为后一个输入", + "tags": [ + "SequentialChain" + ], + "complexity": "simple" + }, + { + "id": "func:SequentialChain.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "SequentialChain.__init__(name, description, tools, version, tags) 方法", + "tags": [ + "SequentialChain", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SequentialChain.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "SequentialChain.execute() 异步方法", + "tags": [ + "SequentialChain", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:ParallelFanOut", + "type": "class", + "name": "ParallelFanOut", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "并行扇出 - 同时执行多个工具,结果合并", + "tags": [ + "ParallelFanOut" + ], + "complexity": "simple" + }, + { + "id": "func:ParallelFanOut.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "ParallelFanOut.__init__(name, description, tools, merge_strategy, version, tags) 方法", + "tags": [ + "ParallelFanOut", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ParallelFanOut.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "ParallelFanOut.execute() 异步方法", + "tags": [ + "ParallelFanOut", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:DynamicSelector", + "type": "class", + "name": "DynamicSelector", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "动态选择器 - 根据输入动态选择合适的工具执行", + "tags": [ + "DynamicSelector" + ], + "complexity": "moderate" + }, + { + "id": "func:DynamicSelector.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "DynamicSelector.__init__(name, description, tools, mode, llm_client, version, tags) 方法", + "tags": [ + "DynamicSelector", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:DynamicSelector.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "DynamicSelector.execute() 异步方法", + "tags": [ + "DynamicSelector", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:DynamicSelector._select_by_keyword", + "type": "function", + "name": "_select_by_keyword", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "DynamicSelector._select_by_keyword(kwargs, intent) 方法", + "tags": [ + "DynamicSelector", + "_select_by_keyword" + ], + "complexity": "simple" + }, + { + "id": "func:DynamicSelector._select_by_llm", + "type": "function", + "name": "_select_by_llm", + "filePath": "src/agentkit/tools/composition.py", + "layer": "utility", + "summary": "DynamicSelector._select_by_llm(kwargs) 异步方法", + "tags": [ + "DynamicSelector", + "_select_by_llm" + ], + "complexity": "simple" + }, + { + "id": "class:ComputerUseTool", + "type": "class", + "name": "ComputerUseTool", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "Computer Use 工具", + "tags": [ + "ComputerUseTool" + ], + "complexity": "complex" + }, + { + "id": "func:ComputerUseTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool.__init__(name, description, input_schema, output_schema, version, tags, api_key, model, api_base_url, session_factory, recorder, fallback_callback, max_retries, request_timeout) 方法", + "tags": [ + "ComputerUseTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._get_http_client", + "type": "function", + "name": "_get_http_client", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._get_http_client() 异步方法", + "tags": [ + "ComputerUseTool", + "_get_http_client" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool.close() 异步方法", + "tags": [ + "ComputerUseTool", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._default_input_schema", + "type": "function", + "name": "_default_input_schema", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._default_input_schema() 方法", + "tags": [ + "ComputerUseTool", + "_default_input_schema" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._default_output_schema", + "type": "function", + "name": "_default_output_schema", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._default_output_schema() 方法", + "tags": [ + "ComputerUseTool", + "_default_output_schema" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool.execute() 异步方法", + "tags": [ + "ComputerUseTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._execute_with_fallback", + "type": "function", + "name": "_execute_with_fallback", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._execute_with_fallback(session, action, params) 异步方法", + "tags": [ + "ComputerUseTool", + "_execute_with_fallback" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._call_anthropic_api", + "type": "function", + "name": "_call_anthropic_api", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._call_anthropic_api(session, action, params) 异步方法", + "tags": [ + "ComputerUseTool", + "_call_anthropic_api" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._validate_params", + "type": "function", + "name": "_validate_params", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._validate_params(action, kwargs) 方法", + "tags": [ + "ComputerUseTool", + "_validate_params" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._format_result", + "type": "function", + "name": "_format_result", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._format_result(result, session_id) 方法", + "tags": [ + "ComputerUseTool", + "_format_result" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool._error_result", + "type": "function", + "name": "_error_result", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool._error_result(action, error, fallback) 方法", + "tags": [ + "ComputerUseTool", + "_error_result" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool.session_manager", + "type": "function", + "name": "session_manager", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool.session_manager() 方法", + "tags": [ + "ComputerUseTool", + "session_manager" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseTool.recorder", + "type": "function", + "name": "recorder", + "filePath": "src/agentkit/tools/computer_use.py", + "layer": "utility", + "summary": "ComputerUseTool.recorder() 方法", + "tags": [ + "ComputerUseTool", + "recorder" + ], + "complexity": "simple" + }, + { + "id": "class:ActionRecord", + "type": "class", + "name": "ActionRecord", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "操作记录", + "tags": [ + "ActionRecord" + ], + "complexity": "simple" + }, + { + "id": "func:ActionRecord.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ActionRecord.to_dict() 方法", + "tags": [ + "ActionRecord", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "func:ActionRecord.from_dict", + "type": "function", + "name": "from_dict", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ActionRecord.from_dict(cls, data) 方法", + "tags": [ + "ActionRecord", + "from_dict" + ], + "complexity": "simple" + }, + { + "id": "class:ComputerUseRecorder", + "type": "class", + "name": "ComputerUseRecorder", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "Computer Use 操作录制器", + "tags": [ + "ComputerUseRecorder" + ], + "complexity": "complex" + }, + { + "id": "func:ComputerUseRecorder.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.__init__(screenshot_dir) 方法", + "tags": [ + "ComputerUseRecorder", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.record", + "type": "function", + "name": "record", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.record(action, params, result, screenshot_path) 方法", + "tags": [ + "ComputerUseRecorder", + "record" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.get_records", + "type": "function", + "name": "get_records", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.get_records() 方法", + "tags": [ + "ComputerUseRecorder", + "get_records" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.get_records_by_action", + "type": "function", + "name": "get_records_by_action", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.get_records_by_action(action) 方法", + "tags": [ + "ComputerUseRecorder", + "get_records_by_action" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.get_failed_records", + "type": "function", + "name": "get_failed_records", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.get_failed_records() 方法", + "tags": [ + "ComputerUseRecorder", + "get_failed_records" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.replay", + "type": "function", + "name": "replay", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.replay(session) 异步方法", + "tags": [ + "ComputerUseRecorder", + "replay" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.save_recording", + "type": "function", + "name": "save_recording", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.save_recording(path) 方法", + "tags": [ + "ComputerUseRecorder", + "save_recording" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.load_recording", + "type": "function", + "name": "load_recording", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.load_recording(path) 方法", + "tags": [ + "ComputerUseRecorder", + "load_recording" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.clear", + "type": "function", + "name": "clear", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.clear() 方法", + "tags": [ + "ComputerUseRecorder", + "clear" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.total_actions", + "type": "function", + "name": "total_actions", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.total_actions() 方法", + "tags": [ + "ComputerUseRecorder", + "total_actions" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.success_count", + "type": "function", + "name": "success_count", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.success_count() 方法", + "tags": [ + "ComputerUseRecorder", + "success_count" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.failure_count", + "type": "function", + "name": "failure_count", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.failure_count() 方法", + "tags": [ + "ComputerUseRecorder", + "failure_count" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseRecorder.summary", + "type": "function", + "name": "summary", + "filePath": "src/agentkit/tools/computer_use_recorder.py", + "layer": "utility", + "summary": "ComputerUseRecorder.summary() 方法", + "tags": [ + "ComputerUseRecorder", + "summary" + ], + "complexity": "simple" + }, + { + "id": "class:ScreenInfo", + "type": "class", + "name": "ScreenInfo", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "屏幕信息", + "tags": [ + "ScreenInfo" + ], + "complexity": "simple" + }, + { + "id": "class:ActionResult", + "type": "class", + "name": "ActionResult", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "操作执行结果", + "tags": [ + "ActionResult" + ], + "complexity": "simple" + }, + { + "id": "class:ComputerUseSession", + "type": "class", + "name": "ComputerUseSession", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "虚拟桌面会话抽象基类", + "tags": [ + "ComputerUseSession" + ], + "complexity": "complex" + }, + { + "id": "func:ComputerUseSession.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.__init__(session_id, screen_width, screen_height) 方法", + "tags": [ + "ComputerUseSession", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.is_started", + "type": "function", + "name": "is_started", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.is_started() 方法", + "tags": [ + "ComputerUseSession", + "is_started" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.start", + "type": "function", + "name": "start", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.start() 异步方法", + "tags": [ + "ComputerUseSession", + "start" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.stop", + "type": "function", + "name": "stop", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.stop() 异步方法", + "tags": [ + "ComputerUseSession", + "stop" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.screenshot", + "type": "function", + "name": "screenshot", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.screenshot() 异步方法", + "tags": [ + "ComputerUseSession", + "screenshot" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.execute_action", + "type": "function", + "name": "execute_action", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.execute_action(action) 异步方法", + "tags": [ + "ComputerUseSession", + "execute_action" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.record_action", + "type": "function", + "name": "record_action", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.record_action(action, params, result) 方法", + "tags": [ + "ComputerUseSession", + "record_action" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.action_history", + "type": "function", + "name": "action_history", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.action_history() 方法", + "tags": [ + "ComputerUseSession", + "action_history" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSession.__repr__", + "type": "function", + "name": "__repr__", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSession.__repr__() 方法", + "tags": [ + "ComputerUseSession", + "__repr__" + ], + "complexity": "simple" + }, + { + "id": "class:InMemoryComputerUseSession", + "type": "class", + "name": "InMemoryComputerUseSession", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "内存模拟会话,用于测试", + "tags": [ + "InMemoryComputerUseSession" + ], + "complexity": "moderate" + }, + { + "id": "func:InMemoryComputerUseSession.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "InMemoryComputerUseSession.__init__(session_id, screen_width, screen_height) 方法", + "tags": [ + "InMemoryComputerUseSession", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryComputerUseSession.start", + "type": "function", + "name": "start", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "InMemoryComputerUseSession.start() 异步方法", + "tags": [ + "InMemoryComputerUseSession", + "start" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryComputerUseSession.stop", + "type": "function", + "name": "stop", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "InMemoryComputerUseSession.stop() 异步方法", + "tags": [ + "InMemoryComputerUseSession", + "stop" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryComputerUseSession.screenshot", + "type": "function", + "name": "screenshot", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "InMemoryComputerUseSession.screenshot() 异步方法", + "tags": [ + "InMemoryComputerUseSession", + "screenshot" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryComputerUseSession.execute_action", + "type": "function", + "name": "execute_action", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "InMemoryComputerUseSession.execute_action(action) 异步方法", + "tags": [ + "InMemoryComputerUseSession", + "execute_action" + ], + "complexity": "simple" + }, + { + "id": "func:InMemoryComputerUseSession._simulate_action", + "type": "function", + "name": "_simulate_action", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "InMemoryComputerUseSession._simulate_action(action) 方法", + "tags": [ + "InMemoryComputerUseSession", + "_simulate_action" + ], + "complexity": "simple" + }, + { + "id": "class:DockerComputerUseSession", + "type": "class", + "name": "DockerComputerUseSession", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "Docker 沙箱虚拟桌面会话", + "tags": [ + "DockerComputerUseSession" + ], + "complexity": "moderate" + }, + { + "id": "func:DockerComputerUseSession.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "DockerComputerUseSession.__init__(session_id, screen_width, screen_height, container_image, docker_url) 方法", + "tags": [ + "DockerComputerUseSession", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:DockerComputerUseSession.container_id", + "type": "function", + "name": "container_id", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "DockerComputerUseSession.container_id() 方法", + "tags": [ + "DockerComputerUseSession", + "container_id" + ], + "complexity": "simple" + }, + { + "id": "func:DockerComputerUseSession.start", + "type": "function", + "name": "start", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "DockerComputerUseSession.start() 异步方法", + "tags": [ + "DockerComputerUseSession", + "start" + ], + "complexity": "simple" + }, + { + "id": "func:DockerComputerUseSession.stop", + "type": "function", + "name": "stop", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "DockerComputerUseSession.stop() 异步方法", + "tags": [ + "DockerComputerUseSession", + "stop" + ], + "complexity": "simple" + }, + { + "id": "func:DockerComputerUseSession.screenshot", + "type": "function", + "name": "screenshot", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "DockerComputerUseSession.screenshot() 异步方法", + "tags": [ + "DockerComputerUseSession", + "screenshot" + ], + "complexity": "simple" + }, + { + "id": "func:DockerComputerUseSession.execute_action", + "type": "function", + "name": "execute_action", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "DockerComputerUseSession.execute_action(action) 异步方法", + "tags": [ + "DockerComputerUseSession", + "execute_action" + ], + "complexity": "simple" + }, + { + "id": "class:ComputerUseSessionManager", + "type": "class", + "name": "ComputerUseSessionManager", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "Computer Use 会话管理器", + "tags": [ + "ComputerUseSessionManager" + ], + "complexity": "moderate" + }, + { + "id": "func:ComputerUseSessionManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSessionManager.__init__(max_sessions, session_factory) 方法", + "tags": [ + "ComputerUseSessionManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSessionManager.get_or_create", + "type": "function", + "name": "get_or_create", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSessionManager.get_or_create(session_id) 方法", + "tags": [ + "ComputerUseSessionManager", + "get_or_create" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSessionManager.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSessionManager.get(session_id) 方法", + "tags": [ + "ComputerUseSessionManager", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSessionManager.remove", + "type": "function", + "name": "remove", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSessionManager.remove(session_id) 方法", + "tags": [ + "ComputerUseSessionManager", + "remove" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSessionManager.list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSessionManager.list_sessions() 方法", + "tags": [ + "ComputerUseSessionManager", + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSessionManager.has_session", + "type": "function", + "name": "has_session", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSessionManager.has_session(session_id) 方法", + "tags": [ + "ComputerUseSessionManager", + "has_session" + ], + "complexity": "simple" + }, + { + "id": "func:ComputerUseSessionManager.close_all", + "type": "function", + "name": "close_all", + "filePath": "src/agentkit/tools/computer_use_session.py", + "layer": "utility", + "summary": "ComputerUseSessionManager.close_all() 异步方法", + "tags": [ + "ComputerUseSessionManager", + "close_all" + ], + "complexity": "simple" + }, + { + "id": "class:FunctionTool", + "type": "class", + "name": "FunctionTool", + "filePath": "src/agentkit/tools/function_tool.py", + "layer": "utility", + "summary": "将普通 Python 函数包装为 Tool", + "tags": [ + "FunctionTool" + ], + "complexity": "simple" + }, + { + "id": "func:FunctionTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/function_tool.py", + "layer": "utility", + "summary": "FunctionTool.__init__(name, description, func, input_schema, output_schema, version, tags) 方法", + "tags": [ + "FunctionTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:FunctionTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/function_tool.py", + "layer": "utility", + "summary": "FunctionTool.execute() 异步方法", + "tags": [ + "FunctionTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:FunctionTool._infer_schema", + "type": "function", + "name": "_infer_schema", + "filePath": "src/agentkit/tools/function_tool.py", + "layer": "utility", + "summary": "FunctionTool._infer_schema(func) 方法", + "tags": [ + "FunctionTool", + "_infer_schema" + ], + "complexity": "simple" + }, + { + "id": "class:HeadroomRetrieveTool", + "type": "class", + "name": "HeadroomRetrieveTool", + "filePath": "src/agentkit/tools/headroom_retrieve.py", + "layer": "utility", + "summary": "从 CCR 缓存检索原始未压缩数据", + "tags": [ + "HeadroomRetrieveTool" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomRetrieveTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/headroom_retrieve.py", + "layer": "utility", + "summary": "HeadroomRetrieveTool.__init__(compressor) 方法", + "tags": [ + "HeadroomRetrieveTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:HeadroomRetrieveTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/headroom_retrieve.py", + "layer": "utility", + "summary": "HeadroomRetrieveTool.execute() 异步方法", + "tags": [ + "HeadroomRetrieveTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:MCPTool", + "type": "class", + "name": "MCPTool", + "filePath": "src/agentkit/tools/mcp_tool.py", + "layer": "utility", + "summary": "MCP 工具 - 通过 MCP Client 调用远程工具", + "tags": [ + "MCPTool" + ], + "complexity": "simple" + }, + { + "id": "func:MCPTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/mcp_tool.py", + "layer": "utility", + "summary": "MCPTool.__init__(name, description, client, input_schema, output_schema, version, tags) 方法", + "tags": [ + "MCPTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MCPTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/mcp_tool.py", + "layer": "utility", + "summary": "MCPTool.execute() 异步方法", + "tags": [ + "MCPTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:MemoryTool", + "type": "class", + "name": "MemoryTool", + "filePath": "src/agentkit/tools/memory_tool.py", + "layer": "utility", + "summary": "Agent 可调用的记忆操作工具.", + "tags": [ + "MemoryTool" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/memory_tool.py", + "layer": "utility", + "summary": "MemoryTool.__init__(memory_store) 方法", + "tags": [ + "MemoryTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/memory_tool.py", + "layer": "utility", + "summary": "MemoryTool.execute() 异步方法", + "tags": [ + "MemoryTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:MemoryTool._update_soul", + "type": "function", + "name": "_update_soul", + "filePath": "src/agentkit/tools/memory_tool.py", + "layer": "utility", + "summary": "MemoryTool._update_soul(mf, section, content, reason) 异步方法", + "tags": [ + "MemoryTool", + "_update_soul" + ], + "complexity": "simple" + }, + { + "id": "class:ErrorType", + "type": "class", + "name": "ErrorType", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "命令输出错误类型", + "tags": [ + "ErrorType" + ], + "complexity": "simple" + }, + { + "id": "class:ParsedOutput", + "type": "class", + "name": "ParsedOutput", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "结构化命令输出", + "tags": [ + "ParsedOutput" + ], + "complexity": "simple" + }, + { + "id": "func:ParsedOutput.to_dict", + "type": "function", + "name": "to_dict", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "ParsedOutput.to_dict() 方法", + "tags": [ + "ParsedOutput", + "to_dict" + ], + "complexity": "simple" + }, + { + "id": "class:OutputParser", + "type": "class", + "name": "OutputParser", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "命令输出结构化解析器", + "tags": [ + "OutputParser" + ], + "complexity": "simple" + }, + { + "id": "func:OutputParser.parse", + "type": "function", + "name": "parse", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "OutputParser.parse(output, exit_code) 方法", + "tags": [ + "OutputParser", + "parse" + ], + "complexity": "simple" + }, + { + "id": "func:OutputParser._extract_message", + "type": "function", + "name": "_extract_message", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "OutputParser._extract_message(output) 方法", + "tags": [ + "OutputParser", + "_extract_message" + ], + "complexity": "simple" + }, + { + "id": "func:OutputParser._classify_error", + "type": "function", + "name": "_classify_error", + "filePath": "src/agentkit/tools/output_parser.py", + "layer": "utility", + "summary": "OutputParser._classify_error(output, exit_code) 方法", + "tags": [ + "OutputParser", + "_classify_error" + ], + "complexity": "simple" + }, + { + "id": "class:PTYOutput", + "type": "class", + "name": "PTYOutput", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTY 输出结果", + "tags": [ + "PTYOutput" + ], + "complexity": "simple" + }, + { + "id": "class:PTYSession", + "type": "class", + "name": "PTYSession", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "伪终端会话 - 支持交互式命令", + "tags": [ + "PTYSession" + ], + "complexity": "complex" + }, + { + "id": "func:PTYSession.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession.__init__(auto_respond, custom_rules, default_timeout, buffer_size) 方法", + "tags": [ + "PTYSession", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession.is_running", + "type": "function", + "name": "is_running", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession.is_running() 方法", + "tags": [ + "PTYSession", + "is_running" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession.start", + "type": "function", + "name": "start", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession.start() 异步方法", + "tags": [ + "PTYSession", + "start" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession.run_command", + "type": "function", + "name": "run_command", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession.run_command(command, timeout, cwd, env) 异步方法", + "tags": [ + "PTYSession", + "run_command" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession.send", + "type": "function", + "name": "send", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession.send(line) 异步方法", + "tags": [ + "PTYSession", + "send" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession.read_output", + "type": "function", + "name": "read_output", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession.read_output(timeout) 异步方法", + "tags": [ + "PTYSession", + "read_output" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession.close() 异步方法", + "tags": [ + "PTYSession", + "close" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession._read_until_exit", + "type": "function", + "name": "_read_until_exit", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession._read_until_exit(timeout) 异步方法", + "tags": [ + "PTYSession", + "_read_until_exit" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession._drain_remaining_output", + "type": "function", + "name": "_drain_remaining_output", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession._drain_remaining_output() 异步方法", + "tags": [ + "PTYSession", + "_drain_remaining_output" + ], + "complexity": "simple" + }, + { + "id": "func:PTYSession._try_auto_respond", + "type": "function", + "name": "_try_auto_respond", + "filePath": "src/agentkit/tools/pty_session.py", + "layer": "utility", + "summary": "PTYSession._try_auto_respond(recent_output) 异步方法", + "tags": [ + "PTYSession", + "_try_auto_respond" + ], + "complexity": "simple" + }, + { + "id": "class:ToolRegistry", + "type": "class", + "name": "ToolRegistry", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "工具注册中心,管理工具的注册、发现、版本", + "tags": [ + "ToolRegistry" + ], + "complexity": "moderate" + }, + { + "id": "func:ToolRegistry.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.__init__() 方法", + "tags": [ + "ToolRegistry", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ToolRegistry.register", + "type": "function", + "name": "register", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.register(tool) 方法", + "tags": [ + "ToolRegistry", + "register" + ], + "complexity": "simple" + }, + { + "id": "func:ToolRegistry.unregister", + "type": "function", + "name": "unregister", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.unregister(name, version) 方法", + "tags": [ + "ToolRegistry", + "unregister" + ], + "complexity": "simple" + }, + { + "id": "func:ToolRegistry.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.get(name, version) 方法", + "tags": [ + "ToolRegistry", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:ToolRegistry.list_tools", + "type": "function", + "name": "list_tools", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.list_tools(tag) 方法", + "tags": [ + "ToolRegistry", + "list_tools" + ], + "complexity": "simple" + }, + { + "id": "func:ToolRegistry.list_all_versions", + "type": "function", + "name": "list_all_versions", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.list_all_versions(name) 方法", + "tags": [ + "ToolRegistry", + "list_all_versions" + ], + "complexity": "simple" + }, + { + "id": "func:ToolRegistry.has_tool", + "type": "function", + "name": "has_tool", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.has_tool(name) 方法", + "tags": [ + "ToolRegistry", + "has_tool" + ], + "complexity": "simple" + }, + { + "id": "func:ToolRegistry.clear", + "type": "function", + "name": "clear", + "filePath": "src/agentkit/tools/registry.py", + "layer": "utility", + "summary": "ToolRegistry.clear() 方法", + "tags": [ + "ToolRegistry", + "clear" + ], + "complexity": "simple" + }, + { + "id": "class:SchemaExtractTool", + "type": "class", + "name": "SchemaExtractTool", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "结构化数据提取工具 - 从 HTML 中提取 JSON-LD、Microdata、RDFa 等", + "tags": [ + "SchemaExtractTool" + ], + "complexity": "moderate" + }, + { + "id": "func:SchemaExtractTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaExtractTool.__init__(name, description, input_schema, output_schema, version, tags) 方法", + "tags": [ + "SchemaExtractTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaExtractTool._default_input_schema", + "type": "function", + "name": "_default_input_schema", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaExtractTool._default_input_schema() 方法", + "tags": [ + "SchemaExtractTool", + "_default_input_schema" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaExtractTool._default_output_schema", + "type": "function", + "name": "_default_output_schema", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaExtractTool._default_output_schema() 方法", + "tags": [ + "SchemaExtractTool", + "_default_output_schema" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaExtractTool._is_url", + "type": "function", + "name": "_is_url", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaExtractTool._is_url(text) 方法", + "tags": [ + "SchemaExtractTool", + "_is_url" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaExtractTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaExtractTool.execute() 异步方法", + "tags": [ + "SchemaExtractTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:SchemaGenerateTool", + "type": "class", + "name": "SchemaGenerateTool", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "JSON-LD 结构化数据生成工具 - 为常见 Schema.org 类型生成标记", + "tags": [ + "SchemaGenerateTool" + ], + "complexity": "moderate" + }, + { + "id": "func:SchemaGenerateTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaGenerateTool.__init__(name, description, input_schema, output_schema, version, tags) 方法", + "tags": [ + "SchemaGenerateTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaGenerateTool._default_input_schema", + "type": "function", + "name": "_default_input_schema", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaGenerateTool._default_input_schema() 方法", + "tags": [ + "SchemaGenerateTool", + "_default_input_schema" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaGenerateTool._default_output_schema", + "type": "function", + "name": "_default_output_schema", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaGenerateTool._default_output_schema() 方法", + "tags": [ + "SchemaGenerateTool", + "_default_output_schema" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaGenerateTool._generate_manual", + "type": "function", + "name": "_generate_manual", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaGenerateTool._generate_manual(schema_type, properties) 方法", + "tags": [ + "SchemaGenerateTool", + "_generate_manual" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaGenerateTool._generate_with_schemaorg", + "type": "function", + "name": "_generate_with_schemaorg", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaGenerateTool._generate_with_schemaorg(schema_type, properties) 方法", + "tags": [ + "SchemaGenerateTool", + "_generate_with_schemaorg" + ], + "complexity": "simple" + }, + { + "id": "func:SchemaGenerateTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/schema_tools.py", + "layer": "utility", + "summary": "SchemaGenerateTool.execute() 异步方法", + "tags": [ + "SchemaGenerateTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:ShellTool", + "type": "class", + "name": "ShellTool", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "Shell 命令执行工具", + "tags": [ + "ShellTool" + ], + "complexity": "complex" + }, + { + "id": "func:ShellTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool.__init__(name, description, input_schema, output_schema, version, tags, confirm_callback, default_timeout, max_output_length) 方法", + "tags": [ + "ShellTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._default_input_schema", + "type": "function", + "name": "_default_input_schema", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._default_input_schema() 方法", + "tags": [ + "ShellTool", + "_default_input_schema" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._default_output_schema", + "type": "function", + "name": "_default_output_schema", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._default_output_schema() 方法", + "tags": [ + "ShellTool", + "_default_output_schema" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool.execute() 异步方法", + "tags": [ + "ShellTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._execute_standalone", + "type": "function", + "name": "_execute_standalone", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._execute_standalone(command, timeout, working_dir, interactive) 异步方法", + "tags": [ + "ShellTool", + "_execute_standalone" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._execute_in_session", + "type": "function", + "name": "_execute_in_session", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._execute_in_session(command, session_id, timeout, working_dir, interactive) 异步方法", + "tags": [ + "ShellTool", + "_execute_in_session" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._execute_with_pty", + "type": "function", + "name": "_execute_with_pty", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._execute_with_pty(command, timeout, cwd, env) 异步方法", + "tags": [ + "ShellTool", + "_execute_with_pty" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._is_dangerous", + "type": "function", + "name": "_is_dangerous", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._is_dangerous(command) 方法", + "tags": [ + "ShellTool", + "_is_dangerous" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._is_single_command_dangerous", + "type": "function", + "name": "_is_single_command_dangerous", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._is_single_command_dangerous(command) 方法", + "tags": [ + "ShellTool", + "_is_single_command_dangerous" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._request_confirmation", + "type": "function", + "name": "_request_confirmation", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._request_confirmation(command) 异步方法", + "tags": [ + "ShellTool", + "_request_confirmation" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool._log_audit", + "type": "function", + "name": "_log_audit", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool._log_audit(command, session_id, exit_code, blocked) 方法", + "tags": [ + "ShellTool", + "_log_audit" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool.session_manager", + "type": "function", + "name": "session_manager", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool.session_manager() 方法", + "tags": [ + "ShellTool", + "session_manager" + ], + "complexity": "simple" + }, + { + "id": "func:ShellTool.audit_log", + "type": "function", + "name": "audit_log", + "filePath": "src/agentkit/tools/shell.py", + "layer": "utility", + "summary": "ShellTool.audit_log() 方法", + "tags": [ + "ShellTool", + "audit_log" + ], + "complexity": "simple" + }, + { + "id": "class:SkillInstallTool", + "type": "class", + "name": "SkillInstallTool", + "filePath": "src/agentkit/tools/skill_install.py", + "layer": "utility", + "summary": "技能安装工具", + "tags": [ + "SkillInstallTool" + ], + "complexity": "simple" + }, + { + "id": "func:SkillInstallTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/skill_install.py", + "layer": "utility", + "summary": "SkillInstallTool.__init__(name, description, input_schema, output_schema, version, tags, confirm_callback, skill_registry, tool_registry) 方法", + "tags": [ + "SkillInstallTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:SkillInstallTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/skill_install.py", + "layer": "utility", + "summary": "SkillInstallTool.execute() 异步方法", + "tags": [ + "SkillInstallTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:SkillInstallTool._try_register_skill", + "type": "function", + "name": "_try_register_skill", + "filePath": "src/agentkit/tools/skill_install.py", + "layer": "utility", + "summary": "SkillInstallTool._try_register_skill(name) 方法", + "tags": [ + "SkillInstallTool", + "_try_register_skill" + ], + "complexity": "simple" + }, + { + "id": "class:CommandRecord", + "type": "class", + "name": "CommandRecord", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "命令执行记录", + "tags": [ + "CommandRecord" + ], + "complexity": "simple" + }, + { + "id": "class:TerminalSession", + "type": "class", + "name": "TerminalSession", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "终端会话 - 跨命令保持 cwd/env/history 状态", + "tags": [ + "TerminalSession" + ], + "complexity": "complex" + }, + { + "id": "func:TerminalSession.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.__init__(session_id, cwd, env, max_history) 方法", + "tags": [ + "TerminalSession", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.cwd", + "type": "function", + "name": "cwd", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.cwd() 方法", + "tags": [ + "TerminalSession", + "cwd" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.env", + "type": "function", + "name": "env", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.env() 方法", + "tags": [ + "TerminalSession", + "env" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.history", + "type": "function", + "name": "history", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.history() 方法", + "tags": [ + "TerminalSession", + "history" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.created_at", + "type": "function", + "name": "created_at", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.created_at() 方法", + "tags": [ + "TerminalSession", + "created_at" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.get_cwd", + "type": "function", + "name": "get_cwd", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.get_cwd() 方法", + "tags": [ + "TerminalSession", + "get_cwd" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.set_cwd", + "type": "function", + "name": "set_cwd", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.set_cwd(cwd) 方法", + "tags": [ + "TerminalSession", + "set_cwd" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.get_env", + "type": "function", + "name": "get_env", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.get_env() 方法", + "tags": [ + "TerminalSession", + "get_env" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.set_env", + "type": "function", + "name": "set_env", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.set_env(key, value) 方法", + "tags": [ + "TerminalSession", + "set_env" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.update_env", + "type": "function", + "name": "update_env", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.update_env(env) 方法", + "tags": [ + "TerminalSession", + "update_env" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.get_history", + "type": "function", + "name": "get_history", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.get_history() 方法", + "tags": [ + "TerminalSession", + "get_history" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.execute(command, timeout) 异步方法", + "tags": [ + "TerminalSession", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession._build_command", + "type": "function", + "name": "_build_command", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession._build_command(command) 方法", + "tags": [ + "TerminalSession", + "_build_command" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession._update_state_after_execution", + "type": "function", + "name": "_update_state_after_execution", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession._update_state_after_execution(command, output, exit_code) 方法", + "tags": [ + "TerminalSession", + "_update_state_after_execution" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession._parse_cd_commands", + "type": "function", + "name": "_parse_cd_commands", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession._parse_cd_commands(command, output) 方法", + "tags": [ + "TerminalSession", + "_parse_cd_commands" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession._parse_export_commands", + "type": "function", + "name": "_parse_export_commands", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession._parse_export_commands(command) 方法", + "tags": [ + "TerminalSession", + "_parse_export_commands" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession._add_history", + "type": "function", + "name": "_add_history", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession._add_history(record) 方法", + "tags": [ + "TerminalSession", + "_add_history" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSession.close", + "type": "function", + "name": "close", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSession.close() 方法", + "tags": [ + "TerminalSession", + "close" + ], + "complexity": "simple" + }, + { + "id": "class:TerminalSessionManager", + "type": "class", + "name": "TerminalSessionManager", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "终端会话管理器 - 按 ID 管理多个 TerminalSession", + "tags": [ + "TerminalSessionManager" + ], + "complexity": "moderate" + }, + { + "id": "func:TerminalSessionManager.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSessionManager.__init__(max_sessions) 方法", + "tags": [ + "TerminalSessionManager", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSessionManager.get_or_create", + "type": "function", + "name": "get_or_create", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSessionManager.get_or_create(session_id, cwd, env) 方法", + "tags": [ + "TerminalSessionManager", + "get_or_create" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSessionManager.get", + "type": "function", + "name": "get", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSessionManager.get(session_id) 方法", + "tags": [ + "TerminalSessionManager", + "get" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSessionManager.remove", + "type": "function", + "name": "remove", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSessionManager.remove(session_id) 方法", + "tags": [ + "TerminalSessionManager", + "remove" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSessionManager.list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSessionManager.list_sessions() 方法", + "tags": [ + "TerminalSessionManager", + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSessionManager.has_session", + "type": "function", + "name": "has_session", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSessionManager.has_session(session_id) 方法", + "tags": [ + "TerminalSessionManager", + "has_session" + ], + "complexity": "simple" + }, + { + "id": "func:TerminalSessionManager.close_all", + "type": "function", + "name": "close_all", + "filePath": "src/agentkit/tools/terminal_session.py", + "layer": "utility", + "summary": "TerminalSessionManager.close_all() 方法", + "tags": [ + "TerminalSessionManager", + "close_all" + ], + "complexity": "simple" + }, + { + "id": "class:WebCrawlTool", + "type": "class", + "name": "WebCrawlTool", + "filePath": "src/agentkit/tools/web_crawl.py", + "layer": "utility", + "summary": "网页抓取工具 - 使用 Crawl4AI,可选依赖未安装时优雅降级", + "tags": [ + "WebCrawlTool" + ], + "complexity": "moderate" + }, + { + "id": "func:WebCrawlTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/web_crawl.py", + "layer": "utility", + "summary": "WebCrawlTool.__init__(name, description, input_schema, output_schema, version, tags) 方法", + "tags": [ + "WebCrawlTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:WebCrawlTool._default_input_schema", + "type": "function", + "name": "_default_input_schema", + "filePath": "src/agentkit/tools/web_crawl.py", + "layer": "utility", + "summary": "WebCrawlTool._default_input_schema() 方法", + "tags": [ + "WebCrawlTool", + "_default_input_schema" + ], + "complexity": "simple" + }, + { + "id": "func:WebCrawlTool._default_output_schema", + "type": "function", + "name": "_default_output_schema", + "filePath": "src/agentkit/tools/web_crawl.py", + "layer": "utility", + "summary": "WebCrawlTool._default_output_schema() 方法", + "tags": [ + "WebCrawlTool", + "_default_output_schema" + ], + "complexity": "simple" + }, + { + "id": "func:WebCrawlTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/web_crawl.py", + "layer": "utility", + "summary": "WebCrawlTool.execute() 异步方法", + "tags": [ + "WebCrawlTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "class:WebSearchTool", + "type": "class", + "name": "WebSearchTool", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "通用网页搜索工具。", + "tags": [ + "WebSearchTool" + ], + "complexity": "complex" + }, + { + "id": "func:WebSearchTool.__init__", + "type": "function", + "name": "__init__", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool.__init__(name, description, input_schema, output_schema, version, tags, tavily_api_key, serper_api_key, default_max_results) 方法", + "tags": [ + "WebSearchTool", + "__init__" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._default_input_schema", + "type": "function", + "name": "_default_input_schema", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._default_input_schema() 方法", + "tags": [ + "WebSearchTool", + "_default_input_schema" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._default_output_schema", + "type": "function", + "name": "_default_output_schema", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._default_output_schema() 方法", + "tags": [ + "WebSearchTool", + "_default_output_schema" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool.execute", + "type": "function", + "name": "execute", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool.execute() 异步方法", + "tags": [ + "WebSearchTool", + "execute" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._search_tavily", + "type": "function", + "name": "_search_tavily", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._search_tavily(query, max_results) 异步方法", + "tags": [ + "WebSearchTool", + "_search_tavily" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._search_serper", + "type": "function", + "name": "_search_serper", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._search_serper(query, max_results) 异步方法", + "tags": [ + "WebSearchTool", + "_search_serper" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._search_duckduckgo", + "type": "function", + "name": "_search_duckduckgo", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._search_duckduckgo(query, max_results) 异步方法", + "tags": [ + "WebSearchTool", + "_search_duckduckgo" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._contains_cjk", + "type": "function", + "name": "_contains_cjk", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._contains_cjk(text) 方法", + "tags": [ + "WebSearchTool", + "_contains_cjk" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._cjk_to_english_hint", + "type": "function", + "name": "_cjk_to_english_hint", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._cjk_to_english_hint(query) 方法", + "tags": [ + "WebSearchTool", + "_cjk_to_english_hint" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._search_duckduckgo_html", + "type": "function", + "name": "_search_duckduckgo_html", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._search_duckduckgo_html(query, max_results) 异步方法", + "tags": [ + "WebSearchTool", + "_search_duckduckgo_html" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._search_duckduckgo_instant", + "type": "function", + "name": "_search_duckduckgo_instant", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._search_duckduckgo_instant(query, max_results) 异步方法", + "tags": [ + "WebSearchTool", + "_search_duckduckgo_instant" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._search_bing", + "type": "function", + "name": "_search_bing", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._search_bing(query, max_results) 异步方法", + "tags": [ + "WebSearchTool", + "_search_bing" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._parse_bing_html", + "type": "function", + "name": "_parse_bing_html", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._parse_bing_html(html, max_results) 方法", + "tags": [ + "WebSearchTool", + "_parse_bing_html" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._parse_duckduckgo_html", + "type": "function", + "name": "_parse_duckduckgo_html", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._parse_duckduckgo_html(html, max_results) 方法", + "tags": [ + "WebSearchTool", + "_parse_duckduckgo_html" + ], + "complexity": "simple" + }, + { + "id": "func:WebSearchTool._parse_duckduckgo_html_alt", + "type": "function", + "name": "_parse_duckduckgo_html_alt", + "filePath": "src/agentkit/tools/web_search.py", + "layer": "utility", + "summary": "WebSearchTool._parse_duckduckgo_html_alt(html, max_results) 方法", + "tags": [ + "WebSearchTool", + "_parse_duckduckgo_html_alt" + ], + "complexity": "simple" + }, + { + "id": "func:_internal_headers", + "type": "function", + "name": "_internal_headers", + "filePath": "configs/geo_handlers.py", + "layer": "utility", + "summary": "_internal_headers() 函数 → dict", + "tags": [ + "_internal_headers" + ], + "complexity": "simple" + }, + { + "id": "func:handle_citation_task", + "type": "function", + "name": "handle_citation_task", + "filePath": "configs/geo_handlers.py", + "layer": "utility", + "summary": "handle_citation_task(task) 异步函数 → dict", + "tags": [ + "handle_citation_task" + ], + "complexity": "simple" + }, + { + "id": "func:handle_monitor_task", + "type": "function", + "name": "handle_monitor_task", + "filePath": "configs/geo_handlers.py", + "layer": "utility", + "summary": "handle_monitor_task(task) 异步函数 → dict", + "tags": [ + "handle_monitor_task" + ], + "complexity": "simple" + }, + { + "id": "func:handle_schema_task", + "type": "function", + "name": "handle_schema_task", + "filePath": "configs/geo_handlers.py", + "layer": "utility", + "summary": "handle_schema_task(task) 异步函数 → dict", + "tags": [ + "handle_schema_task" + ], + "complexity": "simple" + }, + { + "id": "func:_call_internal", + "type": "function", + "name": "_call_internal", + "filePath": "configs/geo_handlers.py", + "layer": "utility", + "summary": "_call_internal(path, input_data) 异步函数 → dict", + "tags": [ + "_call_internal" + ], + "complexity": "simple" + }, + { + "id": "func:_substitute_env_vars", + "type": "function", + "name": "_substitute_env_vars", + "filePath": "configs/geo_server.py", + "layer": "utility", + "summary": "_substitute_env_vars(config_path) 函数 → dict", + "tags": [ + "_substitute_env_vars" + ], + "complexity": "simple" + }, + { + "id": "func:_init_llm_gateway", + "type": "function", + "name": "_init_llm_gateway", + "filePath": "configs/geo_server.py", + "layer": "utility", + "summary": "_init_llm_gateway() 函数 → LLMGateway", + "tags": [ + "_init_llm_gateway" + ], + "complexity": "simple" + }, + { + "id": "func:_init_tool_registry", + "type": "function", + "name": "_init_tool_registry", + "filePath": "configs/geo_server.py", + "layer": "utility", + "summary": "_init_tool_registry() 函数 → ToolRegistry", + "tags": [ + "_init_tool_registry" + ], + "complexity": "simple" + }, + { + "id": "func:_init_skill_registry", + "type": "function", + "name": "_init_skill_registry", + "filePath": "configs/geo_server.py", + "layer": "utility", + "summary": "_init_skill_registry(tool_registry) 函数 → SkillRegistry", + "tags": [ + "_init_skill_registry" + ], + "complexity": "simple" + }, + { + "id": "func:create_geo_app", + "type": "function", + "name": "create_geo_app", + "filePath": "configs/geo_server.py", + "layer": "utility", + "summary": "create_geo_app() 函数 → FastAPI", + "tags": [ + "create_geo_app" + ], + "complexity": "simple" + }, + { + "id": "func:_internal_headers", + "type": "function", + "name": "_internal_headers", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "_internal_headers() 函数 → dict", + "tags": [ + "_internal_headers" + ], + "complexity": "simple" + }, + { + "id": "func:execute_single_platform", + "type": "function", + "name": "execute_single_platform", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "execute_single_platform(keyword, platform, target_brand, brand_aliases) 异步函数 → dict", + "tags": [ + "execute_single_platform" + ], + "complexity": "simple" + }, + { + "id": "func:get_or_create_task", + "type": "function", + "name": "get_or_create_task", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "get_or_create_task(query_id, platform) 异步函数 → dict", + "tags": [ + "get_or_create_task" + ], + "complexity": "simple" + }, + { + "id": "func:retrieve_knowledge", + "type": "function", + "name": "retrieve_knowledge", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "retrieve_knowledge(knowledge_base_ids, query, top_k) 异步函数 → dict", + "tags": [ + "retrieve_knowledge" + ], + "complexity": "moderate" + }, + { + "id": "func:monitor_check_and_compare", + "type": "function", + "name": "monitor_check_and_compare", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "monitor_check_and_compare(record_id) 异步函数 → dict", + "tags": [ + "monitor_check_and_compare" + ], + "complexity": "simple" + }, + { + "id": "func:monitor_generate_report", + "type": "function", + "name": "monitor_generate_report", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "monitor_generate_report(record_id) 异步函数 → dict", + "tags": [ + "monitor_generate_report" + ], + "complexity": "simple" + }, + { + "id": "func:monitor_create_record", + "type": "function", + "name": "monitor_create_record", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "monitor_create_record(brand_id, query_keywords, platform, check_interval_hours) 异步函数 → dict", + "tags": [ + "monitor_create_record" + ], + "complexity": "simple" + }, + { + "id": "func:fill_schema_with_llm", + "type": "function", + "name": "fill_schema_with_llm", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "fill_schema_with_llm(schema_type, brand_info, diagnosis_dimensions) 异步函数 → dict", + "tags": [ + "fill_schema_with_llm" + ], + "complexity": "moderate" + }, + { + "id": "func:identify_missing_dimensions", + "type": "function", + "name": "identify_missing_dimensions", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "identify_missing_dimensions(diagnosis_data, focus_dimensions) 异步函数 → dict", + "tags": [ + "identify_missing_dimensions" + ], + "complexity": "moderate" + }, + { + "id": "func:competitor_analyze", + "type": "function", + "name": "competitor_analyze", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "competitor_analyze(brand_id, analysis_types, period_days) 异步函数 → dict", + "tags": [ + "competitor_analyze" + ], + "complexity": "simple" + }, + { + "id": "func:competitor_gap_analysis", + "type": "function", + "name": "competitor_gap_analysis", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "competitor_gap_analysis(brand_id, period_days) 异步函数 → dict", + "tags": [ + "competitor_gap_analysis" + ], + "complexity": "simple" + }, + { + "id": "func:trend_insight", + "type": "function", + "name": "trend_insight", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "trend_insight(brand_id, days, platforms, keywords) 异步函数 → dict", + "tags": [ + "trend_insight" + ], + "complexity": "simple" + }, + { + "id": "func:trend_hotspot", + "type": "function", + "name": "trend_hotspot", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "trend_hotspot(brand_id, days) 异步函数 → dict", + "tags": [ + "trend_hotspot" + ], + "complexity": "simple" + }, + { + "id": "func:search_knowledge", + "type": "function", + "name": "search_knowledge", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "search_knowledge(query, knowledge_base_ids, top_k) 异步函数 → dict", + "tags": [ + "search_knowledge" + ], + "complexity": "simple" + }, + { + "id": "func:detect_ai_patterns", + "type": "function", + "name": "detect_ai_patterns", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "detect_ai_patterns(content, platform_id) 异步函数 → dict", + "tags": [ + "detect_ai_patterns" + ], + "complexity": "simple" + }, + { + "id": "func:register_geo_tools", + "type": "function", + "name": "register_geo_tools", + "filePath": "configs/geo_tools.py", + "layer": "utility", + "summary": "register_geo_tools(registry) 函数 → None", + "tags": [ + "register_geo_tools" + ], + "complexity": "simple" + }, + { + "id": "func:create_message_bus", + "type": "function", + "name": "create_message_bus", + "filePath": "src/agentkit/bus/redis_bus.py", + "layer": "data", + "summary": "create_message_bus(backend, redis_url, consumer_group, max_retries) 函数 → BinOp(left=Name(id='InMemoryMessageBus', ctx=Load()), op=BitOr(), right=Name(id='RedisMessageBus', ctx=Load()))", + "tags": [ + "create_message_bus" + ], + "complexity": "simple" + }, + { + "id": "func:validate_skill_name", + "type": "function", + "name": "validate_skill_name", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "validate_skill_name(name) 函数 → str", + "tags": [ + "validate_skill_name" + ], + "complexity": "simple" + }, + { + "id": "func:parse_skill_prefix", + "type": "function", + "name": "parse_skill_prefix", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "parse_skill_prefix(content) 函数 → Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[BinOp(left=Name(id='str', ctx=Load()), op=BitOr(), right=Constant(value=None)), Name(id='str', ctx=Load())], ctx=Load()), ctx=Load())", + "tags": [ + "parse_skill_prefix" + ], + "complexity": "simple" + }, + { + "id": "func:build_skill_system_prompt", + "type": "function", + "name": "build_skill_system_prompt", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "build_skill_system_prompt(skill_config) 函数 → BinOp(left=Name(id='str', ctx=Load()), op=BitOr(), right=Constant(value=None))", + "tags": [ + "build_skill_system_prompt" + ], + "complexity": "moderate" + }, + { + "id": "func:resolve_skill_routing", + "type": "function", + "name": "resolve_skill_routing", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "resolve_skill_routing(content, skill_registry, intent_router, default_tools, default_system_prompt, default_model, default_agent_name, agent_tool_registry, session_id) 异步函数 → SkillRoutingResult", + "tags": [ + "resolve_skill_routing" + ], + "complexity": "complex" + }, + { + "id": "func:_build_tools_description", + "type": "function", + "name": "_build_tools_description", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "_build_tools_description(tools) 函数 → str", + "tags": [ + "_build_tools_description" + ], + "complexity": "moderate" + }, + { + "id": "func:_tokenize_content", + "type": "function", + "name": "_tokenize_content", + "filePath": "src/agentkit/chat/skill_routing.py", + "layer": "unknown", + "summary": "_tokenize_content(content) 函数 → Subscript(value=Name(id='list', ctx=Load()), slice=Name(id='str', ctx=Load()), ctx=Load())", + "tags": [ + "_tokenize_content" + ], + "complexity": "moderate" + }, + { + "id": "func:chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "chat(model, agent_name, config, system_prompt, no_stream) 函数", + "tags": [ + "chat" + ], + "complexity": "simple" + }, + { + "id": "func:_chat_async", + "type": "function", + "name": "_chat_async", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "_chat_async(model, agent_name, config_arg, system_prompt, no_stream) 异步函数 → None", + "tags": [ + "_chat_async" + ], + "complexity": "complex" + }, + { + "id": "func:_extract_search_keys", + "type": "function", + "name": "_extract_search_keys", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "_extract_search_keys(server_config) 函数 → Subscript(value=Name(id='dict', ctx=Load()), slice=Tuple(elts=[Name(id='str', ctx=Load()), Name(id='str', ctx=Load())], ctx=Load()), ctx=Load())", + "tags": [ + "_extract_search_keys" + ], + "complexity": "simple" + }, + { + "id": "func:_build_gateway", + "type": "function", + "name": "_build_gateway", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "_build_gateway(server_config) 函数 → LLMGateway", + "tags": [ + "_build_gateway" + ], + "complexity": "moderate" + }, + { + "id": "func:_resolve_default_model", + "type": "function", + "name": "_resolve_default_model", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "_resolve_default_model(server_config) 函数 → str", + "tags": [ + "_resolve_default_model" + ], + "complexity": "moderate" + }, + { + "id": "func:_load_dotenv", + "type": "function", + "name": "_load_dotenv", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "_load_dotenv(dotenv_path) 函数 → None", + "tags": [ + "_load_dotenv" + ], + "complexity": "moderate" + }, + { + "id": "func:_print_help", + "type": "function", + "name": "_print_help", + "filePath": "src/agentkit/cli/chat.py", + "layer": "api", + "summary": "_print_help() 函数 → None", + "tags": [ + "_print_help" + ], + "complexity": "simple" + }, + { + "id": "func:_write_file", + "type": "function", + "name": "_write_file", + "filePath": "src/agentkit/cli/init.py", + "layer": "api", + "summary": "_write_file(path, content, force) 函数 → bool", + "tags": [ + "_write_file" + ], + "complexity": "simple" + }, + { + "id": "func:init", + "type": "function", + "name": "init", + "filePath": "src/agentkit/cli/init.py", + "layer": "api", + "summary": "init(output_dir, non_interactive, force) 函数", + "tags": [ + "init" + ], + "complexity": "simple" + }, + { + "id": "func:gui", + "type": "function", + "name": "gui", + "filePath": "src/agentkit/cli/main.py", + "layer": "api", + "summary": "gui(host, port, config, no_open) 函数", + "tags": [ + "gui" + ], + "complexity": "complex" + }, + { + "id": "func:serve", + "type": "function", + "name": "serve", + "filePath": "src/agentkit/cli/main.py", + "layer": "api", + "summary": "serve(host, port, workers, reload, config, task_store_backend, task_store_redis_url) 函数", + "tags": [ + "serve" + ], + "complexity": "complex" + }, + { + "id": "func:version", + "type": "function", + "name": "version", + "filePath": "src/agentkit/cli/main.py", + "layer": "api", + "summary": "version() 函数", + "tags": [ + "version" + ], + "complexity": "simple" + }, + { + "id": "func:doctor", + "type": "function", + "name": "doctor", + "filePath": "src/agentkit/cli/main.py", + "layer": "api", + "summary": "doctor(host, port) 函数", + "tags": [ + "doctor" + ], + "complexity": "moderate" + }, + { + "id": "func:needs_onboarding", + "type": "function", + "name": "needs_onboarding", + "filePath": "src/agentkit/cli/onboarding.py", + "layer": "api", + "summary": "needs_onboarding(config_arg) 函数 → bool", + "tags": [ + "needs_onboarding" + ], + "complexity": "simple" + }, + { + "id": "func:run_onboarding", + "type": "function", + "name": "run_onboarding", + "filePath": "src/agentkit/cli/onboarding.py", + "layer": "api", + "summary": "run_onboarding(output_dir, config_arg) 函数 → BinOp(left=Name(id='str', ctx=Load()), op=BitOr(), right=Constant(value=None))", + "tags": [ + "run_onboarding" + ], + "complexity": "complex" + }, + { + "id": "func:_generate_api_key", + "type": "function", + "name": "_generate_api_key", + "filePath": "src/agentkit/cli/pair.py", + "layer": "api", + "summary": "_generate_api_key() 函数 → str", + "tags": [ + "_generate_api_key" + ], + "complexity": "simple" + }, + { + "id": "func:_load_clients", + "type": "function", + "name": "_load_clients", + "filePath": "src/agentkit/cli/pair.py", + "layer": "api", + "summary": "_load_clients(config_dir) 函数 → dict", + "tags": [ + "_load_clients" + ], + "complexity": "simple" + }, + { + "id": "func:_save_clients", + "type": "function", + "name": "_save_clients", + "filePath": "src/agentkit/cli/pair.py", + "layer": "api", + "summary": "_save_clients(config_dir, clients) 函数 → None", + "tags": [ + "_save_clients" + ], + "complexity": "simple" + }, + { + "id": "func:pair", + "type": "function", + "name": "pair", + "filePath": "src/agentkit/cli/pair.py", + "layer": "api", + "summary": "pair(name, skills_dir, config_dir, list_clients, revoke, server_url) 函数", + "tags": [ + "pair" + ], + "complexity": "complex" + }, + { + "id": "func:list_skills", + "type": "function", + "name": "list_skills", + "filePath": "src/agentkit/cli/skill.py", + "layer": "api", + "summary": "list_skills(server_url) 函数", + "tags": [ + "list_skills" + ], + "complexity": "moderate" + }, + { + "id": "func:load_skill", + "type": "function", + "name": "load_skill", + "filePath": "src/agentkit/cli/skill.py", + "layer": "api", + "summary": "load_skill(path) 函数", + "tags": [ + "load_skill" + ], + "complexity": "simple" + }, + { + "id": "func:skill_create", + "type": "function", + "name": "skill_create", + "filePath": "src/agentkit/cli/skill.py", + "layer": "api", + "summary": "skill_create(name, output_dir) 函数", + "tags": [ + "skill_create" + ], + "complexity": "simple" + }, + { + "id": "func:skill_info", + "type": "function", + "name": "skill_info", + "filePath": "src/agentkit/cli/skill.py", + "layer": "api", + "summary": "skill_info(name, server_url) 函数", + "tags": [ + "skill_info" + ], + "complexity": "moderate" + }, + { + "id": "func:submit", + "type": "function", + "name": "submit", + "filePath": "src/agentkit/cli/task.py", + "layer": "api", + "summary": "submit(input, input_file, skill, agent, mode, server_url, config) 函数", + "tags": [ + "submit" + ], + "complexity": "moderate" + }, + { + "id": "func:_submit_remote", + "type": "function", + "name": "_submit_remote", + "filePath": "src/agentkit/cli/task.py", + "layer": "api", + "summary": "_submit_remote(input_data, skill, agent, mode, server_url) 函数", + "tags": [ + "_submit_remote" + ], + "complexity": "simple" + }, + { + "id": "func:_submit_local", + "type": "function", + "name": "_submit_local", + "filePath": "src/agentkit/cli/task.py", + "layer": "api", + "summary": "_submit_local(input_data, skill, agent, mode, config_path) 函数", + "tags": [ + "_submit_local" + ], + "complexity": "moderate" + }, + { + "id": "func:status", + "type": "function", + "name": "status", + "filePath": "src/agentkit/cli/task.py", + "layer": "api", + "summary": "status(task_id, server_url) 函数", + "tags": [ + "status" + ], + "complexity": "simple" + }, + { + "id": "func:list_tasks", + "type": "function", + "name": "list_tasks", + "filePath": "src/agentkit/cli/task.py", + "layer": "api", + "summary": "list_tasks(status_filter, limit, server_url) 函数", + "tags": [ + "list_tasks" + ], + "complexity": "moderate" + }, + { + "id": "func:cancel", + "type": "function", + "name": "cancel", + "filePath": "src/agentkit/cli/task.py", + "layer": "api", + "summary": "cancel(task_id, server_url) 函数", + "tags": [ + "cancel" + ], + "complexity": "simple" + }, + { + "id": "func:usage", + "type": "function", + "name": "usage", + "filePath": "src/agentkit/cli/usage.py", + "layer": "api", + "summary": "usage(agent, format, server_url) 函数", + "tags": [ + "usage" + ], + "complexity": "moderate" + }, + { + "id": "func:create_compressor", + "type": "function", + "name": "create_compressor", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "create_compressor(config) 函数 → BinOp(left=Name(id='CompressionStrategy', ctx=Load()), op=BitOr(), right=Constant(value=None))", + "tags": [ + "create_compressor" + ], + "complexity": "moderate" + }, + { + "id": "func:render_cached", + "type": "function", + "name": "render_cached", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "render_cached(template, variables) 函数 → Subscript(value=Name(id='list', ctx=Load()), slice=Subscript(value=Name(id='dict', ctx=Load()), slice=Tuple(elts=[Name(id='str', ctx=Load()), Name(id='str', ctx=Load())], ctx=Load()), ctx=Load()), ctx=Load())", + "tags": [ + "render_cached" + ], + "complexity": "moderate" + }, + { + "id": "func:clear_cache", + "type": "function", + "name": "clear_cache", + "filePath": "src/agentkit/core/compressor.py", + "layer": "service", + "summary": "clear_cache(template) 函数 → None", + "tags": [ + "clear_cache" + ], + "complexity": "simple" + }, + { + "id": "func:_validate_callback_url", + "type": "function", + "name": "_validate_callback_url", + "filePath": "src/agentkit/core/dispatcher.py", + "layer": "service", + "summary": "_validate_callback_url(url) 函数 → bool", + "tags": [ + "_validate_callback_url" + ], + "complexity": "moderate" + }, + { + "id": "func:_is_json_content", + "type": "function", + "name": "_is_json_content", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "_is_json_content(text) 函数 → bool", + "tags": [ + "_is_json_content" + ], + "complexity": "simple" + }, + { + "id": "func:_is_code_content", + "type": "function", + "name": "_is_code_content", + "filePath": "src/agentkit/core/headroom_compressor.py", + "layer": "service", + "summary": "_is_code_content(text) 函数 → bool", + "tags": [ + "_is_code_content" + ], + "complexity": "moderate" + }, + { + "id": "func:setup_structured_logging", + "type": "function", + "name": "setup_structured_logging", + "filePath": "src/agentkit/core/logging.py", + "layer": "service", + "summary": "setup_structured_logging(level) 函数 → None", + "tags": [ + "setup_structured_logging" + ], + "complexity": "simple" + }, + { + "id": "func:get_logger", + "type": "function", + "name": "get_logger", + "filePath": "src/agentkit/core/logging.py", + "layer": "service", + "summary": "get_logger(name) 函数 → Attribute(value=Name(id='logging', ctx=Load()), attr='LoggerAdapter', ctx=Load())", + "tags": [ + "get_logger" + ], + "complexity": "simple" + }, + { + "id": "func:main", + "type": "function", + "name": "main", + "filePath": "src/agentkit/core/standalone.py", + "layer": "service", + "summary": "main() 异步函数", + "tags": [ + "main" + ], + "complexity": "moderate" + }, + { + "id": "func:create_evolution_store", + "type": "function", + "name": "create_evolution_store", + "filePath": "src/agentkit/evolution/evolution_store.py", + "layer": "utility", + "summary": "create_evolution_store(backend, db_path, session_factory, evolution_model) 函数 → BinOp(left=BinOp(left=Name(id='EvolutionStore', ctx=Load()), op=BitOr(), right=Name(id='PersistentEvolutionStore', ctx=Load())), op=BitOr(), right=Name(id='InMemoryEvolutionStore', ctx=Load()))", + "tags": [ + "create_evolution_store" + ], + "complexity": "moderate" + }, + { + "id": "func:_parse_time_window", + "type": "function", + "name": "_parse_time_window", + "filePath": "src/agentkit/evolution/experience_store.py", + "layer": "utility", + "summary": "_parse_time_window(window) 函数 → timedelta", + "tags": [ + "_parse_time_window" + ], + "complexity": "moderate" + }, + { + "id": "func:_compute_name_similarity", + "type": "function", + "name": "_compute_name_similarity", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "_compute_name_similarity(step_name, step_description, historical_step_name) 函数 → float", + "tags": [ + "_compute_name_similarity" + ], + "complexity": "moderate" + }, + { + "id": "func:_extract_keywords", + "type": "function", + "name": "_extract_keywords", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "_extract_keywords(text) 函数 → Subscript(value=Name(id='frozenset', ctx=Load()), slice=Name(id='str', ctx=Load()), ctx=Load())", + "tags": [ + "_extract_keywords" + ], + "complexity": "simple" + }, + { + "id": "func:_determine_warning_level", + "type": "function", + "name": "_determine_warning_level", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "_determine_warning_level(failure_rate) 函数 → WarningLevel", + "tags": [ + "_determine_warning_level" + ], + "complexity": "simple" + }, + { + "id": "func:_warning_level_order", + "type": "function", + "name": "_warning_level_order", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "_warning_level_order(level) 函数 → int", + "tags": [ + "_warning_level_order" + ], + "complexity": "simple" + }, + { + "id": "func:_build_suggestion", + "type": "function", + "name": "_build_suggestion", + "filePath": "src/agentkit/evolution/pitfall_detector.py", + "layer": "utility", + "summary": "_build_suggestion(stats, failure_rate) 函数 → str", + "tags": [ + "_build_suggestion" + ], + "complexity": "moderate" + }, + { + "id": "func:create_prompt_optimizer", + "type": "function", + "name": "create_prompt_optimizer", + "filePath": "src/agentkit/evolution/prompt_optimizer.py", + "layer": "utility", + "summary": "create_prompt_optimizer(optimizer_type, llm_gateway) 函数 → BinOp(left=Name(id='BootstrapPromptOptimizer', ctx=Load()), op=BitOr(), right=Name(id='LLMPromptOptimizer', ctx=Load()))", + "tags": [ + "create_prompt_optimizer" + ], + "complexity": "moderate" + }, + { + "id": "func:_is_retryable_error", + "type": "function", + "name": "_is_retryable_error", + "filePath": "src/agentkit/llm/retry.py", + "layer": "utility", + "summary": "_is_retryable_error(error, retryable_status_codes) 函数 → bool", + "tags": [ + "_is_retryable_error" + ], + "complexity": "moderate" + }, + { + "id": "func:_escape_cql", + "type": "function", + "name": "_escape_cql", + "filePath": "src/agentkit/memory/adapters/confluence.py", + "layer": "data", + "summary": "_escape_cql(value) 函数 → str", + "tags": [ + "_escape_cql" + ], + "complexity": "simple" + }, + { + "id": "func:_detect_format", + "type": "function", + "name": "_detect_format", + "filePath": "src/agentkit/memory/document_loader.py", + "layer": "data", + "summary": "_detect_format(filename) 函数 → str", + "tags": [ + "_detect_format" + ], + "complexity": "simple" + }, + { + "id": "func:_loader_doc_to_kb_doc", + "type": "function", + "name": "_loader_doc_to_kb_doc", + "filePath": "src/agentkit/memory/local_rag.py", + "layer": "data", + "summary": "_loader_doc_to_kb_doc(loader_doc) 函数 → Document", + "tags": [ + "_loader_doc_to_kb_doc" + ], + "complexity": "simple" + }, + { + "id": "func:create_episodic_session_factory", + "type": "function", + "name": "create_episodic_session_factory", + "filePath": "src/agentkit/memory/models.py", + "layer": "data", + "summary": "create_episodic_session_factory(database_url) 函数", + "tags": [ + "create_episodic_session_factory" + ], + "complexity": "simple" + }, + { + "id": "func:ensure_episodic_table", + "type": "function", + "name": "ensure_episodic_table", + "filePath": "src/agentkit/memory/models.py", + "layer": "data", + "summary": "ensure_episodic_table(database_url) 异步函数 → None", + "tags": [ + "ensure_episodic_table" + ], + "complexity": "simple" + }, + { + "id": "func:_content_hash", + "type": "function", + "name": "_content_hash", + "filePath": "src/agentkit/memory/multi_source_retriever.py", + "layer": "data", + "summary": "_content_hash(content) 函数 → str", + "tags": [ + "_content_hash" + ], + "complexity": "simple" + }, + { + "id": "func:create_query_transformer", + "type": "function", + "name": "create_query_transformer", + "filePath": "src/agentkit/memory/query_transformer.py", + "layer": "data", + "summary": "create_query_transformer(strategy, llm_gateway, synonyms, max_sub_queries) 函数 → QueryTransformerBase", + "tags": [ + "create_query_transformer" + ], + "complexity": "moderate" + }, + { + "id": "func:_estimate_tokens", + "type": "function", + "name": "_estimate_tokens", + "filePath": "src/agentkit/memory/retriever.py", + "layer": "data", + "summary": "_estimate_tokens(text) 函数 → int", + "tags": [ + "_estimate_tokens" + ], + "complexity": "simple" + }, + { + "id": "func:execute_with_retry", + "type": "function", + "name": "execute_with_retry", + "filePath": "src/agentkit/orchestrator/retry.py", + "layer": "service", + "summary": "execute_with_retry(func, retry_policy, step_name) 异步函数 → Any", + "tags": [ + "execute_with_retry" + ], + "complexity": "moderate" + }, + { + "id": "func:_build_llm_gateway", + "type": "function", + "name": "_build_llm_gateway", + "filePath": "src/agentkit/server/app.py", + "layer": "api", + "summary": "_build_llm_gateway(config) 函数 → LLMGateway", + "tags": [ + "_build_llm_gateway" + ], + "complexity": "moderate" + }, + { + "id": "func:_build_skill_registry", + "type": "function", + "name": "_build_skill_registry", + "filePath": "src/agentkit/server/app.py", + "layer": "api", + "summary": "_build_skill_registry(config) 函数 → SkillRegistry", + "tags": [ + "_build_skill_registry" + ], + "complexity": "simple" + }, + { + "id": "func:lifespan", + "type": "function", + "name": "lifespan", + "filePath": "src/agentkit/server/app.py", + "layer": "api", + "summary": "lifespan(app) 异步函数", + "tags": [ + "lifespan" + ], + "complexity": "complex" + }, + { + "id": "func:_on_config_change", + "type": "function", + "name": "_on_config_change", + "filePath": "src/agentkit/server/app.py", + "layer": "api", + "summary": "_on_config_change(app, config) 函数 → None", + "tags": [ + "_on_config_change" + ], + "complexity": "complex" + }, + { + "id": "func:create_app", + "type": "function", + "name": "create_app", + "filePath": "src/agentkit/server/app.py", + "layer": "api", + "summary": "create_app(llm_gateway, skill_registry, tool_registry, api_key, rate_limit, server_config) 函数 → FastAPI", + "tags": [ + "create_app" + ], + "complexity": "complex" + }, + { + "id": "func:_resolve_env_vars", + "type": "function", + "name": "_resolve_env_vars", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "_resolve_env_vars(value) 函数 → Any", + "tags": [ + "_resolve_env_vars" + ], + "complexity": "simple" + }, + { + "id": "func:_deep_resolve", + "type": "function", + "name": "_deep_resolve", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "_deep_resolve(data) 函数 → Any", + "tags": [ + "_deep_resolve" + ], + "complexity": "moderate" + }, + { + "id": "func:find_config_path", + "type": "function", + "name": "find_config_path", + "filePath": "src/agentkit/server/config.py", + "layer": "api", + "summary": "find_config_path(config_arg) 函数 → BinOp(left=Name(id='str', ctx=Load()), op=BitOr(), right=Constant(value=None))", + "tags": [ + "find_config_path" + ], + "complexity": "moderate" + }, + { + "id": "func:_load_client_keys", + "type": "function", + "name": "_load_client_keys", + "filePath": "src/agentkit/server/middleware.py", + "layer": "api", + "summary": "_load_client_keys(config_dir) 函数 → Subscript(value=Name(id='dict', ctx=Load()), slice=Tuple(elts=[Name(id='str', ctx=Load()), Name(id='str', ctx=Load())], ctx=Load()), ctx=Load())", + "tags": [ + "_load_client_keys" + ], + "complexity": "moderate" + }, + { + "id": "func:_get_pool", + "type": "function", + "name": "_get_pool", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "_get_pool(request) 函数", + "tags": [ + "_get_pool" + ], + "complexity": "simple" + }, + { + "id": "func:_get_skill_registry", + "type": "function", + "name": "_get_skill_registry", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "_get_skill_registry(request) 函数", + "tags": [ + "_get_skill_registry" + ], + "complexity": "simple" + }, + { + "id": "func:create_agent", + "type": "function", + "name": "create_agent", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "create_agent(request, req) 异步函数", + "tags": [ + "create_agent" + ], + "complexity": "moderate" + }, + { + "id": "func:list_agents", + "type": "function", + "name": "list_agents", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "list_agents(req) 异步函数", + "tags": [ + "list_agents" + ], + "complexity": "simple" + }, + { + "id": "func:get_agent", + "type": "function", + "name": "get_agent", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "get_agent(name, req) 异步函数", + "tags": [ + "get_agent" + ], + "complexity": "simple" + }, + { + "id": "func:delete_agent", + "type": "function", + "name": "delete_agent", + "filePath": "src/agentkit/server/routes/agents.py", + "layer": "api", + "summary": "delete_agent(name, req) 异步函数", + "tags": [ + "delete_agent" + ], + "complexity": "simple" + }, + { + "id": "func:_get_session_manager", + "type": "function", + "name": "_get_session_manager", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "_get_session_manager(request) 函数 → SessionManager", + "tags": [ + "_get_session_manager" + ], + "complexity": "simple" + }, + { + "id": "func:_session_to_response", + "type": "function", + "name": "_session_to_response", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "_session_to_response(session) 函数 → SessionResponse", + "tags": [ + "_session_to_response" + ], + "complexity": "simple" + }, + { + "id": "func:_message_to_response", + "type": "function", + "name": "_message_to_response", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "_message_to_response(msg) 函数 → MessageResponse", + "tags": [ + "_message_to_response" + ], + "complexity": "simple" + }, + { + "id": "func:list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "list_sessions(req) 异步函数", + "tags": [ + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:create_session", + "type": "function", + "name": "create_session", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "create_session(request, req) 异步函数", + "tags": [ + "create_session" + ], + "complexity": "simple" + }, + { + "id": "func:get_session", + "type": "function", + "name": "get_session", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "get_session(session_id, req) 异步函数", + "tags": [ + "get_session" + ], + "complexity": "simple" + }, + { + "id": "func:get_messages", + "type": "function", + "name": "get_messages", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "get_messages(session_id, req, limit, offset) 异步函数", + "tags": [ + "get_messages" + ], + "complexity": "simple" + }, + { + "id": "func:send_message", + "type": "function", + "name": "send_message", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "send_message(session_id, request, req) 异步函数", + "tags": [ + "send_message" + ], + "complexity": "moderate" + }, + { + "id": "func:close_session", + "type": "function", + "name": "close_session", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "close_session(session_id, req) 异步函数", + "tags": [ + "close_session" + ], + "complexity": "simple" + }, + { + "id": "func:chat_websocket", + "type": "function", + "name": "chat_websocket", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "chat_websocket(websocket, session_id) 异步函数 → None", + "tags": [ + "chat_websocket" + ], + "complexity": "complex" + }, + { + "id": "func:_handle_chat_message", + "type": "function", + "name": "_handle_chat_message", + "filePath": "src/agentkit/server/routes/chat.py", + "layer": "api", + "summary": "_handle_chat_message(websocket, session_id, content, sm, cancellation_token, pending_replies, pending_confirmations) 异步函数 → None", + "tags": [ + "_handle_chat_message" + ], + "complexity": "complex" + }, + { + "id": "func:_get_evolution_store", + "type": "function", + "name": "_get_evolution_store", + "filePath": "src/agentkit/server/routes/evolution.py", + "layer": "api", + "summary": "_get_evolution_store(request) 函数", + "tags": [ + "_get_evolution_store" + ], + "complexity": "simple" + }, + { + "id": "func:list_evolution_events", + "type": "function", + "name": "list_evolution_events", + "filePath": "src/agentkit/server/routes/evolution.py", + "layer": "api", + "summary": "list_evolution_events(agent_name, event_type, limit, offset, req) 异步函数", + "tags": [ + "list_evolution_events" + ], + "complexity": "simple" + }, + { + "id": "func:get_skill_versions", + "type": "function", + "name": "get_skill_versions", + "filePath": "src/agentkit/server/routes/evolution.py", + "layer": "api", + "summary": "get_skill_versions(skill_name, req) 异步函数", + "tags": [ + "get_skill_versions" + ], + "complexity": "simple" + }, + { + "id": "func:trigger_evolution", + "type": "function", + "name": "trigger_evolution", + "filePath": "src/agentkit/server/routes/evolution.py", + "layer": "api", + "summary": "trigger_evolution(request, req) 异步函数", + "tags": [ + "trigger_evolution" + ], + "complexity": "moderate" + }, + { + "id": "func:list_ab_tests", + "type": "function", + "name": "list_ab_tests", + "filePath": "src/agentkit/server/routes/evolution.py", + "layer": "api", + "summary": "list_ab_tests(status, limit, req) 异步函数", + "tags": [ + "list_ab_tests" + ], + "complexity": "complex" + }, + { + "id": "func:_verify_api_key", + "type": "function", + "name": "_verify_api_key", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "_verify_api_key(request, api_key_header, api_key_query) 异步函数 → None", + "tags": [ + "_verify_api_key" + ], + "complexity": "complex" + }, + { + "id": "func:_get_experience_store", + "type": "function", + "name": "_get_experience_store", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "_get_experience_store(request) 函数", + "tags": [ + "_get_experience_store" + ], + "complexity": "simple" + }, + { + "id": "func:_get_pitfall_detector", + "type": "function", + "name": "_get_pitfall_detector", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "_get_pitfall_detector(request) 函数", + "tags": [ + "_get_pitfall_detector" + ], + "complexity": "simple" + }, + { + "id": "func:_get_path_optimizer", + "type": "function", + "name": "_get_path_optimizer", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "_get_path_optimizer(request) 函数", + "tags": [ + "_get_path_optimizer" + ], + "complexity": "simple" + }, + { + "id": "func:list_experiences", + "type": "function", + "name": "list_experiences", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "list_experiences(task_type, outcome, limit, req, _auth) 异步函数", + "tags": [ + "list_experiences" + ], + "complexity": "complex" + }, + { + "id": "func:record_experience", + "type": "function", + "name": "record_experience", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "record_experience(body, req, _auth) 异步函数", + "tags": [ + "record_experience" + ], + "complexity": "simple" + }, + { + "id": "func:get_metrics", + "type": "function", + "name": "get_metrics", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "get_metrics(period, req, _auth) 异步函数", + "tags": [ + "get_metrics" + ], + "complexity": "moderate" + }, + { + "id": "func:_generate_trends", + "type": "function", + "name": "_generate_trends", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "_generate_trends(metrics_list, period) 函数 → Subscript(value=Name(id='list', ctx=Load()), slice=Name(id='dict', ctx=Load()), ctx=Load())", + "tags": [ + "_generate_trends" + ], + "complexity": "moderate" + }, + { + "id": "func:_compute_metrics_from_memory", + "type": "function", + "name": "_compute_metrics_from_memory", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "_compute_metrics_from_memory(period) 函数 → Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='dict', ctx=Load()), Subscript(value=Name(id='list', ctx=Load()), slice=Name(id='dict', ctx=Load()), ctx=Load())], ctx=Load()), ctx=Load())", + "tags": [ + "_compute_metrics_from_memory" + ], + "complexity": "moderate" + }, + { + "id": "func:get_usage", + "type": "function", + "name": "get_usage", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "get_usage(period, req, _auth) 异步函数", + "tags": [ + "get_usage" + ], + "complexity": "complex" + }, + { + "id": "func:check_pitfalls", + "type": "function", + "name": "check_pitfalls", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "check_pitfalls(task_type, steps, req, _auth) 异步函数", + "tags": [ + "check_pitfalls" + ], + "complexity": "moderate" + }, + { + "id": "func:list_path_optimizations", + "type": "function", + "name": "list_path_optimizations", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "list_path_optimizations(task_type, limit, req, _auth) 异步函数", + "tags": [ + "list_path_optimizations" + ], + "complexity": "complex" + }, + { + "id": "func:record_path_optimization", + "type": "function", + "name": "record_path_optimization", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "record_path_optimization(body, req, _auth) 异步函数", + "tags": [ + "record_path_optimization" + ], + "complexity": "simple" + }, + { + "id": "func:evolution_dashboard_ws", + "type": "function", + "name": "evolution_dashboard_ws", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "evolution_dashboard_ws(websocket) 异步函数", + "tags": [ + "evolution_dashboard_ws" + ], + "complexity": "complex" + }, + { + "id": "func:_broadcast_event", + "type": "function", + "name": "_broadcast_event", + "filePath": "src/agentkit/server/routes/evolution_dashboard.py", + "layer": "api", + "summary": "_broadcast_event(event_type, data) 异步函数", + "tags": [ + "_broadcast_event" + ], + "complexity": "moderate" + }, + { + "id": "func:health_check", + "type": "function", + "name": "health_check", + "filePath": "src/agentkit/server/routes/health.py", + "layer": "api", + "summary": "health_check(request) 异步函数", + "tags": [ + "health_check" + ], + "complexity": "complex" + }, + { + "id": "func:_verify_api_key", + "type": "function", + "name": "_verify_api_key", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "_verify_api_key(request, api_key_header, api_key_query) 异步函数 → None", + "tags": [ + "_verify_api_key" + ], + "complexity": "complex" + }, + { + "id": "func:list_sources", + "type": "function", + "name": "list_sources", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "list_sources(req, _auth) 异步函数", + "tags": [ + "list_sources" + ], + "complexity": "simple" + }, + { + "id": "func:add_source", + "type": "function", + "name": "add_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "add_source(request, req, _auth) 异步函数", + "tags": [ + "add_source" + ], + "complexity": "simple" + }, + { + "id": "func:remove_source", + "type": "function", + "name": "remove_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "remove_source(source_id, req, _auth) 异步函数", + "tags": [ + "remove_source" + ], + "complexity": "simple" + }, + { + "id": "func:sync_source", + "type": "function", + "name": "sync_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "sync_source(source_id, _auth) 异步函数", + "tags": [ + "sync_source" + ], + "complexity": "simple" + }, + { + "id": "func:update_source", + "type": "function", + "name": "update_source", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "update_source(source_id, data, _auth) 异步函数", + "tags": [ + "update_source" + ], + "complexity": "simple" + }, + { + "id": "func:list_documents", + "type": "function", + "name": "list_documents", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "list_documents(source_id, _auth) 异步函数", + "tags": [ + "list_documents" + ], + "complexity": "simple" + }, + { + "id": "func:delete_document", + "type": "function", + "name": "delete_document", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "delete_document(document_id, _auth) 异步函数", + "tags": [ + "delete_document" + ], + "complexity": "simple" + }, + { + "id": "func:upload_document", + "type": "function", + "name": "upload_document", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "upload_document(req, file, source_id, _auth) 异步函数", + "tags": [ + "upload_document" + ], + "complexity": "complex" + }, + { + "id": "func:search_knowledge", + "type": "function", + "name": "search_knowledge", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "search_knowledge(request, req, _auth) 异步函数", + "tags": [ + "search_knowledge" + ], + "complexity": "moderate" + }, + { + "id": "func:check_source_health", + "type": "function", + "name": "check_source_health", + "filePath": "src/agentkit/server/routes/kb_management.py", + "layer": "api", + "summary": "check_source_health(source_id, req, _auth) 异步函数", + "tags": [ + "check_source_health" + ], + "complexity": "simple" + }, + { + "id": "func:get_usage", + "type": "function", + "name": "get_usage", + "filePath": "src/agentkit/server/routes/llm.py", + "layer": "api", + "summary": "get_usage(agent_name, req) 异步函数", + "tags": [ + "get_usage" + ], + "complexity": "simple" + }, + { + "id": "func:_get_memory_retriever", + "type": "function", + "name": "_get_memory_retriever", + "filePath": "src/agentkit/server/routes/memory.py", + "layer": "api", + "summary": "_get_memory_retriever(request) 函数", + "tags": [ + "_get_memory_retriever" + ], + "complexity": "simple" + }, + { + "id": "func:search_episodic_memory", + "type": "function", + "name": "search_episodic_memory", + "filePath": "src/agentkit/server/routes/memory.py", + "layer": "api", + "summary": "search_episodic_memory(query, top_k, agent_name, req) 异步函数", + "tags": [ + "search_episodic_memory" + ], + "complexity": "moderate" + }, + { + "id": "func:search_semantic_memory", + "type": "function", + "name": "search_semantic_memory", + "filePath": "src/agentkit/server/routes/memory.py", + "layer": "api", + "summary": "search_semantic_memory(query, knowledge_base_ids, top_k, req) 异步函数", + "tags": [ + "search_semantic_memory" + ], + "complexity": "moderate" + }, + { + "id": "func:delete_episodic_memory", + "type": "function", + "name": "delete_episodic_memory", + "filePath": "src/agentkit/server/routes/memory.py", + "layer": "api", + "summary": "delete_episodic_memory(key, req) 异步函数", + "tags": [ + "delete_episodic_memory" + ], + "complexity": "moderate" + }, + { + "id": "func:get_metrics", + "type": "function", + "name": "get_metrics", + "filePath": "src/agentkit/server/routes/metrics.py", + "layer": "api", + "summary": "get_metrics(request) 异步函数", + "tags": [ + "get_metrics" + ], + "complexity": "moderate" + }, + { + "id": "func:_verify_api_key", + "type": "function", + "name": "_verify_api_key", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "_verify_api_key(request, api_key_header, api_key_query) 异步函数 → None", + "tags": [ + "_verify_api_key" + ], + "complexity": "complex" + }, + { + "id": "func:_resolve_for_chat", + "type": "function", + "name": "_resolve_for_chat", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "_resolve_for_chat(request, req) 异步函数 → Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='Any', ctx=Load()), Name(id='Any', ctx=Load()), BinOp(left=Name(id='str', ctx=Load()), op=BitOr(), right=Constant(value=None)), BinOp(left=Name(id='str', ctx=Load()), op=BitOr(), right=Constant(value=None)), BinOp(left=Name(id='float', ctx=Load()), op=BitOr(), right=Constant(value=None))], ctx=Load()), ctx=Load())", + "tags": [ + "_resolve_for_chat" + ], + "complexity": "moderate" + }, + { + "id": "func:chat", + "type": "function", + "name": "chat", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "chat(request, req, _auth) 异步函数", + "tags": [ + "chat" + ], + "complexity": "moderate" + }, + { + "id": "func:chat_stream", + "type": "function", + "name": "chat_stream", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "chat_stream(request, req, _auth) 异步函数", + "tags": [ + "chat_stream" + ], + "complexity": "moderate" + }, + { + "id": "func:get_capabilities", + "type": "function", + "name": "get_capabilities", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "get_capabilities(req, _auth) 异步函数", + "tags": [ + "get_capabilities" + ], + "complexity": "moderate" + }, + { + "id": "func:list_conversations", + "type": "function", + "name": "list_conversations", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "list_conversations(limit, _auth) 异步函数", + "tags": [ + "list_conversations" + ], + "complexity": "simple" + }, + { + "id": "func:_derive_conversation_title", + "type": "function", + "name": "_derive_conversation_title", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "_derive_conversation_title(conv) 函数 → str", + "tags": [ + "_derive_conversation_title" + ], + "complexity": "moderate" + }, + { + "id": "func:get_conversation", + "type": "function", + "name": "get_conversation", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "get_conversation(conversation_id, limit, _auth) 异步函数", + "tags": [ + "get_conversation" + ], + "complexity": "simple" + }, + { + "id": "func:portal_websocket", + "type": "function", + "name": "portal_websocket", + "filePath": "src/agentkit/server/routes/portal.py", + "layer": "api", + "summary": "portal_websocket(websocket) 异步函数", + "tags": [ + "portal_websocket" + ], + "complexity": "complex" + }, + { + "id": "func:_mask_api_key", + "type": "function", + "name": "_mask_api_key", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "_mask_api_key(key) 函数 → str", + "tags": [ + "_mask_api_key" + ], + "complexity": "simple" + }, + { + "id": "func:_read_yaml_config", + "type": "function", + "name": "_read_yaml_config", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "_read_yaml_config(config_path) 函数 → dict", + "tags": [ + "_read_yaml_config" + ], + "complexity": "simple" + }, + { + "id": "func:_write_yaml_config", + "type": "function", + "name": "_write_yaml_config", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "_write_yaml_config(config_path, data) 函数 → None", + "tags": [ + "_write_yaml_config" + ], + "complexity": "simple" + }, + { + "id": "func:_get_config_path", + "type": "function", + "name": "_get_config_path", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "_get_config_path(request) 函数 → str", + "tags": [ + "_get_config_path" + ], + "complexity": "simple" + }, + { + "id": "func:get_llm_settings", + "type": "function", + "name": "get_llm_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "get_llm_settings(request) 异步函数", + "tags": [ + "get_llm_settings" + ], + "complexity": "moderate" + }, + { + "id": "func:update_llm_settings", + "type": "function", + "name": "update_llm_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "update_llm_settings(request, update) 异步函数", + "tags": [ + "update_llm_settings" + ], + "complexity": "complex" + }, + { + "id": "func:get_skills_settings", + "type": "function", + "name": "get_skills_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "get_skills_settings(request) 异步函数", + "tags": [ + "get_skills_settings" + ], + "complexity": "simple" + }, + { + "id": "func:update_skills_settings", + "type": "function", + "name": "update_skills_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "update_skills_settings(request, update) 异步函数", + "tags": [ + "update_skills_settings" + ], + "complexity": "moderate" + }, + { + "id": "func:get_kb_settings", + "type": "function", + "name": "get_kb_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "get_kb_settings(request) 异步函数", + "tags": [ + "get_kb_settings" + ], + "complexity": "simple" + }, + { + "id": "func:update_kb_settings", + "type": "function", + "name": "update_kb_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "update_kb_settings(request, update) 异步函数", + "tags": [ + "update_kb_settings" + ], + "complexity": "simple" + }, + { + "id": "func:get_general_settings", + "type": "function", + "name": "get_general_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "get_general_settings(request) 异步函数", + "tags": [ + "get_general_settings" + ], + "complexity": "simple" + }, + { + "id": "func:update_general_settings", + "type": "function", + "name": "update_general_settings", + "filePath": "src/agentkit/server/routes/settings.py", + "layer": "api", + "summary": "update_general_settings(request, update) 异步函数", + "tags": [ + "update_general_settings" + ], + "complexity": "complex" + }, + { + "id": "func:_skill_to_info", + "type": "function", + "name": "_skill_to_info", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "_skill_to_info(skill) 函数 → Subscript(value=Name(id='dict', ctx=Load()), slice=Tuple(elts=[Name(id='str', ctx=Load()), Name(id='Any', ctx=Load())], ctx=Load()), ctx=Load())", + "tags": [ + "_skill_to_info" + ], + "complexity": "complex" + }, + { + "id": "func:_skill_to_detail", + "type": "function", + "name": "_skill_to_detail", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "_skill_to_detail(skill) 函数 → Subscript(value=Name(id='dict', ctx=Load()), slice=Tuple(elts=[Name(id='str', ctx=Load()), Name(id='Any', ctx=Load())], ctx=Load()), ctx=Load())", + "tags": [ + "_skill_to_detail" + ], + "complexity": "simple" + }, + { + "id": "func:list_skills", + "type": "function", + "name": "list_skills", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "list_skills(req, capability, page, size) 异步函数", + "tags": [ + "list_skills" + ], + "complexity": "moderate" + }, + { + "id": "func:get_skill_detail", + "type": "function", + "name": "get_skill_detail", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "get_skill_detail(skill_name, req) 异步函数", + "tags": [ + "get_skill_detail" + ], + "complexity": "simple" + }, + { + "id": "func:check_skill_health", + "type": "function", + "name": "check_skill_health", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "check_skill_health(skill_name, req) 异步函数", + "tags": [ + "check_skill_health" + ], + "complexity": "simple" + }, + { + "id": "func:list_capabilities", + "type": "function", + "name": "list_capabilities", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "list_capabilities(req) 异步函数", + "tags": [ + "list_capabilities" + ], + "complexity": "simple" + }, + { + "id": "func:reload_skill", + "type": "function", + "name": "reload_skill", + "filePath": "src/agentkit/server/routes/skill_management.py", + "layer": "api", + "summary": "reload_skill(skill_name, req) 异步函数", + "tags": [ + "reload_skill" + ], + "complexity": "simple" + }, + { + "id": "func:_validate_skill_name", + "type": "function", + "name": "_validate_skill_name", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "_validate_skill_name(name) 函数 → str", + "tags": [ + "_validate_skill_name" + ], + "complexity": "simple" + }, + { + "id": "func:_get_skills_dir", + "type": "function", + "name": "_get_skills_dir", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "_get_skills_dir(req) 函数 → str", + "tags": [ + "_get_skills_dir" + ], + "complexity": "moderate" + }, + { + "id": "func:_validate_source_url", + "type": "function", + "name": "_validate_source_url", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "_validate_source_url(source) 函数 → None", + "tags": [ + "_validate_source_url" + ], + "complexity": "complex" + }, + { + "id": "func:_validate_yaml_content", + "type": "function", + "name": "_validate_yaml_content", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "_validate_yaml_content(content) 函数 → dict", + "tags": [ + "_validate_yaml_content" + ], + "complexity": "moderate" + }, + { + "id": "func:register_skill", + "type": "function", + "name": "register_skill", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "register_skill(request, req) 异步函数", + "tags": [ + "register_skill" + ], + "complexity": "simple" + }, + { + "id": "func:list_skills", + "type": "function", + "name": "list_skills", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "list_skills(req) 异步函数", + "tags": [ + "list_skills" + ], + "complexity": "moderate" + }, + { + "id": "func:install_skill", + "type": "function", + "name": "install_skill", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "install_skill(request, req) 异步函数", + "tags": [ + "install_skill" + ], + "complexity": "complex" + }, + { + "id": "func:uninstall_skill", + "type": "function", + "name": "uninstall_skill", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "uninstall_skill(name, req) 异步函数", + "tags": [ + "uninstall_skill" + ], + "complexity": "moderate" + }, + { + "id": "func:create_pipeline", + "type": "function", + "name": "create_pipeline", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "create_pipeline(request, req) 异步函数", + "tags": [ + "create_pipeline" + ], + "complexity": "simple" + }, + { + "id": "func:list_pipelines", + "type": "function", + "name": "list_pipelines", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "list_pipelines(req) 异步函数", + "tags": [ + "list_pipelines" + ], + "complexity": "simple" + }, + { + "id": "func:execute_pipeline", + "type": "function", + "name": "execute_pipeline", + "filePath": "src/agentkit/server/routes/skills.py", + "layer": "api", + "summary": "execute_pipeline(name, request, req) 异步函数", + "tags": [ + "execute_pipeline" + ], + "complexity": "simple" + }, + { + "id": "func:_validate_input_size", + "type": "function", + "name": "_validate_input_size", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "_validate_input_size(input_data) 函数 → None", + "tags": [ + "_validate_input_size" + ], + "complexity": "simple" + }, + { + "id": "func:list_tasks", + "type": "function", + "name": "list_tasks", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "list_tasks(status, limit, req) 异步函数", + "tags": [ + "list_tasks" + ], + "complexity": "simple" + }, + { + "id": "func:submit_task", + "type": "function", + "name": "submit_task", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "submit_task(request, req) 异步函数", + "tags": [ + "submit_task" + ], + "complexity": "complex" + }, + { + "id": "func:get_task_status", + "type": "function", + "name": "get_task_status", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "get_task_status(task_id, req) 异步函数", + "tags": [ + "get_task_status" + ], + "complexity": "simple" + }, + { + "id": "func:cancel_task", + "type": "function", + "name": "cancel_task", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "cancel_task(task_id, req) 异步函数", + "tags": [ + "cancel_task" + ], + "complexity": "moderate" + }, + { + "id": "func:stream_task", + "type": "function", + "name": "stream_task", + "filePath": "src/agentkit/server/routes/tasks.py", + "layer": "api", + "summary": "stream_task(request, req) 异步函数", + "tags": [ + "stream_task" + ], + "complexity": "complex" + }, + { + "id": "func:_get_or_create_session", + "type": "function", + "name": "_get_or_create_session", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "_get_or_create_session(session_id) 函数 → TerminalSessionState", + "tags": [ + "_get_or_create_session" + ], + "complexity": "moderate" + }, + { + "id": "func:_cleanup_session", + "type": "function", + "name": "_cleanup_session", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "_cleanup_session(session_id) 函数 → None", + "tags": [ + "_cleanup_session" + ], + "complexity": "moderate" + }, + { + "id": "func:_is_single_command_dangerous", + "type": "function", + "name": "_is_single_command_dangerous", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "_is_single_command_dangerous(command) 函数 → bool", + "tags": [ + "_is_single_command_dangerous" + ], + "complexity": "complex" + }, + { + "id": "func:_is_dangerous", + "type": "function", + "name": "_is_dangerous", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "_is_dangerous(command) 函数 → bool", + "tags": [ + "_is_dangerous" + ], + "complexity": "moderate" + }, + { + "id": "func:_check_command_safety", + "type": "function", + "name": "_check_command_safety", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "_check_command_safety(command, session_id) 函数 → Subscript(value=Name(id='dict', ctx=Load()), slice=Tuple(elts=[Name(id='str', ctx=Load()), Name(id='Any', ctx=Load())], ctx=Load()), ctx=Load())", + "tags": [ + "_check_command_safety" + ], + "complexity": "moderate" + }, + { + "id": "func:execute_command", + "type": "function", + "name": "execute_command", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "execute_command(request) 异步函数", + "tags": [ + "execute_command" + ], + "complexity": "complex" + }, + { + "id": "func:list_sessions", + "type": "function", + "name": "list_sessions", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "list_sessions() 异步函数", + "tags": [ + "list_sessions" + ], + "complexity": "simple" + }, + { + "id": "func:get_session_history", + "type": "function", + "name": "get_session_history", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "get_session_history(session_id, limit, offset) 异步函数", + "tags": [ + "get_session_history" + ], + "complexity": "simple" + }, + { + "id": "func:close_session", + "type": "function", + "name": "close_session", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "close_session(session_id) 异步函数", + "tags": [ + "close_session" + ], + "complexity": "simple" + }, + { + "id": "func:terminal_websocket", + "type": "function", + "name": "terminal_websocket", + "filePath": "src/agentkit/server/routes/terminal.py", + "layer": "api", + "summary": "terminal_websocket(websocket) 异步函数 → None", + "tags": [ + "terminal_websocket" + ], + "complexity": "complex" + }, + { + "id": "func:_verify_api_key", + "type": "function", + "name": "_verify_api_key", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_verify_api_key(request, api_key_header, api_key_query) 异步函数 → None", + "tags": [ + "_verify_api_key" + ], + "complexity": "complex" + }, + { + "id": "func:_ws_subscribe", + "type": "function", + "name": "_ws_subscribe", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_ws_subscribe(execution_id, ws) 异步函数 → None", + "tags": [ + "_ws_subscribe" + ], + "complexity": "simple" + }, + { + "id": "func:_ws_unsubscribe", + "type": "function", + "name": "_ws_unsubscribe", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_ws_unsubscribe(execution_id, ws) 异步函数 → None", + "tags": [ + "_ws_unsubscribe" + ], + "complexity": "simple" + }, + { + "id": "func:_get_store", + "type": "function", + "name": "_get_store", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_get_store(request) 函数 → WorkflowStore", + "tags": [ + "_get_store" + ], + "complexity": "simple" + }, + { + "id": "func:_validate_workflow_stages", + "type": "function", + "name": "_validate_workflow_stages", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_validate_workflow_stages(stages) 函数 → None", + "tags": [ + "_validate_workflow_stages" + ], + "complexity": "complex" + }, + { + "id": "func:_execute_workflow", + "type": "function", + "name": "_execute_workflow", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_execute_workflow(workflow, execution, variables, store, skill_registry) 异步函数 → None", + "tags": [ + "_execute_workflow" + ], + "complexity": "complex" + }, + { + "id": "func:_evaluate_condition", + "type": "function", + "name": "_evaluate_condition", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_evaluate_condition(expression, variables) 函数 → bool", + "tags": [ + "_evaluate_condition" + ], + "complexity": "complex" + }, + { + "id": "func:_broadcast_ws", + "type": "function", + "name": "_broadcast_ws", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "_broadcast_ws(message, execution_id) 异步函数 → None", + "tags": [ + "_broadcast_ws" + ], + "complexity": "complex" + }, + { + "id": "func:list_workflows", + "type": "function", + "name": "list_workflows", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "list_workflows(request, limit, _auth) 异步函数", + "tags": [ + "list_workflows" + ], + "complexity": "simple" + }, + { + "id": "func:create_workflow", + "type": "function", + "name": "create_workflow", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "create_workflow(request, body, _auth) 异步函数", + "tags": [ + "create_workflow" + ], + "complexity": "simple" + }, + { + "id": "func:get_workflow", + "type": "function", + "name": "get_workflow", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "get_workflow(request, workflow_id, _auth) 异步函数", + "tags": [ + "get_workflow" + ], + "complexity": "simple" + }, + { + "id": "func:list_workflow_executions", + "type": "function", + "name": "list_workflow_executions", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "list_workflow_executions(request, workflow_id, limit, offset, _auth) 异步函数", + "tags": [ + "list_workflow_executions" + ], + "complexity": "simple" + }, + { + "id": "func:update_workflow", + "type": "function", + "name": "update_workflow", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "update_workflow(request, workflow_id, body, _auth) 异步函数", + "tags": [ + "update_workflow" + ], + "complexity": "simple" + }, + { + "id": "func:delete_workflow", + "type": "function", + "name": "delete_workflow", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "delete_workflow(request, workflow_id, _auth) 异步函数", + "tags": [ + "delete_workflow" + ], + "complexity": "simple" + }, + { + "id": "func:execute_workflow", + "type": "function", + "name": "execute_workflow", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "execute_workflow(request, workflow_id, body, _auth) 异步函数", + "tags": [ + "execute_workflow" + ], + "complexity": "simple" + }, + { + "id": "func:get_execution", + "type": "function", + "name": "get_execution", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "get_execution(request, execution_id, _auth) 异步函数", + "tags": [ + "get_execution" + ], + "complexity": "simple" + }, + { + "id": "func:approve_execution", + "type": "function", + "name": "approve_execution", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "approve_execution(request, execution_id, body, _auth) 异步函数", + "tags": [ + "approve_execution" + ], + "complexity": "complex" + }, + { + "id": "func:cancel_execution", + "type": "function", + "name": "cancel_execution", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "cancel_execution(request, execution_id, _auth) 异步函数", + "tags": [ + "cancel_execution" + ], + "complexity": "moderate" + }, + { + "id": "func:workflow_websocket", + "type": "function", + "name": "workflow_websocket", + "filePath": "src/agentkit/server/routes/workflows.py", + "layer": "api", + "summary": "workflow_websocket(websocket) 异步函数", + "tags": [ + "workflow_websocket" + ], + "complexity": "complex" + }, + { + "id": "func:_authenticate", + "type": "function", + "name": "_authenticate", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "_authenticate(websocket, api_key) 函数 → bool", + "tags": [ + "_authenticate" + ], + "complexity": "simple" + }, + { + "id": "func:task_websocket", + "type": "function", + "name": "task_websocket", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "task_websocket(websocket, task_id) 异步函数 → None", + "tags": [ + "task_websocket" + ], + "complexity": "complex" + }, + { + "id": "func:_resolve_agent", + "type": "function", + "name": "_resolve_agent", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "_resolve_agent(websocket, _task_id) 函数", + "tags": [ + "_resolve_agent" + ], + "complexity": "simple" + }, + { + "id": "func:_run_react_and_stream", + "type": "function", + "name": "_run_react_and_stream", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "_run_react_and_stream(websocket, task_id, agent, cancellation_token) 异步函数 → None", + "tags": [ + "_run_react_and_stream" + ], + "complexity": "simple" + }, + { + "id": "func:_listen_client_messages", + "type": "function", + "name": "_listen_client_messages", + "filePath": "src/agentkit/server/routes/ws.py", + "layer": "api", + "summary": "_listen_client_messages(websocket, task_id, cancellation_token, _exec_task) 异步函数 → None", + "tags": [ + "_listen_client_messages" + ], + "complexity": "complex" + }, + { + "id": "func:create_task_store", + "type": "function", + "name": "create_task_store", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "create_task_store(backend, redis_url, ttl_seconds, max_records) 函数 → BinOp(left=Name(id='InMemoryTaskStore', ctx=Load()), op=BitOr(), right=Name(id='RedisTaskStore', ctx=Load()))", + "tags": [ + "create_task_store" + ], + "complexity": "simple" + }, + { + "id": "func:_sanitize_redis_url", + "type": "function", + "name": "_sanitize_redis_url", + "filePath": "src/agentkit/server/task_store.py", + "layer": "api", + "summary": "_sanitize_redis_url(url) 函数 → str", + "tags": [ + "_sanitize_redis_url" + ], + "complexity": "simple" + }, + { + "id": "func:create_session_store", + "type": "function", + "name": "create_session_store", + "filePath": "src/agentkit/session/store.py", + "layer": "data", + "summary": "create_session_store(backend, redis_url, ttl_seconds, data_dir) 函数 → BinOp(left=BinOp(left=Name(id='InMemorySessionStore', ctx=Load()), op=BitOr(), right=Name(id='RedisSessionStore', ctx=Load())), op=BitOr(), right=Name(id='FileSessionStore', ctx=Load()))", + "tags": [ + "create_session_store" + ], + "complexity": "moderate" + }, + { + "id": "func:create_geo_pipeline_steps", + "type": "function", + "name": "create_geo_pipeline_steps", + "filePath": "src/agentkit/skills/geo_pipeline.py", + "layer": "service", + "summary": "create_geo_pipeline_steps() 函数 → Subscript(value=Name(id='list', ctx=Load()), slice=Name(id='PipelineStep', ctx=Load()), ctx=Load())", + "tags": [ + "create_geo_pipeline_steps" + ], + "complexity": "simple" + }, + { + "id": "func:get_meter", + "type": "function", + "name": "get_meter", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "get_meter(name) 函数", + "tags": [ + "get_meter" + ], + "complexity": "simple" + }, + { + "id": "func:_get_counter", + "type": "function", + "name": "_get_counter", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "_get_counter(name, description, unit) 函数", + "tags": [ + "_get_counter" + ], + "complexity": "simple" + }, + { + "id": "func:_get_histogram", + "type": "function", + "name": "_get_histogram", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "_get_histogram(name, description, unit) 函数", + "tags": [ + "_get_histogram" + ], + "complexity": "simple" + }, + { + "id": "func:agent_request_counter", + "type": "function", + "name": "agent_request_counter", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "agent_request_counter() 函数", + "tags": [ + "agent_request_counter" + ], + "complexity": "simple" + }, + { + "id": "func:agent_duration_histogram", + "type": "function", + "name": "agent_duration_histogram", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "agent_duration_histogram() 函数", + "tags": [ + "agent_duration_histogram" + ], + "complexity": "simple" + }, + { + "id": "func:llm_token_histogram", + "type": "function", + "name": "llm_token_histogram", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "llm_token_histogram() 函数", + "tags": [ + "llm_token_histogram" + ], + "complexity": "simple" + }, + { + "id": "func:tool_duration_histogram", + "type": "function", + "name": "tool_duration_histogram", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "tool_duration_histogram() 函数", + "tags": [ + "tool_duration_histogram" + ], + "complexity": "simple" + }, + { + "id": "func:pipeline_step_histogram", + "type": "function", + "name": "pipeline_step_histogram", + "filePath": "src/agentkit/telemetry/metrics.py", + "layer": "utility", + "summary": "pipeline_step_histogram() 函数", + "tags": [ + "pipeline_step_histogram" + ], + "complexity": "simple" + }, + { + "id": "func:setup_telemetry", + "type": "function", + "name": "setup_telemetry", + "filePath": "src/agentkit/telemetry/setup.py", + "layer": "utility", + "summary": "setup_telemetry(app, config) 函数", + "tags": [ + "setup_telemetry" + ], + "complexity": "complex" + }, + { + "id": "func:get_tracer", + "type": "function", + "name": "get_tracer", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "get_tracer() 函数 → BinOp(left=Name(id='NoOpTracer', ctx=Load()), op=BitOr(), right=Name(id='OTelTracer', ctx=Load()))", + "tags": [ + "get_tracer" + ], + "complexity": "simple" + }, + { + "id": "func:init_telemetry", + "type": "function", + "name": "init_telemetry", + "filePath": "src/agentkit/telemetry/tracer.py", + "layer": "utility", + "summary": "init_telemetry(config) 函数 → None", + "tags": [ + "init_telemetry" + ], + "complexity": "moderate" + }, + { + "id": "func:get_tracer", + "type": "function", + "name": "get_tracer", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "get_tracer(name) 函数", + "tags": [ + "get_tracer" + ], + "complexity": "simple" + }, + { + "id": "func:start_span", + "type": "function", + "name": "start_span", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "start_span(name, kind, attributes) 函数", + "tags": [ + "start_span" + ], + "complexity": "moderate" + }, + { + "id": "func:trace_agent", + "type": "function", + "name": "trace_agent", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "trace_agent(agent_name, agent_type) 函数", + "tags": [ + "trace_agent" + ], + "complexity": "simple" + }, + { + "id": "func:trace_tool", + "type": "function", + "name": "trace_tool", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "trace_tool(tool_name) 函数", + "tags": [ + "trace_tool" + ], + "complexity": "simple" + }, + { + "id": "func:trace_llm", + "type": "function", + "name": "trace_llm", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "trace_llm(provider, model) 函数", + "tags": [ + "trace_llm" + ], + "complexity": "moderate" + }, + { + "id": "func:trace_pipeline_step", + "type": "function", + "name": "trace_pipeline_step", + "filePath": "src/agentkit/telemetry/tracing.py", + "layer": "utility", + "summary": "trace_pipeline_step(pipeline_name, step_name) 函数", + "tags": [ + "trace_pipeline_step" + ], + "complexity": "simple" + }, + { + "id": "func:is_safe_url", + "type": "function", + "name": "is_safe_url", + "filePath": "src/agentkit/utils/security.py", + "layer": "unknown", + "summary": "is_safe_url(url) 函数 → bool", + "tags": [ + "is_safe_url" + ], + "complexity": "complex" + }, + { + "id": "func:_is_unsafe_ip", + "type": "function", + "name": "_is_unsafe_ip", + "filePath": "src/agentkit/utils/security.py", + "layer": "unknown", + "summary": "_is_unsafe_ip(ip) 函数 → bool", + "tags": [ + "_is_unsafe_ip" + ], + "complexity": "moderate" + }, + { + "id": "func:is_safe_url_async", + "type": "function", + "name": "is_safe_url_async", + "filePath": "src/agentkit/utils/security.py", + "layer": "unknown", + "summary": "is_safe_url_async(url) 异步函数 → bool", + "tags": [ + "is_safe_url_async" + ], + "complexity": "complex" + }, + { + "id": "func:compute_cosine_similarity", + "type": "function", + "name": "compute_cosine_similarity", + "filePath": "src/agentkit/utils/vector_math.py", + "layer": "unknown", + "summary": "compute_cosine_similarity(vec_a, vec_b) 函数 → float", + "tags": [ + "compute_cosine_similarity" + ], + "complexity": "moderate" + } + ], + "edges": [ + { + "id": "edge:717a9967", + "source": "file:src/agentkit/bus/interface.py", + "target": "class:MessageBus", + "type": "contains", + "label": "定义类 MessageBus" + }, + { + "id": "edge:19af7bc4", + "source": "class:MessageBus", + "target": "func:MessageBus.publish", + "type": "contains", + "label": "方法 publish" + }, + { + "id": "edge:02fe14c0", + "source": "class:MessageBus", + "target": "func:MessageBus.subscribe", + "type": "contains", + "label": "方法 subscribe" + }, + { + "id": "edge:63c58fa4", + "source": "class:MessageBus", + "target": "func:MessageBus.unsubscribe", + "type": "contains", + "label": "方法 unsubscribe" + }, + { + "id": "edge:1c008fc6", + "source": "class:MessageBus", + "target": "func:MessageBus.request", + "type": "contains", + "label": "方法 request" + }, + { + "id": "edge:d4b99660", + "source": "file:src/agentkit/bus/memory_bus.py", + "target": "class:InMemoryMessageBus", + "type": "contains", + "label": "定义类 InMemoryMessageBus" + }, + { + "id": "edge:d23bcf14", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:1677c696", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.publish", + "type": "contains", + "label": "方法 publish" + }, + { + "id": "edge:f77af9dc", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.subscribe", + "type": "contains", + "label": "方法 subscribe" + }, + { + "id": "edge:7e81d148", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus._consume_queue", + "type": "contains", + "label": "方法 _consume_queue" + }, + { + "id": "edge:e98e5e70", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus._try_resolve_pending", + "type": "contains", + "label": "方法 _try_resolve_pending" + }, + { + "id": "edge:1f0f1fc1", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.unsubscribe", + "type": "contains", + "label": "方法 unsubscribe" + }, + { + "id": "edge:b159a8db", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.request", + "type": "contains", + "label": "方法 request" + }, + { + "id": "edge:d64e8898", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.broadcast", + "type": "contains", + "label": "方法 broadcast" + }, + { + "id": "edge:7666bb10", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:9c736677", + "source": "class:InMemoryMessageBus", + "target": "func:InMemoryMessageBus.backend_type", + "type": "contains", + "label": "方法 backend_type" + }, + { + "id": "edge:a2b8fbf5", + "source": "file:src/agentkit/bus/message.py", + "target": "class:AgentMessage", + "type": "contains", + "label": "定义类 AgentMessage" + }, + { + "id": "edge:069895ee", + "source": "class:AgentMessage", + "target": "func:AgentMessage.is_expired", + "type": "contains", + "label": "方法 is_expired" + }, + { + "id": "edge:6e6c3b83", + "source": "class:AgentMessage", + "target": "func:AgentMessage.is_broadcast", + "type": "contains", + "label": "方法 is_broadcast" + }, + { + "id": "edge:1e0f779b", + "source": "class:AgentMessage", + "target": "func:AgentMessage.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:5c7d1d92", + "source": "class:AgentMessage", + "target": "func:AgentMessage.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:bd5469ec", + "source": "file:src/agentkit/bus/protocol.py", + "target": "class:MessageBus", + "type": "contains", + "label": "定义类 MessageBus" + }, + { + "id": "edge:220ba1a9", + "source": "class:MessageBus", + "target": "func:MessageBus.publish", + "type": "contains", + "label": "方法 publish" + }, + { + "id": "edge:2a58836b", + "source": "class:MessageBus", + "target": "func:MessageBus.subscribe", + "type": "contains", + "label": "方法 subscribe" + }, + { + "id": "edge:10d4ca9f", + "source": "class:MessageBus", + "target": "func:MessageBus.unsubscribe", + "type": "contains", + "label": "方法 unsubscribe" + }, + { + "id": "edge:b97acfb1", + "source": "class:MessageBus", + "target": "func:MessageBus.request", + "type": "contains", + "label": "方法 request" + }, + { + "id": "edge:eedaffe0", + "source": "class:MessageBus", + "target": "func:MessageBus.broadcast", + "type": "contains", + "label": "方法 broadcast" + }, + { + "id": "edge:67f603c5", + "source": "class:MessageBus", + "target": "func:MessageBus.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:4d14c6ea", + "source": "file:src/agentkit/bus/redis_bus.py", + "target": "class:RedisMessageBus", + "type": "contains", + "label": "定义类 RedisMessageBus" + }, + { + "id": "edge:1e0f868b", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:737229fe", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus._get_redis", + "type": "contains", + "label": "方法 _get_redis" + }, + { + "id": "edge:df9d2472", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus._stream_key", + "type": "contains", + "label": "方法 _stream_key" + }, + { + "id": "edge:a5d01203", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus._dead_letter_key", + "type": "contains", + "label": "方法 _dead_letter_key" + }, + { + "id": "edge:3583e0c5", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.publish", + "type": "contains", + "label": "方法 publish" + }, + { + "id": "edge:fd01ee0a", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.subscribe", + "type": "contains", + "label": "方法 subscribe" + }, + { + "id": "edge:b41ac432", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus._consume_stream", + "type": "contains", + "label": "方法 _consume_stream" + }, + { + "id": "edge:30a50791", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus._handle_failed_message", + "type": "contains", + "label": "方法 _handle_failed_message" + }, + { + "id": "edge:840cf12e", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.unsubscribe", + "type": "contains", + "label": "方法 unsubscribe" + }, + { + "id": "edge:6f9ea6af", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.request", + "type": "contains", + "label": "方法 request" + }, + { + "id": "edge:f86136fa", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.broadcast", + "type": "contains", + "label": "方法 broadcast" + }, + { + "id": "edge:8ccb888e", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:127614f2", + "source": "class:RedisMessageBus", + "target": "func:RedisMessageBus.backend_type", + "type": "contains", + "label": "方法 backend_type" + }, + { + "id": "edge:8390f5e9", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "class:ExecutionMode", + "type": "contains", + "label": "定义类 ExecutionMode" + }, + { + "id": "edge:86faf6ab", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "class:SkillRoutingResult", + "type": "contains", + "label": "定义类 SkillRoutingResult" + }, + { + "id": "edge:3192daef", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "class:HeuristicClassifier", + "type": "contains", + "label": "定义类 HeuristicClassifier" + }, + { + "id": "edge:e052dbdd", + "source": "class:HeuristicClassifier", + "target": "func:HeuristicClassifier.classify", + "type": "contains", + "label": "方法 classify" + }, + { + "id": "edge:0284fbdf", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "class:CostAwareRouter", + "type": "contains", + "label": "定义类 CostAwareRouter" + }, + { + "id": "edge:f66b7c62", + "source": "class:CostAwareRouter", + "target": "func:CostAwareRouter.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:d03386e3", + "source": "class:CostAwareRouter", + "target": "func:CostAwareRouter._match_layer0", + "type": "contains", + "label": "方法 _match_layer0" + }, + { + "id": "edge:e8217584", + "source": "class:CostAwareRouter", + "target": "func:CostAwareRouter.quick_classify", + "type": "contains", + "label": "方法 quick_classify" + }, + { + "id": "edge:52fafce5", + "source": "class:CostAwareRouter", + "target": "func:CostAwareRouter._classify_merged", + "type": "contains", + "label": "方法 _classify_merged" + }, + { + "id": "edge:a4c1a077", + "source": "class:CostAwareRouter", + "target": "func:CostAwareRouter._route_layer2", + "type": "contains", + "label": "方法 _route_layer2" + }, + { + "id": "edge:6a2e99e5", + "source": "class:CostAwareRouter", + "target": "func:CostAwareRouter.route", + "type": "contains", + "label": "方法 route" + }, + { + "id": "edge:6fc0e0c8", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "class:AgentPool", + "type": "contains", + "label": "定义类 AgentPool" + }, + { + "id": "edge:f41bd1b1", + "source": "class:AgentPool", + "target": "func:AgentPool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:58128fdc", + "source": "class:AgentPool", + "target": "func:AgentPool.create_agent", + "type": "contains", + "label": "方法 create_agent" + }, + { + "id": "edge:ac347f10", + "source": "class:AgentPool", + "target": "func:AgentPool.remove_agent", + "type": "contains", + "label": "方法 remove_agent" + }, + { + "id": "edge:d4aa17be", + "source": "class:AgentPool", + "target": "func:AgentPool.get_agent", + "type": "contains", + "label": "方法 get_agent" + }, + { + "id": "edge:0f0b8b53", + "source": "class:AgentPool", + "target": "func:AgentPool.list_agents", + "type": "contains", + "label": "方法 list_agents" + }, + { + "id": "edge:fabbfd04", + "source": "class:AgentPool", + "target": "func:AgentPool.create_agent_from_skill", + "type": "contains", + "label": "方法 create_agent_from_skill" + }, + { + "id": "edge:4e4825fc", + "source": "file:src/agentkit/core/base.py", + "target": "class:BaseAgent", + "type": "contains", + "label": "定义类 BaseAgent" + }, + { + "id": "edge:77e1df27", + "source": "class:BaseAgent", + "target": "func:BaseAgent.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:41281374", + "source": "class:BaseAgent", + "target": "func:BaseAgent.status", + "type": "contains", + "label": "方法 status" + }, + { + "id": "edge:8b8ee391", + "source": "class:BaseAgent", + "target": "func:BaseAgent.config_version", + "type": "contains", + "label": "方法 config_version" + }, + { + "id": "edge:3b28af12", + "source": "class:BaseAgent", + "target": "func:BaseAgent.is_distributed", + "type": "contains", + "label": "方法 is_distributed" + }, + { + "id": "edge:3002e08e", + "source": "class:BaseAgent", + "target": "func:BaseAgent._acquire_status_lock", + "type": "contains", + "label": "方法 _acquire_status_lock" + }, + { + "id": "edge:474f21e5", + "source": "class:BaseAgent", + "target": "func:BaseAgent._release_status_lock", + "type": "contains", + "label": "方法 _release_status_lock" + }, + { + "id": "edge:6039df9e", + "source": "class:BaseAgent", + "target": "func:BaseAgent.tools", + "type": "contains", + "label": "方法 tools" + }, + { + "id": "edge:28833e47", + "source": "class:BaseAgent", + "target": "func:BaseAgent.memory", + "type": "contains", + "label": "方法 memory" + }, + { + "id": "edge:23ddc328", + "source": "class:BaseAgent", + "target": "func:BaseAgent.llm_gateway", + "type": "contains", + "label": "方法 llm_gateway" + }, + { + "id": "edge:73c0685d", + "source": "class:BaseAgent", + "target": "func:BaseAgent.llm_gateway", + "type": "contains", + "label": "方法 llm_gateway" + }, + { + "id": "edge:2a8d82ef", + "source": "class:BaseAgent", + "target": "func:BaseAgent.skill", + "type": "contains", + "label": "方法 skill" + }, + { + "id": "edge:2e79a683", + "source": "class:BaseAgent", + "target": "func:BaseAgent.skill", + "type": "contains", + "label": "方法 skill" + }, + { + "id": "edge:07b726a7", + "source": "class:BaseAgent", + "target": "func:BaseAgent.quality_gate", + "type": "contains", + "label": "方法 quality_gate" + }, + { + "id": "edge:ca479889", + "source": "class:BaseAgent", + "target": "func:BaseAgent.handle_task", + "type": "contains", + "label": "方法 handle_task" + }, + { + "id": "edge:ddc335d7", + "source": "class:BaseAgent", + "target": "func:BaseAgent.get_capabilities", + "type": "contains", + "label": "方法 get_capabilities" + }, + { + "id": "edge:4756ea8f", + "source": "class:BaseAgent", + "target": "func:BaseAgent.on_task_start", + "type": "contains", + "label": "方法 on_task_start" + }, + { + "id": "edge:842e49cb", + "source": "class:BaseAgent", + "target": "func:BaseAgent.on_task_complete", + "type": "contains", + "label": "方法 on_task_complete" + }, + { + "id": "edge:6b92ca2f", + "source": "class:BaseAgent", + "target": "func:BaseAgent.on_task_failed", + "type": "contains", + "label": "方法 on_task_failed" + }, + { + "id": "edge:3aa31e80", + "source": "class:BaseAgent", + "target": "func:BaseAgent.handle_task_with_feedback", + "type": "contains", + "label": "方法 handle_task_with_feedback" + }, + { + "id": "edge:917dad5a", + "source": "class:BaseAgent", + "target": "func:BaseAgent._build_quality_feedback", + "type": "contains", + "label": "方法 _build_quality_feedback" + }, + { + "id": "edge:a8bc42cb", + "source": "class:BaseAgent", + "target": "func:BaseAgent.use_tool", + "type": "contains", + "label": "方法 use_tool" + }, + { + "id": "edge:abf1dbda", + "source": "class:BaseAgent", + "target": "func:BaseAgent.use_memory", + "type": "contains", + "label": "方法 use_memory" + }, + { + "id": "edge:81f07fee", + "source": "class:BaseAgent", + "target": "func:BaseAgent.use_memory_retriever", + "type": "contains", + "label": "方法 use_memory_retriever" + }, + { + "id": "edge:5e4f6cc1", + "source": "class:BaseAgent", + "target": "func:BaseAgent.set_registry", + "type": "contains", + "label": "方法 set_registry" + }, + { + "id": "edge:0dbcaf8c", + "source": "class:BaseAgent", + "target": "func:BaseAgent.set_dispatcher", + "type": "contains", + "label": "方法 set_dispatcher" + }, + { + "id": "edge:dc949b76", + "source": "class:BaseAgent", + "target": "func:BaseAgent.start", + "type": "contains", + "label": "方法 start" + }, + { + "id": "edge:600918b0", + "source": "class:BaseAgent", + "target": "func:BaseAgent.stop", + "type": "contains", + "label": "方法 stop" + }, + { + "id": "edge:56749b18", + "source": "class:BaseAgent", + "target": "func:BaseAgent.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:6e116ecc", + "source": "class:BaseAgent", + "target": "func:BaseAgent.cancel_task", + "type": "contains", + "label": "方法 cancel_task" + }, + { + "id": "edge:70119a3a", + "source": "class:BaseAgent", + "target": "func:BaseAgent.handoff", + "type": "contains", + "label": "方法 handoff" + }, + { + "id": "edge:7841f452", + "source": "class:BaseAgent", + "target": "func:BaseAgent.report_progress", + "type": "contains", + "label": "方法 report_progress" + }, + { + "id": "edge:50ae7246", + "source": "class:BaseAgent", + "target": "func:BaseAgent.heartbeat", + "type": "contains", + "label": "方法 heartbeat" + }, + { + "id": "edge:ed4fd9f6", + "source": "class:BaseAgent", + "target": "func:BaseAgent._heartbeat_loop", + "type": "contains", + "label": "方法 _heartbeat_loop" + }, + { + "id": "edge:ead0b5d4", + "source": "class:BaseAgent", + "target": "func:BaseAgent._listen_for_tasks", + "type": "contains", + "label": "方法 _listen_for_tasks" + }, + { + "id": "edge:2b523773", + "source": "class:BaseAgent", + "target": "func:BaseAgent._execute_task_with_semaphore", + "type": "contains", + "label": "方法 _execute_task_with_semaphore" + }, + { + "id": "edge:00c92168", + "source": "class:BaseAgent", + "target": "func:BaseAgent._execute_task", + "type": "contains", + "label": "方法 _execute_task" + }, + { + "id": "edge:6a4b840b", + "source": "class:BaseAgent", + "target": "func:BaseAgent._validate_input", + "type": "contains", + "label": "方法 _validate_input" + }, + { + "id": "edge:2085bfd4", + "source": "file:src/agentkit/core/compressor.py", + "target": "class:CompressionStrategy", + "type": "contains", + "label": "定义类 CompressionStrategy" + }, + { + "id": "edge:f12acb2e", + "source": "class:CompressionStrategy", + "target": "func:CompressionStrategy.compress", + "type": "contains", + "label": "方法 compress" + }, + { + "id": "edge:989f1f26", + "source": "class:CompressionStrategy", + "target": "func:CompressionStrategy.compress_tool_result", + "type": "contains", + "label": "方法 compress_tool_result" + }, + { + "id": "edge:7fe52bd3", + "source": "class:CompressionStrategy", + "target": "func:CompressionStrategy.is_available", + "type": "contains", + "label": "方法 is_available" + }, + { + "id": "edge:0a5d068a", + "source": "file:src/agentkit/core/compressor.py", + "target": "class:ContextCompressor", + "type": "contains", + "label": "定义类 ContextCompressor" + }, + { + "id": "edge:052f8b9e", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:cf78e6dc", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor.estimate_tokens", + "type": "contains", + "label": "方法 estimate_tokens" + }, + { + "id": "edge:e80bebea", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor.compress", + "type": "contains", + "label": "方法 compress" + }, + { + "id": "edge:46d3b077", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor._summarize", + "type": "contains", + "label": "方法 _summarize" + }, + { + "id": "edge:9ae2807b", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor._simple_summary", + "type": "contains", + "label": "方法 _simple_summary" + }, + { + "id": "edge:d03184ed", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor._compress_aggressive", + "type": "contains", + "label": "方法 _compress_aggressive" + }, + { + "id": "edge:6dbf8ab3", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor._truncate", + "type": "contains", + "label": "方法 _truncate" + }, + { + "id": "edge:17f9b75f", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor.compress_tool_result", + "type": "contains", + "label": "方法 compress_tool_result" + }, + { + "id": "edge:acbb83d4", + "source": "class:ContextCompressor", + "target": "func:ContextCompressor.is_available", + "type": "contains", + "label": "方法 is_available" + }, + { + "id": "edge:6d6221ca", + "source": "file:src/agentkit/core/config_driven.py", + "target": "class:AgentConfig", + "type": "contains", + "label": "定义类 AgentConfig" + }, + { + "id": "edge:0a3b5365", + "source": "class:AgentConfig", + "target": "func:AgentConfig.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:4e317996", + "source": "class:AgentConfig", + "target": "func:AgentConfig._validate", + "type": "contains", + "label": "方法 _validate" + }, + { + "id": "edge:3ef94b77", + "source": "class:AgentConfig", + "target": "func:AgentConfig.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:633d2182", + "source": "class:AgentConfig", + "target": "func:AgentConfig.from_yaml", + "type": "contains", + "label": "方法 from_yaml" + }, + { + "id": "edge:b55d0c99", + "source": "class:AgentConfig", + "target": "func:AgentConfig.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:86b08cfb", + "source": "file:src/agentkit/core/config_driven.py", + "target": "class:ConfigDrivenAgent", + "type": "contains", + "label": "定义类 ConfigDrivenAgent" + }, + { + "id": "edge:944ad973", + "source": "class:ConfigDrivenAgent", + "target": "class:BaseAgent", + "type": "extends", + "label": "继承 BaseAgent" + }, + { + "id": "edge:fb448e7e", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:548d38b4", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.get_tools", + "type": "contains", + "label": "方法 get_tools" + }, + { + "id": "edge:69091b57", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.get_model", + "type": "contains", + "label": "方法 get_model" + }, + { + "id": "edge:5ae32376", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.get_system_prompt", + "type": "contains", + "label": "方法 get_system_prompt" + }, + { + "id": "edge:48542d0f", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._build_tools_description", + "type": "contains", + "label": "方法 _build_tools_description" + }, + { + "id": "edge:21306c2a", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.get_react_config", + "type": "contains", + "label": "方法 get_react_config" + }, + { + "id": "edge:4199677c", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.config", + "type": "contains", + "label": "方法 config" + }, + { + "id": "edge:5e3be3ac", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.prompt_template", + "type": "contains", + "label": "方法 prompt_template" + }, + { + "id": "edge:f6f0a9b8", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.on_task_complete", + "type": "contains", + "label": "方法 on_task_complete" + }, + { + "id": "edge:9367d87f", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.on_task_failed", + "type": "contains", + "label": "方法 on_task_failed" + }, + { + "id": "edge:f65f566d", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._bind_tools", + "type": "contains", + "label": "方法 _bind_tools" + }, + { + "id": "edge:e5630f04", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._auto_set_current_module", + "type": "contains", + "label": "方法 _auto_set_current_module" + }, + { + "id": "edge:f956e978", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._register_mcp_tools", + "type": "contains", + "label": "方法 _register_mcp_tools" + }, + { + "id": "edge:e6eedd84", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.get_capabilities", + "type": "contains", + "label": "方法 get_capabilities" + }, + { + "id": "edge:53ba430d", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.handle_task", + "type": "contains", + "label": "方法 handle_task" + }, + { + "id": "edge:5b60e6ac", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_react", + "type": "contains", + "label": "方法 _handle_react" + }, + { + "id": "edge:916ed28e", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_rewoo", + "type": "contains", + "label": "方法 _handle_rewoo" + }, + { + "id": "edge:5f1f21cf", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_plan_exec", + "type": "contains", + "label": "方法 _handle_plan_exec" + }, + { + "id": "edge:46233b24", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_reflexion", + "type": "contains", + "label": "方法 _handle_reflexion" + }, + { + "id": "edge:9d592c89", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_direct", + "type": "contains", + "label": "方法 _handle_direct" + }, + { + "id": "edge:b440c60a", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent.handle_task_with_feedback", + "type": "contains", + "label": "方法 handle_task_with_feedback" + }, + { + "id": "edge:e660f5ff", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._wrap_llm_client", + "type": "contains", + "label": "方法 _wrap_llm_client" + }, + { + "id": "edge:06afeeee", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_llm_generate", + "type": "contains", + "label": "方法 _handle_llm_generate" + }, + { + "id": "edge:6d96e336", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_tool_call", + "type": "contains", + "label": "方法 _handle_tool_call" + }, + { + "id": "edge:924edb6b", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._handle_custom", + "type": "contains", + "label": "方法 _handle_custom" + }, + { + "id": "edge:72b7ffb2", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._resolve_tool", + "type": "contains", + "label": "方法 _resolve_tool" + }, + { + "id": "edge:3a6e9e56", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._call_llm", + "type": "contains", + "label": "方法 _call_llm" + }, + { + "id": "edge:486aa0ca", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._parse_llm_response", + "type": "contains", + "label": "方法 _parse_llm_response" + }, + { + "id": "edge:934a4761", + "source": "class:ConfigDrivenAgent", + "target": "func:ConfigDrivenAgent._import_handler", + "type": "contains", + "label": "方法 _import_handler" + }, + { + "id": "edge:85517173", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "class:TaskDispatcher", + "type": "contains", + "label": "定义类 TaskDispatcher" + }, + { + "id": "edge:9a526d11", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:839edc35", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher._get_redis", + "type": "contains", + "label": "方法 _get_redis" + }, + { + "id": "edge:a53bd22c", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher.dispatch", + "type": "contains", + "label": "方法 dispatch" + }, + { + "id": "edge:b09f78a5", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher.cancel_task", + "type": "contains", + "label": "方法 cancel_task" + }, + { + "id": "edge:8b0b42bc", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher.get_task_status", + "type": "contains", + "label": "方法 get_task_status" + }, + { + "id": "edge:fb5cd1ec", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher.handle_result", + "type": "contains", + "label": "方法 handle_result" + }, + { + "id": "edge:56665e07", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher.handle_progress", + "type": "contains", + "label": "方法 handle_progress" + }, + { + "id": "edge:a170ea6d", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher.retry_failed_tasks", + "type": "contains", + "label": "方法 retry_failed_tasks" + }, + { + "id": "edge:554fd5a0", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher._write_log", + "type": "contains", + "label": "方法 _write_log" + }, + { + "id": "edge:bfc7a946", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher._trigger_callback", + "type": "contains", + "label": "方法 _trigger_callback" + }, + { + "id": "edge:586bc7d2", + "source": "class:TaskDispatcher", + "target": "func:TaskDispatcher._task_to_dict", + "type": "contains", + "label": "方法 _task_to_dict" + }, + { + "id": "edge:384c7ce9", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:AgentFrameworkError", + "type": "contains", + "label": "定义类 AgentFrameworkError" + }, + { + "id": "edge:f74fe0c4", + "source": "class:AgentFrameworkError", + "target": "func:AgentFrameworkError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:a86e7211", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:AgentNotFoundError", + "type": "contains", + "label": "定义类 AgentNotFoundError" + }, + { + "id": "edge:10897225", + "source": "class:AgentNotFoundError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:7950a477", + "source": "class:AgentNotFoundError", + "target": "func:AgentNotFoundError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6ad97edc", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:AgentAlreadyRegisteredError", + "type": "contains", + "label": "定义类 AgentAlreadyRegisteredError" + }, + { + "id": "edge:e8424fc3", + "source": "class:AgentAlreadyRegisteredError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:aeef56f5", + "source": "class:AgentAlreadyRegisteredError", + "target": "func:AgentAlreadyRegisteredError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:17d802e1", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:AgentUnavailableError", + "type": "contains", + "label": "定义类 AgentUnavailableError" + }, + { + "id": "edge:218ba661", + "source": "class:AgentUnavailableError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:75546060", + "source": "class:AgentUnavailableError", + "target": "func:AgentUnavailableError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:09276c9a", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:TaskNotFoundError", + "type": "contains", + "label": "定义类 TaskNotFoundError" + }, + { + "id": "edge:ffe50bf6", + "source": "class:TaskNotFoundError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:c1dbd936", + "source": "class:TaskNotFoundError", + "target": "func:TaskNotFoundError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:979d0f35", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:TaskDispatchError", + "type": "contains", + "label": "定义类 TaskDispatchError" + }, + { + "id": "edge:14aba424", + "source": "class:TaskDispatchError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:c53e10a2", + "source": "class:TaskDispatchError", + "target": "func:TaskDispatchError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6529eb71", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:TaskExecutionError", + "type": "contains", + "label": "定义类 TaskExecutionError" + }, + { + "id": "edge:8f7b5109", + "source": "class:TaskExecutionError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:bce96133", + "source": "class:TaskExecutionError", + "target": "func:TaskExecutionError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:731c5a42", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:TaskTimeoutError", + "type": "contains", + "label": "定义类 TaskTimeoutError" + }, + { + "id": "edge:8b20c625", + "source": "class:TaskTimeoutError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:4687edc3", + "source": "class:TaskTimeoutError", + "target": "func:TaskTimeoutError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:573283b3", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:TaskCancelledError", + "type": "contains", + "label": "定义类 TaskCancelledError" + }, + { + "id": "edge:84644d54", + "source": "class:TaskCancelledError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:b101f6e6", + "source": "class:TaskCancelledError", + "target": "func:TaskCancelledError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:1e3a41b5", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:NoAvailableAgentError", + "type": "contains", + "label": "定义类 NoAvailableAgentError" + }, + { + "id": "edge:69dffc47", + "source": "class:NoAvailableAgentError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:af66a534", + "source": "class:NoAvailableAgentError", + "target": "func:NoAvailableAgentError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8c3528b8", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:ConfigValidationError", + "type": "contains", + "label": "定义类 ConfigValidationError" + }, + { + "id": "edge:970c05a7", + "source": "class:ConfigValidationError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:5f0095d1", + "source": "class:ConfigValidationError", + "target": "func:ConfigValidationError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:fcf0b39a", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:AgentNotReadyError", + "type": "contains", + "label": "定义类 AgentNotReadyError" + }, + { + "id": "edge:8467244e", + "source": "class:AgentNotReadyError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:a7a13ecb", + "source": "class:AgentNotReadyError", + "target": "func:AgentNotReadyError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b5777567", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:SkillNotFoundError", + "type": "contains", + "label": "定义类 SkillNotFoundError" + }, + { + "id": "edge:66330410", + "source": "class:SkillNotFoundError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:3854de26", + "source": "class:SkillNotFoundError", + "target": "func:SkillNotFoundError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:48b28f36", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:ToolNotFoundError", + "type": "contains", + "label": "定义类 ToolNotFoundError" + }, + { + "id": "edge:0963e5a3", + "source": "class:ToolNotFoundError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:00a44c97", + "source": "class:ToolNotFoundError", + "target": "func:ToolNotFoundError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:cce4505f", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:ToolExecutionError", + "type": "contains", + "label": "定义类 ToolExecutionError" + }, + { + "id": "edge:76e23637", + "source": "class:ToolExecutionError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:bc4d29b4", + "source": "class:ToolExecutionError", + "target": "func:ToolExecutionError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:80b6e7c9", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:SchemaValidationError", + "type": "contains", + "label": "定义类 SchemaValidationError" + }, + { + "id": "edge:8d63b014", + "source": "class:SchemaValidationError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:52a3fb1a", + "source": "class:SchemaValidationError", + "target": "func:SchemaValidationError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:aca602a0", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:HandoffError", + "type": "contains", + "label": "定义类 HandoffError" + }, + { + "id": "edge:d95137b5", + "source": "class:HandoffError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:df6041ce", + "source": "class:HandoffError", + "target": "func:HandoffError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6e57e056", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:EvolutionError", + "type": "contains", + "label": "定义类 EvolutionError" + }, + { + "id": "edge:c7524713", + "source": "class:EvolutionError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:c1b83ac3", + "source": "class:EvolutionError", + "target": "func:EvolutionError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b292b505", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:LLMError", + "type": "contains", + "label": "定义类 LLMError" + }, + { + "id": "edge:ef534984", + "source": "class:LLMError", + "target": "class:AgentFrameworkError", + "type": "extends", + "label": "继承 AgentFrameworkError" + }, + { + "id": "edge:1d75e66f", + "source": "class:LLMError", + "target": "func:LLMError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:4fc877dd", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:LLMProviderError", + "type": "contains", + "label": "定义类 LLMProviderError" + }, + { + "id": "edge:d9c993a8", + "source": "class:LLMProviderError", + "target": "class:LLMError", + "type": "extends", + "label": "继承 LLMError" + }, + { + "id": "edge:4a867aff", + "source": "class:LLMProviderError", + "target": "func:LLMProviderError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:5d5bc4c5", + "source": "file:src/agentkit/core/exceptions.py", + "target": "class:ModelNotFoundError", + "type": "contains", + "label": "定义类 ModelNotFoundError" + }, + { + "id": "edge:2cf541ee", + "source": "class:ModelNotFoundError", + "target": "class:LLMError", + "type": "extends", + "label": "继承 LLMError" + }, + { + "id": "edge:1aa86abb", + "source": "class:ModelNotFoundError", + "target": "func:ModelNotFoundError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:47386aa4", + "source": "file:src/agentkit/core/goal_planner.py", + "target": "class:GoalPlanner", + "type": "contains", + "label": "定义类 GoalPlanner" + }, + { + "id": "edge:8fb2958c", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:0bd774f9", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner.generate_plan", + "type": "contains", + "label": "方法 generate_plan" + }, + { + "id": "edge:0edc51c3", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._rule_based_decompose", + "type": "contains", + "label": "方法 _rule_based_decompose" + }, + { + "id": "edge:51464833", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._extract_parallel_items", + "type": "contains", + "label": "方法 _extract_parallel_items" + }, + { + "id": "edge:5748a0da", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._extract_sequential_parts", + "type": "contains", + "label": "方法 _extract_sequential_parts" + }, + { + "id": "edge:66983226", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._decompose_parallel_goal", + "type": "contains", + "label": "方法 _decompose_parallel_goal" + }, + { + "id": "edge:af99f6ac", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._decompose_sequential_goal", + "type": "contains", + "label": "方法 _decompose_sequential_goal" + }, + { + "id": "edge:3ef20ec4", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._decompose_simple_goal", + "type": "contains", + "label": "方法 _decompose_simple_goal" + }, + { + "id": "edge:4ad0d49c", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._infer_required_skills", + "type": "contains", + "label": "方法 _infer_required_skills" + }, + { + "id": "edge:301da66d", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._identify_skill_gaps", + "type": "contains", + "label": "方法 _identify_skill_gaps" + }, + { + "id": "edge:ab80c64d", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._should_refine_with_llm", + "type": "contains", + "label": "方法 _should_refine_with_llm" + }, + { + "id": "edge:04e2efd7", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._llm_refine_plan", + "type": "contains", + "label": "方法 _llm_refine_plan" + }, + { + "id": "edge:b0b07cac", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner._build_parallel_groups", + "type": "contains", + "label": "方法 _build_parallel_groups" + }, + { + "id": "edge:71079f2b", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner.update_plan_from_feedback", + "type": "contains", + "label": "方法 update_plan_from_feedback" + }, + { + "id": "edge:558bd2c0", + "source": "class:GoalPlanner", + "target": "func:GoalPlanner.validate_plan", + "type": "contains", + "label": "方法 validate_plan" + }, + { + "id": "edge:5dbb7ea7", + "source": "file:src/agentkit/core/headroom_compressor.py", + "target": "class:HeadroomCompressor", + "type": "contains", + "label": "定义类 HeadroomCompressor" + }, + { + "id": "edge:5b280548", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:52b7933a", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor.is_available", + "type": "contains", + "label": "方法 is_available" + }, + { + "id": "edge:11a5d622", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor.compress", + "type": "contains", + "label": "方法 compress" + }, + { + "id": "edge:f6a63c51", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor.compress_tool_result", + "type": "contains", + "label": "方法 compress_tool_result" + }, + { + "id": "edge:35bfcb23", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor._detect_content_type", + "type": "contains", + "label": "方法 _detect_content_type" + }, + { + "id": "edge:c484cb51", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor._compress_with_headroom", + "type": "contains", + "label": "方法 _compress_with_headroom" + }, + { + "id": "edge:2411ca30", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor._store_ccr", + "type": "contains", + "label": "方法 _store_ccr" + }, + { + "id": "edge:b0c5ad14", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor._evict_expired", + "type": "contains", + "label": "方法 _evict_expired" + }, + { + "id": "edge:60d1f74f", + "source": "class:HeadroomCompressor", + "target": "func:HeadroomCompressor.retrieve", + "type": "contains", + "label": "方法 retrieve" + }, + { + "id": "edge:9a4cf585", + "source": "file:src/agentkit/core/logging.py", + "target": "class:StructuredFormatter", + "type": "contains", + "label": "定义类 StructuredFormatter" + }, + { + "id": "edge:c65fc99a", + "source": "class:StructuredFormatter", + "target": "func:StructuredFormatter.format", + "type": "contains", + "label": "方法 format" + }, + { + "id": "edge:4fb92193", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "class:AgentRole", + "type": "contains", + "label": "定义类 AgentRole" + }, + { + "id": "edge:a1369729", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "class:SubTaskStatus", + "type": "contains", + "label": "定义类 SubTaskStatus" + }, + { + "id": "edge:405428a8", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "class:SubTask", + "type": "contains", + "label": "定义类 SubTask" + }, + { + "id": "edge:3e65bf50", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "class:OrchestrationPlan", + "type": "contains", + "label": "定义类 OrchestrationPlan" + }, + { + "id": "edge:639b1ba9", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "class:OrchestrationResult", + "type": "contains", + "label": "定义类 OrchestrationResult" + }, + { + "id": "edge:e99a9065", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "class:OrchestratorConfig", + "type": "contains", + "label": "定义类 OrchestratorConfig" + }, + { + "id": "edge:a8be3b19", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "class:Orchestrator", + "type": "contains", + "label": "定义类 Orchestrator" + }, + { + "id": "edge:f10f22a3", + "source": "class:Orchestrator", + "target": "func:Orchestrator.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:fd79bef7", + "source": "class:Orchestrator", + "target": "func:Orchestrator.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:abceb6a7", + "source": "class:Orchestrator", + "target": "func:Orchestrator._decompose_task", + "type": "contains", + "label": "方法 _decompose_task" + }, + { + "id": "edge:efb00e67", + "source": "class:Orchestrator", + "target": "func:Orchestrator._llm_decompose", + "type": "contains", + "label": "方法 _llm_decompose" + }, + { + "id": "edge:d5fa548c", + "source": "class:Orchestrator", + "target": "func:Orchestrator._build_parallel_groups", + "type": "contains", + "label": "方法 _build_parallel_groups" + }, + { + "id": "edge:61b68ccb", + "source": "class:Orchestrator", + "target": "func:Orchestrator._execute_plan", + "type": "contains", + "label": "方法 _execute_plan" + }, + { + "id": "edge:64dd9711", + "source": "class:Orchestrator", + "target": "func:Orchestrator._execute_subtask", + "type": "contains", + "label": "方法 _execute_subtask" + }, + { + "id": "edge:e7157ec3", + "source": "class:Orchestrator", + "target": "func:Orchestrator._inject_dependency_results", + "type": "contains", + "label": "方法 _inject_dependency_results" + }, + { + "id": "edge:2852a4c0", + "source": "class:Orchestrator", + "target": "func:Orchestrator._aggregate_results", + "type": "contains", + "label": "方法 _aggregate_results" + }, + { + "id": "edge:64218495", + "source": "class:Orchestrator", + "target": "func:Orchestrator._get_available_skill_names", + "type": "contains", + "label": "方法 _get_available_skill_names" + }, + { + "id": "edge:b287e1cd", + "source": "class:Orchestrator", + "target": "func:Orchestrator._convert_execution_plan_to_subtasks", + "type": "contains", + "label": "方法 _convert_execution_plan_to_subtasks" + }, + { + "id": "edge:80c3a84d", + "source": "class:Orchestrator", + "target": "func:Orchestrator._match_agent_for_skills", + "type": "contains", + "label": "方法 _match_agent_for_skills" + }, + { + "id": "edge:ed80278c", + "source": "class:Orchestrator", + "target": "func:Orchestrator.execute_adaptive", + "type": "contains", + "label": "方法 execute_adaptive" + }, + { + "id": "edge:0b9ddefa", + "source": "class:Orchestrator", + "target": "func:Orchestrator._evaluate_quality", + "type": "contains", + "label": "方法 _evaluate_quality" + }, + { + "id": "edge:58202d2d", + "source": "class:Orchestrator", + "target": "func:Orchestrator._rule_based_evaluate", + "type": "contains", + "label": "方法 _rule_based_evaluate" + }, + { + "id": "edge:5a5d59cf", + "source": "class:Orchestrator", + "target": "func:Orchestrator._llm_evaluate", + "type": "contains", + "label": "方法 _llm_evaluate" + }, + { + "id": "edge:d4328f3b", + "source": "class:Orchestrator", + "target": "func:Orchestrator._reexecute_failed", + "type": "contains", + "label": "方法 _reexecute_failed" + }, + { + "id": "edge:1b64ebd5", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "class:CheckStatus", + "type": "contains", + "label": "定义类 CheckStatus" + }, + { + "id": "edge:3d636fdc", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "class:CheckResult", + "type": "contains", + "label": "定义类 CheckResult" + }, + { + "id": "edge:1aa70ebd", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "class:ReviewReport", + "type": "contains", + "label": "定义类 ReviewReport" + }, + { + "id": "edge:b399f269", + "source": "class:ReviewReport", + "target": "func:ReviewReport.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:73465285", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "class:QualityGate", + "type": "contains", + "label": "定义类 QualityGate" + }, + { + "id": "edge:8ff644d2", + "source": "class:QualityGate", + "target": "func:QualityGate.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:3515d492", + "source": "class:QualityGate", + "target": "func:QualityGate.check", + "type": "contains", + "label": "方法 check" + }, + { + "id": "edge:693edf47", + "source": "class:QualityGate", + "target": "func:QualityGate._check_required_fields", + "type": "contains", + "label": "方法 _check_required_fields" + }, + { + "id": "edge:558631a9", + "source": "class:QualityGate", + "target": "func:QualityGate._check_min_word_count", + "type": "contains", + "label": "方法 _check_min_word_count" + }, + { + "id": "edge:dbbcc0d8", + "source": "class:QualityGate", + "target": "func:QualityGate._check_custom", + "type": "contains", + "label": "方法 _check_custom" + }, + { + "id": "edge:be3a1655", + "source": "class:QualityGate", + "target": "func:QualityGate._compute_quality_score", + "type": "contains", + "label": "方法 _compute_quality_score" + }, + { + "id": "edge:5d632eee", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "class:RuleBasedStepReflector", + "type": "contains", + "label": "定义类 RuleBasedStepReflector" + }, + { + "id": "edge:6a6e652c", + "source": "class:RuleBasedStepReflector", + "target": "func:RuleBasedStepReflector.reflect_step", + "type": "contains", + "label": "方法 reflect_step" + }, + { + "id": "edge:b0999581", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "class:PlanChecker", + "type": "contains", + "label": "定义类 PlanChecker" + }, + { + "id": "edge:1ee30630", + "source": "class:PlanChecker", + "target": "func:PlanChecker.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:08474744", + "source": "class:PlanChecker", + "target": "func:PlanChecker.check_step", + "type": "contains", + "label": "方法 check_step" + }, + { + "id": "edge:ed148b73", + "source": "class:PlanChecker", + "target": "func:PlanChecker.review_plan", + "type": "contains", + "label": "方法 review_plan" + }, + { + "id": "edge:b0a7cac6", + "source": "class:PlanChecker", + "target": "func:PlanChecker.should_retry", + "type": "contains", + "label": "方法 should_retry" + }, + { + "id": "edge:dff7603f", + "source": "class:PlanChecker", + "target": "func:PlanChecker.should_request_human", + "type": "contains", + "label": "方法 should_request_human" + }, + { + "id": "edge:18cc5820", + "source": "class:PlanChecker", + "target": "func:PlanChecker.make_step_complete_callback", + "type": "contains", + "label": "方法 make_step_complete_callback" + }, + { + "id": "edge:dd813516", + "source": "class:PlanChecker", + "target": "func:PlanChecker._collect_failure_reasons", + "type": "contains", + "label": "方法 _collect_failure_reasons" + }, + { + "id": "edge:613d2dad", + "source": "class:PlanChecker", + "target": "func:PlanChecker._determine_outcome", + "type": "contains", + "label": "方法 _determine_outcome" + }, + { + "id": "edge:52a87fc3", + "source": "class:PlanChecker", + "target": "func:PlanChecker._generate_optimization_tips", + "type": "contains", + "label": "方法 _generate_optimization_tips" + }, + { + "id": "edge:b3d5b463", + "source": "class:PlanChecker", + "target": "func:PlanChecker._write_experience", + "type": "contains", + "label": "方法 _write_experience" + }, + { + "id": "edge:7cb85d9b", + "source": "class:PlanChecker", + "target": "func:PlanChecker.reset", + "type": "contains", + "label": "方法 reset" + }, + { + "id": "edge:dfeb9227", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "class:_StreamState", + "type": "contains", + "label": "定义类 _StreamState" + }, + { + "id": "edge:114dd9cf", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "class:PlanExecEngine", + "type": "contains", + "label": "定义类 PlanExecEngine" + }, + { + "id": "edge:67b89a73", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:04c94640", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:7372dac6", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine.execute_stream", + "type": "contains", + "label": "方法 execute_stream" + }, + { + "id": "edge:76a99fea", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._execute_loop", + "type": "contains", + "label": "方法 _execute_loop" + }, + { + "id": "edge:ec57a791", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._execute_with_replanning", + "type": "contains", + "label": "方法 _execute_with_replanning" + }, + { + "id": "edge:315fdc3d", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._extract_goal", + "type": "contains", + "label": "方法 _extract_goal" + }, + { + "id": "edge:f2179b6d", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._extract_skill_names", + "type": "contains", + "label": "方法 _extract_skill_names" + }, + { + "id": "edge:62121405", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._build_task_message", + "type": "contains", + "label": "方法 _build_task_message" + }, + { + "id": "edge:2b9030d7", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._create_executor", + "type": "contains", + "label": "方法 _create_executor" + }, + { + "id": "edge:c9f480f8", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._plan_to_pipeline", + "type": "contains", + "label": "方法 _plan_to_pipeline" + }, + { + "id": "edge:add981d6", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._plan_result_to_pipeline_result", + "type": "contains", + "label": "方法 _plan_result_to_pipeline_result" + }, + { + "id": "edge:e0813847", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._pipeline_to_plan", + "type": "contains", + "label": "方法 _pipeline_to_plan" + }, + { + "id": "edge:0bde0553", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._merge_completed_results", + "type": "contains", + "label": "方法 _merge_completed_results" + }, + { + "id": "edge:430ea100", + "source": "class:PlanExecEngine", + "target": "func:PlanExecEngine._aggregate_output", + "type": "contains", + "label": "方法 _aggregate_output" + }, + { + "id": "edge:c81bed54", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "class:_LLMStepExecutor", + "type": "contains", + "label": "定义类 _LLMStepExecutor" + }, + { + "id": "edge:58b743e7", + "source": "class:_LLMStepExecutor", + "target": "func:_LLMStepExecutor.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:a55fc335", + "source": "class:_LLMStepExecutor", + "target": "func:_LLMStepExecutor.create_agent_from_skill", + "type": "contains", + "label": "方法 create_agent_from_skill" + }, + { + "id": "edge:90c6fd7c", + "source": "class:_LLMStepExecutor", + "target": "func:_LLMStepExecutor.get_agent", + "type": "contains", + "label": "方法 get_agent" + }, + { + "id": "edge:9c4aadf1", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "class:_LLMStepAgent", + "type": "contains", + "label": "定义类 _LLMStepAgent" + }, + { + "id": "edge:814b0aba", + "source": "class:_LLMStepAgent", + "target": "func:_LLMStepAgent.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ad6ce417", + "source": "class:_LLMStepAgent", + "target": "func:_LLMStepAgent.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:3e9e765c", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "class:FailureAction", + "type": "contains", + "label": "定义类 FailureAction" + }, + { + "id": "edge:56f8786c", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "class:StepExecutionResult", + "type": "contains", + "label": "定义类 StepExecutionResult" + }, + { + "id": "edge:4bc66386", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "class:PlanExecutionResult", + "type": "contains", + "label": "定义类 PlanExecutionResult" + }, + { + "id": "edge:51adddf4", + "source": "class:PlanExecutionResult", + "target": "func:PlanExecutionResult.completed_steps", + "type": "contains", + "label": "方法 completed_steps" + }, + { + "id": "edge:29b08dde", + "source": "class:PlanExecutionResult", + "target": "func:PlanExecutionResult.failed_steps", + "type": "contains", + "label": "方法 failed_steps" + }, + { + "id": "edge:3d0fc671", + "source": "class:PlanExecutionResult", + "target": "func:PlanExecutionResult.skipped_steps", + "type": "contains", + "label": "方法 skipped_steps" + }, + { + "id": "edge:bf0f2c56", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "class:PlanExecutor", + "type": "contains", + "label": "定义类 PlanExecutor" + }, + { + "id": "edge:a94639a3", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:2310eda4", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:f66209d5", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._execute_step_with_retry", + "type": "contains", + "label": "方法 _execute_step_with_retry" + }, + { + "id": "edge:e5106c8b", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._execute_step_once", + "type": "contains", + "label": "方法 _execute_step_once" + }, + { + "id": "edge:f30236b5", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._handle_step_failure", + "type": "contains", + "label": "方法 _handle_step_failure" + }, + { + "id": "edge:baafdb4a", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._default_failure_action", + "type": "contains", + "label": "方法 _default_failure_action" + }, + { + "id": "edge:2bbc4f7a", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._skip_dependent_steps", + "type": "contains", + "label": "方法 _skip_dependent_steps" + }, + { + "id": "edge:ae56c421", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._abort_remaining_steps", + "type": "contains", + "label": "方法 _abort_remaining_steps" + }, + { + "id": "edge:479f9d10", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._inject_dependency_results", + "type": "contains", + "label": "方法 _inject_dependency_results" + }, + { + "id": "edge:bc2da391", + "source": "class:PlanExecutor", + "target": "func:PlanExecutor._determine_overall_status", + "type": "contains", + "label": "方法 _determine_overall_status" + }, + { + "id": "edge:fda540b7", + "source": "file:src/agentkit/core/plan_schema.py", + "target": "class:PlanStepStatus", + "type": "contains", + "label": "定义类 PlanStepStatus" + }, + { + "id": "edge:f9472d3e", + "source": "file:src/agentkit/core/plan_schema.py", + "target": "class:SkillGapLevel", + "type": "contains", + "label": "定义类 SkillGapLevel" + }, + { + "id": "edge:8055a200", + "source": "file:src/agentkit/core/plan_schema.py", + "target": "class:SkillGap", + "type": "contains", + "label": "定义类 SkillGap" + }, + { + "id": "edge:92222fd4", + "source": "file:src/agentkit/core/plan_schema.py", + "target": "class:PlanStep", + "type": "contains", + "label": "定义类 PlanStep" + }, + { + "id": "edge:833d4aec", + "source": "class:PlanStep", + "target": "func:PlanStep.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:7c1a11b8", + "source": "file:src/agentkit/core/plan_schema.py", + "target": "class:ExecutionPlan", + "type": "contains", + "label": "定义类 ExecutionPlan" + }, + { + "id": "edge:88b4d892", + "source": "class:ExecutionPlan", + "target": "func:ExecutionPlan.has_skill_gaps", + "type": "contains", + "label": "方法 has_skill_gaps" + }, + { + "id": "edge:e07a104d", + "source": "class:ExecutionPlan", + "target": "func:ExecutionPlan.get_step", + "type": "contains", + "label": "方法 get_step" + }, + { + "id": "edge:485acadd", + "source": "class:ExecutionPlan", + "target": "func:ExecutionPlan.to_readable", + "type": "contains", + "label": "方法 to_readable" + }, + { + "id": "edge:44d0f6f9", + "source": "class:ExecutionPlan", + "target": "func:ExecutionPlan.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:1924ef08", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:TaskStatus", + "type": "contains", + "label": "定义类 TaskStatus" + }, + { + "id": "edge:cf97328c", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:AgentStatus", + "type": "contains", + "label": "定义类 AgentStatus" + }, + { + "id": "edge:6a9dd453", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:AgentCapability", + "type": "contains", + "label": "定义类 AgentCapability" + }, + { + "id": "edge:c8ca7b37", + "source": "class:AgentCapability", + "target": "func:AgentCapability.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:514349ad", + "source": "class:AgentCapability", + "target": "func:AgentCapability.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:87ba9086", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:TaskMessage", + "type": "contains", + "label": "定义类 TaskMessage" + }, + { + "id": "edge:6d23dfa3", + "source": "class:TaskMessage", + "target": "func:TaskMessage.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:d9203201", + "source": "class:TaskMessage", + "target": "func:TaskMessage.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:fe4e12c6", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:TaskResult", + "type": "contains", + "label": "定义类 TaskResult" + }, + { + "id": "edge:0c4c9b66", + "source": "class:TaskResult", + "target": "func:TaskResult.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:9dfe5d01", + "source": "class:TaskResult", + "target": "func:TaskResult.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:28e87f24", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:TaskProgress", + "type": "contains", + "label": "定义类 TaskProgress" + }, + { + "id": "edge:59a533d9", + "source": "class:TaskProgress", + "target": "func:TaskProgress.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:fe3d2adb", + "source": "class:TaskProgress", + "target": "func:TaskProgress.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:fc284db3", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:HandoffMessage", + "type": "contains", + "label": "定义类 HandoffMessage" + }, + { + "id": "edge:72a2e79b", + "source": "class:HandoffMessage", + "target": "func:HandoffMessage.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:2ca4c32f", + "source": "class:HandoffMessage", + "target": "func:HandoffMessage.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:30d092eb", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:EvolutionEvent", + "type": "contains", + "label": "定义类 EvolutionEvent" + }, + { + "id": "edge:3002f795", + "source": "class:EvolutionEvent", + "target": "func:EvolutionEvent.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:cf704190", + "source": "file:src/agentkit/core/protocol.py", + "target": "class:CancellationToken", + "type": "contains", + "label": "定义类 CancellationToken" + }, + { + "id": "edge:ade9a65f", + "source": "class:CancellationToken", + "target": "func:CancellationToken.cancel", + "type": "contains", + "label": "方法 cancel" + }, + { + "id": "edge:00ff07da", + "source": "class:CancellationToken", + "target": "func:CancellationToken.is_cancelled", + "type": "contains", + "label": "方法 is_cancelled" + }, + { + "id": "edge:40c768d1", + "source": "class:CancellationToken", + "target": "func:CancellationToken.check", + "type": "contains", + "label": "方法 check" + }, + { + "id": "edge:affdeb0c", + "source": "file:src/agentkit/core/react.py", + "target": "class:ReActStep", + "type": "contains", + "label": "定义类 ReActStep" + }, + { + "id": "edge:1c34ab7c", + "source": "file:src/agentkit/core/react.py", + "target": "class:ReActResult", + "type": "contains", + "label": "定义类 ReActResult" + }, + { + "id": "edge:a1057f19", + "source": "file:src/agentkit/core/react.py", + "target": "class:ReActEvent", + "type": "contains", + "label": "定义类 ReActEvent" + }, + { + "id": "edge:dae7fb35", + "source": "file:src/agentkit/core/react.py", + "target": "class:ReActEngine", + "type": "contains", + "label": "定义类 ReActEngine" + }, + { + "id": "edge:ff1659c7", + "source": "class:ReActEngine", + "target": "func:ReActEngine.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:af789e99", + "source": "class:ReActEngine", + "target": "func:ReActEngine.reset", + "type": "contains", + "label": "方法 reset" + }, + { + "id": "edge:c6ff51ae", + "source": "class:ReActEngine", + "target": "func:ReActEngine.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:d7847156", + "source": "class:ReActEngine", + "target": "func:ReActEngine._execute_loop", + "type": "contains", + "label": "方法 _execute_loop" + }, + { + "id": "edge:69e47152", + "source": "class:ReActEngine", + "target": "func:ReActEngine.execute_stream", + "type": "contains", + "label": "方法 execute_stream" + }, + { + "id": "edge:4ee81331", + "source": "class:ReActEngine", + "target": "func:ReActEngine._build_tool_schemas", + "type": "contains", + "label": "方法 _build_tool_schemas" + }, + { + "id": "edge:d76817b5", + "source": "class:ReActEngine", + "target": "func:ReActEngine._build_response_from_stream", + "type": "contains", + "label": "方法 _build_response_from_stream" + }, + { + "id": "edge:986c460c", + "source": "class:ReActEngine", + "target": "func:ReActEngine._find_tool", + "type": "contains", + "label": "方法 _find_tool" + }, + { + "id": "edge:756e5ae9", + "source": "class:ReActEngine", + "target": "func:ReActEngine._should_compress", + "type": "contains", + "label": "方法 _should_compress" + }, + { + "id": "edge:603d117f", + "source": "class:ReActEngine", + "target": "func:ReActEngine._build_tool_result_message", + "type": "contains", + "label": "方法 _build_tool_result_message" + }, + { + "id": "edge:44fd81a9", + "source": "class:ReActEngine", + "target": "func:ReActEngine._execute_tool", + "type": "contains", + "label": "方法 _execute_tool" + }, + { + "id": "edge:8956e68e", + "source": "class:ReActEngine", + "target": "func:ReActEngine._execute_tool_with_confirmation", + "type": "contains", + "label": "方法 _execute_tool_with_confirmation" + }, + { + "id": "edge:8c511556", + "source": "class:ReActEngine", + "target": "func:ReActEngine._should_execute_parallel", + "type": "contains", + "label": "方法 _should_execute_parallel" + }, + { + "id": "edge:b8b6033d", + "source": "class:ReActEngine", + "target": "func:ReActEngine._get_parallelizable_indices", + "type": "contains", + "label": "方法 _get_parallelizable_indices" + }, + { + "id": "edge:4f9f5fbc", + "source": "class:ReActEngine", + "target": "func:ReActEngine._parse_text_tool_calls", + "type": "contains", + "label": "方法 _parse_text_tool_calls" + }, + { + "id": "edge:190fc33b", + "source": "file:src/agentkit/core/reflexion.py", + "target": "class:ReflexionReflection", + "type": "contains", + "label": "定义类 ReflexionReflection" + }, + { + "id": "edge:2c89ba45", + "source": "file:src/agentkit/core/reflexion.py", + "target": "class:ReflexionResult", + "type": "contains", + "label": "定义类 ReflexionResult" + }, + { + "id": "edge:4cb9d98f", + "source": "file:src/agentkit/core/reflexion.py", + "target": "class:ReflexionEngine", + "type": "contains", + "label": "定义类 ReflexionEngine" + }, + { + "id": "edge:3ef196df", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:de057ddc", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:7bc7327e", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine._execute_loop", + "type": "contains", + "label": "方法 _execute_loop" + }, + { + "id": "edge:d17de063", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine.execute_stream", + "type": "contains", + "label": "方法 execute_stream" + }, + { + "id": "edge:136ba892", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine._evaluate", + "type": "contains", + "label": "方法 _evaluate" + }, + { + "id": "edge:def7baa8", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine._parse_evaluation_score", + "type": "contains", + "label": "方法 _parse_evaluation_score" + }, + { + "id": "edge:82c2fdb0", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine._reflect", + "type": "contains", + "label": "方法 _reflect" + }, + { + "id": "edge:c5a25c80", + "source": "class:ReflexionEngine", + "target": "func:ReflexionEngine._build_reflection_prompt", + "type": "contains", + "label": "方法 _build_reflection_prompt" + }, + { + "id": "edge:bda6ddb3", + "source": "file:src/agentkit/core/registry.py", + "target": "class:AgentRegistry", + "type": "contains", + "label": "定义类 AgentRegistry" + }, + { + "id": "edge:d6d6dbcc", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b40311f9", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.register", + "type": "contains", + "label": "方法 register" + }, + { + "id": "edge:a30964c5", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.unregister", + "type": "contains", + "label": "方法 unregister" + }, + { + "id": "edge:d0f5bab6", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.update_heartbeat", + "type": "contains", + "label": "方法 update_heartbeat" + }, + { + "id": "edge:5d55d946", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.get_agent", + "type": "contains", + "label": "方法 get_agent" + }, + { + "id": "edge:8751a219", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.list_agents", + "type": "contains", + "label": "方法 list_agents" + }, + { + "id": "edge:4904b92c", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.get_available_agent", + "type": "contains", + "label": "方法 get_available_agent" + }, + { + "id": "edge:e8fafb12", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry.check_health", + "type": "contains", + "label": "方法 check_health" + }, + { + "id": "edge:7128ec17", + "source": "class:AgentRegistry", + "target": "func:AgentRegistry._agent_to_dict", + "type": "contains", + "label": "方法 _agent_to_dict" + }, + { + "id": "edge:2d89d71f", + "source": "file:src/agentkit/core/rewoo.py", + "target": "class:_FallbackFailedError", + "type": "contains", + "label": "定义类 _FallbackFailedError" + }, + { + "id": "edge:c802874c", + "source": "class:_FallbackFailedError", + "target": "func:_FallbackFailedError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ac8fe82e", + "source": "file:src/agentkit/core/rewoo.py", + "target": "class:ReWOOPlanStep", + "type": "contains", + "label": "定义类 ReWOOPlanStep" + }, + { + "id": "edge:f1ec1c0d", + "source": "file:src/agentkit/core/rewoo.py", + "target": "class:ReWOOPlan", + "type": "contains", + "label": "定义类 ReWOOPlan" + }, + { + "id": "edge:ae775de9", + "source": "file:src/agentkit/core/rewoo.py", + "target": "class:ReWOOStep", + "type": "contains", + "label": "定义类 ReWOOStep" + }, + { + "id": "edge:74a68aa8", + "source": "class:ReWOOStep", + "target": "class:ReActStep", + "type": "extends", + "label": "继承 ReActStep" + }, + { + "id": "edge:32b8655c", + "source": "file:src/agentkit/core/rewoo.py", + "target": "class:ReWOOEngine", + "type": "contains", + "label": "定义类 ReWOOEngine" + }, + { + "id": "edge:d5857eae", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:11838a82", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:aa9c81e1", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._execute_rewoo", + "type": "contains", + "label": "方法 _execute_rewoo" + }, + { + "id": "edge:626ea391", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine.execute_stream", + "type": "contains", + "label": "方法 execute_stream" + }, + { + "id": "edge:5a85eda6", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._try_fallback_strategies_stream", + "type": "contains", + "label": "方法 _try_fallback_strategies_stream" + }, + { + "id": "edge:2517b120", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_simplified_rewoo_stream", + "type": "contains", + "label": "方法 _fallback_simplified_rewoo_stream" + }, + { + "id": "edge:810f0eaa", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_react_stream", + "type": "contains", + "label": "方法 _fallback_react_stream" + }, + { + "id": "edge:07b5b1f7", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_direct_stream", + "type": "contains", + "label": "方法 _fallback_direct_stream" + }, + { + "id": "edge:f786d727", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_plan_exec_stream", + "type": "contains", + "label": "方法 _fallback_plan_exec_stream" + }, + { + "id": "edge:f2c98f86", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._try_fallback_strategies", + "type": "contains", + "label": "方法 _try_fallback_strategies" + }, + { + "id": "edge:0bc0cc6e", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_simplified_rewoo", + "type": "contains", + "label": "方法 _fallback_simplified_rewoo" + }, + { + "id": "edge:ef0b7f03", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_react", + "type": "contains", + "label": "方法 _fallback_react" + }, + { + "id": "edge:9a305591", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_direct", + "type": "contains", + "label": "方法 _fallback_direct" + }, + { + "id": "edge:e66b69b6", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._fallback_plan_exec", + "type": "contains", + "label": "方法 _fallback_plan_exec" + }, + { + "id": "edge:049eb2fe", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._plan_phase", + "type": "contains", + "label": "方法 _plan_phase" + }, + { + "id": "edge:ad4ca605", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._synthesis_phase", + "type": "contains", + "label": "方法 _synthesis_phase" + }, + { + "id": "edge:7eacd668", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._build_tool_schemas", + "type": "contains", + "label": "方法 _build_tool_schemas" + }, + { + "id": "edge:35369afe", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._build_tool_descriptions", + "type": "contains", + "label": "方法 _build_tool_descriptions" + }, + { + "id": "edge:ecb0e2e0", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._parse_plan", + "type": "contains", + "label": "方法 _parse_plan" + }, + { + "id": "edge:4def798f", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._find_tool", + "type": "contains", + "label": "方法 _find_tool" + }, + { + "id": "edge:4ec775aa", + "source": "class:ReWOOEngine", + "target": "func:ReWOOEngine._execute_tool", + "type": "contains", + "label": "方法 _execute_tool" + }, + { + "id": "edge:aa8c482f", + "source": "file:src/agentkit/core/shared_workspace.py", + "target": "class:SharedWorkspace", + "type": "contains", + "label": "定义类 SharedWorkspace" + }, + { + "id": "edge:77e63706", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b7946174", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace._make_key", + "type": "contains", + "label": "方法 _make_key" + }, + { + "id": "edge:e4265800", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace.write", + "type": "contains", + "label": "方法 write" + }, + { + "id": "edge:6d0b8ebe", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace.read", + "type": "contains", + "label": "方法 read" + }, + { + "id": "edge:9c82377a", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace.delete", + "type": "contains", + "label": "方法 delete" + }, + { + "id": "edge:b6be95f6", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace.lock", + "type": "contains", + "label": "方法 lock" + }, + { + "id": "edge:e8079634", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace.unlock", + "type": "contains", + "label": "方法 unlock" + }, + { + "id": "edge:b5d4c1ae", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace._get_version", + "type": "contains", + "label": "方法 _get_version" + }, + { + "id": "edge:0495070f", + "source": "class:SharedWorkspace", + "target": "func:SharedWorkspace.list_keys", + "type": "contains", + "label": "方法 list_keys" + }, + { + "id": "edge:3df4439a", + "source": "file:src/agentkit/core/standalone.py", + "target": "class:StandaloneRunner", + "type": "contains", + "label": "定义类 StandaloneRunner" + }, + { + "id": "edge:09367ba5", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:a3a6587f", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.agents", + "type": "contains", + "label": "方法 agents" + }, + { + "id": "edge:e6af7bd8", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.add_tool", + "type": "contains", + "label": "方法 add_tool" + }, + { + "id": "edge:878e9d2a", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.add_custom_handler", + "type": "contains", + "label": "方法 add_custom_handler" + }, + { + "id": "edge:1164d70a", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.discover_configs", + "type": "contains", + "label": "方法 discover_configs" + }, + { + "id": "edge:472a6714", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.build_agents", + "type": "contains", + "label": "方法 build_agents" + }, + { + "id": "edge:536f7ae4", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.start_all", + "type": "contains", + "label": "方法 start_all" + }, + { + "id": "edge:dc73af74", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.stop_all", + "type": "contains", + "label": "方法 stop_all" + }, + { + "id": "edge:2cedb7f8", + "source": "class:StandaloneRunner", + "target": "func:StandaloneRunner.execute_task", + "type": "contains", + "label": "方法 execute_task" + }, + { + "id": "edge:0d7cf28c", + "source": "file:src/agentkit/core/trace.py", + "target": "class:TraceStep", + "type": "contains", + "label": "定义类 TraceStep" + }, + { + "id": "edge:83acde91", + "source": "class:TraceStep", + "target": "func:TraceStep.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:ae973298", + "source": "file:src/agentkit/core/trace.py", + "target": "class:ExecutionTrace", + "type": "contains", + "label": "定义类 ExecutionTrace" + }, + { + "id": "edge:dc40b8a6", + "source": "class:ExecutionTrace", + "target": "func:ExecutionTrace.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:19543323", + "source": "file:src/agentkit/core/trace.py", + "target": "class:TraceRecorder", + "type": "contains", + "label": "定义类 TraceRecorder" + }, + { + "id": "edge:8d58e4ef", + "source": "class:TraceRecorder", + "target": "func:TraceRecorder.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8f62abfd", + "source": "class:TraceRecorder", + "target": "func:TraceRecorder.start_trace", + "type": "contains", + "label": "方法 start_trace" + }, + { + "id": "edge:092dbf95", + "source": "class:TraceRecorder", + "target": "func:TraceRecorder.record_step", + "type": "contains", + "label": "方法 record_step" + }, + { + "id": "edge:e82a5531", + "source": "class:TraceRecorder", + "target": "func:TraceRecorder.end_trace", + "type": "contains", + "label": "方法 end_trace" + }, + { + "id": "edge:ba53490c", + "source": "class:TraceRecorder", + "target": "func:TraceRecorder.get_trace", + "type": "contains", + "label": "方法 get_trace" + }, + { + "id": "edge:7bfcfede", + "source": "class:TraceRecorder", + "target": "func:TraceRecorder.start_step_timer", + "type": "contains", + "label": "方法 start_step_timer" + }, + { + "id": "edge:b6c78941", + "source": "class:TraceRecorder", + "target": "func:TraceRecorder.elapsed_ms", + "type": "contains", + "label": "方法 elapsed_ms" + }, + { + "id": "edge:9e620185", + "source": "file:src/agentkit/evaluation/ragas_evaluator.py", + "target": "class:EvalSample", + "type": "contains", + "label": "定义类 EvalSample" + }, + { + "id": "edge:3a010938", + "source": "file:src/agentkit/evaluation/ragas_evaluator.py", + "target": "class:EvalMetrics", + "type": "contains", + "label": "定义类 EvalMetrics" + }, + { + "id": "edge:add1c5b7", + "source": "class:EvalMetrics", + "target": "func:EvalMetrics.average", + "type": "contains", + "label": "方法 average" + }, + { + "id": "edge:99193744", + "source": "class:EvalMetrics", + "target": "func:EvalMetrics.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:1f1d8673", + "source": "file:src/agentkit/evaluation/ragas_evaluator.py", + "target": "class:EvalResult", + "type": "contains", + "label": "定义类 EvalResult" + }, + { + "id": "edge:c8125b57", + "source": "file:src/agentkit/evaluation/ragas_evaluator.py", + "target": "class:EvalDatasetBuilder", + "type": "contains", + "label": "定义类 EvalDatasetBuilder" + }, + { + "id": "edge:bfa543da", + "source": "class:EvalDatasetBuilder", + "target": "func:EvalDatasetBuilder.from_traces", + "type": "contains", + "label": "方法 from_traces" + }, + { + "id": "edge:f1ec8747", + "source": "class:EvalDatasetBuilder", + "target": "func:EvalDatasetBuilder.from_dict_list", + "type": "contains", + "label": "方法 from_dict_list" + }, + { + "id": "edge:756f9f22", + "source": "file:src/agentkit/evaluation/ragas_evaluator.py", + "target": "class:RagasEvaluator", + "type": "contains", + "label": "定义类 RagasEvaluator" + }, + { + "id": "edge:26738dc5", + "source": "class:RagasEvaluator", + "target": "func:RagasEvaluator.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:52ca0cdf", + "source": "class:RagasEvaluator", + "target": "func:RagasEvaluator.evaluate", + "type": "contains", + "label": "方法 evaluate" + }, + { + "id": "edge:b787e7fb", + "source": "class:RagasEvaluator", + "target": "func:RagasEvaluator._evaluate_with_ragas", + "type": "contains", + "label": "方法 _evaluate_with_ragas" + }, + { + "id": "edge:85f60e6c", + "source": "class:RagasEvaluator", + "target": "func:RagasEvaluator._evaluate_builtin", + "type": "contains", + "label": "方法 _evaluate_builtin" + }, + { + "id": "edge:fe9e15ed", + "source": "file:src/agentkit/evolution/ab_tester.py", + "target": "class:ABTestConfig", + "type": "contains", + "label": "定义类 ABTestConfig" + }, + { + "id": "edge:b5c87b12", + "source": "file:src/agentkit/evolution/ab_tester.py", + "target": "class:ABTestResult", + "type": "contains", + "label": "定义类 ABTestResult" + }, + { + "id": "edge:06b948dc", + "source": "file:src/agentkit/evolution/ab_tester.py", + "target": "class:ABTester", + "type": "contains", + "label": "定义类 ABTester" + }, + { + "id": "edge:456fd518", + "source": "class:ABTester", + "target": "func:ABTester.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8fbfcfd6", + "source": "class:ABTester", + "target": "func:ABTester.create_test", + "type": "contains", + "label": "方法 create_test" + }, + { + "id": "edge:421f74c7", + "source": "class:ABTester", + "target": "func:ABTester.assign_group", + "type": "contains", + "label": "方法 assign_group" + }, + { + "id": "edge:16ca7dfd", + "source": "class:ABTester", + "target": "func:ABTester.record_result", + "type": "contains", + "label": "方法 record_result" + }, + { + "id": "edge:82b2e10f", + "source": "class:ABTester", + "target": "func:ABTester.persist_results", + "type": "contains", + "label": "方法 persist_results" + }, + { + "id": "edge:396952e4", + "source": "class:ABTester", + "target": "func:ABTester.evaluate", + "type": "contains", + "label": "方法 evaluate" + }, + { + "id": "edge:6499e668", + "source": "class:ABTester", + "target": "func:ABTester._normal_cdf", + "type": "contains", + "label": "方法 _normal_cdf" + }, + { + "id": "edge:58c4e0c3", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "class:EvolutionStore", + "type": "contains", + "label": "定义类 EvolutionStore" + }, + { + "id": "edge:a72790b2", + "source": "class:EvolutionStore", + "target": "func:EvolutionStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:4bd16c76", + "source": "class:EvolutionStore", + "target": "func:EvolutionStore.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:a805db01", + "source": "class:EvolutionStore", + "target": "func:EvolutionStore.rollback", + "type": "contains", + "label": "方法 rollback" + }, + { + "id": "edge:66c66878", + "source": "class:EvolutionStore", + "target": "func:EvolutionStore.list_events", + "type": "contains", + "label": "方法 list_events" + }, + { + "id": "edge:d171078f", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "class:PersistentEvolutionStore", + "type": "contains", + "label": "定义类 PersistentEvolutionStore" + }, + { + "id": "edge:23a27823", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:108feab6", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._run_sync", + "type": "contains", + "label": "方法 _run_sync" + }, + { + "id": "edge:5c7c6f58", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:eb69cc97", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:1dda7b5d", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:fac8864d", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._retry_locked", + "type": "contains", + "label": "方法 _retry_locked" + }, + { + "id": "edge:77855ffc", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._record_sync", + "type": "contains", + "label": "方法 _record_sync" + }, + { + "id": "edge:197e202c", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:487cd19f", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._rollback_sync", + "type": "contains", + "label": "方法 _rollback_sync" + }, + { + "id": "edge:7fba9b04", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.rollback", + "type": "contains", + "label": "方法 rollback" + }, + { + "id": "edge:e369ba1e", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._list_events_sync", + "type": "contains", + "label": "方法 _list_events_sync" + }, + { + "id": "edge:0edc20f3", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.list_events", + "type": "contains", + "label": "方法 list_events" + }, + { + "id": "edge:2ce1bb1e", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._record_skill_version_sync", + "type": "contains", + "label": "方法 _record_skill_version_sync" + }, + { + "id": "edge:f6301584", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.record_skill_version", + "type": "contains", + "label": "方法 record_skill_version" + }, + { + "id": "edge:9e64a116", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._list_skill_versions_sync", + "type": "contains", + "label": "方法 _list_skill_versions_sync" + }, + { + "id": "edge:6efd20cc", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.list_skill_versions", + "type": "contains", + "label": "方法 list_skill_versions" + }, + { + "id": "edge:59ca0e9c", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._record_ab_test_result_sync", + "type": "contains", + "label": "方法 _record_ab_test_result_sync" + }, + { + "id": "edge:ae2172d3", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.record_ab_test_result", + "type": "contains", + "label": "方法 record_ab_test_result" + }, + { + "id": "edge:3a8a933d", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore._get_ab_test_results_sync", + "type": "contains", + "label": "方法 _get_ab_test_results_sync" + }, + { + "id": "edge:ae879625", + "source": "class:PersistentEvolutionStore", + "target": "func:PersistentEvolutionStore.get_ab_test_results", + "type": "contains", + "label": "方法 get_ab_test_results" + }, + { + "id": "edge:536f1a53", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "class:InMemoryEvolutionStore", + "type": "contains", + "label": "定义类 InMemoryEvolutionStore" + }, + { + "id": "edge:d13744e1", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:5a2045a2", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:c5c2ff78", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.rollback", + "type": "contains", + "label": "方法 rollback" + }, + { + "id": "edge:a8a6a246", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.list_events", + "type": "contains", + "label": "方法 list_events" + }, + { + "id": "edge:6a2639d6", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.record_skill_version", + "type": "contains", + "label": "方法 record_skill_version" + }, + { + "id": "edge:6ae84675", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.list_skill_versions", + "type": "contains", + "label": "方法 list_skill_versions" + }, + { + "id": "edge:f60285a9", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.record_ab_test_result", + "type": "contains", + "label": "方法 record_ab_test_result" + }, + { + "id": "edge:83773c6c", + "source": "class:InMemoryEvolutionStore", + "target": "func:InMemoryEvolutionStore.get_ab_test_results", + "type": "contains", + "label": "方法 get_ab_test_results" + }, + { + "id": "edge:4fb23497", + "source": "file:src/agentkit/evolution/experience_schema.py", + "target": "class:TaskExperience", + "type": "contains", + "label": "定义类 TaskExperience" + }, + { + "id": "edge:f7aeb471", + "source": "class:TaskExperience", + "target": "func:TaskExperience.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:41f8ec79", + "source": "class:TaskExperience", + "target": "func:TaskExperience.text_for_embedding", + "type": "contains", + "label": "方法 text_for_embedding" + }, + { + "id": "edge:f96d9a28", + "source": "file:src/agentkit/evolution/experience_schema.py", + "target": "class:EvolutionMetrics", + "type": "contains", + "label": "定义类 EvolutionMetrics" + }, + { + "id": "edge:cc6098bc", + "source": "class:EvolutionMetrics", + "target": "func:EvolutionMetrics.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:9ad73e50", + "source": "file:src/agentkit/evolution/experience_store.py", + "target": "class:ExperienceStore", + "type": "contains", + "label": "定义类 ExperienceStore" + }, + { + "id": "edge:029db329", + "source": "class:ExperienceStore", + "target": "func:ExperienceStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:fc612c92", + "source": "class:ExperienceStore", + "target": "func:ExperienceStore.record_experience", + "type": "contains", + "label": "方法 record_experience" + }, + { + "id": "edge:d1763d55", + "source": "class:ExperienceStore", + "target": "func:ExperienceStore.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:ccce4dfe", + "source": "class:ExperienceStore", + "target": "func:ExperienceStore._search_pgvector", + "type": "contains", + "label": "方法 _search_pgvector" + }, + { + "id": "edge:f7efbb0f", + "source": "class:ExperienceStore", + "target": "func:ExperienceStore._search_client_side", + "type": "contains", + "label": "方法 _search_client_side" + }, + { + "id": "edge:a4277bdb", + "source": "class:ExperienceStore", + "target": "func:ExperienceStore.get_metrics", + "type": "contains", + "label": "方法 get_metrics" + }, + { + "id": "edge:56d0e5ec", + "source": "file:src/agentkit/evolution/experience_store.py", + "target": "class:InMemoryExperienceStore", + "type": "contains", + "label": "定义类 InMemoryExperienceStore" + }, + { + "id": "edge:b90177f1", + "source": "class:InMemoryExperienceStore", + "target": "func:InMemoryExperienceStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:612cd694", + "source": "class:InMemoryExperienceStore", + "target": "func:InMemoryExperienceStore.record_experience", + "type": "contains", + "label": "方法 record_experience" + }, + { + "id": "edge:a3284704", + "source": "class:InMemoryExperienceStore", + "target": "func:InMemoryExperienceStore.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:195595ec", + "source": "class:InMemoryExperienceStore", + "target": "func:InMemoryExperienceStore.get_metrics", + "type": "contains", + "label": "方法 get_metrics" + }, + { + "id": "edge:ff954f88", + "source": "file:src/agentkit/evolution/fitness.py", + "target": "class:FitnessWeights", + "type": "contains", + "label": "定义类 FitnessWeights" + }, + { + "id": "edge:45276a67", + "source": "class:FitnessWeights", + "target": "func:FitnessWeights.__post_init__", + "type": "contains", + "label": "方法 __post_init__" + }, + { + "id": "edge:859f932e", + "source": "file:src/agentkit/evolution/fitness.py", + "target": "class:MultiObjectiveFitness", + "type": "contains", + "label": "定义类 MultiObjectiveFitness" + }, + { + "id": "edge:dcb38e3b", + "source": "class:MultiObjectiveFitness", + "target": "func:MultiObjectiveFitness.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:55fa4eee", + "source": "class:MultiObjectiveFitness", + "target": "func:MultiObjectiveFitness.evaluate", + "type": "contains", + "label": "方法 evaluate" + }, + { + "id": "edge:058d6a19", + "source": "class:MultiObjectiveFitness", + "target": "func:MultiObjectiveFitness.weighted_score", + "type": "contains", + "label": "方法 weighted_score" + }, + { + "id": "edge:02430fd4", + "source": "class:MultiObjectiveFitness", + "target": "func:MultiObjectiveFitness.pareto_rank", + "type": "contains", + "label": "方法 pareto_rank" + }, + { + "id": "edge:e7d7aa84", + "source": "class:MultiObjectiveFitness", + "target": "func:MultiObjectiveFitness.crowding_distance", + "type": "contains", + "label": "方法 crowding_distance" + }, + { + "id": "edge:c031b07c", + "source": "file:src/agentkit/evolution/fitness.py", + "target": "class:ExtendedStrategyConfig", + "type": "contains", + "label": "定义类 ExtendedStrategyConfig" + }, + { + "id": "edge:77a34a1c", + "source": "file:src/agentkit/evolution/fitness.py", + "target": "class:ExtendedStrategyTuner", + "type": "contains", + "label": "定义类 ExtendedStrategyTuner" + }, + { + "id": "edge:19024615", + "source": "class:ExtendedStrategyTuner", + "target": "func:ExtendedStrategyTuner.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:58351ea4", + "source": "class:ExtendedStrategyTuner", + "target": "func:ExtendedStrategyTuner.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:b51cfaf1", + "source": "class:ExtendedStrategyTuner", + "target": "func:ExtendedStrategyTuner.suggest", + "type": "contains", + "label": "方法 suggest" + }, + { + "id": "edge:6eb37613", + "source": "class:ExtendedStrategyTuner", + "target": "func:ExtendedStrategyTuner._optimize_param", + "type": "contains", + "label": "方法 _optimize_param" + }, + { + "id": "edge:604bb655", + "source": "class:ExtendedStrategyTuner", + "target": "func:ExtendedStrategyTuner._suggest_retrieval_mode", + "type": "contains", + "label": "方法 _suggest_retrieval_mode" + }, + { + "id": "edge:5a982847", + "source": "class:ExtendedStrategyTuner", + "target": "func:ExtendedStrategyTuner.history_size", + "type": "contains", + "label": "方法 history_size" + }, + { + "id": "edge:fef0c906", + "source": "file:src/agentkit/evolution/genetic.py", + "target": "class:FitnessScore", + "type": "contains", + "label": "定义类 FitnessScore" + }, + { + "id": "edge:1cfcb057", + "source": "class:FitnessScore", + "target": "func:FitnessScore.normalized", + "type": "contains", + "label": "方法 normalized" + }, + { + "id": "edge:0fc578e6", + "source": "class:FitnessScore", + "target": "func:FitnessScore.dominates", + "type": "contains", + "label": "方法 dominates" + }, + { + "id": "edge:f8ab8a30", + "source": "file:src/agentkit/evolution/genetic.py", + "target": "class:PromptChromosome", + "type": "contains", + "label": "定义类 PromptChromosome" + }, + { + "id": "edge:475524a9", + "source": "class:PromptChromosome", + "target": "func:PromptChromosome.to_module", + "type": "contains", + "label": "方法 to_module" + }, + { + "id": "edge:b658e9de", + "source": "class:PromptChromosome", + "target": "func:PromptChromosome.from_module", + "type": "contains", + "label": "方法 from_module" + }, + { + "id": "edge:77553ff7", + "source": "file:src/agentkit/evolution/genetic.py", + "target": "class:CrossoverOperator", + "type": "contains", + "label": "定义类 CrossoverOperator" + }, + { + "id": "edge:50549c04", + "source": "class:CrossoverOperator", + "target": "func:CrossoverOperator.crossover", + "type": "contains", + "label": "方法 crossover" + }, + { + "id": "edge:c6d75b6e", + "source": "class:CrossoverOperator", + "target": "func:CrossoverOperator._crossover_text", + "type": "contains", + "label": "方法 _crossover_text" + }, + { + "id": "edge:b52cf2ec", + "source": "class:CrossoverOperator", + "target": "func:CrossoverOperator._crossover_demos", + "type": "contains", + "label": "方法 _crossover_demos" + }, + { + "id": "edge:32066864", + "source": "class:CrossoverOperator", + "target": "func:CrossoverOperator._crossover_constraints", + "type": "contains", + "label": "方法 _crossover_constraints" + }, + { + "id": "edge:dc024eb7", + "source": "file:src/agentkit/evolution/genetic.py", + "target": "class:MutationOperator", + "type": "contains", + "label": "定义类 MutationOperator" + }, + { + "id": "edge:419b0b00", + "source": "class:MutationOperator", + "target": "func:MutationOperator.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:68502172", + "source": "class:MutationOperator", + "target": "func:MutationOperator.mutate", + "type": "contains", + "label": "方法 mutate" + }, + { + "id": "edge:ac9cd394", + "source": "class:MutationOperator", + "target": "func:MutationOperator._mutate_instructions", + "type": "contains", + "label": "方法 _mutate_instructions" + }, + { + "id": "edge:d6a37dc7", + "source": "class:MutationOperator", + "target": "func:MutationOperator._mutate_demos", + "type": "contains", + "label": "方法 _mutate_demos" + }, + { + "id": "edge:46f9a66d", + "source": "class:MutationOperator", + "target": "func:MutationOperator._mutate_constraints", + "type": "contains", + "label": "方法 _mutate_constraints" + }, + { + "id": "edge:c85b20b9", + "source": "file:src/agentkit/evolution/genetic.py", + "target": "class:GEPAPopulation", + "type": "contains", + "label": "定义类 GEPAPopulation" + }, + { + "id": "edge:7fbbd98a", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:39dc60d7", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.generation", + "type": "contains", + "label": "方法 generation" + }, + { + "id": "edge:21ed00d8", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.individuals", + "type": "contains", + "label": "方法 individuals" + }, + { + "id": "edge:4558f06e", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.size", + "type": "contains", + "label": "方法 size" + }, + { + "id": "edge:c29d7fa3", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.initialize", + "type": "contains", + "label": "方法 initialize" + }, + { + "id": "edge:e4777712", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.add", + "type": "contains", + "label": "方法 add" + }, + { + "id": "edge:0b918b96", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.get_elite", + "type": "contains", + "label": "方法 get_elite" + }, + { + "id": "edge:906534e6", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.get_pareto_front", + "type": "contains", + "label": "方法 get_pareto_front" + }, + { + "id": "edge:2ff21c26", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.tournament_select", + "type": "contains", + "label": "方法 tournament_select" + }, + { + "id": "edge:bdea55dc", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.evolve", + "type": "contains", + "label": "方法 evolve" + }, + { + "id": "edge:47c09839", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.get_best", + "type": "contains", + "label": "方法 get_best" + }, + { + "id": "edge:0c97c808", + "source": "class:GEPAPopulation", + "target": "func:GEPAPopulation.get_statistics", + "type": "contains", + "label": "方法 get_statistics" + }, + { + "id": "edge:2057e686", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "class:SoulEvolutionConfig", + "type": "contains", + "label": "定义类 SoulEvolutionConfig" + }, + { + "id": "edge:f8d2b24b", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "class:EvolutionLogEntry", + "type": "contains", + "label": "定义类 EvolutionLogEntry" + }, + { + "id": "edge:3d616b7b", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "class:EvolutionMixin", + "type": "contains", + "label": "定义类 EvolutionMixin" + }, + { + "id": "edge:5126ab2b", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b3aa7ed5", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin._create_reflector", + "type": "contains", + "label": "方法 _create_reflector" + }, + { + "id": "edge:80d768ee", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin.evolve_after_task", + "type": "contains", + "label": "方法 evolve_after_task" + }, + { + "id": "edge:35ce9897", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin._optimize_with_context", + "type": "contains", + "label": "方法 _optimize_with_context" + }, + { + "id": "edge:2d4d6f84", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin._run_ab_test", + "type": "contains", + "label": "方法 _run_ab_test" + }, + { + "id": "edge:d11b7315", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin._run_strategy_tuning", + "type": "contains", + "label": "方法 _run_strategy_tuning" + }, + { + "id": "edge:963f4a5b", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin.get_evolution_history", + "type": "contains", + "label": "方法 get_evolution_history" + }, + { + "id": "edge:3d5d6cab", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin.set_current_module", + "type": "contains", + "label": "方法 set_current_module" + }, + { + "id": "edge:4901f194", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin._apply_change", + "type": "contains", + "label": "方法 _apply_change" + }, + { + "id": "edge:def891ed", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin._rollback_change", + "type": "contains", + "label": "方法 _rollback_change" + }, + { + "id": "edge:b6b7f14a", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin.record_reflection", + "type": "contains", + "label": "方法 record_reflection" + }, + { + "id": "edge:afd8fc18", + "source": "class:EvolutionMixin", + "target": "func:EvolutionMixin.evolve_soul", + "type": "contains", + "label": "方法 evolve_soul" + }, + { + "id": "edge:5de09963", + "source": "file:src/agentkit/evolution/llm_reflector.py", + "target": "class:LLMReflector", + "type": "contains", + "label": "定义类 LLMReflector" + }, + { + "id": "edge:df2b841e", + "source": "class:LLMReflector", + "target": "func:LLMReflector.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6b3f9aa4", + "source": "class:LLMReflector", + "target": "func:LLMReflector._sanitize_for_prompt", + "type": "contains", + "label": "方法 _sanitize_for_prompt" + }, + { + "id": "edge:2776fe5d", + "source": "class:LLMReflector", + "target": "func:LLMReflector.reflect", + "type": "contains", + "label": "方法 reflect" + }, + { + "id": "edge:39526896", + "source": "class:LLMReflector", + "target": "func:LLMReflector._build_reflection_prompt", + "type": "contains", + "label": "方法 _build_reflection_prompt" + }, + { + "id": "edge:1c05a943", + "source": "class:LLMReflector", + "target": "func:LLMReflector._parse_reflection_response", + "type": "contains", + "label": "方法 _parse_reflection_response" + }, + { + "id": "edge:2740caad", + "source": "class:LLMReflector", + "target": "func:LLMReflector._build_reflection_from_data", + "type": "contains", + "label": "方法 _build_reflection_from_data" + }, + { + "id": "edge:bde420ce", + "source": "file:src/agentkit/evolution/models.py", + "target": "class:EvolutionEventModel", + "type": "contains", + "label": "定义类 EvolutionEventModel" + }, + { + "id": "edge:931c21ea", + "source": "file:src/agentkit/evolution/models.py", + "target": "class:SkillVersionModel", + "type": "contains", + "label": "定义类 SkillVersionModel" + }, + { + "id": "edge:1d03fb22", + "source": "file:src/agentkit/evolution/models.py", + "target": "class:ABTestResultModel", + "type": "contains", + "label": "定义类 ABTestResultModel" + }, + { + "id": "edge:c5ed7c0b", + "source": "file:src/agentkit/evolution/path_optimizer.py", + "target": "class:ExecutionPath", + "type": "contains", + "label": "定义类 ExecutionPath" + }, + { + "id": "edge:3e9a355c", + "source": "file:src/agentkit/evolution/path_optimizer.py", + "target": "class:PathUpdateResult", + "type": "contains", + "label": "定义类 PathUpdateResult" + }, + { + "id": "edge:81ed1f83", + "source": "file:src/agentkit/evolution/path_optimizer.py", + "target": "class:PathOptimizer", + "type": "contains", + "label": "定义类 PathOptimizer" + }, + { + "id": "edge:5c3247fd", + "source": "class:PathOptimizer", + "target": "func:PathOptimizer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:1a10307b", + "source": "class:PathOptimizer", + "target": "func:PathOptimizer.get_recommended_path", + "type": "contains", + "label": "方法 get_recommended_path" + }, + { + "id": "edge:07c1d9de", + "source": "class:PathOptimizer", + "target": "func:PathOptimizer.evaluate_and_update", + "type": "contains", + "label": "方法 evaluate_and_update" + }, + { + "id": "edge:77704197", + "source": "class:PathOptimizer", + "target": "func:PathOptimizer._compare_and_decide", + "type": "contains", + "label": "方法 _compare_and_decide" + }, + { + "id": "edge:d557fb2b", + "source": "class:PathOptimizer", + "target": "func:PathOptimizer._apply_update", + "type": "contains", + "label": "方法 _apply_update" + }, + { + "id": "edge:e42962db", + "source": "class:PathOptimizer", + "target": "func:PathOptimizer.get_pending_paths", + "type": "contains", + "label": "方法 get_pending_paths" + }, + { + "id": "edge:8a7077ef", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "class:WarningLevel", + "type": "contains", + "label": "定义类 WarningLevel" + }, + { + "id": "edge:96846062", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "class:PitfallWarning", + "type": "contains", + "label": "定义类 PitfallWarning" + }, + { + "id": "edge:aab900f0", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "class:ExperienceStoreProtocol", + "type": "contains", + "label": "定义类 ExperienceStoreProtocol" + }, + { + "id": "edge:4e6e1c8b", + "source": "class:ExperienceStoreProtocol", + "target": "func:ExperienceStoreProtocol.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:47abcdcf", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "class:PitfallDetector", + "type": "contains", + "label": "定义类 PitfallDetector" + }, + { + "id": "edge:42cb178b", + "source": "class:PitfallDetector", + "target": "func:PitfallDetector.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8d6406ca", + "source": "class:PitfallDetector", + "target": "func:PitfallDetector.check_pitfalls", + "type": "contains", + "label": "方法 check_pitfalls" + }, + { + "id": "edge:93860d29", + "source": "class:PitfallDetector", + "target": "func:PitfallDetector._search_experiences", + "type": "contains", + "label": "方法 _search_experiences" + }, + { + "id": "edge:48596b42", + "source": "class:PitfallDetector", + "target": "func:PitfallDetector._extract_step_failure_stats", + "type": "contains", + "label": "方法 _extract_step_failure_stats" + }, + { + "id": "edge:bc226c33", + "source": "class:PitfallDetector", + "target": "func:PitfallDetector._match_and_warn", + "type": "contains", + "label": "方法 _match_and_warn" + }, + { + "id": "edge:19949a07", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "class:_StepFailureStats", + "type": "contains", + "label": "定义类 _StepFailureStats" + }, + { + "id": "edge:8bb4fdc1", + "source": "file:src/agentkit/evolution/prompt_optimizer.py", + "target": "class:Signature", + "type": "contains", + "label": "定义类 Signature" + }, + { + "id": "edge:df8641ac", + "source": "class:Signature", + "target": "func:Signature.to_prompt_prefix", + "type": "contains", + "label": "方法 to_prompt_prefix" + }, + { + "id": "edge:862b971c", + "source": "file:src/agentkit/evolution/prompt_optimizer.py", + "target": "class:Module", + "type": "contains", + "label": "定义类 Module" + }, + { + "id": "edge:42bc645d", + "source": "class:Module", + "target": "func:Module.render", + "type": "contains", + "label": "方法 render" + }, + { + "id": "edge:5025f147", + "source": "file:src/agentkit/evolution/prompt_optimizer.py", + "target": "class:BootstrapPromptOptimizer", + "type": "contains", + "label": "定义类 BootstrapPromptOptimizer" + }, + { + "id": "edge:5c9a0412", + "source": "class:BootstrapPromptOptimizer", + "target": "func:BootstrapPromptOptimizer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:31a65128", + "source": "class:BootstrapPromptOptimizer", + "target": "func:BootstrapPromptOptimizer.add_example", + "type": "contains", + "label": "方法 add_example" + }, + { + "id": "edge:4139aa8b", + "source": "class:BootstrapPromptOptimizer", + "target": "func:BootstrapPromptOptimizer.optimize", + "type": "contains", + "label": "方法 optimize" + }, + { + "id": "edge:3b615ba1", + "source": "class:BootstrapPromptOptimizer", + "target": "func:BootstrapPromptOptimizer.example_count", + "type": "contains", + "label": "方法 example_count" + }, + { + "id": "edge:89e747ae", + "source": "file:src/agentkit/evolution/prompt_optimizer.py", + "target": "class:LLMPromptOptimizer", + "type": "contains", + "label": "定义类 LLMPromptOptimizer" + }, + { + "id": "edge:17036f0c", + "source": "class:LLMPromptOptimizer", + "target": "func:LLMPromptOptimizer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:f840f5d6", + "source": "class:LLMPromptOptimizer", + "target": "func:LLMPromptOptimizer.add_example", + "type": "contains", + "label": "方法 add_example" + }, + { + "id": "edge:8b3cffa9", + "source": "class:LLMPromptOptimizer", + "target": "func:LLMPromptOptimizer.optimize", + "type": "contains", + "label": "方法 optimize" + }, + { + "id": "edge:27b7f169", + "source": "class:LLMPromptOptimizer", + "target": "func:LLMPromptOptimizer._llm_optimize_instruction", + "type": "contains", + "label": "方法 _llm_optimize_instruction" + }, + { + "id": "edge:015cdb36", + "source": "class:LLMPromptOptimizer", + "target": "func:LLMPromptOptimizer._build_optimization_prompt", + "type": "contains", + "label": "方法 _build_optimization_prompt" + }, + { + "id": "edge:f93f648b", + "source": "class:LLMPromptOptimizer", + "target": "func:LLMPromptOptimizer.example_count", + "type": "contains", + "label": "方法 example_count" + }, + { + "id": "edge:bb36f5ac", + "source": "file:src/agentkit/evolution/reflector.py", + "target": "class:Reflection", + "type": "contains", + "label": "定义类 Reflection" + }, + { + "id": "edge:5006c4df", + "source": "file:src/agentkit/evolution/reflector.py", + "target": "class:RuleBasedReflector", + "type": "contains", + "label": "定义类 RuleBasedReflector" + }, + { + "id": "edge:d398a4cf", + "source": "class:RuleBasedReflector", + "target": "func:RuleBasedReflector.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:fb5e56cb", + "source": "class:RuleBasedReflector", + "target": "func:RuleBasedReflector.reflect", + "type": "contains", + "label": "方法 reflect" + }, + { + "id": "edge:90f37e25", + "source": "class:RuleBasedReflector", + "target": "func:RuleBasedReflector._score_quality", + "type": "contains", + "label": "方法 _score_quality" + }, + { + "id": "edge:2d734102", + "source": "class:RuleBasedReflector", + "target": "func:RuleBasedReflector._extract_patterns", + "type": "contains", + "label": "方法 _extract_patterns" + }, + { + "id": "edge:ac5767a2", + "source": "class:RuleBasedReflector", + "target": "func:RuleBasedReflector._generate_insights", + "type": "contains", + "label": "方法 _generate_insights" + }, + { + "id": "edge:570a18f9", + "source": "class:RuleBasedReflector", + "target": "func:RuleBasedReflector._generate_suggestions", + "type": "contains", + "label": "方法 _generate_suggestions" + }, + { + "id": "edge:d9999ef1", + "source": "file:src/agentkit/evolution/strategy_tuner.py", + "target": "class:StrategyConfig", + "type": "contains", + "label": "定义类 StrategyConfig" + }, + { + "id": "edge:7ae3c3e2", + "source": "file:src/agentkit/evolution/strategy_tuner.py", + "target": "class:StrategyTuner", + "type": "contains", + "label": "定义类 StrategyTuner" + }, + { + "id": "edge:119e60ee", + "source": "class:StrategyTuner", + "target": "func:StrategyTuner.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:a54ab121", + "source": "class:StrategyTuner", + "target": "func:StrategyTuner.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:969eb470", + "source": "class:StrategyTuner", + "target": "func:StrategyTuner.suggest", + "type": "contains", + "label": "方法 suggest" + }, + { + "id": "edge:e7356518", + "source": "class:StrategyTuner", + "target": "func:StrategyTuner._optimize_param_1d", + "type": "contains", + "label": "方法 _optimize_param_1d" + }, + { + "id": "edge:668cb5d2", + "source": "class:StrategyTuner", + "target": "func:StrategyTuner._clamp", + "type": "contains", + "label": "方法 _clamp" + }, + { + "id": "edge:bae6304b", + "source": "file:src/agentkit/llm/config.py", + "target": "class:ProviderConfig", + "type": "contains", + "label": "定义类 ProviderConfig" + }, + { + "id": "edge:50c239a1", + "source": "file:src/agentkit/llm/config.py", + "target": "class:LLMConfig", + "type": "contains", + "label": "定义类 LLMConfig" + }, + { + "id": "edge:91fb3b75", + "source": "class:LLMConfig", + "target": "func:LLMConfig.from_yaml", + "type": "contains", + "label": "方法 from_yaml" + }, + { + "id": "edge:abd68aed", + "source": "class:LLMConfig", + "target": "func:LLMConfig.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:f0873e1c", + "source": "file:src/agentkit/llm/gateway.py", + "target": "class:LLMGateway", + "type": "contains", + "label": "定义类 LLMGateway" + }, + { + "id": "edge:16deb503", + "source": "class:LLMGateway", + "target": "func:LLMGateway.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:bd2d94b4", + "source": "class:LLMGateway", + "target": "func:LLMGateway.register_provider", + "type": "contains", + "label": "方法 register_provider" + }, + { + "id": "edge:25f36b28", + "source": "class:LLMGateway", + "target": "func:LLMGateway.has_providers", + "type": "contains", + "label": "方法 has_providers" + }, + { + "id": "edge:92269564", + "source": "class:LLMGateway", + "target": "func:LLMGateway.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:a9fdf142", + "source": "class:LLMGateway", + "target": "func:LLMGateway.chat_stream", + "type": "contains", + "label": "方法 chat_stream" + }, + { + "id": "edge:f3a634d5", + "source": "class:LLMGateway", + "target": "func:LLMGateway._get_models_to_try", + "type": "contains", + "label": "方法 _get_models_to_try" + }, + { + "id": "edge:b800994e", + "source": "class:LLMGateway", + "target": "func:LLMGateway._resolve_model_alias", + "type": "contains", + "label": "方法 _resolve_model_alias" + }, + { + "id": "edge:13789a73", + "source": "class:LLMGateway", + "target": "func:LLMGateway._resolve_model", + "type": "contains", + "label": "方法 _resolve_model" + }, + { + "id": "edge:4d01b6f6", + "source": "class:LLMGateway", + "target": "func:LLMGateway._get_fallback_model", + "type": "contains", + "label": "方法 _get_fallback_model" + }, + { + "id": "edge:ce90eced", + "source": "class:LLMGateway", + "target": "func:LLMGateway._calculate_cost", + "type": "contains", + "label": "方法 _calculate_cost" + }, + { + "id": "edge:46d98483", + "source": "class:LLMGateway", + "target": "func:LLMGateway.get_usage", + "type": "contains", + "label": "方法 get_usage" + }, + { + "id": "edge:0037c500", + "source": "file:src/agentkit/llm/protocol.py", + "target": "class:TokenUsage", + "type": "contains", + "label": "定义类 TokenUsage" + }, + { + "id": "edge:b99fdcbc", + "source": "class:TokenUsage", + "target": "func:TokenUsage.total_tokens", + "type": "contains", + "label": "方法 total_tokens" + }, + { + "id": "edge:63b715d7", + "source": "file:src/agentkit/llm/protocol.py", + "target": "class:ToolCall", + "type": "contains", + "label": "定义类 ToolCall" + }, + { + "id": "edge:ff49e956", + "source": "file:src/agentkit/llm/protocol.py", + "target": "class:LLMRequest", + "type": "contains", + "label": "定义类 LLMRequest" + }, + { + "id": "edge:bd8432e8", + "source": "class:LLMRequest", + "target": "func:LLMRequest.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:0c897035", + "source": "file:src/agentkit/llm/protocol.py", + "target": "class:StreamChunk", + "type": "contains", + "label": "定义类 StreamChunk" + }, + { + "id": "edge:cd19878c", + "source": "file:src/agentkit/llm/protocol.py", + "target": "class:LLMResponse", + "type": "contains", + "label": "定义类 LLMResponse" + }, + { + "id": "edge:24aedb3c", + "source": "class:LLMResponse", + "target": "func:LLMResponse.has_tool_calls", + "type": "contains", + "label": "方法 has_tool_calls" + }, + { + "id": "edge:8b8f03e2", + "source": "file:src/agentkit/llm/protocol.py", + "target": "class:LLMProvider", + "type": "contains", + "label": "定义类 LLMProvider" + }, + { + "id": "edge:470176fa", + "source": "class:LLMProvider", + "target": "func:LLMProvider.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:93e9b178", + "source": "class:LLMProvider", + "target": "func:LLMProvider.chat_stream", + "type": "contains", + "label": "方法 chat_stream" + }, + { + "id": "edge:88e82dab", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "class:_AnthropicStreamContext", + "type": "contains", + "label": "定义类 _AnthropicStreamContext" + }, + { + "id": "edge:8eba27b8", + "source": "class:_AnthropicStreamContext", + "target": "func:_AnthropicStreamContext.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6b9da9e7", + "source": "class:_AnthropicStreamContext", + "target": "func:_AnthropicStreamContext.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:be946446", + "source": "class:_AnthropicStreamContext", + "target": "func:_AnthropicStreamContext.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:fa515dbb", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "class:AnthropicProvider", + "type": "contains", + "label": "定义类 AnthropicProvider" + }, + { + "id": "edge:90fc25f8", + "source": "class:AnthropicProvider", + "target": "class:LLMProvider", + "type": "extends", + "label": "继承 LLMProvider" + }, + { + "id": "edge:7f97fe2a", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:e5e2f611", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._get_client", + "type": "contains", + "label": "方法 _get_client" + }, + { + "id": "edge:552bacc6", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:0fac31c6", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._build_headers", + "type": "contains", + "label": "方法 _build_headers" + }, + { + "id": "edge:085187af", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._convert_messages", + "type": "contains", + "label": "方法 _convert_messages" + }, + { + "id": "edge:7b300099", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._convert_tools", + "type": "contains", + "label": "方法 _convert_tools" + }, + { + "id": "edge:ead67955", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._convert_tool_choice", + "type": "contains", + "label": "方法 _convert_tool_choice" + }, + { + "id": "edge:214737ec", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._parse_response", + "type": "contains", + "label": "方法 _parse_response" + }, + { + "id": "edge:514097a9", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._handle_error", + "type": "contains", + "label": "方法 _handle_error" + }, + { + "id": "edge:39d000ac", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:9f3cad15", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._chat_impl", + "type": "contains", + "label": "方法 _chat_impl" + }, + { + "id": "edge:4101f820", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider.chat_stream", + "type": "contains", + "label": "方法 chat_stream" + }, + { + "id": "edge:ea9de081", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._open_stream", + "type": "contains", + "label": "方法 _open_stream" + }, + { + "id": "edge:7b890a34", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider._iterate_stream", + "type": "contains", + "label": "方法 _iterate_stream" + }, + { + "id": "edge:5e042513", + "source": "class:AnthropicProvider", + "target": "func:AnthropicProvider.get_model_info", + "type": "contains", + "label": "方法 get_model_info" + }, + { + "id": "edge:97395612", + "source": "file:src/agentkit/llm/providers/doubao.py", + "target": "class:DoubaoProvider", + "type": "contains", + "label": "定义类 DoubaoProvider" + }, + { + "id": "edge:63f8d5e3", + "source": "class:DoubaoProvider", + "target": "func:DoubaoProvider.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:2cd2dea9", + "source": "class:DoubaoProvider", + "target": "func:DoubaoProvider.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:411c07a1", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "class:_GeminiStreamContext", + "type": "contains", + "label": "定义类 _GeminiStreamContext" + }, + { + "id": "edge:b97525ef", + "source": "class:_GeminiStreamContext", + "target": "func:_GeminiStreamContext.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:7d1c2b67", + "source": "class:_GeminiStreamContext", + "target": "func:_GeminiStreamContext.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:7fef7bcd", + "source": "class:_GeminiStreamContext", + "target": "func:_GeminiStreamContext.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:d6daf273", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "class:GeminiProvider", + "type": "contains", + "label": "定义类 GeminiProvider" + }, + { + "id": "edge:19dcdc54", + "source": "class:GeminiProvider", + "target": "class:LLMProvider", + "type": "extends", + "label": "继承 LLMProvider" + }, + { + "id": "edge:1ee9ad73", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8f7788f6", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._get_client", + "type": "contains", + "label": "方法 _get_client" + }, + { + "id": "edge:b21109e8", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:629f79cd", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._convert_messages", + "type": "contains", + "label": "方法 _convert_messages" + }, + { + "id": "edge:ef25442b", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._convert_tools", + "type": "contains", + "label": "方法 _convert_tools" + }, + { + "id": "edge:60cd27f7", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._convert_tool_choice", + "type": "contains", + "label": "方法 _convert_tool_choice" + }, + { + "id": "edge:35917947", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._parse_response", + "type": "contains", + "label": "方法 _parse_response" + }, + { + "id": "edge:4c3a7447", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._handle_error", + "type": "contains", + "label": "方法 _handle_error" + }, + { + "id": "edge:6ff59d15", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:b0d563c1", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._chat_impl", + "type": "contains", + "label": "方法 _chat_impl" + }, + { + "id": "edge:20831433", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider.chat_stream", + "type": "contains", + "label": "方法 chat_stream" + }, + { + "id": "edge:a2933ddd", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._open_stream", + "type": "contains", + "label": "方法 _open_stream" + }, + { + "id": "edge:2d9908cb", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider._iterate_stream", + "type": "contains", + "label": "方法 _iterate_stream" + }, + { + "id": "edge:81cd4b00", + "source": "class:GeminiProvider", + "target": "func:GeminiProvider.get_model_info", + "type": "contains", + "label": "方法 get_model_info" + }, + { + "id": "edge:95c19e5e", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "class:_StreamContext", + "type": "contains", + "label": "定义类 _StreamContext" + }, + { + "id": "edge:dac9d1fb", + "source": "class:_StreamContext", + "target": "func:_StreamContext.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b8256c37", + "source": "class:_StreamContext", + "target": "func:_StreamContext.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:73997b5f", + "source": "class:_StreamContext", + "target": "func:_StreamContext.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:5fb00aa8", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "class:OpenAICompatibleProvider", + "type": "contains", + "label": "定义类 OpenAICompatibleProvider" + }, + { + "id": "edge:20819967", + "source": "class:OpenAICompatibleProvider", + "target": "class:LLMProvider", + "type": "extends", + "label": "继承 LLMProvider" + }, + { + "id": "edge:b1b43730", + "source": "class:OpenAICompatibleProvider", + "target": "func:OpenAICompatibleProvider.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:29831f86", + "source": "class:OpenAICompatibleProvider", + "target": "func:OpenAICompatibleProvider.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:3f5cc2c6", + "source": "class:OpenAICompatibleProvider", + "target": "func:OpenAICompatibleProvider.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:205bae50", + "source": "class:OpenAICompatibleProvider", + "target": "func:OpenAICompatibleProvider._chat_impl", + "type": "contains", + "label": "方法 _chat_impl" + }, + { + "id": "edge:26b76caa", + "source": "class:OpenAICompatibleProvider", + "target": "func:OpenAICompatibleProvider.chat_stream", + "type": "contains", + "label": "方法 chat_stream" + }, + { + "id": "edge:ab19c99d", + "source": "class:OpenAICompatibleProvider", + "target": "func:OpenAICompatibleProvider._open_stream", + "type": "contains", + "label": "方法 _open_stream" + }, + { + "id": "edge:f36698d3", + "source": "class:OpenAICompatibleProvider", + "target": "func:OpenAICompatibleProvider._iterate_stream", + "type": "contains", + "label": "方法 _iterate_stream" + }, + { + "id": "edge:270e4d0b", + "source": "file:src/agentkit/llm/providers/tracker.py", + "target": "class:UsageRecord", + "type": "contains", + "label": "定义类 UsageRecord" + }, + { + "id": "edge:688c8f03", + "source": "file:src/agentkit/llm/providers/tracker.py", + "target": "class:UsageSummary", + "type": "contains", + "label": "定义类 UsageSummary" + }, + { + "id": "edge:160f72a5", + "source": "file:src/agentkit/llm/providers/tracker.py", + "target": "class:UsageTracker", + "type": "contains", + "label": "定义类 UsageTracker" + }, + { + "id": "edge:3ae290fc", + "source": "class:UsageTracker", + "target": "func:UsageTracker.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:f12b0261", + "source": "class:UsageTracker", + "target": "func:UsageTracker.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:7c36c7ee", + "source": "class:UsageTracker", + "target": "func:UsageTracker.get_usage", + "type": "contains", + "label": "方法 get_usage" + }, + { + "id": "edge:a91e305a", + "source": "file:src/agentkit/llm/providers/wenxin.py", + "target": "class:WenxinProvider", + "type": "contains", + "label": "定义类 WenxinProvider" + }, + { + "id": "edge:78ccbc26", + "source": "class:WenxinProvider", + "target": "class:OpenAICompatibleProvider", + "type": "extends", + "label": "继承 OpenAICompatibleProvider" + }, + { + "id": "edge:7b0b9fce", + "source": "class:WenxinProvider", + "target": "func:WenxinProvider.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:44442410", + "source": "class:WenxinProvider", + "target": "func:WenxinProvider.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:abb45581", + "source": "class:WenxinProvider", + "target": "func:WenxinProvider._ensure_access_token", + "type": "contains", + "label": "方法 _ensure_access_token" + }, + { + "id": "edge:98bc9a76", + "source": "file:src/agentkit/llm/providers/yuanbao.py", + "target": "class:YuanbaoProvider", + "type": "contains", + "label": "定义类 YuanbaoProvider" + }, + { + "id": "edge:db6cec0e", + "source": "class:YuanbaoProvider", + "target": "class:OpenAICompatibleProvider", + "type": "extends", + "label": "继承 OpenAICompatibleProvider" + }, + { + "id": "edge:fd6aa0de", + "source": "class:YuanbaoProvider", + "target": "func:YuanbaoProvider.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:46274408", + "source": "class:YuanbaoProvider", + "target": "func:YuanbaoProvider.chat", + "type": "contains", + "label": "方法 chat" + }, + { + "id": "edge:8203b448", + "source": "file:src/agentkit/llm/retry.py", + "target": "class:RetryConfig", + "type": "contains", + "label": "定义类 RetryConfig" + }, + { + "id": "edge:b3d2b032", + "source": "file:src/agentkit/llm/retry.py", + "target": "class:CircuitState", + "type": "contains", + "label": "定义类 CircuitState" + }, + { + "id": "edge:4edcddae", + "source": "file:src/agentkit/llm/retry.py", + "target": "class:CircuitBreakerConfig", + "type": "contains", + "label": "定义类 CircuitBreakerConfig" + }, + { + "id": "edge:448fb32d", + "source": "file:src/agentkit/llm/retry.py", + "target": "class:CircuitOpenError", + "type": "contains", + "label": "定义类 CircuitOpenError" + }, + { + "id": "edge:90707f20", + "source": "class:CircuitOpenError", + "target": "class:LLMProviderError", + "type": "extends", + "label": "继承 LLMProviderError" + }, + { + "id": "edge:ab54cd74", + "source": "class:CircuitOpenError", + "target": "func:CircuitOpenError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:757e1d94", + "source": "file:src/agentkit/llm/retry.py", + "target": "class:RetryPolicy", + "type": "contains", + "label": "定义类 RetryPolicy" + }, + { + "id": "edge:d7e0861e", + "source": "class:RetryPolicy", + "target": "func:RetryPolicy.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:e03b7295", + "source": "class:RetryPolicy", + "target": "func:RetryPolicy.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:fafdcc0d", + "source": "file:src/agentkit/llm/retry.py", + "target": "class:CircuitBreaker", + "type": "contains", + "label": "定义类 CircuitBreaker" + }, + { + "id": "edge:87541e7b", + "source": "class:CircuitBreaker", + "target": "func:CircuitBreaker.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:4223445e", + "source": "class:CircuitBreaker", + "target": "func:CircuitBreaker.state", + "type": "contains", + "label": "方法 state" + }, + { + "id": "edge:12606e9f", + "source": "class:CircuitBreaker", + "target": "func:CircuitBreaker._on_success", + "type": "contains", + "label": "方法 _on_success" + }, + { + "id": "edge:bc92a188", + "source": "class:CircuitBreaker", + "target": "func:CircuitBreaker._on_failure", + "type": "contains", + "label": "方法 _on_failure" + }, + { + "id": "edge:338a831c", + "source": "class:CircuitBreaker", + "target": "func:CircuitBreaker.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:d7a5e3d0", + "source": "file:src/agentkit/marketplace/auction.py", + "target": "class:Bid", + "type": "contains", + "label": "定义类 Bid" + }, + { + "id": "edge:4642f8de", + "source": "class:Bid", + "target": "func:Bid.__post_init__", + "type": "contains", + "label": "方法 __post_init__" + }, + { + "id": "edge:bf90fae9", + "source": "file:src/agentkit/marketplace/auction.py", + "target": "class:AuctionResult", + "type": "contains", + "label": "定义类 AuctionResult" + }, + { + "id": "edge:7e58997b", + "source": "file:src/agentkit/marketplace/auction.py", + "target": "class:AuctionHouse", + "type": "contains", + "label": "定义类 AuctionHouse" + }, + { + "id": "edge:8f932d03", + "source": "class:AuctionHouse", + "target": "func:AuctionHouse.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:29f31965", + "source": "class:AuctionHouse", + "target": "func:AuctionHouse.run_auction", + "type": "contains", + "label": "方法 run_auction" + }, + { + "id": "edge:01a5c083", + "source": "class:AuctionHouse", + "target": "func:AuctionHouse.score_bid", + "type": "contains", + "label": "方法 score_bid" + }, + { + "id": "edge:23e09c4b", + "source": "class:AuctionHouse", + "target": "func:AuctionHouse.filter_by_capabilities", + "type": "contains", + "label": "方法 filter_by_capabilities" + }, + { + "id": "edge:8429dcde", + "source": "class:AuctionHouse", + "target": "func:AuctionHouse.run_vickrey_auction", + "type": "contains", + "label": "方法 run_vickrey_auction" + }, + { + "id": "edge:dbf48654", + "source": "file:src/agentkit/marketplace/wealth.py", + "target": "class:WealthTracker", + "type": "contains", + "label": "定义类 WealthTracker" + }, + { + "id": "edge:5878c95a", + "source": "class:WealthTracker", + "target": "func:WealthTracker.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:beceb35e", + "source": "class:WealthTracker", + "target": "func:WealthTracker.get_wealth", + "type": "contains", + "label": "方法 get_wealth" + }, + { + "id": "edge:cc6cff87", + "source": "class:WealthTracker", + "target": "func:WealthTracker.reward", + "type": "contains", + "label": "方法 reward" + }, + { + "id": "edge:f69d0609", + "source": "class:WealthTracker", + "target": "func:WealthTracker.penalize", + "type": "contains", + "label": "方法 penalize" + }, + { + "id": "edge:d8975687", + "source": "class:WealthTracker", + "target": "func:WealthTracker.is_bankrupt", + "type": "contains", + "label": "方法 is_bankrupt" + }, + { + "id": "edge:d6f5cce2", + "source": "class:WealthTracker", + "target": "func:WealthTracker.reset", + "type": "contains", + "label": "方法 reset" + }, + { + "id": "edge:947e0a55", + "source": "class:WealthTracker", + "target": "func:WealthTracker.get_rankings", + "type": "contains", + "label": "方法 get_rankings" + }, + { + "id": "edge:1c6e2420", + "source": "class:WealthTracker", + "target": "func:WealthTracker.get_wealth_factor", + "type": "contains", + "label": "方法 get_wealth_factor" + }, + { + "id": "edge:2521297b", + "source": "file:src/agentkit/mcp/client.py", + "target": "class:MCPClient", + "type": "contains", + "label": "定义类 MCPClient" + }, + { + "id": "edge:be654826", + "source": "class:MCPClient", + "target": "func:MCPClient.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:4d1c62c1", + "source": "class:MCPClient", + "target": "func:MCPClient.from_transport", + "type": "contains", + "label": "方法 from_transport" + }, + { + "id": "edge:d48f2657", + "source": "class:MCPClient", + "target": "func:MCPClient.list_tools", + "type": "contains", + "label": "方法 list_tools" + }, + { + "id": "edge:61b7d74e", + "source": "class:MCPClient", + "target": "func:MCPClient.call_tool", + "type": "contains", + "label": "方法 call_tool" + }, + { + "id": "edge:165e6223", + "source": "class:MCPClient", + "target": "func:MCPClient.as_tool", + "type": "contains", + "label": "方法 as_tool" + }, + { + "id": "edge:b07880b6", + "source": "file:src/agentkit/mcp/client.py", + "target": "class:MCPTool", + "type": "contains", + "label": "定义类 MCPTool" + }, + { + "id": "edge:207080a3", + "source": "class:MCPTool", + "target": "func:MCPTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:bdcce24f", + "source": "class:MCPTool", + "target": "func:MCPTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:ae58f19a", + "source": "file:src/agentkit/mcp/manager.py", + "target": "class:MCPManager", + "type": "contains", + "label": "定义类 MCPManager" + }, + { + "id": "edge:87400af8", + "source": "class:MCPManager", + "target": "func:MCPManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:3aa00729", + "source": "class:MCPManager", + "target": "func:MCPManager.start_all", + "type": "contains", + "label": "方法 start_all" + }, + { + "id": "edge:9d2dce77", + "source": "class:MCPManager", + "target": "func:MCPManager._start_server_safe", + "type": "contains", + "label": "方法 _start_server_safe" + }, + { + "id": "edge:e38d55ca", + "source": "class:MCPManager", + "target": "func:MCPManager._start_server", + "type": "contains", + "label": "方法 _start_server" + }, + { + "id": "edge:ad0078f5", + "source": "class:MCPManager", + "target": "func:MCPManager.stop_all", + "type": "contains", + "label": "方法 stop_all" + }, + { + "id": "edge:471c7739", + "source": "class:MCPManager", + "target": "func:MCPManager.is_available", + "type": "contains", + "label": "方法 is_available" + }, + { + "id": "edge:68e2fac1", + "source": "class:MCPManager", + "target": "func:MCPManager.get_server_tools", + "type": "contains", + "label": "方法 get_server_tools" + }, + { + "id": "edge:4c35cb52", + "source": "class:MCPManager", + "target": "func:MCPManager.list_all_tools", + "type": "contains", + "label": "方法 list_all_tools" + }, + { + "id": "edge:a3be679a", + "source": "class:MCPManager", + "target": "func:MCPManager.get_tool_registry", + "type": "contains", + "label": "方法 get_tool_registry" + }, + { + "id": "edge:1daf0195", + "source": "file:src/agentkit/mcp/server.py", + "target": "class:MCPServer", + "type": "contains", + "label": "定义类 MCPServer" + }, + { + "id": "edge:92164d10", + "source": "class:MCPServer", + "target": "func:MCPServer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:7df6b103", + "source": "class:MCPServer", + "target": "func:MCPServer._create_app", + "type": "contains", + "label": "方法 _create_app" + }, + { + "id": "edge:e6326e75", + "source": "class:MCPServer", + "target": "func:MCPServer.start", + "type": "contains", + "label": "方法 start" + }, + { + "id": "edge:b9891e45", + "source": "class:MCPServer", + "target": "func:MCPServer.get_app", + "type": "contains", + "label": "方法 get_app" + }, + { + "id": "edge:1aef7ceb", + "source": "file:src/agentkit/mcp/transport.py", + "target": "class:TransportError", + "type": "contains", + "label": "定义类 TransportError" + }, + { + "id": "edge:e11b94f6", + "source": "class:TransportError", + "target": "func:TransportError.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:3e544ae6", + "source": "file:src/agentkit/mcp/transport.py", + "target": "class:Transport", + "type": "contains", + "label": "定义类 Transport" + }, + { + "id": "edge:810cb578", + "source": "class:Transport", + "target": "func:Transport.connect", + "type": "contains", + "label": "方法 connect" + }, + { + "id": "edge:88c24d6c", + "source": "class:Transport", + "target": "func:Transport.disconnect", + "type": "contains", + "label": "方法 disconnect" + }, + { + "id": "edge:e2ed467f", + "source": "class:Transport", + "target": "func:Transport.send_request", + "type": "contains", + "label": "方法 send_request" + }, + { + "id": "edge:9d44df08", + "source": "class:Transport", + "target": "func:Transport.receive_response", + "type": "contains", + "label": "方法 receive_response" + }, + { + "id": "edge:a66b8bd4", + "source": "file:src/agentkit/mcp/transport.py", + "target": "class:HTTPTransport", + "type": "contains", + "label": "定义类 HTTPTransport" + }, + { + "id": "edge:651ab572", + "source": "class:HTTPTransport", + "target": "class:Transport", + "type": "extends", + "label": "继承 Transport" + }, + { + "id": "edge:f344e3b4", + "source": "class:HTTPTransport", + "target": "func:HTTPTransport.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:31cf970a", + "source": "class:HTTPTransport", + "target": "func:HTTPTransport.is_connected", + "type": "contains", + "label": "方法 is_connected" + }, + { + "id": "edge:43825ae2", + "source": "class:HTTPTransport", + "target": "func:HTTPTransport.connect", + "type": "contains", + "label": "方法 connect" + }, + { + "id": "edge:1256e295", + "source": "class:HTTPTransport", + "target": "func:HTTPTransport.disconnect", + "type": "contains", + "label": "方法 disconnect" + }, + { + "id": "edge:5c1ea026", + "source": "class:HTTPTransport", + "target": "func:HTTPTransport._next_request_id", + "type": "contains", + "label": "方法 _next_request_id" + }, + { + "id": "edge:dafcbfca", + "source": "class:HTTPTransport", + "target": "func:HTTPTransport.send_request", + "type": "contains", + "label": "方法 send_request" + }, + { + "id": "edge:a783d7b5", + "source": "class:HTTPTransport", + "target": "func:HTTPTransport.receive_response", + "type": "contains", + "label": "方法 receive_response" + }, + { + "id": "edge:9afcb7ee", + "source": "file:src/agentkit/mcp/transport.py", + "target": "class:SSETransport", + "type": "contains", + "label": "定义类 SSETransport" + }, + { + "id": "edge:d2b76f0c", + "source": "class:SSETransport", + "target": "class:Transport", + "type": "extends", + "label": "继承 Transport" + }, + { + "id": "edge:8e3e3c94", + "source": "class:SSETransport", + "target": "func:SSETransport.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b6953698", + "source": "class:SSETransport", + "target": "func:SSETransport.is_connected", + "type": "contains", + "label": "方法 is_connected" + }, + { + "id": "edge:3ab7b921", + "source": "class:SSETransport", + "target": "func:SSETransport.connect", + "type": "contains", + "label": "方法 connect" + }, + { + "id": "edge:4093ef6c", + "source": "class:SSETransport", + "target": "func:SSETransport.disconnect", + "type": "contains", + "label": "方法 disconnect" + }, + { + "id": "edge:4cbfa86b", + "source": "class:SSETransport", + "target": "func:SSETransport._listen_sse", + "type": "contains", + "label": "方法 _listen_sse" + }, + { + "id": "edge:06def263", + "source": "class:SSETransport", + "target": "func:SSETransport._next_request_id", + "type": "contains", + "label": "方法 _next_request_id" + }, + { + "id": "edge:8a54aabd", + "source": "class:SSETransport", + "target": "func:SSETransport.send_request", + "type": "contains", + "label": "方法 send_request" + }, + { + "id": "edge:5e06db71", + "source": "class:SSETransport", + "target": "func:SSETransport.receive_response", + "type": "contains", + "label": "方法 receive_response" + }, + { + "id": "edge:acaa6119", + "source": "file:src/agentkit/mcp/transport.py", + "target": "class:StdioTransport", + "type": "contains", + "label": "定义类 StdioTransport" + }, + { + "id": "edge:631ee8ef", + "source": "class:StdioTransport", + "target": "class:Transport", + "type": "extends", + "label": "继承 Transport" + }, + { + "id": "edge:91f09643", + "source": "class:StdioTransport", + "target": "func:StdioTransport.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:4e614b65", + "source": "class:StdioTransport", + "target": "func:StdioTransport.is_connected", + "type": "contains", + "label": "方法 is_connected" + }, + { + "id": "edge:351c22c6", + "source": "class:StdioTransport", + "target": "func:StdioTransport._next_request_id", + "type": "contains", + "label": "方法 _next_request_id" + }, + { + "id": "edge:337f8965", + "source": "class:StdioTransport", + "target": "func:StdioTransport.connect", + "type": "contains", + "label": "方法 connect" + }, + { + "id": "edge:643f7596", + "source": "class:StdioTransport", + "target": "func:StdioTransport.disconnect", + "type": "contains", + "label": "方法 disconnect" + }, + { + "id": "edge:9e051597", + "source": "class:StdioTransport", + "target": "func:StdioTransport._cleanup", + "type": "contains", + "label": "方法 _cleanup" + }, + { + "id": "edge:10155075", + "source": "class:StdioTransport", + "target": "func:StdioTransport.send_request", + "type": "contains", + "label": "方法 send_request" + }, + { + "id": "edge:aa4107bd", + "source": "class:StdioTransport", + "target": "func:StdioTransport._send_request_internal", + "type": "contains", + "label": "方法 _send_request_internal" + }, + { + "id": "edge:b7594869", + "source": "class:StdioTransport", + "target": "func:StdioTransport._send_notification", + "type": "contains", + "label": "方法 _send_notification" + }, + { + "id": "edge:d847e055", + "source": "class:StdioTransport", + "target": "func:StdioTransport._write_message", + "type": "contains", + "label": "方法 _write_message" + }, + { + "id": "edge:7206022c", + "source": "class:StdioTransport", + "target": "func:StdioTransport.receive_response", + "type": "contains", + "label": "方法 receive_response" + }, + { + "id": "edge:26745afe", + "source": "class:StdioTransport", + "target": "func:StdioTransport._read_stdout", + "type": "contains", + "label": "方法 _read_stdout" + }, + { + "id": "edge:bcc95c24", + "source": "class:StdioTransport", + "target": "func:StdioTransport._read_stderr", + "type": "contains", + "label": "方法 _read_stderr" + }, + { + "id": "edge:53f4fbd6", + "source": "file:src/agentkit/memory/adapters/base.py", + "target": "class:KBAdapter", + "type": "contains", + "label": "定义类 KBAdapter" + }, + { + "id": "edge:9f8460e8", + "source": "class:KBAdapter", + "target": "func:KBAdapter.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:d088ab11", + "source": "class:KBAdapter", + "target": "func:KBAdapter.source_id", + "type": "contains", + "label": "方法 source_id" + }, + { + "id": "edge:be83c264", + "source": "class:KBAdapter", + "target": "func:KBAdapter.source_name", + "type": "contains", + "label": "方法 source_name" + }, + { + "id": "edge:cb6ba848", + "source": "class:KBAdapter", + "target": "func:KBAdapter.source_type", + "type": "contains", + "label": "方法 source_type" + }, + { + "id": "edge:9b7032ff", + "source": "class:KBAdapter", + "target": "func:KBAdapter._get_client", + "type": "contains", + "label": "方法 _get_client" + }, + { + "id": "edge:7e4b678d", + "source": "class:KBAdapter", + "target": "func:KBAdapter._make_client", + "type": "contains", + "label": "方法 _make_client" + }, + { + "id": "edge:b326dda7", + "source": "class:KBAdapter", + "target": "func:KBAdapter.ingest", + "type": "contains", + "label": "方法 ingest" + }, + { + "id": "edge:91b3b653", + "source": "class:KBAdapter", + "target": "func:KBAdapter._ingest_one", + "type": "contains", + "label": "方法 _ingest_one" + }, + { + "id": "edge:898b53c7", + "source": "class:KBAdapter", + "target": "func:KBAdapter.query", + "type": "contains", + "label": "方法 query" + }, + { + "id": "edge:1ea570f2", + "source": "class:KBAdapter", + "target": "func:KBAdapter.delete_by_id", + "type": "contains", + "label": "方法 delete_by_id" + }, + { + "id": "edge:f4a5248a", + "source": "class:KBAdapter", + "target": "func:KBAdapter.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:110a2e96", + "source": "class:KBAdapter", + "target": "func:KBAdapter.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:8eee4770", + "source": "class:KBAdapter", + "target": "func:KBAdapter.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:350a0cf4", + "source": "class:KBAdapter", + "target": "func:KBAdapter.get_document", + "type": "contains", + "label": "方法 get_document" + }, + { + "id": "edge:ff929722", + "source": "class:KBAdapter", + "target": "func:KBAdapter.authenticate", + "type": "contains", + "label": "方法 authenticate" + }, + { + "id": "edge:dcd0a249", + "source": "class:KBAdapter", + "target": "func:KBAdapter.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:81d294c5", + "source": "class:KBAdapter", + "target": "func:KBAdapter.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:0f0d5355", + "source": "class:KBAdapter", + "target": "func:KBAdapter.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:f3d70586", + "source": "file:src/agentkit/memory/adapters/confluence.py", + "target": "class:ConfluenceAdapter", + "type": "contains", + "label": "定义类 ConfluenceAdapter" + }, + { + "id": "edge:1af82923", + "source": "class:ConfluenceAdapter", + "target": "class:KBAdapter", + "type": "extends", + "label": "继承 KBAdapter" + }, + { + "id": "edge:659e9e78", + "source": "class:ConfluenceAdapter", + "target": "func:ConfluenceAdapter.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:06d92341", + "source": "class:ConfluenceAdapter", + "target": "func:ConfluenceAdapter._make_client", + "type": "contains", + "label": "方法 _make_client" + }, + { + "id": "edge:13565ffb", + "source": "class:ConfluenceAdapter", + "target": "func:ConfluenceAdapter.authenticate", + "type": "contains", + "label": "方法 authenticate" + }, + { + "id": "edge:10ee0cef", + "source": "class:ConfluenceAdapter", + "target": "func:ConfluenceAdapter.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:1b9c6ddf", + "source": "class:ConfluenceAdapter", + "target": "func:ConfluenceAdapter.get_document", + "type": "contains", + "label": "方法 get_document" + }, + { + "id": "edge:19ec62bd", + "source": "class:ConfluenceAdapter", + "target": "func:ConfluenceAdapter.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:f610c524", + "source": "class:ConfluenceAdapter", + "target": "func:ConfluenceAdapter.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:7db496ae", + "source": "file:src/agentkit/memory/adapters/feishu.py", + "target": "class:FeishuKBAdapter", + "type": "contains", + "label": "定义类 FeishuKBAdapter" + }, + { + "id": "edge:76f2575a", + "source": "class:FeishuKBAdapter", + "target": "class:KBAdapter", + "type": "extends", + "label": "继承 KBAdapter" + }, + { + "id": "edge:0bf7c3d4", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6fc49386", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter._make_client", + "type": "contains", + "label": "方法 _make_client" + }, + { + "id": "edge:52d7a708", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter._get_access_token", + "type": "contains", + "label": "方法 _get_access_token" + }, + { + "id": "edge:dd38ff36", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter.authenticate", + "type": "contains", + "label": "方法 authenticate" + }, + { + "id": "edge:f220232b", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:99bcf09b", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter.get_document", + "type": "contains", + "label": "方法 get_document" + }, + { + "id": "edge:955316d5", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:359061c7", + "source": "class:FeishuKBAdapter", + "target": "func:FeishuKBAdapter.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:fec434de", + "source": "file:src/agentkit/memory/adapters/generic_http.py", + "target": "class:GenericHTTPAdapter", + "type": "contains", + "label": "定义类 GenericHTTPAdapter" + }, + { + "id": "edge:ff4c6ff0", + "source": "class:GenericHTTPAdapter", + "target": "class:KBAdapter", + "type": "extends", + "label": "继承 KBAdapter" + }, + { + "id": "edge:b13ca4ab", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:62fb7385", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter._make_client", + "type": "contains", + "label": "方法 _make_client" + }, + { + "id": "edge:f86ff150", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:0caad63d", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.ingest", + "type": "contains", + "label": "方法 ingest" + }, + { + "id": "edge:6072f1c7", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.delete_by_id", + "type": "contains", + "label": "方法 delete_by_id" + }, + { + "id": "edge:96f25f83", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.get_document", + "type": "contains", + "label": "方法 get_document" + }, + { + "id": "edge:8639eb00", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:06b72bd1", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:7a67931d", + "source": "class:GenericHTTPAdapter", + "target": "func:GenericHTTPAdapter.authenticate", + "type": "contains", + "label": "方法 authenticate" + }, + { + "id": "edge:52997774", + "source": "file:src/agentkit/memory/base.py", + "target": "class:MemoryItem", + "type": "contains", + "label": "定义类 MemoryItem" + }, + { + "id": "edge:4f7d6cc1", + "source": "class:MemoryItem", + "target": "func:MemoryItem.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:76e627de", + "source": "file:src/agentkit/memory/base.py", + "target": "class:Memory", + "type": "contains", + "label": "定义类 Memory" + }, + { + "id": "edge:fcc30dfc", + "source": "class:Memory", + "target": "func:Memory.store", + "type": "contains", + "label": "方法 store" + }, + { + "id": "edge:c8391eba", + "source": "class:Memory", + "target": "func:Memory.retrieve", + "type": "contains", + "label": "方法 retrieve" + }, + { + "id": "edge:6c3eaad1", + "source": "class:Memory", + "target": "func:Memory.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:4812a128", + "source": "class:Memory", + "target": "func:Memory.delete", + "type": "contains", + "label": "方法 delete" + }, + { + "id": "edge:37f15af6", + "source": "class:Memory", + "target": "func:Memory.store_batch", + "type": "contains", + "label": "方法 store_batch" + }, + { + "id": "edge:d4ac790b", + "source": "class:Memory", + "target": "func:Memory.get_context", + "type": "contains", + "label": "方法 get_context" + }, + { + "id": "edge:cef8074e", + "source": "file:src/agentkit/memory/chunking.py", + "target": "class:Chunk", + "type": "contains", + "label": "定义类 Chunk" + }, + { + "id": "edge:cf161e7c", + "source": "class:Chunk", + "target": "func:Chunk.__post_init__", + "type": "contains", + "label": "方法 __post_init__" + }, + { + "id": "edge:56dae6db", + "source": "class:Chunk", + "target": "func:Chunk.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:f2639c98", + "source": "file:src/agentkit/memory/chunking.py", + "target": "class:TextChunker", + "type": "contains", + "label": "定义类 TextChunker" + }, + { + "id": "edge:8e8b0b75", + "source": "class:TextChunker", + "target": "func:TextChunker.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:dde41067", + "source": "class:TextChunker", + "target": "func:TextChunker.chunk", + "type": "contains", + "label": "方法 chunk" + }, + { + "id": "edge:f6dc9328", + "source": "class:TextChunker", + "target": "func:TextChunker._split_by_separator", + "type": "contains", + "label": "方法 _split_by_separator" + }, + { + "id": "edge:86df4281", + "source": "class:TextChunker", + "target": "func:TextChunker._merge_and_split", + "type": "contains", + "label": "方法 _merge_and_split" + }, + { + "id": "edge:8f257d21", + "source": "class:TextChunker", + "target": "func:TextChunker._split_large_segment", + "type": "contains", + "label": "方法 _split_large_segment" + }, + { + "id": "edge:6f47a710", + "source": "class:TextChunker", + "target": "func:TextChunker._get_overlap_segments", + "type": "contains", + "label": "方法 _get_overlap_segments" + }, + { + "id": "edge:36ddcc1e", + "source": "file:src/agentkit/memory/chunking.py", + "target": "class:StructuralChunker", + "type": "contains", + "label": "定义类 StructuralChunker" + }, + { + "id": "edge:2b47f863", + "source": "class:StructuralChunker", + "target": "func:StructuralChunker.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:16cdd050", + "source": "class:StructuralChunker", + "target": "func:StructuralChunker.chunk", + "type": "contains", + "label": "方法 chunk" + }, + { + "id": "edge:975aa925", + "source": "class:StructuralChunker", + "target": "func:StructuralChunker._split_by_headings", + "type": "contains", + "label": "方法 _split_by_headings" + }, + { + "id": "edge:6b882873", + "source": "file:src/agentkit/memory/contextual_retrieval.py", + "target": "class:ContextualChunk", + "type": "contains", + "label": "定义类 ContextualChunk" + }, + { + "id": "edge:f456df6a", + "source": "class:ContextualChunk", + "target": "func:ContextualChunk.content", + "type": "contains", + "label": "方法 content" + }, + { + "id": "edge:a8375d1d", + "source": "file:src/agentkit/memory/contextual_retrieval.py", + "target": "class:ContextualChunker", + "type": "contains", + "label": "定义类 ContextualChunker" + }, + { + "id": "edge:74dcdfe3", + "source": "class:ContextualChunker", + "target": "func:ContextualChunker.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:4bd994ed", + "source": "class:ContextualChunker", + "target": "func:ContextualChunker.enhance_chunks", + "type": "contains", + "label": "方法 enhance_chunks" + }, + { + "id": "edge:a0687567", + "source": "class:ContextualChunker", + "target": "func:ContextualChunker._process_batch", + "type": "contains", + "label": "方法 _process_batch" + }, + { + "id": "edge:e20086b2", + "source": "class:ContextualChunker", + "target": "func:ContextualChunker._generate_context", + "type": "contains", + "label": "方法 _generate_context" + }, + { + "id": "edge:33e94046", + "source": "class:ContextualChunker", + "target": "func:ContextualChunker._make_cache_key", + "type": "contains", + "label": "方法 _make_cache_key" + }, + { + "id": "edge:d0842b5a", + "source": "class:ContextualChunker", + "target": "func:ContextualChunker.clear_cache", + "type": "contains", + "label": "方法 clear_cache" + }, + { + "id": "edge:513466a8", + "source": "file:src/agentkit/memory/document_loader.py", + "target": "class:Document", + "type": "contains", + "label": "定义类 Document" + }, + { + "id": "edge:8b828e4b", + "source": "class:Document", + "target": "func:Document.__post_init__", + "type": "contains", + "label": "方法 __post_init__" + }, + { + "id": "edge:4071cb54", + "source": "class:Document", + "target": "func:Document.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:454b0ae1", + "source": "file:src/agentkit/memory/document_loader.py", + "target": "class:DocumentLoader", + "type": "contains", + "label": "定义类 DocumentLoader" + }, + { + "id": "edge:bd80b872", + "source": "class:DocumentLoader", + "target": "func:DocumentLoader.load", + "type": "contains", + "label": "方法 load" + }, + { + "id": "edge:c5dac3d8", + "source": "class:DocumentLoader", + "target": "func:DocumentLoader.load_bytes", + "type": "contains", + "label": "方法 load_bytes" + }, + { + "id": "edge:736f6247", + "source": "class:DocumentLoader", + "target": "func:DocumentLoader._parse_pdf", + "type": "contains", + "label": "方法 _parse_pdf" + }, + { + "id": "edge:49001631", + "source": "class:DocumentLoader", + "target": "func:DocumentLoader._parse_docx", + "type": "contains", + "label": "方法 _parse_docx" + }, + { + "id": "edge:78e510b0", + "source": "class:DocumentLoader", + "target": "func:DocumentLoader._parse_markdown", + "type": "contains", + "label": "方法 _parse_markdown" + }, + { + "id": "edge:8bfc5661", + "source": "class:DocumentLoader", + "target": "func:DocumentLoader._parse_html", + "type": "contains", + "label": "方法 _parse_html" + }, + { + "id": "edge:83e10f31", + "source": "class:DocumentLoader", + "target": "func:DocumentLoader._parse_text", + "type": "contains", + "label": "方法 _parse_text" + }, + { + "id": "edge:a4e75b5e", + "source": "file:src/agentkit/memory/embedder.py", + "target": "class:EmbeddingCache", + "type": "contains", + "label": "定义类 EmbeddingCache" + }, + { + "id": "edge:5eb6e850", + "source": "class:EmbeddingCache", + "target": "func:EmbeddingCache.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b3462dd5", + "source": "class:EmbeddingCache", + "target": "func:EmbeddingCache._make_key", + "type": "contains", + "label": "方法 _make_key" + }, + { + "id": "edge:1d24e935", + "source": "class:EmbeddingCache", + "target": "func:EmbeddingCache.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:7fbcaa15", + "source": "class:EmbeddingCache", + "target": "func:EmbeddingCache.put", + "type": "contains", + "label": "方法 put" + }, + { + "id": "edge:ed094b2b", + "source": "class:EmbeddingCache", + "target": "func:EmbeddingCache.clear", + "type": "contains", + "label": "方法 clear" + }, + { + "id": "edge:c805584f", + "source": "file:src/agentkit/memory/embedder.py", + "target": "class:Embedder", + "type": "contains", + "label": "定义类 Embedder" + }, + { + "id": "edge:4e9729e6", + "source": "class:Embedder", + "target": "func:Embedder.embed", + "type": "contains", + "label": "方法 embed" + }, + { + "id": "edge:62898f0b", + "source": "class:Embedder", + "target": "func:Embedder.get_dimension", + "type": "contains", + "label": "方法 get_dimension" + }, + { + "id": "edge:a5000dc5", + "source": "file:src/agentkit/memory/embedder.py", + "target": "class:OpenAIEmbedder", + "type": "contains", + "label": "定义类 OpenAIEmbedder" + }, + { + "id": "edge:00e9d6e1", + "source": "class:OpenAIEmbedder", + "target": "class:Embedder", + "type": "extends", + "label": "继承 Embedder" + }, + { + "id": "edge:1a31b0de", + "source": "class:OpenAIEmbedder", + "target": "func:OpenAIEmbedder.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6c23c04a", + "source": "class:OpenAIEmbedder", + "target": "func:OpenAIEmbedder._get_client", + "type": "contains", + "label": "方法 _get_client" + }, + { + "id": "edge:4beebac8", + "source": "class:OpenAIEmbedder", + "target": "func:OpenAIEmbedder.aclose", + "type": "contains", + "label": "方法 aclose" + }, + { + "id": "edge:fc373615", + "source": "class:OpenAIEmbedder", + "target": "func:OpenAIEmbedder.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:b3104444", + "source": "class:OpenAIEmbedder", + "target": "func:OpenAIEmbedder.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:aa9b408a", + "source": "class:OpenAIEmbedder", + "target": "func:OpenAIEmbedder.embed", + "type": "contains", + "label": "方法 embed" + }, + { + "id": "edge:13fb67cd", + "source": "class:OpenAIEmbedder", + "target": "func:OpenAIEmbedder.get_dimension", + "type": "contains", + "label": "方法 get_dimension" + }, + { + "id": "edge:5ede1f78", + "source": "file:src/agentkit/memory/embedder.py", + "target": "class:MockEmbedder", + "type": "contains", + "label": "定义类 MockEmbedder" + }, + { + "id": "edge:db6f076d", + "source": "class:MockEmbedder", + "target": "class:Embedder", + "type": "extends", + "label": "继承 Embedder" + }, + { + "id": "edge:5be82ce7", + "source": "class:MockEmbedder", + "target": "func:MockEmbedder.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ae862106", + "source": "class:MockEmbedder", + "target": "func:MockEmbedder.embed", + "type": "contains", + "label": "方法 embed" + }, + { + "id": "edge:330413c3", + "source": "class:MockEmbedder", + "target": "func:MockEmbedder.get_dimension", + "type": "contains", + "label": "方法 get_dimension" + }, + { + "id": "edge:f21fb6b6", + "source": "file:src/agentkit/memory/episodic.py", + "target": "class:EpisodicMemory", + "type": "contains", + "label": "定义类 EpisodicMemory" + }, + { + "id": "edge:d35155bb", + "source": "class:EpisodicMemory", + "target": "class:Memory", + "type": "extends", + "label": "继承 Memory" + }, + { + "id": "edge:9ca0305b", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:bdce9583", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory.store", + "type": "contains", + "label": "方法 store" + }, + { + "id": "edge:b9190990", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory.retrieve", + "type": "contains", + "label": "方法 retrieve" + }, + { + "id": "edge:e1d8871e", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory._retrieve_pgvector", + "type": "contains", + "label": "方法 _retrieve_pgvector" + }, + { + "id": "edge:65c8973b", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory._retrieve_client_side", + "type": "contains", + "label": "方法 _retrieve_client_side" + }, + { + "id": "edge:ce1b6dbd", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:26694e1c", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory._search_pgvector", + "type": "contains", + "label": "方法 _search_pgvector" + }, + { + "id": "edge:ead5ded7", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory._search_client_side", + "type": "contains", + "label": "方法 _search_client_side" + }, + { + "id": "edge:93a7c99f", + "source": "class:EpisodicMemory", + "target": "func:EpisodicMemory.delete", + "type": "contains", + "label": "方法 delete" + }, + { + "id": "edge:1995cafe", + "source": "file:src/agentkit/memory/http_rag.py", + "target": "class:HttpRAGService", + "type": "contains", + "label": "定义类 HttpRAGService" + }, + { + "id": "edge:d713474d", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ecd2db9a", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService._get_client", + "type": "contains", + "label": "方法 _get_client" + }, + { + "id": "edge:05a5e150", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:d4bf0c1e", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.enhanced_search", + "type": "contains", + "label": "方法 enhanced_search" + }, + { + "id": "edge:e7602d9a", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.ingest", + "type": "contains", + "label": "方法 ingest" + }, + { + "id": "edge:5a6aeb7d", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:854a3820", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:a7200340", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:2afcce69", + "source": "class:HttpRAGService", + "target": "func:HttpRAGService.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:55a9aa5e", + "source": "file:src/agentkit/memory/knowledge_base.py", + "target": "class:Document", + "type": "contains", + "label": "定义类 Document" + }, + { + "id": "edge:8637de1f", + "source": "file:src/agentkit/memory/knowledge_base.py", + "target": "class:QueryResult", + "type": "contains", + "label": "定义类 QueryResult" + }, + { + "id": "edge:cb0a548f", + "source": "file:src/agentkit/memory/knowledge_base.py", + "target": "class:SourceInfo", + "type": "contains", + "label": "定义类 SourceInfo" + }, + { + "id": "edge:584c165e", + "source": "file:src/agentkit/memory/knowledge_base.py", + "target": "class:KnowledgeBase", + "type": "contains", + "label": "定义类 KnowledgeBase" + }, + { + "id": "edge:d45f0963", + "source": "class:KnowledgeBase", + "target": "func:KnowledgeBase.ingest", + "type": "contains", + "label": "方法 ingest" + }, + { + "id": "edge:c7c3939f", + "source": "class:KnowledgeBase", + "target": "func:KnowledgeBase.query", + "type": "contains", + "label": "方法 query" + }, + { + "id": "edge:8c63aaf3", + "source": "class:KnowledgeBase", + "target": "func:KnowledgeBase.delete_by_id", + "type": "contains", + "label": "方法 delete_by_id" + }, + { + "id": "edge:12f12047", + "source": "class:KnowledgeBase", + "target": "func:KnowledgeBase.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:a65be9d9", + "source": "class:KnowledgeBase", + "target": "func:KnowledgeBase.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:74b38818", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "class:LocalRAGService", + "type": "contains", + "label": "定义类 LocalRAGService" + }, + { + "id": "edge:69b85c71", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:24b75421", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService.ingest", + "type": "contains", + "label": "方法 ingest" + }, + { + "id": "edge:7b2bb0ed", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService.query", + "type": "contains", + "label": "方法 query" + }, + { + "id": "edge:8d00797c", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService.delete_by_id", + "type": "contains", + "label": "方法 delete_by_id" + }, + { + "id": "edge:9b91a6c6", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:eb125ef2", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:fd20abcc", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService._chunk_document", + "type": "contains", + "label": "方法 _chunk_document" + }, + { + "id": "edge:bc7aaa18", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService._store_chunks", + "type": "contains", + "label": "方法 _store_chunks" + }, + { + "id": "edge:9836a4dc", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService._query_pgvector", + "type": "contains", + "label": "方法 _query_pgvector" + }, + { + "id": "edge:850e2f68", + "source": "class:LocalRAGService", + "target": "func:LocalRAGService._query_client_side", + "type": "contains", + "label": "方法 _query_client_side" + }, + { + "id": "edge:fb349d0e", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "class:InMemoryLocalRAGService", + "type": "contains", + "label": "定义类 InMemoryLocalRAGService" + }, + { + "id": "edge:954cc20e", + "source": "class:InMemoryLocalRAGService", + "target": "func:InMemoryLocalRAGService.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:1cdb26be", + "source": "class:InMemoryLocalRAGService", + "target": "func:InMemoryLocalRAGService.ingest", + "type": "contains", + "label": "方法 ingest" + }, + { + "id": "edge:b9c964ac", + "source": "class:InMemoryLocalRAGService", + "target": "func:InMemoryLocalRAGService.query", + "type": "contains", + "label": "方法 query" + }, + { + "id": "edge:fb897c00", + "source": "class:InMemoryLocalRAGService", + "target": "func:InMemoryLocalRAGService.delete_by_id", + "type": "contains", + "label": "方法 delete_by_id" + }, + { + "id": "edge:348b5bd2", + "source": "class:InMemoryLocalRAGService", + "target": "func:InMemoryLocalRAGService.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:8b70e6da", + "source": "class:InMemoryLocalRAGService", + "target": "func:InMemoryLocalRAGService.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:fb519e11", + "source": "class:InMemoryLocalRAGService", + "target": "func:InMemoryLocalRAGService._chunk_document", + "type": "contains", + "label": "方法 _chunk_document" + }, + { + "id": "edge:ed3990e5", + "source": "file:src/agentkit/memory/models.py", + "target": "class:EpisodeModel", + "type": "contains", + "label": "定义类 EpisodeModel" + }, + { + "id": "edge:a9d0929b", + "source": "file:src/agentkit/memory/multi_source_retriever.py", + "target": "class:MultiSourceRetriever", + "type": "contains", + "label": "定义类 MultiSourceRetriever" + }, + { + "id": "edge:39250dd3", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:af7d97f6", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever.register_source", + "type": "contains", + "label": "方法 register_source" + }, + { + "id": "edge:57f9b9d2", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever.unregister_source", + "type": "contains", + "label": "方法 unregister_source" + }, + { + "id": "edge:734ff6b3", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:d6781205", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever.list_all_sources", + "type": "contains", + "label": "方法 list_all_sources" + }, + { + "id": "edge:ebef8417", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever.get_source_names", + "type": "contains", + "label": "方法 get_source_names" + }, + { + "id": "edge:e630713d", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever._resolve_sources", + "type": "contains", + "label": "方法 _resolve_sources" + }, + { + "id": "edge:c3e0ab9d", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever._query_sources", + "type": "contains", + "label": "方法 _query_sources" + }, + { + "id": "edge:60b3676f", + "source": "class:MultiSourceRetriever", + "target": "func:MultiSourceRetriever._deduplicate", + "type": "contains", + "label": "方法 _deduplicate" + }, + { + "id": "edge:351cbad5", + "source": "file:src/agentkit/memory/profile.py", + "target": "class:MemoryFile", + "type": "contains", + "label": "定义类 MemoryFile" + }, + { + "id": "edge:6dd998b1", + "source": "class:MemoryFile", + "target": "func:MemoryFile.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:cde09280", + "source": "class:MemoryFile", + "target": "func:MemoryFile.read", + "type": "contains", + "label": "方法 read" + }, + { + "id": "edge:64b31aa9", + "source": "class:MemoryFile", + "target": "func:MemoryFile.write", + "type": "contains", + "label": "方法 write" + }, + { + "id": "edge:26e47abc", + "source": "class:MemoryFile", + "target": "func:MemoryFile.read_section", + "type": "contains", + "label": "方法 read_section" + }, + { + "id": "edge:ea1284fd", + "source": "class:MemoryFile", + "target": "func:MemoryFile.add_section", + "type": "contains", + "label": "方法 add_section" + }, + { + "id": "edge:5f80d222", + "source": "class:MemoryFile", + "target": "func:MemoryFile.replace_section", + "type": "contains", + "label": "方法 replace_section" + }, + { + "id": "edge:3e799364", + "source": "class:MemoryFile", + "target": "func:MemoryFile.remove_section", + "type": "contains", + "label": "方法 remove_section" + }, + { + "id": "edge:1c142603", + "source": "class:MemoryFile", + "target": "func:MemoryFile.list_sections", + "type": "contains", + "label": "方法 list_sections" + }, + { + "id": "edge:1ced053e", + "source": "class:MemoryFile", + "target": "func:MemoryFile.trim_to_budget", + "type": "contains", + "label": "方法 trim_to_budget" + }, + { + "id": "edge:a202d735", + "source": "class:MemoryFile", + "target": "func:MemoryFile._trim_content", + "type": "contains", + "label": "方法 _trim_content" + }, + { + "id": "edge:24a80257", + "source": "file:src/agentkit/memory/profile.py", + "target": "class:MemorySnapshot", + "type": "contains", + "label": "定义类 MemorySnapshot" + }, + { + "id": "edge:95fd5ede", + "source": "class:MemorySnapshot", + "target": "func:MemorySnapshot.is_empty", + "type": "contains", + "label": "方法 is_empty" + }, + { + "id": "edge:46114772", + "source": "file:src/agentkit/memory/profile.py", + "target": "class:MemoryStore", + "type": "contains", + "label": "定义类 MemoryStore" + }, + { + "id": "edge:321ad2c1", + "source": "class:MemoryStore", + "target": "func:MemoryStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:01e255f3", + "source": "class:MemoryStore", + "target": "func:MemoryStore.get_file", + "type": "contains", + "label": "方法 get_file" + }, + { + "id": "edge:7eb2aee5", + "source": "class:MemoryStore", + "target": "func:MemoryStore.ensure_defaults", + "type": "contains", + "label": "方法 ensure_defaults" + }, + { + "id": "edge:16953460", + "source": "class:MemoryStore", + "target": "func:MemoryStore.load_all", + "type": "contains", + "label": "方法 load_all" + }, + { + "id": "edge:964b2d7d", + "source": "class:MemoryStore", + "target": "func:MemoryStore.load_daily_logs", + "type": "contains", + "label": "方法 load_daily_logs" + }, + { + "id": "edge:c31b17ab", + "source": "class:MemoryStore", + "target": "func:MemoryStore.archive_old_dailies", + "type": "contains", + "label": "方法 archive_old_dailies" + }, + { + "id": "edge:abd8c11c", + "source": "class:MemoryStore", + "target": "func:MemoryStore.build_system_prompt", + "type": "contains", + "label": "方法 build_system_prompt" + }, + { + "id": "edge:4a6cf7a7", + "source": "class:MemoryStore", + "target": "func:MemoryStore.refresh_system_prompt", + "type": "contains", + "label": "方法 refresh_system_prompt" + }, + { + "id": "edge:be6ffd5e", + "source": "class:MemoryStore", + "target": "func:MemoryStore.notify_change", + "type": "contains", + "label": "方法 notify_change" + }, + { + "id": "edge:8c02f35d", + "source": "file:src/agentkit/memory/query_transformer.py", + "target": "class:TransformedQuery", + "type": "contains", + "label": "定义类 TransformedQuery" + }, + { + "id": "edge:8cec7651", + "source": "file:src/agentkit/memory/query_transformer.py", + "target": "class:QueryTransformerBase", + "type": "contains", + "label": "定义类 QueryTransformerBase" + }, + { + "id": "edge:e4a30fc8", + "source": "class:QueryTransformerBase", + "target": "func:QueryTransformerBase.transform", + "type": "contains", + "label": "方法 transform" + }, + { + "id": "edge:5ee03433", + "source": "file:src/agentkit/memory/query_transformer.py", + "target": "class:LLMQueryTransformer", + "type": "contains", + "label": "定义类 LLMQueryTransformer" + }, + { + "id": "edge:88c52bd9", + "source": "class:LLMQueryTransformer", + "target": "class:QueryTransformerBase", + "type": "extends", + "label": "继承 QueryTransformerBase" + }, + { + "id": "edge:f70f88ce", + "source": "class:LLMQueryTransformer", + "target": "func:LLMQueryTransformer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b9116935", + "source": "class:LLMQueryTransformer", + "target": "func:LLMQueryTransformer.transform", + "type": "contains", + "label": "方法 transform" + }, + { + "id": "edge:a53115a4", + "source": "file:src/agentkit/memory/query_transformer.py", + "target": "class:RuleQueryTransformer", + "type": "contains", + "label": "定义类 RuleQueryTransformer" + }, + { + "id": "edge:5753d12b", + "source": "class:RuleQueryTransformer", + "target": "class:QueryTransformerBase", + "type": "extends", + "label": "继承 QueryTransformerBase" + }, + { + "id": "edge:477d4493", + "source": "class:RuleQueryTransformer", + "target": "func:RuleQueryTransformer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:696355e1", + "source": "class:RuleQueryTransformer", + "target": "func:RuleQueryTransformer.transform", + "type": "contains", + "label": "方法 transform" + }, + { + "id": "edge:d9f19332", + "source": "file:src/agentkit/memory/query_transformer.py", + "target": "class:NoOpQueryTransformer", + "type": "contains", + "label": "定义类 NoOpQueryTransformer" + }, + { + "id": "edge:6900144d", + "source": "class:NoOpQueryTransformer", + "target": "class:QueryTransformerBase", + "type": "extends", + "label": "继承 QueryTransformerBase" + }, + { + "id": "edge:5857a0e5", + "source": "class:NoOpQueryTransformer", + "target": "func:NoOpQueryTransformer.transform", + "type": "contains", + "label": "方法 transform" + }, + { + "id": "edge:ff4f402a", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "class:LoopState", + "type": "contains", + "label": "定义类 LoopState" + }, + { + "id": "edge:446bc7a6", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "class:CorrectionAttempt", + "type": "contains", + "label": "定义类 CorrectionAttempt" + }, + { + "id": "edge:c96fafe6", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "class:RAGLoopResult", + "type": "contains", + "label": "定义类 RAGLoopResult" + }, + { + "id": "edge:c08d2de7", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "class:RAGSelfCorrectionLoop", + "type": "contains", + "label": "定义类 RAGSelfCorrectionLoop" + }, + { + "id": "edge:16172f63", + "source": "class:RAGSelfCorrectionLoop", + "target": "func:RAGSelfCorrectionLoop.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6dff2584", + "source": "class:RAGSelfCorrectionLoop", + "target": "func:RAGSelfCorrectionLoop.retrieve_with_correction", + "type": "contains", + "label": "方法 retrieve_with_correction" + }, + { + "id": "edge:4a8e95a9", + "source": "class:RAGSelfCorrectionLoop", + "target": "func:RAGSelfCorrectionLoop._determine_next_state", + "type": "contains", + "label": "方法 _determine_next_state" + }, + { + "id": "edge:5b0a5224", + "source": "class:RAGSelfCorrectionLoop", + "target": "func:RAGSelfCorrectionLoop._rewrite_query", + "type": "contains", + "label": "方法 _rewrite_query" + }, + { + "id": "edge:fa14cb08", + "source": "file:src/agentkit/memory/relevance_scorer.py", + "target": "class:RelevanceVerdict", + "type": "contains", + "label": "定义类 RelevanceVerdict" + }, + { + "id": "edge:33fe1e9d", + "source": "file:src/agentkit/memory/relevance_scorer.py", + "target": "class:RelevanceScore", + "type": "contains", + "label": "定义类 RelevanceScore" + }, + { + "id": "edge:c13816d7", + "source": "file:src/agentkit/memory/relevance_scorer.py", + "target": "class:RetrievalEvaluation", + "type": "contains", + "label": "定义类 RetrievalEvaluation" + }, + { + "id": "edge:9198e4b9", + "source": "file:src/agentkit/memory/relevance_scorer.py", + "target": "class:RelevanceScorer", + "type": "contains", + "label": "定义类 RelevanceScorer" + }, + { + "id": "edge:de964795", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b84a83ca", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer.score_item", + "type": "contains", + "label": "方法 score_item" + }, + { + "id": "edge:542b6a68", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer.evaluate", + "type": "contains", + "label": "方法 evaluate" + }, + { + "id": "edge:5977ea1c", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer._determine_verdict", + "type": "contains", + "label": "方法 _determine_verdict" + }, + { + "id": "edge:9496d441", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer._tokenize", + "type": "contains", + "label": "方法 _tokenize" + }, + { + "id": "edge:051194d5", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer._jaccard_similarity", + "type": "contains", + "label": "方法 _jaccard_similarity" + }, + { + "id": "edge:713b7a1d", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer._query_coverage", + "type": "contains", + "label": "方法 _query_coverage" + }, + { + "id": "edge:91c50d1c", + "source": "class:RelevanceScorer", + "target": "func:RelevanceScorer._length_score", + "type": "contains", + "label": "方法 _length_score" + }, + { + "id": "edge:9d67b989", + "source": "file:src/agentkit/memory/retriever.py", + "target": "class:MemoryRetriever", + "type": "contains", + "label": "定义类 MemoryRetriever" + }, + { + "id": "edge:b77697c7", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:e3efed1c", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever.retrieve", + "type": "contains", + "label": "方法 retrieve" + }, + { + "id": "edge:1150a939", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever._search_layers", + "type": "contains", + "label": "方法 _search_layers" + }, + { + "id": "edge:184f4608", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever._retrieve_from_sources", + "type": "contains", + "label": "方法 _retrieve_from_sources" + }, + { + "id": "edge:3d315e64", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever.multi_source_retriever", + "type": "contains", + "label": "方法 multi_source_retriever" + }, + { + "id": "edge:2906e839", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever.get_context_string", + "type": "contains", + "label": "方法 get_context_string" + }, + { + "id": "edge:06524b7c", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever._format_structured_header", + "type": "contains", + "label": "方法 _format_structured_header" + }, + { + "id": "edge:8a651ad7", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever.store_episode", + "type": "contains", + "label": "方法 store_episode" + }, + { + "id": "edge:73d82e15", + "source": "class:MemoryRetriever", + "target": "func:MemoryRetriever.create_retrieve_tool", + "type": "contains", + "label": "方法 create_retrieve_tool" + }, + { + "id": "edge:00518a38", + "source": "file:src/agentkit/memory/retriever.py", + "target": "class:RetrieveKnowledgeTool", + "type": "contains", + "label": "定义类 RetrieveKnowledgeTool" + }, + { + "id": "edge:a93ae7a7", + "source": "class:RetrieveKnowledgeTool", + "target": "func:RetrieveKnowledgeTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:2fd266cd", + "source": "class:RetrieveKnowledgeTool", + "target": "func:RetrieveKnowledgeTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:a41cd9c8", + "source": "file:src/agentkit/memory/semantic.py", + "target": "class:SemanticMemory", + "type": "contains", + "label": "定义类 SemanticMemory" + }, + { + "id": "edge:e644ac07", + "source": "class:SemanticMemory", + "target": "class:Memory", + "type": "extends", + "label": "继承 Memory" + }, + { + "id": "edge:8e7557b6", + "source": "class:SemanticMemory", + "target": "func:SemanticMemory.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8bf5ab44", + "source": "class:SemanticMemory", + "target": "func:SemanticMemory.store", + "type": "contains", + "label": "方法 store" + }, + { + "id": "edge:48c317aa", + "source": "class:SemanticMemory", + "target": "func:SemanticMemory.retrieve", + "type": "contains", + "label": "方法 retrieve" + }, + { + "id": "edge:5e4b1a2d", + "source": "class:SemanticMemory", + "target": "func:SemanticMemory.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:4fc4820a", + "source": "class:SemanticMemory", + "target": "func:SemanticMemory.delete", + "type": "contains", + "label": "方法 delete" + }, + { + "id": "edge:cbfeb12c", + "source": "file:src/agentkit/memory/working.py", + "target": "class:WorkingMemory", + "type": "contains", + "label": "定义类 WorkingMemory" + }, + { + "id": "edge:5619096b", + "source": "class:WorkingMemory", + "target": "class:Memory", + "type": "extends", + "label": "继承 Memory" + }, + { + "id": "edge:b2522133", + "source": "class:WorkingMemory", + "target": "func:WorkingMemory.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6eba849f", + "source": "class:WorkingMemory", + "target": "func:WorkingMemory._make_key", + "type": "contains", + "label": "方法 _make_key" + }, + { + "id": "edge:06eb5997", + "source": "class:WorkingMemory", + "target": "func:WorkingMemory.store", + "type": "contains", + "label": "方法 store" + }, + { + "id": "edge:88c1dad9", + "source": "class:WorkingMemory", + "target": "func:WorkingMemory.retrieve", + "type": "contains", + "label": "方法 retrieve" + }, + { + "id": "edge:f35d7dd9", + "source": "class:WorkingMemory", + "target": "func:WorkingMemory.search", + "type": "contains", + "label": "方法 search" + }, + { + "id": "edge:e4ca24bc", + "source": "class:WorkingMemory", + "target": "func:WorkingMemory.delete", + "type": "contains", + "label": "方法 delete" + }, + { + "id": "edge:058914c5", + "source": "class:WorkingMemory", + "target": "func:WorkingMemory.clear", + "type": "contains", + "label": "方法 clear" + }, + { + "id": "edge:6cdf342c", + "source": "file:src/agentkit/orchestrator/compensation.py", + "target": "class:CompletedStep", + "type": "contains", + "label": "定义类 CompletedStep" + }, + { + "id": "edge:62aac460", + "source": "file:src/agentkit/orchestrator/compensation.py", + "target": "class:CompensationResult", + "type": "contains", + "label": "定义类 CompensationResult" + }, + { + "id": "edge:82caacc5", + "source": "file:src/agentkit/orchestrator/compensation.py", + "target": "class:SagaOrchestrator", + "type": "contains", + "label": "定义类 SagaOrchestrator" + }, + { + "id": "edge:dd4885f0", + "source": "class:SagaOrchestrator", + "target": "func:SagaOrchestrator.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:f2f1f754", + "source": "class:SagaOrchestrator", + "target": "func:SagaOrchestrator.record_completed", + "type": "contains", + "label": "方法 record_completed" + }, + { + "id": "edge:776fd192", + "source": "class:SagaOrchestrator", + "target": "func:SagaOrchestrator.compensate", + "type": "contains", + "label": "方法 compensate" + }, + { + "id": "edge:00b0f76d", + "source": "class:SagaOrchestrator", + "target": "func:SagaOrchestrator.clear", + "type": "contains", + "label": "方法 clear" + }, + { + "id": "edge:ac1cee61", + "source": "class:SagaOrchestrator", + "target": "func:SagaOrchestrator.completed_steps", + "type": "contains", + "label": "方法 completed_steps" + }, + { + "id": "edge:81e8e9d1", + "source": "file:src/agentkit/orchestrator/dynamic_pipeline.py", + "target": "class:DynamicPipeline", + "type": "contains", + "label": "定义类 DynamicPipeline" + }, + { + "id": "edge:c8cb5919", + "source": "class:DynamicPipeline", + "target": "func:DynamicPipeline.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:738978b4", + "source": "class:DynamicPipeline", + "target": "func:DynamicPipeline.execute_conditional", + "type": "contains", + "label": "方法 execute_conditional" + }, + { + "id": "edge:ae1af877", + "source": "class:DynamicPipeline", + "target": "func:DynamicPipeline.execute_nested", + "type": "contains", + "label": "方法 execute_nested" + }, + { + "id": "edge:062f3feb", + "source": "class:DynamicPipeline", + "target": "func:DynamicPipeline.execute_loop", + "type": "contains", + "label": "方法 execute_loop" + }, + { + "id": "edge:29278136", + "source": "file:src/agentkit/orchestrator/handoff.py", + "target": "class:HandoffManager", + "type": "contains", + "label": "定义类 HandoffManager" + }, + { + "id": "edge:9de3bd0f", + "source": "class:HandoffManager", + "target": "func:HandoffManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:a1e924c6", + "source": "class:HandoffManager", + "target": "func:HandoffManager.register_handler", + "type": "contains", + "label": "方法 register_handler" + }, + { + "id": "edge:314edda3", + "source": "class:HandoffManager", + "target": "func:HandoffManager.send_handoff", + "type": "contains", + "label": "方法 send_handoff" + }, + { + "id": "edge:4526a951", + "source": "class:HandoffManager", + "target": "func:HandoffManager.listen_for_handoffs", + "type": "contains", + "label": "方法 listen_for_handoffs" + }, + { + "id": "edge:94a7793e", + "source": "class:HandoffManager", + "target": "func:HandoffManager._handle_handoff", + "type": "contains", + "label": "方法 _handle_handoff" + }, + { + "id": "edge:26e26d6e", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "class:PipelineEngine", + "type": "contains", + "label": "定义类 PipelineEngine" + }, + { + "id": "edge:c7f1b41b", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:253b98e1", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:59c934d6", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._adaptive_loop", + "type": "contains", + "label": "方法 _adaptive_loop" + }, + { + "id": "edge:da9d5097", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._execute_pipeline", + "type": "contains", + "label": "方法 _execute_pipeline" + }, + { + "id": "edge:5ad63fcc", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._execute_stage", + "type": "contains", + "label": "方法 _execute_stage" + }, + { + "id": "edge:71d14f2c", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._topological_group", + "type": "contains", + "label": "方法 _topological_group" + }, + { + "id": "edge:4338a9b0", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._resolve_variables", + "type": "contains", + "label": "方法 _resolve_variables" + }, + { + "id": "edge:12650885", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._get_nested", + "type": "contains", + "label": "方法 _get_nested" + }, + { + "id": "edge:25c70a30", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._evaluate_condition", + "type": "contains", + "label": "方法 _evaluate_condition" + }, + { + "id": "edge:3526d413", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._execute_stage_with_adversarial", + "type": "contains", + "label": "方法 _execute_stage_with_adversarial" + }, + { + "id": "edge:1f71e809", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._execute_agent_stage", + "type": "contains", + "label": "方法 _execute_agent_stage" + }, + { + "id": "edge:7272f537", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._execute_verifier", + "type": "contains", + "label": "方法 _execute_verifier" + }, + { + "id": "edge:b5416660", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._build_feedback_context", + "type": "contains", + "label": "方法 _build_feedback_context" + }, + { + "id": "edge:815290e7", + "source": "class:PipelineEngine", + "target": "func:PipelineEngine._escalate", + "type": "contains", + "label": "方法 _escalate" + }, + { + "id": "edge:993bbf04", + "source": "file:src/agentkit/orchestrator/pipeline_loader.py", + "target": "class:PipelineLoader", + "type": "contains", + "label": "定义类 PipelineLoader" + }, + { + "id": "edge:de553a96", + "source": "class:PipelineLoader", + "target": "func:PipelineLoader.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:42dd9e51", + "source": "class:PipelineLoader", + "target": "func:PipelineLoader.load", + "type": "contains", + "label": "方法 load" + }, + { + "id": "edge:3e80c798", + "source": "class:PipelineLoader", + "target": "func:PipelineLoader.load_from_yaml", + "type": "contains", + "label": "方法 load_from_yaml" + }, + { + "id": "edge:d1f2f653", + "source": "class:PipelineLoader", + "target": "func:PipelineLoader.validate_dag", + "type": "contains", + "label": "方法 validate_dag" + }, + { + "id": "edge:34762e65", + "source": "file:src/agentkit/orchestrator/pipeline_models.py", + "target": "class:Base", + "type": "contains", + "label": "定义类 Base" + }, + { + "id": "edge:fcf6bfe0", + "source": "file:src/agentkit/orchestrator/pipeline_models.py", + "target": "class:PipelineExecutionModel", + "type": "contains", + "label": "定义类 PipelineExecutionModel" + }, + { + "id": "edge:14f47a1f", + "source": "class:PipelineExecutionModel", + "target": "class:Base", + "type": "extends", + "label": "继承 Base" + }, + { + "id": "edge:e03a9009", + "source": "file:src/agentkit/orchestrator/pipeline_models.py", + "target": "class:PipelineStepHistoryModel", + "type": "contains", + "label": "定义类 PipelineStepHistoryModel" + }, + { + "id": "edge:390be886", + "source": "class:PipelineStepHistoryModel", + "target": "class:Base", + "type": "extends", + "label": "继承 Base" + }, + { + "id": "edge:4c424270", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:StageStatus", + "type": "contains", + "label": "定义类 StageStatus" + }, + { + "id": "edge:ec223fd5", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:ReviewIssue", + "type": "contains", + "label": "定义类 ReviewIssue" + }, + { + "id": "edge:c23430bf", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:ReviewFeedback", + "type": "contains", + "label": "定义类 ReviewFeedback" + }, + { + "id": "edge:cd2f94c9", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:AdversarialState", + "type": "contains", + "label": "定义类 AdversarialState" + }, + { + "id": "edge:f2c99ad8", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:PipelineStage", + "type": "contains", + "label": "定义类 PipelineStage" + }, + { + "id": "edge:90b7c10b", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:Pipeline", + "type": "contains", + "label": "定义类 Pipeline" + }, + { + "id": "edge:95c7b07a", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:StageResult", + "type": "contains", + "label": "定义类 StageResult" + }, + { + "id": "edge:c15a8e17", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:PipelineResult", + "type": "contains", + "label": "定义类 PipelineResult" + }, + { + "id": "edge:8ceeba4e", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:AdaptiveConfig", + "type": "contains", + "label": "定义类 AdaptiveConfig" + }, + { + "id": "edge:d0caf93d", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "class:ReflectionReport", + "type": "contains", + "label": "定义类 ReflectionReport" + }, + { + "id": "edge:3d34ce9a", + "source": "file:src/agentkit/orchestrator/pipeline_state.py", + "target": "class:PipelineStateMemory", + "type": "contains", + "label": "定义类 PipelineStateMemory" + }, + { + "id": "edge:be5e3a02", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:74d527d3", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.create_execution", + "type": "contains", + "label": "方法 create_execution" + }, + { + "id": "edge:ae69d049", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.update_step", + "type": "contains", + "label": "方法 update_step" + }, + { + "id": "edge:5483dbec", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.complete_execution", + "type": "contains", + "label": "方法 complete_execution" + }, + { + "id": "edge:4d77b38b", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.fail_execution", + "type": "contains", + "label": "方法 fail_execution" + }, + { + "id": "edge:63cf824c", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.get_execution", + "type": "contains", + "label": "方法 get_execution" + }, + { + "id": "edge:4c2e9b4f", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.list_executions", + "type": "contains", + "label": "方法 list_executions" + }, + { + "id": "edge:6c410c47", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.get_step_history", + "type": "contains", + "label": "方法 get_step_history" + }, + { + "id": "edge:66ff8334", + "source": "class:PipelineStateMemory", + "target": "func:PipelineStateMemory.get_execution_sync", + "type": "contains", + "label": "方法 get_execution_sync" + }, + { + "id": "edge:62a1e316", + "source": "file:src/agentkit/orchestrator/pipeline_state.py", + "target": "class:PipelineStateRedis", + "type": "contains", + "label": "定义类 PipelineStateRedis" + }, + { + "id": "edge:1ccda42c", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:81a89f5c", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis._get_redis", + "type": "contains", + "label": "方法 _get_redis" + }, + { + "id": "edge:68595282", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis._safe_redis_call", + "type": "contains", + "label": "方法 _safe_redis_call" + }, + { + "id": "edge:096d05d0", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis._key", + "type": "contains", + "label": "方法 _key" + }, + { + "id": "edge:bc00640c", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.create_execution", + "type": "contains", + "label": "方法 create_execution" + }, + { + "id": "edge:ff82215f", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.update_step", + "type": "contains", + "label": "方法 update_step" + }, + { + "id": "edge:1ae97100", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.complete_execution", + "type": "contains", + "label": "方法 complete_execution" + }, + { + "id": "edge:cdca0bd7", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.fail_execution", + "type": "contains", + "label": "方法 fail_execution" + }, + { + "id": "edge:8ee07e93", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.get_execution", + "type": "contains", + "label": "方法 get_execution" + }, + { + "id": "edge:bb207d1c", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.list_executions", + "type": "contains", + "label": "方法 list_executions" + }, + { + "id": "edge:a46515fb", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.get_step_history", + "type": "contains", + "label": "方法 get_step_history" + }, + { + "id": "edge:58c824f5", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:15d93eb9", + "source": "class:PipelineStateRedis", + "target": "func:PipelineStateRedis.using_fallback", + "type": "contains", + "label": "方法 using_fallback" + }, + { + "id": "edge:922e9b97", + "source": "file:src/agentkit/orchestrator/pipeline_state.py", + "target": "class:PipelineStatePG", + "type": "contains", + "label": "定义类 PipelineStatePG" + }, + { + "id": "edge:127c9127", + "source": "class:PipelineStatePG", + "target": "func:PipelineStatePG.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:f488306e", + "source": "class:PipelineStatePG", + "target": "func:PipelineStatePG.enabled", + "type": "contains", + "label": "方法 enabled" + }, + { + "id": "edge:c846aaf3", + "source": "class:PipelineStatePG", + "target": "func:PipelineStatePG.persist_execution", + "type": "contains", + "label": "方法 persist_execution" + }, + { + "id": "edge:fecf268c", + "source": "class:PipelineStatePG", + "target": "func:PipelineStatePG.persist_step_history", + "type": "contains", + "label": "方法 persist_step_history" + }, + { + "id": "edge:5973cf6e", + "source": "class:PipelineStatePG", + "target": "func:PipelineStatePG.query_executions", + "type": "contains", + "label": "方法 query_executions" + }, + { + "id": "edge:69252c20", + "source": "class:PipelineStatePG", + "target": "func:PipelineStatePG.get_execution", + "type": "contains", + "label": "方法 get_execution" + }, + { + "id": "edge:abb89924", + "source": "class:PipelineStatePG", + "target": "func:PipelineStatePG._model_to_dict", + "type": "contains", + "label": "方法 _model_to_dict" + }, + { + "id": "edge:4f7645fb", + "source": "file:src/agentkit/orchestrator/pipeline_state.py", + "target": "class:PipelineStateManager", + "type": "contains", + "label": "定义类 PipelineStateManager" + }, + { + "id": "edge:a4173369", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:75038b39", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.hot_store", + "type": "contains", + "label": "方法 hot_store" + }, + { + "id": "edge:42569756", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.cold_store", + "type": "contains", + "label": "方法 cold_store" + }, + { + "id": "edge:7468d383", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.create_execution", + "type": "contains", + "label": "方法 create_execution" + }, + { + "id": "edge:b5b0b3e6", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.update_step", + "type": "contains", + "label": "方法 update_step" + }, + { + "id": "edge:2bb60236", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.complete_execution", + "type": "contains", + "label": "方法 complete_execution" + }, + { + "id": "edge:9bb04988", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.fail_execution", + "type": "contains", + "label": "方法 fail_execution" + }, + { + "id": "edge:bc5566f8", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.get_execution", + "type": "contains", + "label": "方法 get_execution" + }, + { + "id": "edge:5eec36c7", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.list_executions", + "type": "contains", + "label": "方法 list_executions" + }, + { + "id": "edge:6ffa9bb7", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.get_step_history", + "type": "contains", + "label": "方法 get_step_history" + }, + { + "id": "edge:7408e8b1", + "source": "class:PipelineStateManager", + "target": "func:PipelineStateManager.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:b49c2a47", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "class:PipelineReflector", + "type": "contains", + "label": "定义类 PipelineReflector" + }, + { + "id": "edge:41458872", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:06bf9a1a", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector.reflect", + "type": "contains", + "label": "方法 reflect" + }, + { + "id": "edge:673e9ff4", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector._find_failure", + "type": "contains", + "label": "方法 _find_failure" + }, + { + "id": "edge:182df1e0", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector._collect_completed_outputs", + "type": "contains", + "label": "方法 _collect_completed_outputs" + }, + { + "id": "edge:2c90fcb8", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector._llm_reflect", + "type": "contains", + "label": "方法 _llm_reflect" + }, + { + "id": "edge:27aabac1", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector._build_reflection_prompt", + "type": "contains", + "label": "方法 _build_reflection_prompt" + }, + { + "id": "edge:5b7f0922", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector._parse_reflection_response", + "type": "contains", + "label": "方法 _parse_reflection_response" + }, + { + "id": "edge:2300e8c4", + "source": "class:PipelineReflector", + "target": "func:PipelineReflector._rule_based_reflect", + "type": "contains", + "label": "方法 _rule_based_reflect" + }, + { + "id": "edge:bcd2f58e", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "class:PipelineReplanner", + "type": "contains", + "label": "定义类 PipelineReplanner" + }, + { + "id": "edge:4c34d405", + "source": "class:PipelineReplanner", + "target": "func:PipelineReplanner.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:2db00c0c", + "source": "class:PipelineReplanner", + "target": "func:PipelineReplanner.replan", + "type": "contains", + "label": "方法 replan" + }, + { + "id": "edge:eff01f6f", + "source": "class:PipelineReplanner", + "target": "func:PipelineReplanner._llm_replan", + "type": "contains", + "label": "方法 _llm_replan" + }, + { + "id": "edge:fc300334", + "source": "class:PipelineReplanner", + "target": "func:PipelineReplanner._parse_pipeline_response", + "type": "contains", + "label": "方法 _parse_pipeline_response" + }, + { + "id": "edge:82adb65b", + "source": "class:PipelineReplanner", + "target": "func:PipelineReplanner._rule_based_replan", + "type": "contains", + "label": "方法 _rule_based_replan" + }, + { + "id": "edge:1e9aef9c", + "source": "class:PipelineReplanner", + "target": "func:PipelineReplanner._adjust_failed_stage", + "type": "contains", + "label": "方法 _adjust_failed_stage" + }, + { + "id": "edge:5399fe4e", + "source": "file:src/agentkit/orchestrator/retry.py", + "target": "class:StepRetryPolicy", + "type": "contains", + "label": "定义类 StepRetryPolicy" + }, + { + "id": "edge:73b70ec5", + "source": "class:StepRetryPolicy", + "target": "func:StepRetryPolicy.calculate_delay", + "type": "contains", + "label": "方法 calculate_delay" + }, + { + "id": "edge:32b376c7", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "class:WorkflowStage", + "type": "contains", + "label": "定义类 WorkflowStage" + }, + { + "id": "edge:7d7d5059", + "source": "class:WorkflowStage", + "target": "class:PipelineStage", + "type": "extends", + "label": "继承 PipelineStage" + }, + { + "id": "edge:9f92a9da", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "class:WorkflowDefinition", + "type": "contains", + "label": "定义类 WorkflowDefinition" + }, + { + "id": "edge:6abf9096", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "class:WorkflowExecution", + "type": "contains", + "label": "定义类 WorkflowExecution" + }, + { + "id": "edge:ccdfd7f6", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "class:WorkflowSummary", + "type": "contains", + "label": "定义类 WorkflowSummary" + }, + { + "id": "edge:aadb313a", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "class:CreateWorkflowRequest", + "type": "contains", + "label": "定义类 CreateWorkflowRequest" + }, + { + "id": "edge:cc36bdc6", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "class:ExecuteWorkflowRequest", + "type": "contains", + "label": "定义类 ExecuteWorkflowRequest" + }, + { + "id": "edge:9e9d0cc2", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "class:ApproveRequest", + "type": "contains", + "label": "定义类 ApproveRequest" + }, + { + "id": "edge:110948c9", + "source": "file:src/agentkit/org/context.py", + "target": "class:AgentProfile", + "type": "contains", + "label": "定义类 AgentProfile" + }, + { + "id": "edge:4a21dd3f", + "source": "file:src/agentkit/org/context.py", + "target": "class:OrganizationContext", + "type": "contains", + "label": "定义类 OrganizationContext" + }, + { + "id": "edge:f9d2aad5", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:9d2c751a", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.register_agent", + "type": "contains", + "label": "方法 register_agent" + }, + { + "id": "edge:8b9c32af", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.unregister_agent", + "type": "contains", + "label": "方法 unregister_agent" + }, + { + "id": "edge:2ed95e2e", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.get_agent_profile", + "type": "contains", + "label": "方法 get_agent_profile" + }, + { + "id": "edge:5d61725f", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.list_agents", + "type": "contains", + "label": "方法 list_agents" + }, + { + "id": "edge:6158ddef", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.find_best_agent", + "type": "contains", + "label": "方法 find_best_agent" + }, + { + "id": "edge:f8591c0a", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.update_load", + "type": "contains", + "label": "方法 update_load" + }, + { + "id": "edge:748639fc", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.set_availability", + "type": "contains", + "label": "方法 set_availability" + }, + { + "id": "edge:f5d551e8", + "source": "class:OrganizationContext", + "target": "func:OrganizationContext.from_agent_pool", + "type": "contains", + "label": "方法 from_agent_pool" + }, + { + "id": "edge:3d6b41b7", + "source": "file:src/agentkit/org/discovery.py", + "target": "class:AgentDiscovery", + "type": "contains", + "label": "定义类 AgentDiscovery" + }, + { + "id": "edge:8049cd2c", + "source": "class:AgentDiscovery", + "target": "func:AgentDiscovery.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8b3ea6c3", + "source": "class:AgentDiscovery", + "target": "func:AgentDiscovery.discover_by_capability", + "type": "contains", + "label": "方法 discover_by_capability" + }, + { + "id": "edge:4866c574", + "source": "class:AgentDiscovery", + "target": "func:AgentDiscovery.discover_by_execution_mode", + "type": "contains", + "label": "方法 discover_by_execution_mode" + }, + { + "id": "edge:db5a0e52", + "source": "class:AgentDiscovery", + "target": "func:AgentDiscovery.discover_available", + "type": "contains", + "label": "方法 discover_available" + }, + { + "id": "edge:e81deaa9", + "source": "class:AgentDiscovery", + "target": "func:AgentDiscovery.recommend_agent", + "type": "contains", + "label": "方法 recommend_agent" + }, + { + "id": "edge:6cf6c42a", + "source": "file:src/agentkit/prompts/section.py", + "target": "class:PromptSection", + "type": "contains", + "label": "定义类 PromptSection" + }, + { + "id": "edge:61d82caf", + "source": "class:PromptSection", + "target": "func:PromptSection.render", + "type": "contains", + "label": "方法 render" + }, + { + "id": "edge:bf81e67f", + "source": "file:src/agentkit/prompts/template.py", + "target": "class:PromptTemplate", + "type": "contains", + "label": "定义类 PromptTemplate" + }, + { + "id": "edge:3a68daaa", + "source": "class:PromptTemplate", + "target": "func:PromptTemplate.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:bfbf2701", + "source": "class:PromptTemplate", + "target": "func:PromptTemplate.render", + "type": "contains", + "label": "方法 render" + }, + { + "id": "edge:da597d1f", + "source": "class:PromptTemplate", + "target": "func:PromptTemplate.sections", + "type": "contains", + "label": "方法 sections" + }, + { + "id": "edge:4254e4bf", + "source": "class:PromptTemplate", + "target": "func:PromptTemplate.render_cached", + "type": "contains", + "label": "方法 render_cached" + }, + { + "id": "edge:4501bdc9", + "source": "class:PromptTemplate", + "target": "func:PromptTemplate.clear_cache", + "type": "contains", + "label": "方法 clear_cache" + }, + { + "id": "edge:78ac4800", + "source": "file:src/agentkit/quality/alignment.py", + "target": "class:AlignmentConfig", + "type": "contains", + "label": "定义类 AlignmentConfig" + }, + { + "id": "edge:5ce8def3", + "source": "class:AlignmentConfig", + "target": "func:AlignmentConfig.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:65fafd2c", + "source": "file:src/agentkit/quality/alignment.py", + "target": "class:AlignmentCheckResult", + "type": "contains", + "label": "定义类 AlignmentCheckResult" + }, + { + "id": "edge:68483c49", + "source": "file:src/agentkit/quality/alignment.py", + "target": "class:CascadeAlert", + "type": "contains", + "label": "定义类 CascadeAlert" + }, + { + "id": "edge:e74d8fc2", + "source": "file:src/agentkit/quality/alignment.py", + "target": "class:ConstraintInjector", + "type": "contains", + "label": "定义类 ConstraintInjector" + }, + { + "id": "edge:92417085", + "source": "class:ConstraintInjector", + "target": "func:ConstraintInjector.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:60a43a2c", + "source": "class:ConstraintInjector", + "target": "func:ConstraintInjector.inject", + "type": "contains", + "label": "方法 inject" + }, + { + "id": "edge:acf4a4af", + "source": "file:src/agentkit/quality/alignment.py", + "target": "class:AlignmentGuard", + "type": "contains", + "label": "定义类 AlignmentGuard" + }, + { + "id": "edge:d07ccc3d", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6b4ed2c6", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard.inject_constraints", + "type": "contains", + "label": "方法 inject_constraints" + }, + { + "id": "edge:df022183", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard.check_output", + "type": "contains", + "label": "方法 check_output" + }, + { + "id": "edge:85e13f07", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard._rule_check", + "type": "contains", + "label": "方法 _rule_check" + }, + { + "id": "edge:6d0b0f00", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard._is_positive_mention", + "type": "contains", + "label": "方法 _is_positive_mention" + }, + { + "id": "edge:8cf09b13", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard._extract_text", + "type": "contains", + "label": "方法 _extract_text" + }, + { + "id": "edge:21948d6b", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard._llm_check", + "type": "contains", + "label": "方法 _llm_check" + }, + { + "id": "edge:c84fc198", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard.record_interaction", + "type": "contains", + "label": "方法 record_interaction" + }, + { + "id": "edge:0b142684", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard.record_loop_depth", + "type": "contains", + "label": "方法 record_loop_depth" + }, + { + "id": "edge:f2e39643", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard.reset_session", + "type": "contains", + "label": "方法 reset_session" + }, + { + "id": "edge:7ff1d9d3", + "source": "class:AlignmentGuard", + "target": "func:AlignmentGuard.get_interaction_count", + "type": "contains", + "label": "方法 get_interaction_count" + }, + { + "id": "edge:c7486a43", + "source": "file:src/agentkit/quality/cascade_detector.py", + "target": "class:CascadeAlert", + "type": "contains", + "label": "定义类 CascadeAlert" + }, + { + "id": "edge:addbe591", + "source": "file:src/agentkit/quality/cascade_detector.py", + "target": "class:CascadeDetector", + "type": "contains", + "label": "定义类 CascadeDetector" + }, + { + "id": "edge:8c4267c4", + "source": "class:CascadeDetector", + "target": "func:CascadeDetector.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:c8f9a3ee", + "source": "class:CascadeDetector", + "target": "func:CascadeDetector.check_interaction", + "type": "contains", + "label": "方法 check_interaction" + }, + { + "id": "edge:39331045", + "source": "class:CascadeDetector", + "target": "func:CascadeDetector.check_depth", + "type": "contains", + "label": "方法 check_depth" + }, + { + "id": "edge:c2ef1111", + "source": "class:CascadeDetector", + "target": "func:CascadeDetector.reset", + "type": "contains", + "label": "方法 reset" + }, + { + "id": "edge:e7a315cb", + "source": "class:CascadeDetector", + "target": "func:CascadeDetector.get_stats", + "type": "contains", + "label": "方法 get_stats" + }, + { + "id": "edge:0f6b16af", + "source": "file:src/agentkit/quality/gate.py", + "target": "class:QualityCheck", + "type": "contains", + "label": "定义类 QualityCheck" + }, + { + "id": "edge:0d502814", + "source": "file:src/agentkit/quality/gate.py", + "target": "class:QualityResult", + "type": "contains", + "label": "定义类 QualityResult" + }, + { + "id": "edge:51c13be3", + "source": "file:src/agentkit/quality/gate.py", + "target": "class:QualityGate", + "type": "contains", + "label": "定义类 QualityGate" + }, + { + "id": "edge:b488ff6c", + "source": "class:QualityGate", + "target": "func:QualityGate.validate", + "type": "contains", + "label": "方法 validate" + }, + { + "id": "edge:b5c6fa4b", + "source": "class:QualityGate", + "target": "func:QualityGate._import_validator", + "type": "contains", + "label": "方法 _import_validator" + }, + { + "id": "edge:581026c6", + "source": "file:src/agentkit/quality/output.py", + "target": "class:OutputMetadata", + "type": "contains", + "label": "定义类 OutputMetadata" + }, + { + "id": "edge:8b665123", + "source": "file:src/agentkit/quality/output.py", + "target": "class:StandardOutput", + "type": "contains", + "label": "定义类 StandardOutput" + }, + { + "id": "edge:61888c68", + "source": "file:src/agentkit/quality/output.py", + "target": "class:OutputStandardizer", + "type": "contains", + "label": "定义类 OutputStandardizer" + }, + { + "id": "edge:8d2122c8", + "source": "class:OutputStandardizer", + "target": "func:OutputStandardizer.standardize", + "type": "contains", + "label": "方法 standardize" + }, + { + "id": "edge:765017b0", + "source": "class:OutputStandardizer", + "target": "func:OutputStandardizer._validate_schema", + "type": "contains", + "label": "方法 _validate_schema" + }, + { + "id": "edge:0253a1de", + "source": "class:OutputStandardizer", + "target": "func:OutputStandardizer._normalize_types", + "type": "contains", + "label": "方法 _normalize_types" + }, + { + "id": "edge:f9dca58e", + "source": "class:OutputStandardizer", + "target": "func:OutputStandardizer._calculate_quality_score", + "type": "contains", + "label": "方法 _calculate_quality_score" + }, + { + "id": "edge:87c26660", + "source": "file:src/agentkit/router/intent.py", + "target": "class:RoutingResult", + "type": "contains", + "label": "定义类 RoutingResult" + }, + { + "id": "edge:ca1f5683", + "source": "file:src/agentkit/router/intent.py", + "target": "class:IntentRouter", + "type": "contains", + "label": "定义类 IntentRouter" + }, + { + "id": "edge:363ae440", + "source": "class:IntentRouter", + "target": "func:IntentRouter.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:e56b7029", + "source": "class:IntentRouter", + "target": "func:IntentRouter.route", + "type": "contains", + "label": "方法 route" + }, + { + "id": "edge:adc35ee7", + "source": "class:IntentRouter", + "target": "func:IntentRouter._match_keywords", + "type": "contains", + "label": "方法 _match_keywords" + }, + { + "id": "edge:1b6a7f16", + "source": "class:IntentRouter", + "target": "func:IntentRouter._classify_with_llm", + "type": "contains", + "label": "方法 _classify_with_llm" + }, + { + "id": "edge:c75349a1", + "source": "class:IntentRouter", + "target": "func:IntentRouter._build_classification_prompt", + "type": "contains", + "label": "方法 _build_classification_prompt" + }, + { + "id": "edge:a06f13af", + "source": "class:IntentRouter", + "target": "func:IntentRouter._parse_llm_response", + "type": "contains", + "label": "方法 _parse_llm_response" + }, + { + "id": "edge:88684a65", + "source": "class:IntentRouter", + "target": "func:IntentRouter._extract_skill_name_from_text", + "type": "contains", + "label": "方法 _extract_skill_name_from_text" + }, + { + "id": "edge:972120d4", + "source": "class:IntentRouter", + "target": "func:IntentRouter._extract_string_values", + "type": "contains", + "label": "方法 _extract_string_values" + }, + { + "id": "edge:8a8b4550", + "source": "file:src/agentkit/server/client.py", + "target": "class:AgentKitClient", + "type": "contains", + "label": "定义类 AgentKitClient" + }, + { + "id": "edge:f36d5c3f", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:a35f5b69", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.create_agent", + "type": "contains", + "label": "方法 create_agent" + }, + { + "id": "edge:9ebb969b", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.list_agents", + "type": "contains", + "label": "方法 list_agents" + }, + { + "id": "edge:7a5b70e0", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.get_agent", + "type": "contains", + "label": "方法 get_agent" + }, + { + "id": "edge:435bb525", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.delete_agent", + "type": "contains", + "label": "方法 delete_agent" + }, + { + "id": "edge:56263f86", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.submit_task", + "type": "contains", + "label": "方法 submit_task" + }, + { + "id": "edge:1660723b", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.register_skill", + "type": "contains", + "label": "方法 register_skill" + }, + { + "id": "edge:59ca0b67", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.list_skills", + "type": "contains", + "label": "方法 list_skills" + }, + { + "id": "edge:f3d911b9", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.get_usage", + "type": "contains", + "label": "方法 get_usage" + }, + { + "id": "edge:31c978bd", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.health", + "type": "contains", + "label": "方法 health" + }, + { + "id": "edge:697494c0", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.submit_task_async", + "type": "contains", + "label": "方法 submit_task_async" + }, + { + "id": "edge:f96d0cb2", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.get_task_status", + "type": "contains", + "label": "方法 get_task_status" + }, + { + "id": "edge:7091e59f", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.cancel_task", + "type": "contains", + "label": "方法 cancel_task" + }, + { + "id": "edge:4ab1dd44", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.list_tasks", + "type": "contains", + "label": "方法 list_tasks" + }, + { + "id": "edge:f2a90298", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.stream_task", + "type": "contains", + "label": "方法 stream_task" + }, + { + "id": "edge:c0b60f5c", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:629bc096", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.__aenter__", + "type": "contains", + "label": "方法 __aenter__" + }, + { + "id": "edge:fc238b5c", + "source": "class:AgentKitClient", + "target": "func:AgentKitClient.__aexit__", + "type": "contains", + "label": "方法 __aexit__" + }, + { + "id": "edge:7d479769", + "source": "file:src/agentkit/server/client_config.py", + "target": "class:ClientConfig", + "type": "contains", + "label": "定义类 ClientConfig" + }, + { + "id": "edge:65ec0bbd", + "source": "class:ClientConfig", + "target": "func:ClientConfig.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:e655143b", + "source": "class:ClientConfig", + "target": "func:ClientConfig.clients", + "type": "contains", + "label": "方法 clients" + }, + { + "id": "edge:3a4930cf", + "source": "class:ClientConfig", + "target": "func:ClientConfig._load_clients", + "type": "contains", + "label": "方法 _load_clients" + }, + { + "id": "edge:f2db2033", + "source": "class:ClientConfig", + "target": "func:ClientConfig.reload", + "type": "contains", + "label": "方法 reload" + }, + { + "id": "edge:70f254fa", + "source": "class:ClientConfig", + "target": "func:ClientConfig.identify_client", + "type": "contains", + "label": "方法 identify_client" + }, + { + "id": "edge:1f28f0e7", + "source": "class:ClientConfig", + "target": "func:ClientConfig.get_client_config", + "type": "contains", + "label": "方法 get_client_config" + }, + { + "id": "edge:95f04e18", + "source": "class:ClientConfig", + "target": "func:ClientConfig.get_skills_dir", + "type": "contains", + "label": "方法 get_skills_dir" + }, + { + "id": "edge:44baf47e", + "source": "class:ClientConfig", + "target": "func:ClientConfig._load_default_config", + "type": "contains", + "label": "方法 _load_default_config" + }, + { + "id": "edge:53ebb445", + "source": "class:ClientConfig", + "target": "func:ClientConfig.validate_api_key", + "type": "contains", + "label": "方法 validate_api_key" + }, + { + "id": "edge:012e4a3e", + "source": "file:src/agentkit/server/config.py", + "target": "class:MCPServerConfig", + "type": "contains", + "label": "定义类 MCPServerConfig" + }, + { + "id": "edge:f32304fa", + "source": "class:MCPServerConfig", + "target": "func:MCPServerConfig.validate", + "type": "contains", + "label": "方法 validate" + }, + { + "id": "edge:536f5d4a", + "source": "class:MCPServerConfig", + "target": "func:MCPServerConfig.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:88156a63", + "source": "file:src/agentkit/server/config.py", + "target": "class:ServerConfig", + "type": "contains", + "label": "定义类 ServerConfig" + }, + { + "id": "edge:2efcc425", + "source": "class:ServerConfig", + "target": "func:ServerConfig.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b72c3cea", + "source": "class:ServerConfig", + "target": "func:ServerConfig.has_llm_provider", + "type": "contains", + "label": "方法 has_llm_provider" + }, + { + "id": "edge:0c48d819", + "source": "class:ServerConfig", + "target": "func:ServerConfig.from_yaml", + "type": "contains", + "label": "方法 from_yaml" + }, + { + "id": "edge:8c739293", + "source": "class:ServerConfig", + "target": "func:ServerConfig.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:1e6c16b2", + "source": "class:ServerConfig", + "target": "func:ServerConfig._build_llm_config", + "type": "contains", + "label": "方法 _build_llm_config" + }, + { + "id": "edge:814c9485", + "source": "class:ServerConfig", + "target": "func:ServerConfig._build_mcp_configs", + "type": "contains", + "label": "方法 _build_mcp_configs" + }, + { + "id": "edge:9426c2ba", + "source": "class:ServerConfig", + "target": "func:ServerConfig.load_skill_configs", + "type": "contains", + "label": "方法 load_skill_configs" + }, + { + "id": "edge:9a5f64c7", + "source": "class:ServerConfig", + "target": "func:ServerConfig.load_dotenv", + "type": "contains", + "label": "方法 load_dotenv" + }, + { + "id": "edge:88fa2ebe", + "source": "class:ServerConfig", + "target": "func:ServerConfig.watch_config", + "type": "contains", + "label": "方法 watch_config" + }, + { + "id": "edge:14e3927a", + "source": "class:ServerConfig", + "target": "func:ServerConfig.stop_watching", + "type": "contains", + "label": "方法 stop_watching" + }, + { + "id": "edge:3075693a", + "source": "class:ServerConfig", + "target": "func:ServerConfig._watch_with_watchfiles", + "type": "contains", + "label": "方法 _watch_with_watchfiles" + }, + { + "id": "edge:56770401", + "source": "class:ServerConfig", + "target": "func:ServerConfig._poll_config_loop", + "type": "contains", + "label": "方法 _poll_config_loop" + }, + { + "id": "edge:c1467c71", + "source": "class:ServerConfig", + "target": "func:ServerConfig._try_reload_config", + "type": "contains", + "label": "方法 _try_reload_config" + }, + { + "id": "edge:0b12de4e", + "source": "file:src/agentkit/server/middleware.py", + "target": "class:APIKeyAuthMiddleware", + "type": "contains", + "label": "定义类 APIKeyAuthMiddleware" + }, + { + "id": "edge:1cf04152", + "source": "class:APIKeyAuthMiddleware", + "target": "func:APIKeyAuthMiddleware.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:e256f73d", + "source": "class:APIKeyAuthMiddleware", + "target": "func:APIKeyAuthMiddleware.dispatch", + "type": "contains", + "label": "方法 dispatch" + }, + { + "id": "edge:3266ab85", + "source": "file:src/agentkit/server/middleware.py", + "target": "class:RateLimiter", + "type": "contains", + "label": "定义类 RateLimiter" + }, + { + "id": "edge:fbf3df20", + "source": "class:RateLimiter", + "target": "func:RateLimiter.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:2c05c189", + "source": "class:RateLimiter", + "target": "func:RateLimiter.is_allowed", + "type": "contains", + "label": "方法 is_allowed" + }, + { + "id": "edge:120448b9", + "source": "class:RateLimiter", + "target": "func:RateLimiter.max_requests", + "type": "contains", + "label": "方法 max_requests" + }, + { + "id": "edge:2defa46a", + "source": "file:src/agentkit/server/middleware.py", + "target": "class:RateLimitMiddleware", + "type": "contains", + "label": "定义类 RateLimitMiddleware" + }, + { + "id": "edge:8c152a59", + "source": "class:RateLimitMiddleware", + "target": "func:RateLimitMiddleware.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:80f7fb53", + "source": "class:RateLimitMiddleware", + "target": "func:RateLimitMiddleware.dispatch", + "type": "contains", + "label": "方法 dispatch" + }, + { + "id": "edge:48b48296", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "class:CreateAgentRequest", + "type": "contains", + "label": "定义类 CreateAgentRequest" + }, + { + "id": "edge:2e39f0c4", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "class:CreateSessionRequest", + "type": "contains", + "label": "定义类 CreateSessionRequest" + }, + { + "id": "edge:99e21bc2", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "class:SendMessageRequest", + "type": "contains", + "label": "定义类 SendMessageRequest" + }, + { + "id": "edge:bbf60dec", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "class:SessionResponse", + "type": "contains", + "label": "定义类 SessionResponse" + }, + { + "id": "edge:88151b95", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "class:MessageResponse", + "type": "contains", + "label": "定义类 MessageResponse" + }, + { + "id": "edge:cdce1872", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "class:ChatConnectionManager", + "type": "contains", + "label": "定义类 ChatConnectionManager" + }, + { + "id": "edge:1644f428", + "source": "class:ChatConnectionManager", + "target": "func:ChatConnectionManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8316d6e1", + "source": "class:ChatConnectionManager", + "target": "func:ChatConnectionManager.add", + "type": "contains", + "label": "方法 add" + }, + { + "id": "edge:5e498c99", + "source": "class:ChatConnectionManager", + "target": "func:ChatConnectionManager.remove", + "type": "contains", + "label": "方法 remove" + }, + { + "id": "edge:1fb67a28", + "source": "class:ChatConnectionManager", + "target": "func:ChatConnectionManager.get_connections", + "type": "contains", + "label": "方法 get_connections" + }, + { + "id": "edge:ff566f3b", + "source": "class:ChatConnectionManager", + "target": "func:ChatConnectionManager.send_json", + "type": "contains", + "label": "方法 send_json" + }, + { + "id": "edge:3ab02b0d", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "class:TriggerEvolutionRequest", + "type": "contains", + "label": "定义类 TriggerEvolutionRequest" + }, + { + "id": "edge:49349ad0", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "class:DashboardExperience", + "type": "contains", + "label": "定义类 DashboardExperience" + }, + { + "id": "edge:27da566c", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "class:DashboardOptimization", + "type": "contains", + "label": "定义类 DashboardOptimization" + }, + { + "id": "edge:6f9784a1", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "class:RecordExperienceRequest", + "type": "contains", + "label": "定义类 RecordExperienceRequest" + }, + { + "id": "edge:978ab195", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "class:RecordOptimizationRequest", + "type": "contains", + "label": "定义类 RecordOptimizationRequest" + }, + { + "id": "edge:a47d0167", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "class:UsageRecordResponse", + "type": "contains", + "label": "定义类 UsageRecordResponse" + }, + { + "id": "edge:4fb952ce", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "class:UsageSummaryResponse", + "type": "contains", + "label": "定义类 UsageSummaryResponse" + }, + { + "id": "edge:9d8953fe", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "class:KnowledgeSource", + "type": "contains", + "label": "定义类 KnowledgeSource" + }, + { + "id": "edge:ac8d237c", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "class:UploadedDocument", + "type": "contains", + "label": "定义类 UploadedDocument" + }, + { + "id": "edge:8ad3cea6", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "class:KnowledgeSourceStore", + "type": "contains", + "label": "定义类 KnowledgeSourceStore" + }, + { + "id": "edge:3f237b7c", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:6c5c1fba", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.add_source", + "type": "contains", + "label": "方法 add_source" + }, + { + "id": "edge:7ed8ec8a", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.get_source", + "type": "contains", + "label": "方法 get_source" + }, + { + "id": "edge:d74a6b64", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.remove_source", + "type": "contains", + "label": "方法 remove_source" + }, + { + "id": "edge:cc1d4355", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.list_sources", + "type": "contains", + "label": "方法 list_sources" + }, + { + "id": "edge:dbbed723", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.add_document", + "type": "contains", + "label": "方法 add_document" + }, + { + "id": "edge:61a4e7d6", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.list_documents", + "type": "contains", + "label": "方法 list_documents" + }, + { + "id": "edge:74ac7dc8", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.delete_document", + "type": "contains", + "label": "方法 delete_document" + }, + { + "id": "edge:16e6d9c4", + "source": "class:KnowledgeSourceStore", + "target": "func:KnowledgeSourceStore.update_source", + "type": "contains", + "label": "方法 update_source" + }, + { + "id": "edge:24dc8e27", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "class:AddSourceRequest", + "type": "contains", + "label": "定义类 AddSourceRequest" + }, + { + "id": "edge:953c90a5", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "class:SearchRequest", + "type": "contains", + "label": "定义类 SearchRequest" + }, + { + "id": "edge:9b19e36f", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "class:SearchResult", + "type": "contains", + "label": "定义类 SearchResult" + }, + { + "id": "edge:5df354f2", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "class:UpdateSourceRequest", + "type": "contains", + "label": "定义类 UpdateSourceRequest" + }, + { + "id": "edge:8de9fc89", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "class:ChatMessage", + "type": "contains", + "label": "定义类 ChatMessage" + }, + { + "id": "edge:536d8955", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "class:Conversation", + "type": "contains", + "label": "定义类 Conversation" + }, + { + "id": "edge:e05949ba", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "class:ConversationStore", + "type": "contains", + "label": "定义类 ConversationStore" + }, + { + "id": "edge:ce4e6484", + "source": "class:ConversationStore", + "target": "func:ConversationStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8fc1396c", + "source": "class:ConversationStore", + "target": "func:ConversationStore.get_or_create", + "type": "contains", + "label": "方法 get_or_create" + }, + { + "id": "edge:d20ee314", + "source": "class:ConversationStore", + "target": "func:ConversationStore.add_message", + "type": "contains", + "label": "方法 add_message" + }, + { + "id": "edge:c7415001", + "source": "class:ConversationStore", + "target": "func:ConversationStore.get_history", + "type": "contains", + "label": "方法 get_history" + }, + { + "id": "edge:df84a1fb", + "source": "class:ConversationStore", + "target": "func:ConversationStore.list_conversations", + "type": "contains", + "label": "方法 list_conversations" + }, + { + "id": "edge:ef03cc76", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "class:ChatRequest", + "type": "contains", + "label": "定义类 ChatRequest" + }, + { + "id": "edge:b80fb9ea", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "class:ChatResponse", + "type": "contains", + "label": "定义类 ChatResponse" + }, + { + "id": "edge:d4c88d78", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "class:CapabilityInfo", + "type": "contains", + "label": "定义类 CapabilityInfo" + }, + { + "id": "edge:16551793", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "class:CapabilitiesResponse", + "type": "contains", + "label": "定义类 CapabilitiesResponse" + }, + { + "id": "edge:8a6e5ce4", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:LlmProviderResponse", + "type": "contains", + "label": "定义类 LlmProviderResponse" + }, + { + "id": "edge:d34ec8a3", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:LlmConfigResponse", + "type": "contains", + "label": "定义类 LlmConfigResponse" + }, + { + "id": "edge:98ab3883", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:LlmProviderUpdate", + "type": "contains", + "label": "定义类 LlmProviderUpdate" + }, + { + "id": "edge:78bf2a2d", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:LlmConfigUpdate", + "type": "contains", + "label": "定义类 LlmConfigUpdate" + }, + { + "id": "edge:bc75ba18", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:SkillsConfigResponse", + "type": "contains", + "label": "定义类 SkillsConfigResponse" + }, + { + "id": "edge:ce6bbca4", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:SkillsConfigUpdate", + "type": "contains", + "label": "定义类 SkillsConfigUpdate" + }, + { + "id": "edge:8680834f", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:KbConfigResponse", + "type": "contains", + "label": "定义类 KbConfigResponse" + }, + { + "id": "edge:3a125fbf", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:KbConfigUpdate", + "type": "contains", + "label": "定义类 KbConfigUpdate" + }, + { + "id": "edge:9b6836d5", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:GeneralConfigResponse", + "type": "contains", + "label": "定义类 GeneralConfigResponse" + }, + { + "id": "edge:e7c5d1d2", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "class:GeneralConfigUpdate", + "type": "contains", + "label": "定义类 GeneralConfigUpdate" + }, + { + "id": "edge:caf0cd35", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "class:SkillInfo", + "type": "contains", + "label": "定义类 SkillInfo" + }, + { + "id": "edge:14431f7e", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "class:SkillDetail", + "type": "contains", + "label": "定义类 SkillDetail" + }, + { + "id": "edge:cb9f18b3", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "class:CapabilityInfo", + "type": "contains", + "label": "定义类 CapabilityInfo" + }, + { + "id": "edge:8d0e8810", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "class:RegisterSkillRequest", + "type": "contains", + "label": "定义类 RegisterSkillRequest" + }, + { + "id": "edge:0e8b8736", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "class:CreatePipelineRequest", + "type": "contains", + "label": "定义类 CreatePipelineRequest" + }, + { + "id": "edge:844a8983", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "class:ExecutePipelineRequest", + "type": "contains", + "label": "定义类 ExecutePipelineRequest" + }, + { + "id": "edge:020becc3", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "class:InstallSkillRequest", + "type": "contains", + "label": "定义类 InstallSkillRequest" + }, + { + "id": "edge:10ff8d73", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "class:SubmitTaskRequest", + "type": "contains", + "label": "定义类 SubmitTaskRequest" + }, + { + "id": "edge:c7a070df", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "class:TerminalSessionState", + "type": "contains", + "label": "定义类 TerminalSessionState" + }, + { + "id": "edge:fcb3e890", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "class:ExecuteRequest", + "type": "contains", + "label": "定义类 ExecuteRequest" + }, + { + "id": "edge:670f589b", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "class:ExecuteResponse", + "type": "contains", + "label": "定义类 ExecuteResponse" + }, + { + "id": "edge:49978d32", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "class:SessionInfo", + "type": "contains", + "label": "定义类 SessionInfo" + }, + { + "id": "edge:5d73e711", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "class:HistoryResponse", + "type": "contains", + "label": "定义类 HistoryResponse" + }, + { + "id": "edge:2d3c26bc", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "class:WorkflowStore", + "type": "contains", + "label": "定义类 WorkflowStore" + }, + { + "id": "edge:d3d92bbd", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:0241a476", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore._evict_execution", + "type": "contains", + "label": "方法 _evict_execution" + }, + { + "id": "edge:611605ee", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.save", + "type": "contains", + "label": "方法 save" + }, + { + "id": "edge:0451cd40", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:01e33536", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.list", + "type": "contains", + "label": "方法 list" + }, + { + "id": "edge:0c396a7e", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.delete", + "type": "contains", + "label": "方法 delete" + }, + { + "id": "edge:fa9da044", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.create_execution", + "type": "contains", + "label": "方法 create_execution" + }, + { + "id": "edge:dd065f74", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.get_execution", + "type": "contains", + "label": "方法 get_execution" + }, + { + "id": "edge:85bf6e3d", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.update_execution", + "type": "contains", + "label": "方法 update_execution" + }, + { + "id": "edge:0b201656", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.get_execution_lock", + "type": "contains", + "label": "方法 get_execution_lock" + }, + { + "id": "edge:df98b469", + "source": "class:WorkflowStore", + "target": "func:WorkflowStore.list_executions", + "type": "contains", + "label": "方法 list_executions" + }, + { + "id": "edge:7c58002f", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "class:ConnectionManager", + "type": "contains", + "label": "定义类 ConnectionManager" + }, + { + "id": "edge:5b37689d", + "source": "class:ConnectionManager", + "target": "func:ConnectionManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b4cffb46", + "source": "class:ConnectionManager", + "target": "func:ConnectionManager.add", + "type": "contains", + "label": "方法 add" + }, + { + "id": "edge:1f8ac0c0", + "source": "class:ConnectionManager", + "target": "func:ConnectionManager.remove", + "type": "contains", + "label": "方法 remove" + }, + { + "id": "edge:b12967ce", + "source": "class:ConnectionManager", + "target": "func:ConnectionManager.get_tokens", + "type": "contains", + "label": "方法 get_tokens" + }, + { + "id": "edge:e482df37", + "source": "class:ConnectionManager", + "target": "func:ConnectionManager.broadcast", + "type": "contains", + "label": "方法 broadcast" + }, + { + "id": "edge:86584fb4", + "source": "class:ConnectionManager", + "target": "func:ConnectionManager.has_connections", + "type": "contains", + "label": "方法 has_connections" + }, + { + "id": "edge:389ba40c", + "source": "file:src/agentkit/server/runner.py", + "target": "class:BackgroundRunner", + "type": "contains", + "label": "定义类 BackgroundRunner" + }, + { + "id": "edge:5bf44677", + "source": "class:BackgroundRunner", + "target": "func:BackgroundRunner.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:93e1a37b", + "source": "class:BackgroundRunner", + "target": "func:BackgroundRunner.active_count", + "type": "contains", + "label": "方法 active_count" + }, + { + "id": "edge:a290b4b7", + "source": "class:BackgroundRunner", + "target": "func:BackgroundRunner.submit", + "type": "contains", + "label": "方法 submit" + }, + { + "id": "edge:9695cf44", + "source": "class:BackgroundRunner", + "target": "func:BackgroundRunner._run_task", + "type": "contains", + "label": "方法 _run_task" + }, + { + "id": "edge:26b954b6", + "source": "class:BackgroundRunner", + "target": "func:BackgroundRunner.cancel", + "type": "contains", + "label": "方法 cancel" + }, + { + "id": "edge:eb1bb391", + "source": "file:src/agentkit/server/task_store.py", + "target": "class:TaskRecord", + "type": "contains", + "label": "定义类 TaskRecord" + }, + { + "id": "edge:889b30aa", + "source": "class:TaskRecord", + "target": "func:TaskRecord.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:10722562", + "source": "class:TaskRecord", + "target": "func:TaskRecord.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:5ffc51f7", + "source": "file:src/agentkit/server/task_store.py", + "target": "class:InMemoryTaskStore", + "type": "contains", + "label": "定义类 InMemoryTaskStore" + }, + { + "id": "edge:b607f7d3", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:3e36f811", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.backend_type", + "type": "contains", + "label": "方法 backend_type" + }, + { + "id": "edge:02f0f2da", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.start_cleanup", + "type": "contains", + "label": "方法 start_cleanup" + }, + { + "id": "edge:3b62261a", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.stop_cleanup", + "type": "contains", + "label": "方法 stop_cleanup" + }, + { + "id": "edge:72335dc5", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore._cleanup_loop", + "type": "contains", + "label": "方法 _cleanup_loop" + }, + { + "id": "edge:da7cd441", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore._cleanup_expired", + "type": "contains", + "label": "方法 _cleanup_expired" + }, + { + "id": "edge:557aa93d", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.create", + "type": "contains", + "label": "方法 create" + }, + { + "id": "edge:b7200acc", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:b4459c96", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.update_status", + "type": "contains", + "label": "方法 update_status" + }, + { + "id": "edge:48a3068c", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.list_tasks", + "type": "contains", + "label": "方法 list_tasks" + }, + { + "id": "edge:5d5ae183", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.count_by_status", + "type": "contains", + "label": "方法 count_by_status" + }, + { + "id": "edge:6f9365ef", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.size", + "type": "contains", + "label": "方法 size" + }, + { + "id": "edge:1705458f", + "source": "class:InMemoryTaskStore", + "target": "func:InMemoryTaskStore.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:8248529c", + "source": "file:src/agentkit/server/task_store.py", + "target": "class:RedisTaskStore", + "type": "contains", + "label": "定义类 RedisTaskStore" + }, + { + "id": "edge:6e188446", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:d38a201f", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.backend_type", + "type": "contains", + "label": "方法 backend_type" + }, + { + "id": "edge:332e2860", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore._get_redis", + "type": "contains", + "label": "方法 _get_redis" + }, + { + "id": "edge:4e366f9f", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore._key", + "type": "contains", + "label": "方法 _key" + }, + { + "id": "edge:97e1f403", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.start_cleanup", + "type": "contains", + "label": "方法 start_cleanup" + }, + { + "id": "edge:352d52d6", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.stop_cleanup", + "type": "contains", + "label": "方法 stop_cleanup" + }, + { + "id": "edge:497a3f91", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.create", + "type": "contains", + "label": "方法 create" + }, + { + "id": "edge:2bded90b", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:65708ee0", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.update_status", + "type": "contains", + "label": "方法 update_status" + }, + { + "id": "edge:dbe2de42", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.list_tasks", + "type": "contains", + "label": "方法 list_tasks" + }, + { + "id": "edge:dd38f83a", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.count_by_status", + "type": "contains", + "label": "方法 count_by_status" + }, + { + "id": "edge:6ffdef58", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.size", + "type": "contains", + "label": "方法 size" + }, + { + "id": "edge:b83e8a7e", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:7a5628df", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore._count_keys", + "type": "contains", + "label": "方法 _count_keys" + }, + { + "id": "edge:e9286722", + "source": "class:RedisTaskStore", + "target": "func:RedisTaskStore._evict_oldest_completed", + "type": "contains", + "label": "方法 _evict_oldest_completed" + }, + { + "id": "edge:08010878", + "source": "file:src/agentkit/session/manager.py", + "target": "class:AsyncWriteQueue", + "type": "contains", + "label": "定义类 AsyncWriteQueue" + }, + { + "id": "edge:22e43b2c", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ebbd89e4", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue._ensure_started", + "type": "contains", + "label": "方法 _ensure_started" + }, + { + "id": "edge:d1cb2144", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue._writer_loop", + "type": "contains", + "label": "方法 _writer_loop" + }, + { + "id": "edge:21c799aa", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue.enqueue", + "type": "contains", + "label": "方法 enqueue" + }, + { + "id": "edge:f30696f9", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue.buffered_messages", + "type": "contains", + "label": "方法 buffered_messages" + }, + { + "id": "edge:73318e2f", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue.pending_count", + "type": "contains", + "label": "方法 pending_count" + }, + { + "id": "edge:b458a0d7", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue.flush", + "type": "contains", + "label": "方法 flush" + }, + { + "id": "edge:7826e75b", + "source": "class:AsyncWriteQueue", + "target": "func:AsyncWriteQueue.stop", + "type": "contains", + "label": "方法 stop" + }, + { + "id": "edge:1cc259b6", + "source": "file:src/agentkit/session/manager.py", + "target": "class:SessionManager", + "type": "contains", + "label": "定义类 SessionManager" + }, + { + "id": "edge:691be1dc", + "source": "class:SessionManager", + "target": "func:SessionManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b18215aa", + "source": "class:SessionManager", + "target": "func:SessionManager.store", + "type": "contains", + "label": "方法 store" + }, + { + "id": "edge:8d8ce21e", + "source": "class:SessionManager", + "target": "func:SessionManager.create_session", + "type": "contains", + "label": "方法 create_session" + }, + { + "id": "edge:37254890", + "source": "class:SessionManager", + "target": "func:SessionManager.get_session", + "type": "contains", + "label": "方法 get_session" + }, + { + "id": "edge:cb7e3a8f", + "source": "class:SessionManager", + "target": "func:SessionManager.pause_session", + "type": "contains", + "label": "方法 pause_session" + }, + { + "id": "edge:a14aba4b", + "source": "class:SessionManager", + "target": "func:SessionManager.resume_session", + "type": "contains", + "label": "方法 resume_session" + }, + { + "id": "edge:27a1134c", + "source": "class:SessionManager", + "target": "func:SessionManager.close_session", + "type": "contains", + "label": "方法 close_session" + }, + { + "id": "edge:d162e6c2", + "source": "class:SessionManager", + "target": "func:SessionManager.delete_session", + "type": "contains", + "label": "方法 delete_session" + }, + { + "id": "edge:a9f83b0e", + "source": "class:SessionManager", + "target": "func:SessionManager.list_sessions", + "type": "contains", + "label": "方法 list_sessions" + }, + { + "id": "edge:084817fe", + "source": "class:SessionManager", + "target": "func:SessionManager.append_message", + "type": "contains", + "label": "方法 append_message" + }, + { + "id": "edge:c42a0991", + "source": "class:SessionManager", + "target": "func:SessionManager.get_messages", + "type": "contains", + "label": "方法 get_messages" + }, + { + "id": "edge:1b6cdea1", + "source": "class:SessionManager", + "target": "func:SessionManager.get_chat_messages", + "type": "contains", + "label": "方法 get_chat_messages" + }, + { + "id": "edge:d4af2300", + "source": "class:SessionManager", + "target": "func:SessionManager.count_messages", + "type": "contains", + "label": "方法 count_messages" + }, + { + "id": "edge:7c8050f6", + "source": "class:SessionManager", + "target": "func:SessionManager.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:dc57df06", + "source": "class:SessionManager", + "target": "func:SessionManager.flush", + "type": "contains", + "label": "方法 flush" + }, + { + "id": "edge:099b9519", + "source": "class:SessionManager", + "target": "func:SessionManager.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:5f8a7333", + "source": "file:src/agentkit/session/models.py", + "target": "class:SessionStatus", + "type": "contains", + "label": "定义类 SessionStatus" + }, + { + "id": "edge:6bb6605d", + "source": "file:src/agentkit/session/models.py", + "target": "class:MessageRole", + "type": "contains", + "label": "定义类 MessageRole" + }, + { + "id": "edge:643d1e2b", + "source": "file:src/agentkit/session/models.py", + "target": "class:Message", + "type": "contains", + "label": "定义类 Message" + }, + { + "id": "edge:cb75db02", + "source": "class:Message", + "target": "func:Message.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:29546fe6", + "source": "class:Message", + "target": "func:Message.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:4be31792", + "source": "class:Message", + "target": "func:Message.to_chat_message", + "type": "contains", + "label": "方法 to_chat_message" + }, + { + "id": "edge:1c6a9a41", + "source": "file:src/agentkit/session/models.py", + "target": "class:Session", + "type": "contains", + "label": "定义类 Session" + }, + { + "id": "edge:0f4aaef2", + "source": "class:Session", + "target": "func:Session.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:c59cde12", + "source": "class:Session", + "target": "func:Session.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:35f2055e", + "source": "class:Session", + "target": "func:Session.new_session_id", + "type": "contains", + "label": "方法 new_session_id" + }, + { + "id": "edge:b67560fa", + "source": "class:Session", + "target": "func:Session.new_message_id", + "type": "contains", + "label": "方法 new_message_id" + }, + { + "id": "edge:1b606b5b", + "source": "file:src/agentkit/session/store.py", + "target": "class:SessionStore", + "type": "contains", + "label": "定义类 SessionStore" + }, + { + "id": "edge:672ed841", + "source": "class:SessionStore", + "target": "func:SessionStore.save_session", + "type": "contains", + "label": "方法 save_session" + }, + { + "id": "edge:ec44d5e6", + "source": "class:SessionStore", + "target": "func:SessionStore.get_session", + "type": "contains", + "label": "方法 get_session" + }, + { + "id": "edge:62ff48d5", + "source": "class:SessionStore", + "target": "func:SessionStore.update_session_status", + "type": "contains", + "label": "方法 update_session_status" + }, + { + "id": "edge:1cf8b0c0", + "source": "class:SessionStore", + "target": "func:SessionStore.delete_session", + "type": "contains", + "label": "方法 delete_session" + }, + { + "id": "edge:000a0427", + "source": "class:SessionStore", + "target": "func:SessionStore.list_sessions", + "type": "contains", + "label": "方法 list_sessions" + }, + { + "id": "edge:fea8b12f", + "source": "class:SessionStore", + "target": "func:SessionStore.append_message", + "type": "contains", + "label": "方法 append_message" + }, + { + "id": "edge:403d2dc4", + "source": "class:SessionStore", + "target": "func:SessionStore.get_messages", + "type": "contains", + "label": "方法 get_messages" + }, + { + "id": "edge:4ba0c104", + "source": "class:SessionStore", + "target": "func:SessionStore.count_messages", + "type": "contains", + "label": "方法 count_messages" + }, + { + "id": "edge:f07c30d4", + "source": "class:SessionStore", + "target": "func:SessionStore.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:1e9fe782", + "source": "file:src/agentkit/session/store.py", + "target": "class:InMemorySessionStore", + "type": "contains", + "label": "定义类 InMemorySessionStore" + }, + { + "id": "edge:97436206", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ab84829b", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.save_session", + "type": "contains", + "label": "方法 save_session" + }, + { + "id": "edge:a07e20fb", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.get_session", + "type": "contains", + "label": "方法 get_session" + }, + { + "id": "edge:278e568b", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.update_session_status", + "type": "contains", + "label": "方法 update_session_status" + }, + { + "id": "edge:e19c45d8", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.delete_session", + "type": "contains", + "label": "方法 delete_session" + }, + { + "id": "edge:b2022dd4", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.list_sessions", + "type": "contains", + "label": "方法 list_sessions" + }, + { + "id": "edge:12f9dac3", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.append_message", + "type": "contains", + "label": "方法 append_message" + }, + { + "id": "edge:75386505", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.get_messages", + "type": "contains", + "label": "方法 get_messages" + }, + { + "id": "edge:91c57909", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.count_messages", + "type": "contains", + "label": "方法 count_messages" + }, + { + "id": "edge:1341704b", + "source": "class:InMemorySessionStore", + "target": "func:InMemorySessionStore.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:ab60096e", + "source": "file:src/agentkit/session/store.py", + "target": "class:RedisSessionStore", + "type": "contains", + "label": "定义类 RedisSessionStore" + }, + { + "id": "edge:ed591064", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:9943ac65", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore._get_redis", + "type": "contains", + "label": "方法 _get_redis" + }, + { + "id": "edge:92034900", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore._session_key", + "type": "contains", + "label": "方法 _session_key" + }, + { + "id": "edge:f1ba07a3", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore._messages_key", + "type": "contains", + "label": "方法 _messages_key" + }, + { + "id": "edge:09461641", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.save_session", + "type": "contains", + "label": "方法 save_session" + }, + { + "id": "edge:965b43da", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.get_session", + "type": "contains", + "label": "方法 get_session" + }, + { + "id": "edge:200f88b4", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.update_session_status", + "type": "contains", + "label": "方法 update_session_status" + }, + { + "id": "edge:d659f6b0", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.delete_session", + "type": "contains", + "label": "方法 delete_session" + }, + { + "id": "edge:5cd541b7", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.list_sessions", + "type": "contains", + "label": "方法 list_sessions" + }, + { + "id": "edge:a4a49b1d", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.append_message", + "type": "contains", + "label": "方法 append_message" + }, + { + "id": "edge:cbfed68a", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.get_messages", + "type": "contains", + "label": "方法 get_messages" + }, + { + "id": "edge:42a0c90f", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.count_messages", + "type": "contains", + "label": "方法 count_messages" + }, + { + "id": "edge:e880041f", + "source": "class:RedisSessionStore", + "target": "func:RedisSessionStore.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:b22d6d4b", + "source": "file:src/agentkit/session/store.py", + "target": "class:FileSessionStore", + "type": "contains", + "label": "定义类 FileSessionStore" + }, + { + "id": "edge:a4d7ab59", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:9653d62f", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore._session_path", + "type": "contains", + "label": "方法 _session_path" + }, + { + "id": "edge:629ca4fa", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore._read_session_file", + "type": "contains", + "label": "方法 _read_session_file" + }, + { + "id": "edge:174ace13", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore._write_session_file", + "type": "contains", + "label": "方法 _write_session_file" + }, + { + "id": "edge:bd63e5d7", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.save_session", + "type": "contains", + "label": "方法 save_session" + }, + { + "id": "edge:03c936d6", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.get_session", + "type": "contains", + "label": "方法 get_session" + }, + { + "id": "edge:197c8340", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.update_session_status", + "type": "contains", + "label": "方法 update_session_status" + }, + { + "id": "edge:f04191a1", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.delete_session", + "type": "contains", + "label": "方法 delete_session" + }, + { + "id": "edge:5552f5d1", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.list_sessions", + "type": "contains", + "label": "方法 list_sessions" + }, + { + "id": "edge:46182a4a", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.append_message", + "type": "contains", + "label": "方法 append_message" + }, + { + "id": "edge:459683f7", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.get_messages", + "type": "contains", + "label": "方法 get_messages" + }, + { + "id": "edge:5fcd4466", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.count_messages", + "type": "contains", + "label": "方法 count_messages" + }, + { + "id": "edge:89699054", + "source": "class:FileSessionStore", + "target": "func:FileSessionStore.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:68b46a3c", + "source": "file:src/agentkit/skills/base.py", + "target": "class:EvolutionConfig", + "type": "contains", + "label": "定义类 EvolutionConfig" + }, + { + "id": "edge:8eab3e75", + "source": "file:src/agentkit/skills/base.py", + "target": "class:IntentConfig", + "type": "contains", + "label": "定义类 IntentConfig" + }, + { + "id": "edge:f52b8ffb", + "source": "file:src/agentkit/skills/base.py", + "target": "class:QualityGateConfig", + "type": "contains", + "label": "定义类 QualityGateConfig" + }, + { + "id": "edge:66339d7d", + "source": "file:src/agentkit/skills/base.py", + "target": "class:SkillConfig", + "type": "contains", + "label": "定义类 SkillConfig" + }, + { + "id": "edge:8da8bdda", + "source": "class:SkillConfig", + "target": "class:AgentConfig", + "type": "extends", + "label": "继承 AgentConfig" + }, + { + "id": "edge:c23131af", + "source": "class:SkillConfig", + "target": "func:SkillConfig.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:db5383a9", + "source": "class:SkillConfig", + "target": "func:SkillConfig._validate_v2", + "type": "contains", + "label": "方法 _validate_v2" + }, + { + "id": "edge:7c70fcbb", + "source": "class:SkillConfig", + "target": "func:SkillConfig._parse_dependencies", + "type": "contains", + "label": "方法 _parse_dependencies" + }, + { + "id": "edge:f0b8123f", + "source": "class:SkillConfig", + "target": "func:SkillConfig._parse_capabilities", + "type": "contains", + "label": "方法 _parse_capabilities" + }, + { + "id": "edge:5ab35968", + "source": "class:SkillConfig", + "target": "func:SkillConfig.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:1f458391", + "source": "class:SkillConfig", + "target": "func:SkillConfig.from_yaml", + "type": "contains", + "label": "方法 from_yaml" + }, + { + "id": "edge:a3bd77d7", + "source": "class:SkillConfig", + "target": "func:SkillConfig.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:51c4ca5f", + "source": "file:src/agentkit/skills/base.py", + "target": "class:Skill", + "type": "contains", + "label": "定义类 Skill" + }, + { + "id": "edge:37bfcfdf", + "source": "class:Skill", + "target": "func:Skill.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:1f84fc11", + "source": "class:Skill", + "target": "func:Skill.name", + "type": "contains", + "label": "方法 name" + }, + { + "id": "edge:976819ec", + "source": "class:Skill", + "target": "func:Skill.version", + "type": "contains", + "label": "方法 version" + }, + { + "id": "edge:cfb0f3a1", + "source": "class:Skill", + "target": "func:Skill.config", + "type": "contains", + "label": "方法 config" + }, + { + "id": "edge:0014fc74", + "source": "class:Skill", + "target": "func:Skill.tools", + "type": "contains", + "label": "方法 tools" + }, + { + "id": "edge:e0d413c6", + "source": "class:Skill", + "target": "func:Skill.capabilities", + "type": "contains", + "label": "方法 capabilities" + }, + { + "id": "edge:e0bffcd0", + "source": "class:Skill", + "target": "func:Skill.dependencies", + "type": "contains", + "label": "方法 dependencies" + }, + { + "id": "edge:9373fd29", + "source": "class:Skill", + "target": "func:Skill.bind_tool", + "type": "contains", + "label": "方法 bind_tool" + }, + { + "id": "edge:51bb8a68", + "source": "class:Skill", + "target": "func:Skill.unbind_tool", + "type": "contains", + "label": "方法 unbind_tool" + }, + { + "id": "edge:a12f038f", + "source": "class:Skill", + "target": "func:Skill.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:a6f22ebd", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "class:PipelineStep", + "type": "contains", + "label": "定义类 PipelineStep" + }, + { + "id": "edge:5407bf2d", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "class:PipelineStepResult", + "type": "contains", + "label": "定义类 PipelineStepResult" + }, + { + "id": "edge:94dd84e1", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "class:PipelineResult", + "type": "contains", + "label": "定义类 PipelineResult" + }, + { + "id": "edge:23750aaf", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "class:GEOPipeline", + "type": "contains", + "label": "定义类 GEOPipeline" + }, + { + "id": "edge:29183fb8", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:83cb9e46", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline.from_config", + "type": "contains", + "label": "方法 from_config" + }, + { + "id": "edge:8759bd89", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:339487d8", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline._execute_step", + "type": "contains", + "label": "方法 _execute_step" + }, + { + "id": "edge:57d694e3", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline._execute_skill", + "type": "contains", + "label": "方法 _execute_skill" + }, + { + "id": "edge:e7af5e96", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline._build_execution_groups", + "type": "contains", + "label": "方法 _build_execution_groups" + }, + { + "id": "edge:408a552a", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline._map_input", + "type": "contains", + "label": "方法 _map_input" + }, + { + "id": "edge:59f1f74c", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline._resolve_mapping_path", + "type": "contains", + "label": "方法 _resolve_mapping_path" + }, + { + "id": "edge:a52df077", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline._evaluate_condition", + "type": "contains", + "label": "方法 _evaluate_condition" + }, + { + "id": "edge:24e7c173", + "source": "class:GEOPipeline", + "target": "func:GEOPipeline._build_final_output", + "type": "contains", + "label": "方法 _build_final_output" + }, + { + "id": "edge:6259cdaa", + "source": "file:src/agentkit/skills/loader.py", + "target": "class:SkillLoader", + "type": "contains", + "label": "定义类 SkillLoader" + }, + { + "id": "edge:4ca2207b", + "source": "class:SkillLoader", + "target": "func:SkillLoader.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:35efbc70", + "source": "class:SkillLoader", + "target": "func:SkillLoader.load_from_directory", + "type": "contains", + "label": "方法 load_from_directory" + }, + { + "id": "edge:5e7e549c", + "source": "class:SkillLoader", + "target": "func:SkillLoader.load_from_file", + "type": "contains", + "label": "方法 load_from_file" + }, + { + "id": "edge:5be9bbd7", + "source": "class:SkillLoader", + "target": "func:SkillLoader._load_skill_from_file", + "type": "contains", + "label": "方法 _load_skill_from_file" + }, + { + "id": "edge:3d4ad507", + "source": "class:SkillLoader", + "target": "func:SkillLoader.load_from_skill_md", + "type": "contains", + "label": "方法 load_from_skill_md" + }, + { + "id": "edge:01c45281", + "source": "class:SkillLoader", + "target": "func:SkillLoader.load_from_entry_points", + "type": "contains", + "label": "方法 load_from_entry_points" + }, + { + "id": "edge:a9bc7e1d", + "source": "class:SkillLoader", + "target": "func:SkillLoader._bind_tools", + "type": "contains", + "label": "方法 _bind_tools" + }, + { + "id": "edge:69ba5b9a", + "source": "file:src/agentkit/skills/pipeline.py", + "target": "class:SkillPipeline", + "type": "contains", + "label": "定义类 SkillPipeline" + }, + { + "id": "edge:8edea2c7", + "source": "class:SkillPipeline", + "target": "func:SkillPipeline.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:f87568b6", + "source": "class:SkillPipeline", + "target": "func:SkillPipeline.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:3e7e21d0", + "source": "class:SkillPipeline", + "target": "func:SkillPipeline._execute_skill", + "type": "contains", + "label": "方法 _execute_skill" + }, + { + "id": "edge:d5fdd226", + "source": "class:SkillPipeline", + "target": "func:SkillPipeline._evaluate_condition", + "type": "contains", + "label": "方法 _evaluate_condition" + }, + { + "id": "edge:25f0c7c0", + "source": "class:SkillPipeline", + "target": "func:SkillPipeline._resolve_path", + "type": "contains", + "label": "方法 _resolve_path" + }, + { + "id": "edge:aff0488a", + "source": "class:SkillPipeline", + "target": "func:SkillPipeline._map_input", + "type": "contains", + "label": "方法 _map_input" + }, + { + "id": "edge:b4b05f8f", + "source": "file:src/agentkit/skills/registry.py", + "target": "class:SkillRegistry", + "type": "contains", + "label": "定义类 SkillRegistry" + }, + { + "id": "edge:2fcd1d28", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:48ef988c", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.register", + "type": "contains", + "label": "方法 register" + }, + { + "id": "edge:ec226090", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.unregister", + "type": "contains", + "label": "方法 unregister" + }, + { + "id": "edge:b37b4c10", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:4b49453c", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.list_skills", + "type": "contains", + "label": "方法 list_skills" + }, + { + "id": "edge:a6a2e0c2", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.update_skill", + "type": "contains", + "label": "方法 update_skill" + }, + { + "id": "edge:755d2436", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.has_skill", + "type": "contains", + "label": "方法 has_skill" + }, + { + "id": "edge:9cab50fc", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.get_versions", + "type": "contains", + "label": "方法 get_versions" + }, + { + "id": "edge:85fcf072", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.query_by_capability", + "type": "contains", + "label": "方法 query_by_capability" + }, + { + "id": "edge:77c416bb", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.health_check", + "type": "contains", + "label": "方法 health_check" + }, + { + "id": "edge:88917b43", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry._check_skill_dependencies", + "type": "contains", + "label": "方法 _check_skill_dependencies" + }, + { + "id": "edge:6d602fc4", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry._check_version_constraint", + "type": "contains", + "label": "方法 _check_version_constraint" + }, + { + "id": "edge:792b0706", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.register_pipeline", + "type": "contains", + "label": "方法 register_pipeline" + }, + { + "id": "edge:daa9c2dc", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.get_pipeline", + "type": "contains", + "label": "方法 get_pipeline" + }, + { + "id": "edge:56393f81", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.list_pipelines", + "type": "contains", + "label": "方法 list_pipelines" + }, + { + "id": "edge:382dbdba", + "source": "class:SkillRegistry", + "target": "func:SkillRegistry.unregister_pipeline", + "type": "contains", + "label": "方法 unregister_pipeline" + }, + { + "id": "edge:fbc97f98", + "source": "file:src/agentkit/skills/schema.py", + "target": "class:DependencyDecl", + "type": "contains", + "label": "定义类 DependencyDecl" + }, + { + "id": "edge:d1e2ad1d", + "source": "file:src/agentkit/skills/schema.py", + "target": "class:CapabilityTag", + "type": "contains", + "label": "定义类 CapabilityTag" + }, + { + "id": "edge:615b1838", + "source": "file:src/agentkit/skills/schema.py", + "target": "class:SkillSpec", + "type": "contains", + "label": "定义类 SkillSpec" + }, + { + "id": "edge:0397b781", + "source": "class:SkillSpec", + "target": "func:SkillSpec.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:a9c0e8e0", + "source": "class:SkillSpec", + "target": "func:SkillSpec.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:dc994e2e", + "source": "class:SkillSpec", + "target": "func:SkillSpec.capability_tags", + "type": "contains", + "label": "方法 capability_tags" + }, + { + "id": "edge:2c3211c3", + "source": "class:SkillSpec", + "target": "func:SkillSpec.required_dependencies", + "type": "contains", + "label": "方法 required_dependencies" + }, + { + "id": "edge:936f1d57", + "source": "class:SkillSpec", + "target": "func:SkillSpec.skill_dependencies", + "type": "contains", + "label": "方法 skill_dependencies" + }, + { + "id": "edge:df518772", + "source": "class:SkillSpec", + "target": "func:SkillSpec.tool_dependencies", + "type": "contains", + "label": "方法 tool_dependencies" + }, + { + "id": "edge:862237e8", + "source": "file:src/agentkit/skills/schema.py", + "target": "class:HealthCheckResult", + "type": "contains", + "label": "定义类 HealthCheckResult" + }, + { + "id": "edge:ab33715e", + "source": "class:HealthCheckResult", + "target": "func:HealthCheckResult.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:c656fa17", + "source": "file:src/agentkit/skills/skill_md.py", + "target": "class:SkillMdParser", + "type": "contains", + "label": "定义类 SkillMdParser" + }, + { + "id": "edge:3254010a", + "source": "class:SkillMdParser", + "target": "func:SkillMdParser.parse", + "type": "contains", + "label": "方法 parse" + }, + { + "id": "edge:2183a5cc", + "source": "class:SkillMdParser", + "target": "func:SkillMdParser.to_skill_config", + "type": "contains", + "label": "方法 to_skill_config" + }, + { + "id": "edge:74026389", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "class:_NoOpCounter", + "type": "contains", + "label": "定义类 _NoOpCounter" + }, + { + "id": "edge:022284e5", + "source": "class:_NoOpCounter", + "target": "func:_NoOpCounter.add", + "type": "contains", + "label": "方法 add" + }, + { + "id": "edge:7805da65", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "class:_NoOpHistogram", + "type": "contains", + "label": "定义类 _NoOpHistogram" + }, + { + "id": "edge:8a80f75d", + "source": "class:_NoOpHistogram", + "target": "func:_NoOpHistogram.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:e1c2307f", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "class:_NoOpUpDownCounter", + "type": "contains", + "label": "定义类 _NoOpUpDownCounter" + }, + { + "id": "edge:9d8739f9", + "source": "class:_NoOpUpDownCounter", + "target": "func:_NoOpUpDownCounter.add", + "type": "contains", + "label": "方法 add" + }, + { + "id": "edge:92291278", + "source": "file:src/agentkit/telemetry/tracer.py", + "target": "class:TelemetryConfig", + "type": "contains", + "label": "定义类 TelemetryConfig" + }, + { + "id": "edge:89b15cc4", + "source": "file:src/agentkit/telemetry/tracer.py", + "target": "class:NoOpSpan", + "type": "contains", + "label": "定义类 NoOpSpan" + }, + { + "id": "edge:a9087b81", + "source": "class:NoOpSpan", + "target": "func:NoOpSpan.__enter__", + "type": "contains", + "label": "方法 __enter__" + }, + { + "id": "edge:5fde9112", + "source": "class:NoOpSpan", + "target": "func:NoOpSpan.__exit__", + "type": "contains", + "label": "方法 __exit__" + }, + { + "id": "edge:7f668d51", + "source": "class:NoOpSpan", + "target": "func:NoOpSpan.set_attribute", + "type": "contains", + "label": "方法 set_attribute" + }, + { + "id": "edge:fd8443f7", + "source": "class:NoOpSpan", + "target": "func:NoOpSpan.add_event", + "type": "contains", + "label": "方法 add_event" + }, + { + "id": "edge:8905f91b", + "source": "class:NoOpSpan", + "target": "func:NoOpSpan.record_exception", + "type": "contains", + "label": "方法 record_exception" + }, + { + "id": "edge:26f85d00", + "source": "class:NoOpSpan", + "target": "func:NoOpSpan.is_recording", + "type": "contains", + "label": "方法 is_recording" + }, + { + "id": "edge:7cf9f4cf", + "source": "file:src/agentkit/telemetry/tracer.py", + "target": "class:NoOpTracer", + "type": "contains", + "label": "定义类 NoOpTracer" + }, + { + "id": "edge:8d32238f", + "source": "class:NoOpTracer", + "target": "func:NoOpTracer.start_span", + "type": "contains", + "label": "方法 start_span" + }, + { + "id": "edge:a7d67081", + "source": "class:NoOpTracer", + "target": "func:NoOpTracer.start_as_current_span", + "type": "contains", + "label": "方法 start_as_current_span" + }, + { + "id": "edge:03ef70d9", + "source": "file:src/agentkit/telemetry/tracer.py", + "target": "class:OTelSpan", + "type": "contains", + "label": "定义类 OTelSpan" + }, + { + "id": "edge:0a64a1ae", + "source": "class:OTelSpan", + "target": "func:OTelSpan.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ff3db179", + "source": "class:OTelSpan", + "target": "func:OTelSpan.__enter__", + "type": "contains", + "label": "方法 __enter__" + }, + { + "id": "edge:603d1f5f", + "source": "class:OTelSpan", + "target": "func:OTelSpan.__exit__", + "type": "contains", + "label": "方法 __exit__" + }, + { + "id": "edge:517d3584", + "source": "class:OTelSpan", + "target": "func:OTelSpan.set_attribute", + "type": "contains", + "label": "方法 set_attribute" + }, + { + "id": "edge:e2988038", + "source": "class:OTelSpan", + "target": "func:OTelSpan.add_event", + "type": "contains", + "label": "方法 add_event" + }, + { + "id": "edge:6e34ed3b", + "source": "class:OTelSpan", + "target": "func:OTelSpan.record_exception", + "type": "contains", + "label": "方法 record_exception" + }, + { + "id": "edge:c74caaa5", + "source": "class:OTelSpan", + "target": "func:OTelSpan.is_recording", + "type": "contains", + "label": "方法 is_recording" + }, + { + "id": "edge:9b967a9a", + "source": "file:src/agentkit/telemetry/tracer.py", + "target": "class:OTelTracer", + "type": "contains", + "label": "定义类 OTelTracer" + }, + { + "id": "edge:55d7a1f7", + "source": "class:OTelTracer", + "target": "func:OTelTracer.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:7a520bfc", + "source": "class:OTelTracer", + "target": "func:OTelTracer.start_span", + "type": "contains", + "label": "方法 start_span" + }, + { + "id": "edge:aaa3e41f", + "source": "class:OTelTracer", + "target": "func:OTelTracer.start_as_current_span", + "type": "contains", + "label": "方法 start_as_current_span" + }, + { + "id": "edge:f4398845", + "source": "file:src/agentkit/telemetry/tracing.py", + "target": "class:_NoOpSpan", + "type": "contains", + "label": "定义类 _NoOpSpan" + }, + { + "id": "edge:eab36bfd", + "source": "class:_NoOpSpan", + "target": "func:_NoOpSpan.__enter__", + "type": "contains", + "label": "方法 __enter__" + }, + { + "id": "edge:b6a52402", + "source": "class:_NoOpSpan", + "target": "func:_NoOpSpan.__exit__", + "type": "contains", + "label": "方法 __exit__" + }, + { + "id": "edge:1f25ad84", + "source": "class:_NoOpSpan", + "target": "func:_NoOpSpan.set_attribute", + "type": "contains", + "label": "方法 set_attribute" + }, + { + "id": "edge:d9cd031d", + "source": "class:_NoOpSpan", + "target": "func:_NoOpSpan.add_event", + "type": "contains", + "label": "方法 add_event" + }, + { + "id": "edge:d5650aa1", + "source": "class:_NoOpSpan", + "target": "func:_NoOpSpan.set_status", + "type": "contains", + "label": "方法 set_status" + }, + { + "id": "edge:a57d3563", + "source": "class:_NoOpSpan", + "target": "func:_NoOpSpan.record_exception", + "type": "contains", + "label": "方法 record_exception" + }, + { + "id": "edge:73d2b0ec", + "source": "file:src/agentkit/tools/agent_tool.py", + "target": "class:AgentTool", + "type": "contains", + "label": "定义类 AgentTool" + }, + { + "id": "edge:5f4e0e38", + "source": "class:AgentTool", + "target": "func:AgentTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:13127164", + "source": "class:AgentTool", + "target": "func:AgentTool.set_dispatcher", + "type": "contains", + "label": "方法 set_dispatcher" + }, + { + "id": "edge:f8165686", + "source": "class:AgentTool", + "target": "func:AgentTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:89ccec3d", + "source": "file:src/agentkit/tools/ask_human.py", + "target": "class:AskHumanTool", + "type": "contains", + "label": "定义类 AskHumanTool" + }, + { + "id": "edge:d2aeac12", + "source": "class:AskHumanTool", + "target": "func:AskHumanTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:46d6438b", + "source": "class:AskHumanTool", + "target": "func:AskHumanTool.configure", + "type": "contains", + "label": "方法 configure" + }, + { + "id": "edge:95063708", + "source": "class:AskHumanTool", + "target": "func:AskHumanTool.parameters", + "type": "contains", + "label": "方法 parameters" + }, + { + "id": "edge:019f9df8", + "source": "class:AskHumanTool", + "target": "func:AskHumanTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:88d53cfd", + "source": "file:src/agentkit/tools/baidu_search.py", + "target": "class:BaiduSearchTool", + "type": "contains", + "label": "定义类 BaiduSearchTool" + }, + { + "id": "edge:88fa57ef", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:e4756a17", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool._default_input_schema", + "type": "contains", + "label": "方法 _default_input_schema" + }, + { + "id": "edge:abc8bd5f", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool._default_output_schema", + "type": "contains", + "label": "方法 _default_output_schema" + }, + { + "id": "edge:e4e90608", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:02763cfd", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool._search_via_api", + "type": "contains", + "label": "方法 _search_via_api" + }, + { + "id": "edge:9fd90781", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool._search_via_scrape", + "type": "contains", + "label": "方法 _search_via_scrape" + }, + { + "id": "edge:c1b438b8", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool._parse_baidu_html", + "type": "contains", + "label": "方法 _parse_baidu_html" + }, + { + "id": "edge:cae6e240", + "source": "class:BaiduSearchTool", + "target": "func:BaiduSearchTool._parse_baidu_html_alt", + "type": "contains", + "label": "方法 _parse_baidu_html_alt" + }, + { + "id": "edge:29564125", + "source": "file:src/agentkit/tools/base.py", + "target": "class:Tool", + "type": "contains", + "label": "定义类 Tool" + }, + { + "id": "edge:18220bf8", + "source": "class:Tool", + "target": "func:Tool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:db3ed220", + "source": "class:Tool", + "target": "func:Tool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:fcd74bed", + "source": "class:Tool", + "target": "func:Tool.before_execute", + "type": "contains", + "label": "方法 before_execute" + }, + { + "id": "edge:b3dbe916", + "source": "class:Tool", + "target": "func:Tool.after_execute", + "type": "contains", + "label": "方法 after_execute" + }, + { + "id": "edge:f0542452", + "source": "class:Tool", + "target": "func:Tool.on_error", + "type": "contains", + "label": "方法 on_error" + }, + { + "id": "edge:1db3334b", + "source": "class:Tool", + "target": "func:Tool.safe_execute", + "type": "contains", + "label": "方法 safe_execute" + }, + { + "id": "edge:c7069195", + "source": "class:Tool", + "target": "func:Tool.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:04ba24c7", + "source": "class:Tool", + "target": "func:Tool.__repr__", + "type": "contains", + "label": "方法 __repr__" + }, + { + "id": "edge:2c75d9fc", + "source": "file:src/agentkit/tools/composition.py", + "target": "class:SequentialChain", + "type": "contains", + "label": "定义类 SequentialChain" + }, + { + "id": "edge:6884a14b", + "source": "class:SequentialChain", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:11692e13", + "source": "class:SequentialChain", + "target": "func:SequentialChain.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:d36f074a", + "source": "class:SequentialChain", + "target": "func:SequentialChain.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:4ca5cdda", + "source": "file:src/agentkit/tools/composition.py", + "target": "class:ParallelFanOut", + "type": "contains", + "label": "定义类 ParallelFanOut" + }, + { + "id": "edge:482be5b5", + "source": "class:ParallelFanOut", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:e5156930", + "source": "class:ParallelFanOut", + "target": "func:ParallelFanOut.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:7b102d9b", + "source": "class:ParallelFanOut", + "target": "func:ParallelFanOut.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:14713582", + "source": "file:src/agentkit/tools/composition.py", + "target": "class:DynamicSelector", + "type": "contains", + "label": "定义类 DynamicSelector" + }, + { + "id": "edge:cf43046a", + "source": "class:DynamicSelector", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:9019719f", + "source": "class:DynamicSelector", + "target": "func:DynamicSelector.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:bd64ee61", + "source": "class:DynamicSelector", + "target": "func:DynamicSelector.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:a6eeedcd", + "source": "class:DynamicSelector", + "target": "func:DynamicSelector._select_by_keyword", + "type": "contains", + "label": "方法 _select_by_keyword" + }, + { + "id": "edge:80939f9c", + "source": "class:DynamicSelector", + "target": "func:DynamicSelector._select_by_llm", + "type": "contains", + "label": "方法 _select_by_llm" + }, + { + "id": "edge:3e97fbfb", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "class:ComputerUseTool", + "type": "contains", + "label": "定义类 ComputerUseTool" + }, + { + "id": "edge:a1218f7c", + "source": "class:ComputerUseTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:4fcac89d", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:069d627d", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._get_http_client", + "type": "contains", + "label": "方法 _get_http_client" + }, + { + "id": "edge:9dc81322", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:586b5f28", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._default_input_schema", + "type": "contains", + "label": "方法 _default_input_schema" + }, + { + "id": "edge:3c728f6b", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._default_output_schema", + "type": "contains", + "label": "方法 _default_output_schema" + }, + { + "id": "edge:20edceae", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:c7b0b329", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._execute_with_fallback", + "type": "contains", + "label": "方法 _execute_with_fallback" + }, + { + "id": "edge:f28d7fb1", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._call_anthropic_api", + "type": "contains", + "label": "方法 _call_anthropic_api" + }, + { + "id": "edge:e5d29e2e", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._validate_params", + "type": "contains", + "label": "方法 _validate_params" + }, + { + "id": "edge:67de4bfa", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._format_result", + "type": "contains", + "label": "方法 _format_result" + }, + { + "id": "edge:ce35b977", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool._error_result", + "type": "contains", + "label": "方法 _error_result" + }, + { + "id": "edge:2a1b1d78", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool.session_manager", + "type": "contains", + "label": "方法 session_manager" + }, + { + "id": "edge:8a2bdec8", + "source": "class:ComputerUseTool", + "target": "func:ComputerUseTool.recorder", + "type": "contains", + "label": "方法 recorder" + }, + { + "id": "edge:761efe1c", + "source": "file:src/agentkit/tools/computer_use_recorder.py", + "target": "class:ActionRecord", + "type": "contains", + "label": "定义类 ActionRecord" + }, + { + "id": "edge:e45a7904", + "source": "class:ActionRecord", + "target": "func:ActionRecord.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:2389453e", + "source": "class:ActionRecord", + "target": "func:ActionRecord.from_dict", + "type": "contains", + "label": "方法 from_dict" + }, + { + "id": "edge:b7c8059c", + "source": "file:src/agentkit/tools/computer_use_recorder.py", + "target": "class:ComputerUseRecorder", + "type": "contains", + "label": "定义类 ComputerUseRecorder" + }, + { + "id": "edge:6890099d", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:b6e30e24", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.record", + "type": "contains", + "label": "方法 record" + }, + { + "id": "edge:5f950ac2", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.get_records", + "type": "contains", + "label": "方法 get_records" + }, + { + "id": "edge:5af02ee4", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.get_records_by_action", + "type": "contains", + "label": "方法 get_records_by_action" + }, + { + "id": "edge:150080a4", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.get_failed_records", + "type": "contains", + "label": "方法 get_failed_records" + }, + { + "id": "edge:ed00b19e", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.replay", + "type": "contains", + "label": "方法 replay" + }, + { + "id": "edge:87f9a40e", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.save_recording", + "type": "contains", + "label": "方法 save_recording" + }, + { + "id": "edge:e38758b7", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.load_recording", + "type": "contains", + "label": "方法 load_recording" + }, + { + "id": "edge:8b09471a", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.clear", + "type": "contains", + "label": "方法 clear" + }, + { + "id": "edge:055d8b86", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.total_actions", + "type": "contains", + "label": "方法 total_actions" + }, + { + "id": "edge:6f7fc703", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.success_count", + "type": "contains", + "label": "方法 success_count" + }, + { + "id": "edge:3a672e7a", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.failure_count", + "type": "contains", + "label": "方法 failure_count" + }, + { + "id": "edge:cb682941", + "source": "class:ComputerUseRecorder", + "target": "func:ComputerUseRecorder.summary", + "type": "contains", + "label": "方法 summary" + }, + { + "id": "edge:e2627472", + "source": "file:src/agentkit/tools/computer_use_session.py", + "target": "class:ScreenInfo", + "type": "contains", + "label": "定义类 ScreenInfo" + }, + { + "id": "edge:a50bda28", + "source": "file:src/agentkit/tools/computer_use_session.py", + "target": "class:ActionResult", + "type": "contains", + "label": "定义类 ActionResult" + }, + { + "id": "edge:62d57f55", + "source": "file:src/agentkit/tools/computer_use_session.py", + "target": "class:ComputerUseSession", + "type": "contains", + "label": "定义类 ComputerUseSession" + }, + { + "id": "edge:d8ef9e30", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:ea8b50a6", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.is_started", + "type": "contains", + "label": "方法 is_started" + }, + { + "id": "edge:fb5128e8", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.start", + "type": "contains", + "label": "方法 start" + }, + { + "id": "edge:bb3e0977", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.stop", + "type": "contains", + "label": "方法 stop" + }, + { + "id": "edge:3ca7c4a8", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.screenshot", + "type": "contains", + "label": "方法 screenshot" + }, + { + "id": "edge:3f1b5a11", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.execute_action", + "type": "contains", + "label": "方法 execute_action" + }, + { + "id": "edge:f67ed0f1", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.record_action", + "type": "contains", + "label": "方法 record_action" + }, + { + "id": "edge:e2c3a328", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.action_history", + "type": "contains", + "label": "方法 action_history" + }, + { + "id": "edge:eecca645", + "source": "class:ComputerUseSession", + "target": "func:ComputerUseSession.__repr__", + "type": "contains", + "label": "方法 __repr__" + }, + { + "id": "edge:5343f0f7", + "source": "file:src/agentkit/tools/computer_use_session.py", + "target": "class:InMemoryComputerUseSession", + "type": "contains", + "label": "定义类 InMemoryComputerUseSession" + }, + { + "id": "edge:d34c11eb", + "source": "class:InMemoryComputerUseSession", + "target": "class:ComputerUseSession", + "type": "extends", + "label": "继承 ComputerUseSession" + }, + { + "id": "edge:4f337c96", + "source": "class:InMemoryComputerUseSession", + "target": "func:InMemoryComputerUseSession.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:3241dc5c", + "source": "class:InMemoryComputerUseSession", + "target": "func:InMemoryComputerUseSession.start", + "type": "contains", + "label": "方法 start" + }, + { + "id": "edge:e3b9b045", + "source": "class:InMemoryComputerUseSession", + "target": "func:InMemoryComputerUseSession.stop", + "type": "contains", + "label": "方法 stop" + }, + { + "id": "edge:eb6125a3", + "source": "class:InMemoryComputerUseSession", + "target": "func:InMemoryComputerUseSession.screenshot", + "type": "contains", + "label": "方法 screenshot" + }, + { + "id": "edge:81f0cdd4", + "source": "class:InMemoryComputerUseSession", + "target": "func:InMemoryComputerUseSession.execute_action", + "type": "contains", + "label": "方法 execute_action" + }, + { + "id": "edge:50e0eb69", + "source": "class:InMemoryComputerUseSession", + "target": "func:InMemoryComputerUseSession._simulate_action", + "type": "contains", + "label": "方法 _simulate_action" + }, + { + "id": "edge:7b22bffa", + "source": "file:src/agentkit/tools/computer_use_session.py", + "target": "class:DockerComputerUseSession", + "type": "contains", + "label": "定义类 DockerComputerUseSession" + }, + { + "id": "edge:cda8e572", + "source": "class:DockerComputerUseSession", + "target": "class:ComputerUseSession", + "type": "extends", + "label": "继承 ComputerUseSession" + }, + { + "id": "edge:ec834df5", + "source": "class:DockerComputerUseSession", + "target": "func:DockerComputerUseSession.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:029ce394", + "source": "class:DockerComputerUseSession", + "target": "func:DockerComputerUseSession.container_id", + "type": "contains", + "label": "方法 container_id" + }, + { + "id": "edge:604c0c20", + "source": "class:DockerComputerUseSession", + "target": "func:DockerComputerUseSession.start", + "type": "contains", + "label": "方法 start" + }, + { + "id": "edge:fcb68515", + "source": "class:DockerComputerUseSession", + "target": "func:DockerComputerUseSession.stop", + "type": "contains", + "label": "方法 stop" + }, + { + "id": "edge:55ffae1e", + "source": "class:DockerComputerUseSession", + "target": "func:DockerComputerUseSession.screenshot", + "type": "contains", + "label": "方法 screenshot" + }, + { + "id": "edge:a8bf5f8a", + "source": "class:DockerComputerUseSession", + "target": "func:DockerComputerUseSession.execute_action", + "type": "contains", + "label": "方法 execute_action" + }, + { + "id": "edge:e03192d5", + "source": "file:src/agentkit/tools/computer_use_session.py", + "target": "class:ComputerUseSessionManager", + "type": "contains", + "label": "定义类 ComputerUseSessionManager" + }, + { + "id": "edge:387fb91b", + "source": "class:ComputerUseSessionManager", + "target": "func:ComputerUseSessionManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:de5523f9", + "source": "class:ComputerUseSessionManager", + "target": "func:ComputerUseSessionManager.get_or_create", + "type": "contains", + "label": "方法 get_or_create" + }, + { + "id": "edge:6b39f8af", + "source": "class:ComputerUseSessionManager", + "target": "func:ComputerUseSessionManager.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:78bbe81f", + "source": "class:ComputerUseSessionManager", + "target": "func:ComputerUseSessionManager.remove", + "type": "contains", + "label": "方法 remove" + }, + { + "id": "edge:080802bf", + "source": "class:ComputerUseSessionManager", + "target": "func:ComputerUseSessionManager.list_sessions", + "type": "contains", + "label": "方法 list_sessions" + }, + { + "id": "edge:a2142c60", + "source": "class:ComputerUseSessionManager", + "target": "func:ComputerUseSessionManager.has_session", + "type": "contains", + "label": "方法 has_session" + }, + { + "id": "edge:5225e968", + "source": "class:ComputerUseSessionManager", + "target": "func:ComputerUseSessionManager.close_all", + "type": "contains", + "label": "方法 close_all" + }, + { + "id": "edge:4524a2c7", + "source": "file:src/agentkit/tools/function_tool.py", + "target": "class:FunctionTool", + "type": "contains", + "label": "定义类 FunctionTool" + }, + { + "id": "edge:601d7fad", + "source": "class:FunctionTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:b47318cf", + "source": "class:FunctionTool", + "target": "func:FunctionTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:66ad9c08", + "source": "class:FunctionTool", + "target": "func:FunctionTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:96463dfe", + "source": "class:FunctionTool", + "target": "func:FunctionTool._infer_schema", + "type": "contains", + "label": "方法 _infer_schema" + }, + { + "id": "edge:ebac7ab3", + "source": "file:src/agentkit/tools/headroom_retrieve.py", + "target": "class:HeadroomRetrieveTool", + "type": "contains", + "label": "定义类 HeadroomRetrieveTool" + }, + { + "id": "edge:5b5dff3d", + "source": "class:HeadroomRetrieveTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:ca8b18a4", + "source": "class:HeadroomRetrieveTool", + "target": "func:HeadroomRetrieveTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:328de0c0", + "source": "class:HeadroomRetrieveTool", + "target": "func:HeadroomRetrieveTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:3c05f944", + "source": "file:src/agentkit/tools/mcp_tool.py", + "target": "class:MCPTool", + "type": "contains", + "label": "定义类 MCPTool" + }, + { + "id": "edge:40de800e", + "source": "class:MCPTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:ad130121", + "source": "class:MCPTool", + "target": "func:MCPTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:a1937ad7", + "source": "class:MCPTool", + "target": "func:MCPTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:093a3226", + "source": "file:src/agentkit/tools/memory_tool.py", + "target": "class:MemoryTool", + "type": "contains", + "label": "定义类 MemoryTool" + }, + { + "id": "edge:d59508bf", + "source": "class:MemoryTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:d659e4d7", + "source": "class:MemoryTool", + "target": "func:MemoryTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:2d3dc229", + "source": "class:MemoryTool", + "target": "func:MemoryTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:1ba24847", + "source": "class:MemoryTool", + "target": "func:MemoryTool._update_soul", + "type": "contains", + "label": "方法 _update_soul" + }, + { + "id": "edge:65f5f9e1", + "source": "file:src/agentkit/tools/output_parser.py", + "target": "class:ErrorType", + "type": "contains", + "label": "定义类 ErrorType" + }, + { + "id": "edge:f320f3a2", + "source": "file:src/agentkit/tools/output_parser.py", + "target": "class:ParsedOutput", + "type": "contains", + "label": "定义类 ParsedOutput" + }, + { + "id": "edge:2b22e4cf", + "source": "class:ParsedOutput", + "target": "func:ParsedOutput.to_dict", + "type": "contains", + "label": "方法 to_dict" + }, + { + "id": "edge:8f60e11d", + "source": "file:src/agentkit/tools/output_parser.py", + "target": "class:OutputParser", + "type": "contains", + "label": "定义类 OutputParser" + }, + { + "id": "edge:5c771560", + "source": "class:OutputParser", + "target": "func:OutputParser.parse", + "type": "contains", + "label": "方法 parse" + }, + { + "id": "edge:071a9619", + "source": "class:OutputParser", + "target": "func:OutputParser._extract_message", + "type": "contains", + "label": "方法 _extract_message" + }, + { + "id": "edge:544c68df", + "source": "class:OutputParser", + "target": "func:OutputParser._classify_error", + "type": "contains", + "label": "方法 _classify_error" + }, + { + "id": "edge:0d646ada", + "source": "file:src/agentkit/tools/pty_session.py", + "target": "class:PTYOutput", + "type": "contains", + "label": "定义类 PTYOutput" + }, + { + "id": "edge:896341b5", + "source": "file:src/agentkit/tools/pty_session.py", + "target": "class:PTYSession", + "type": "contains", + "label": "定义类 PTYSession" + }, + { + "id": "edge:cb0d0956", + "source": "class:PTYSession", + "target": "func:PTYSession.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:dfc1c51c", + "source": "class:PTYSession", + "target": "func:PTYSession.is_running", + "type": "contains", + "label": "方法 is_running" + }, + { + "id": "edge:774bcc44", + "source": "class:PTYSession", + "target": "func:PTYSession.start", + "type": "contains", + "label": "方法 start" + }, + { + "id": "edge:3844b93b", + "source": "class:PTYSession", + "target": "func:PTYSession.run_command", + "type": "contains", + "label": "方法 run_command" + }, + { + "id": "edge:643d25fc", + "source": "class:PTYSession", + "target": "func:PTYSession.send", + "type": "contains", + "label": "方法 send" + }, + { + "id": "edge:71e0fb74", + "source": "class:PTYSession", + "target": "func:PTYSession.read_output", + "type": "contains", + "label": "方法 read_output" + }, + { + "id": "edge:87b9bd8f", + "source": "class:PTYSession", + "target": "func:PTYSession.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:e289ae10", + "source": "class:PTYSession", + "target": "func:PTYSession._read_until_exit", + "type": "contains", + "label": "方法 _read_until_exit" + }, + { + "id": "edge:bdc7328e", + "source": "class:PTYSession", + "target": "func:PTYSession._drain_remaining_output", + "type": "contains", + "label": "方法 _drain_remaining_output" + }, + { + "id": "edge:df1a2e77", + "source": "class:PTYSession", + "target": "func:PTYSession._try_auto_respond", + "type": "contains", + "label": "方法 _try_auto_respond" + }, + { + "id": "edge:aa6d9f10", + "source": "file:src/agentkit/tools/registry.py", + "target": "class:ToolRegistry", + "type": "contains", + "label": "定义类 ToolRegistry" + }, + { + "id": "edge:39553864", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8c324077", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.register", + "type": "contains", + "label": "方法 register" + }, + { + "id": "edge:3b7d3833", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.unregister", + "type": "contains", + "label": "方法 unregister" + }, + { + "id": "edge:5d0236f8", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:8bb1b360", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.list_tools", + "type": "contains", + "label": "方法 list_tools" + }, + { + "id": "edge:987e5c3b", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.list_all_versions", + "type": "contains", + "label": "方法 list_all_versions" + }, + { + "id": "edge:40ec4433", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.has_tool", + "type": "contains", + "label": "方法 has_tool" + }, + { + "id": "edge:8c5be34b", + "source": "class:ToolRegistry", + "target": "func:ToolRegistry.clear", + "type": "contains", + "label": "方法 clear" + }, + { + "id": "edge:967ac024", + "source": "file:src/agentkit/tools/schema_tools.py", + "target": "class:SchemaExtractTool", + "type": "contains", + "label": "定义类 SchemaExtractTool" + }, + { + "id": "edge:7f3e349f", + "source": "class:SchemaExtractTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:7cc22ccf", + "source": "class:SchemaExtractTool", + "target": "func:SchemaExtractTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:3345cbdf", + "source": "class:SchemaExtractTool", + "target": "func:SchemaExtractTool._default_input_schema", + "type": "contains", + "label": "方法 _default_input_schema" + }, + { + "id": "edge:fc9bfed0", + "source": "class:SchemaExtractTool", + "target": "func:SchemaExtractTool._default_output_schema", + "type": "contains", + "label": "方法 _default_output_schema" + }, + { + "id": "edge:1a99ddb9", + "source": "class:SchemaExtractTool", + "target": "func:SchemaExtractTool._is_url", + "type": "contains", + "label": "方法 _is_url" + }, + { + "id": "edge:cefd7782", + "source": "class:SchemaExtractTool", + "target": "func:SchemaExtractTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:100fb303", + "source": "file:src/agentkit/tools/schema_tools.py", + "target": "class:SchemaGenerateTool", + "type": "contains", + "label": "定义类 SchemaGenerateTool" + }, + { + "id": "edge:a558773a", + "source": "class:SchemaGenerateTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:f7bd31af", + "source": "class:SchemaGenerateTool", + "target": "func:SchemaGenerateTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8dd9fdf9", + "source": "class:SchemaGenerateTool", + "target": "func:SchemaGenerateTool._default_input_schema", + "type": "contains", + "label": "方法 _default_input_schema" + }, + { + "id": "edge:96b9cdef", + "source": "class:SchemaGenerateTool", + "target": "func:SchemaGenerateTool._default_output_schema", + "type": "contains", + "label": "方法 _default_output_schema" + }, + { + "id": "edge:70d22e21", + "source": "class:SchemaGenerateTool", + "target": "func:SchemaGenerateTool._generate_manual", + "type": "contains", + "label": "方法 _generate_manual" + }, + { + "id": "edge:29cd6675", + "source": "class:SchemaGenerateTool", + "target": "func:SchemaGenerateTool._generate_with_schemaorg", + "type": "contains", + "label": "方法 _generate_with_schemaorg" + }, + { + "id": "edge:984476f2", + "source": "class:SchemaGenerateTool", + "target": "func:SchemaGenerateTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:73ad39c0", + "source": "file:src/agentkit/tools/shell.py", + "target": "class:ShellTool", + "type": "contains", + "label": "定义类 ShellTool" + }, + { + "id": "edge:8fe84fb5", + "source": "class:ShellTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:a362268b", + "source": "class:ShellTool", + "target": "func:ShellTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:06936dab", + "source": "class:ShellTool", + "target": "func:ShellTool._default_input_schema", + "type": "contains", + "label": "方法 _default_input_schema" + }, + { + "id": "edge:726c0e3d", + "source": "class:ShellTool", + "target": "func:ShellTool._default_output_schema", + "type": "contains", + "label": "方法 _default_output_schema" + }, + { + "id": "edge:e8d23c45", + "source": "class:ShellTool", + "target": "func:ShellTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:8e6a6586", + "source": "class:ShellTool", + "target": "func:ShellTool._execute_standalone", + "type": "contains", + "label": "方法 _execute_standalone" + }, + { + "id": "edge:0ec0b04d", + "source": "class:ShellTool", + "target": "func:ShellTool._execute_in_session", + "type": "contains", + "label": "方法 _execute_in_session" + }, + { + "id": "edge:d00dce01", + "source": "class:ShellTool", + "target": "func:ShellTool._execute_with_pty", + "type": "contains", + "label": "方法 _execute_with_pty" + }, + { + "id": "edge:f48d722a", + "source": "class:ShellTool", + "target": "func:ShellTool._is_dangerous", + "type": "contains", + "label": "方法 _is_dangerous" + }, + { + "id": "edge:40f97213", + "source": "class:ShellTool", + "target": "func:ShellTool._is_single_command_dangerous", + "type": "contains", + "label": "方法 _is_single_command_dangerous" + }, + { + "id": "edge:e84b0b4c", + "source": "class:ShellTool", + "target": "func:ShellTool._request_confirmation", + "type": "contains", + "label": "方法 _request_confirmation" + }, + { + "id": "edge:49e1b48c", + "source": "class:ShellTool", + "target": "func:ShellTool._log_audit", + "type": "contains", + "label": "方法 _log_audit" + }, + { + "id": "edge:36c25aab", + "source": "class:ShellTool", + "target": "func:ShellTool.session_manager", + "type": "contains", + "label": "方法 session_manager" + }, + { + "id": "edge:3110856d", + "source": "class:ShellTool", + "target": "func:ShellTool.audit_log", + "type": "contains", + "label": "方法 audit_log" + }, + { + "id": "edge:8d34b3e5", + "source": "file:src/agentkit/tools/skill_install.py", + "target": "class:SkillInstallTool", + "type": "contains", + "label": "定义类 SkillInstallTool" + }, + { + "id": "edge:34c89006", + "source": "class:SkillInstallTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:00cdd3aa", + "source": "class:SkillInstallTool", + "target": "func:SkillInstallTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:3f6fff81", + "source": "class:SkillInstallTool", + "target": "func:SkillInstallTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:ac415f5e", + "source": "class:SkillInstallTool", + "target": "func:SkillInstallTool._try_register_skill", + "type": "contains", + "label": "方法 _try_register_skill" + }, + { + "id": "edge:e7c59979", + "source": "file:src/agentkit/tools/terminal_session.py", + "target": "class:CommandRecord", + "type": "contains", + "label": "定义类 CommandRecord" + }, + { + "id": "edge:4d7b1d56", + "source": "file:src/agentkit/tools/terminal_session.py", + "target": "class:TerminalSession", + "type": "contains", + "label": "定义类 TerminalSession" + }, + { + "id": "edge:65651d7f", + "source": "class:TerminalSession", + "target": "func:TerminalSession.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:f4ba33b8", + "source": "class:TerminalSession", + "target": "func:TerminalSession.cwd", + "type": "contains", + "label": "方法 cwd" + }, + { + "id": "edge:915231f9", + "source": "class:TerminalSession", + "target": "func:TerminalSession.env", + "type": "contains", + "label": "方法 env" + }, + { + "id": "edge:5bc38d61", + "source": "class:TerminalSession", + "target": "func:TerminalSession.history", + "type": "contains", + "label": "方法 history" + }, + { + "id": "edge:0dee2d37", + "source": "class:TerminalSession", + "target": "func:TerminalSession.created_at", + "type": "contains", + "label": "方法 created_at" + }, + { + "id": "edge:483a32a8", + "source": "class:TerminalSession", + "target": "func:TerminalSession.get_cwd", + "type": "contains", + "label": "方法 get_cwd" + }, + { + "id": "edge:91dd467e", + "source": "class:TerminalSession", + "target": "func:TerminalSession.set_cwd", + "type": "contains", + "label": "方法 set_cwd" + }, + { + "id": "edge:2b7a653e", + "source": "class:TerminalSession", + "target": "func:TerminalSession.get_env", + "type": "contains", + "label": "方法 get_env" + }, + { + "id": "edge:7253a357", + "source": "class:TerminalSession", + "target": "func:TerminalSession.set_env", + "type": "contains", + "label": "方法 set_env" + }, + { + "id": "edge:b50f634a", + "source": "class:TerminalSession", + "target": "func:TerminalSession.update_env", + "type": "contains", + "label": "方法 update_env" + }, + { + "id": "edge:25f22232", + "source": "class:TerminalSession", + "target": "func:TerminalSession.get_history", + "type": "contains", + "label": "方法 get_history" + }, + { + "id": "edge:0eb410a6", + "source": "class:TerminalSession", + "target": "func:TerminalSession.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:e5f86022", + "source": "class:TerminalSession", + "target": "func:TerminalSession._build_command", + "type": "contains", + "label": "方法 _build_command" + }, + { + "id": "edge:d6ba01ab", + "source": "class:TerminalSession", + "target": "func:TerminalSession._update_state_after_execution", + "type": "contains", + "label": "方法 _update_state_after_execution" + }, + { + "id": "edge:96917e07", + "source": "class:TerminalSession", + "target": "func:TerminalSession._parse_cd_commands", + "type": "contains", + "label": "方法 _parse_cd_commands" + }, + { + "id": "edge:7565d581", + "source": "class:TerminalSession", + "target": "func:TerminalSession._parse_export_commands", + "type": "contains", + "label": "方法 _parse_export_commands" + }, + { + "id": "edge:ed7e9b60", + "source": "class:TerminalSession", + "target": "func:TerminalSession._add_history", + "type": "contains", + "label": "方法 _add_history" + }, + { + "id": "edge:b8b5d8a4", + "source": "class:TerminalSession", + "target": "func:TerminalSession.close", + "type": "contains", + "label": "方法 close" + }, + { + "id": "edge:e2effc8b", + "source": "file:src/agentkit/tools/terminal_session.py", + "target": "class:TerminalSessionManager", + "type": "contains", + "label": "定义类 TerminalSessionManager" + }, + { + "id": "edge:b359adf9", + "source": "class:TerminalSessionManager", + "target": "func:TerminalSessionManager.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:aca75a75", + "source": "class:TerminalSessionManager", + "target": "func:TerminalSessionManager.get_or_create", + "type": "contains", + "label": "方法 get_or_create" + }, + { + "id": "edge:e9bbde4a", + "source": "class:TerminalSessionManager", + "target": "func:TerminalSessionManager.get", + "type": "contains", + "label": "方法 get" + }, + { + "id": "edge:481a6432", + "source": "class:TerminalSessionManager", + "target": "func:TerminalSessionManager.remove", + "type": "contains", + "label": "方法 remove" + }, + { + "id": "edge:3601877b", + "source": "class:TerminalSessionManager", + "target": "func:TerminalSessionManager.list_sessions", + "type": "contains", + "label": "方法 list_sessions" + }, + { + "id": "edge:61e559a6", + "source": "class:TerminalSessionManager", + "target": "func:TerminalSessionManager.has_session", + "type": "contains", + "label": "方法 has_session" + }, + { + "id": "edge:d218bbf7", + "source": "class:TerminalSessionManager", + "target": "func:TerminalSessionManager.close_all", + "type": "contains", + "label": "方法 close_all" + }, + { + "id": "edge:afd78926", + "source": "file:src/agentkit/tools/web_crawl.py", + "target": "class:WebCrawlTool", + "type": "contains", + "label": "定义类 WebCrawlTool" + }, + { + "id": "edge:bf886771", + "source": "class:WebCrawlTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:cc810bf9", + "source": "class:WebCrawlTool", + "target": "func:WebCrawlTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:8615914e", + "source": "class:WebCrawlTool", + "target": "func:WebCrawlTool._default_input_schema", + "type": "contains", + "label": "方法 _default_input_schema" + }, + { + "id": "edge:0340d445", + "source": "class:WebCrawlTool", + "target": "func:WebCrawlTool._default_output_schema", + "type": "contains", + "label": "方法 _default_output_schema" + }, + { + "id": "edge:79331b1f", + "source": "class:WebCrawlTool", + "target": "func:WebCrawlTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:4185b858", + "source": "file:src/agentkit/tools/web_search.py", + "target": "class:WebSearchTool", + "type": "contains", + "label": "定义类 WebSearchTool" + }, + { + "id": "edge:40d33f60", + "source": "class:WebSearchTool", + "target": "class:Tool", + "type": "extends", + "label": "继承 Tool" + }, + { + "id": "edge:5359bf0f", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool.__init__", + "type": "contains", + "label": "方法 __init__" + }, + { + "id": "edge:d2e99b5e", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._default_input_schema", + "type": "contains", + "label": "方法 _default_input_schema" + }, + { + "id": "edge:e82082a5", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._default_output_schema", + "type": "contains", + "label": "方法 _default_output_schema" + }, + { + "id": "edge:898ed4b2", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool.execute", + "type": "contains", + "label": "方法 execute" + }, + { + "id": "edge:54f1380c", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._search_tavily", + "type": "contains", + "label": "方法 _search_tavily" + }, + { + "id": "edge:ca87c37d", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._search_serper", + "type": "contains", + "label": "方法 _search_serper" + }, + { + "id": "edge:aefb8982", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._search_duckduckgo", + "type": "contains", + "label": "方法 _search_duckduckgo" + }, + { + "id": "edge:728f9727", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._contains_cjk", + "type": "contains", + "label": "方法 _contains_cjk" + }, + { + "id": "edge:dda8912f", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._cjk_to_english_hint", + "type": "contains", + "label": "方法 _cjk_to_english_hint" + }, + { + "id": "edge:72d4f49d", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._search_duckduckgo_html", + "type": "contains", + "label": "方法 _search_duckduckgo_html" + }, + { + "id": "edge:90a0e27e", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._search_duckduckgo_instant", + "type": "contains", + "label": "方法 _search_duckduckgo_instant" + }, + { + "id": "edge:1637f15e", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._search_bing", + "type": "contains", + "label": "方法 _search_bing" + }, + { + "id": "edge:81e46d5f", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._parse_bing_html", + "type": "contains", + "label": "方法 _parse_bing_html" + }, + { + "id": "edge:c9f48848", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._parse_duckduckgo_html", + "type": "contains", + "label": "方法 _parse_duckduckgo_html" + }, + { + "id": "edge:38295222", + "source": "class:WebSearchTool", + "target": "func:WebSearchTool._parse_duckduckgo_html_alt", + "type": "contains", + "label": "方法 _parse_duckduckgo_html_alt" + }, + { + "id": "edge:848cb46e", + "source": "file:configs/geo_handlers.py", + "target": "func:_internal_headers", + "type": "contains", + "label": "定义函数 _internal_headers" + }, + { + "id": "edge:67b47e02", + "source": "file:configs/geo_handlers.py", + "target": "func:handle_citation_task", + "type": "contains", + "label": "定义函数 handle_citation_task" + }, + { + "id": "edge:1104d283", + "source": "file:configs/geo_handlers.py", + "target": "func:handle_monitor_task", + "type": "contains", + "label": "定义函数 handle_monitor_task" + }, + { + "id": "edge:d43f3a0c", + "source": "file:configs/geo_handlers.py", + "target": "func:handle_schema_task", + "type": "contains", + "label": "定义函数 handle_schema_task" + }, + { + "id": "edge:6f8f8930", + "source": "file:configs/geo_handlers.py", + "target": "func:_call_internal", + "type": "contains", + "label": "定义函数 _call_internal" + }, + { + "id": "edge:a3ac3fc5", + "source": "file:configs/geo_server.py", + "target": "func:_substitute_env_vars", + "type": "contains", + "label": "定义函数 _substitute_env_vars" + }, + { + "id": "edge:ae754f0f", + "source": "file:configs/geo_server.py", + "target": "func:_init_llm_gateway", + "type": "contains", + "label": "定义函数 _init_llm_gateway" + }, + { + "id": "edge:862689ea", + "source": "file:configs/geo_server.py", + "target": "func:_init_tool_registry", + "type": "contains", + "label": "定义函数 _init_tool_registry" + }, + { + "id": "edge:27205d95", + "source": "file:configs/geo_server.py", + "target": "func:_init_skill_registry", + "type": "contains", + "label": "定义函数 _init_skill_registry" + }, + { + "id": "edge:b41f498f", + "source": "file:configs/geo_server.py", + "target": "func:create_geo_app", + "type": "contains", + "label": "定义函数 create_geo_app" + }, + { + "id": "edge:bb884b89", + "source": "file:configs/geo_tools.py", + "target": "func:_internal_headers", + "type": "contains", + "label": "定义函数 _internal_headers" + }, + { + "id": "edge:05b4be9d", + "source": "file:configs/geo_tools.py", + "target": "func:execute_single_platform", + "type": "contains", + "label": "定义函数 execute_single_platform" + }, + { + "id": "edge:f699ceed", + "source": "file:configs/geo_tools.py", + "target": "func:get_or_create_task", + "type": "contains", + "label": "定义函数 get_or_create_task" + }, + { + "id": "edge:bbf88241", + "source": "file:configs/geo_tools.py", + "target": "func:retrieve_knowledge", + "type": "contains", + "label": "定义函数 retrieve_knowledge" + }, + { + "id": "edge:85b60cfe", + "source": "file:configs/geo_tools.py", + "target": "func:monitor_check_and_compare", + "type": "contains", + "label": "定义函数 monitor_check_and_compare" + }, + { + "id": "edge:9f817138", + "source": "file:configs/geo_tools.py", + "target": "func:monitor_generate_report", + "type": "contains", + "label": "定义函数 monitor_generate_report" + }, + { + "id": "edge:4adf721b", + "source": "file:configs/geo_tools.py", + "target": "func:monitor_create_record", + "type": "contains", + "label": "定义函数 monitor_create_record" + }, + { + "id": "edge:79722fa8", + "source": "file:configs/geo_tools.py", + "target": "func:fill_schema_with_llm", + "type": "contains", + "label": "定义函数 fill_schema_with_llm" + }, + { + "id": "edge:af87a0fb", + "source": "file:configs/geo_tools.py", + "target": "func:identify_missing_dimensions", + "type": "contains", + "label": "定义函数 identify_missing_dimensions" + }, + { + "id": "edge:a0c0acef", + "source": "file:configs/geo_tools.py", + "target": "func:competitor_analyze", + "type": "contains", + "label": "定义函数 competitor_analyze" + }, + { + "id": "edge:749aa29c", + "source": "file:configs/geo_tools.py", + "target": "func:competitor_gap_analysis", + "type": "contains", + "label": "定义函数 competitor_gap_analysis" + }, + { + "id": "edge:04e8200c", + "source": "file:configs/geo_tools.py", + "target": "func:trend_insight", + "type": "contains", + "label": "定义函数 trend_insight" + }, + { + "id": "edge:c19eeeac", + "source": "file:configs/geo_tools.py", + "target": "func:trend_hotspot", + "type": "contains", + "label": "定义函数 trend_hotspot" + }, + { + "id": "edge:1ba9a1a3", + "source": "file:configs/geo_tools.py", + "target": "func:search_knowledge", + "type": "contains", + "label": "定义函数 search_knowledge" + }, + { + "id": "edge:9e953190", + "source": "file:configs/geo_tools.py", + "target": "func:detect_ai_patterns", + "type": "contains", + "label": "定义函数 detect_ai_patterns" + }, + { + "id": "edge:7faef3ff", + "source": "file:configs/geo_tools.py", + "target": "func:register_geo_tools", + "type": "contains", + "label": "定义函数 register_geo_tools" + }, + { + "id": "edge:fe5c6ef2", + "source": "file:src/agentkit/bus/redis_bus.py", + "target": "func:create_message_bus", + "type": "contains", + "label": "定义函数 create_message_bus" + }, + { + "id": "edge:28c3bb7c", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "func:validate_skill_name", + "type": "contains", + "label": "定义函数 validate_skill_name" + }, + { + "id": "edge:4e679258", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "func:parse_skill_prefix", + "type": "contains", + "label": "定义函数 parse_skill_prefix" + }, + { + "id": "edge:02158f3c", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "func:build_skill_system_prompt", + "type": "contains", + "label": "定义函数 build_skill_system_prompt" + }, + { + "id": "edge:6d52d105", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "func:resolve_skill_routing", + "type": "contains", + "label": "定义函数 resolve_skill_routing" + }, + { + "id": "edge:fecfd471", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "func:_build_tools_description", + "type": "contains", + "label": "定义函数 _build_tools_description" + }, + { + "id": "edge:c7f91fa0", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "func:_tokenize_content", + "type": "contains", + "label": "定义函数 _tokenize_content" + }, + { + "id": "edge:664023af", + "source": "file:src/agentkit/cli/chat.py", + "target": "func:chat", + "type": "contains", + "label": "定义函数 chat" + }, + { + "id": "edge:ba08640c", + "source": "file:src/agentkit/cli/chat.py", + "target": "func:_chat_async", + "type": "contains", + "label": "定义函数 _chat_async" + }, + { + "id": "edge:3b3d2742", + "source": "file:src/agentkit/cli/chat.py", + "target": "func:_extract_search_keys", + "type": "contains", + "label": "定义函数 _extract_search_keys" + }, + { + "id": "edge:b138479e", + "source": "file:src/agentkit/cli/chat.py", + "target": "func:_build_gateway", + "type": "contains", + "label": "定义函数 _build_gateway" + }, + { + "id": "edge:f2c6ef71", + "source": "file:src/agentkit/cli/chat.py", + "target": "func:_resolve_default_model", + "type": "contains", + "label": "定义函数 _resolve_default_model" + }, + { + "id": "edge:d4244ae1", + "source": "file:src/agentkit/cli/chat.py", + "target": "func:_load_dotenv", + "type": "contains", + "label": "定义函数 _load_dotenv" + }, + { + "id": "edge:c7820ca0", + "source": "file:src/agentkit/cli/chat.py", + "target": "func:_print_help", + "type": "contains", + "label": "定义函数 _print_help" + }, + { + "id": "edge:d28bf4fd", + "source": "file:src/agentkit/cli/init.py", + "target": "func:_write_file", + "type": "contains", + "label": "定义函数 _write_file" + }, + { + "id": "edge:7c7be7d9", + "source": "file:src/agentkit/cli/init.py", + "target": "func:init", + "type": "contains", + "label": "定义函数 init" + }, + { + "id": "edge:d1004a5e", + "source": "file:src/agentkit/cli/main.py", + "target": "func:gui", + "type": "contains", + "label": "定义函数 gui" + }, + { + "id": "edge:320e5a6b", + "source": "file:src/agentkit/cli/main.py", + "target": "func:serve", + "type": "contains", + "label": "定义函数 serve" + }, + { + "id": "edge:8442c852", + "source": "file:src/agentkit/cli/main.py", + "target": "func:version", + "type": "contains", + "label": "定义函数 version" + }, + { + "id": "edge:4701c50a", + "source": "file:src/agentkit/cli/main.py", + "target": "func:doctor", + "type": "contains", + "label": "定义函数 doctor" + }, + { + "id": "edge:28815083", + "source": "file:src/agentkit/cli/onboarding.py", + "target": "func:needs_onboarding", + "type": "contains", + "label": "定义函数 needs_onboarding" + }, + { + "id": "edge:84ad74ee", + "source": "file:src/agentkit/cli/onboarding.py", + "target": "func:run_onboarding", + "type": "contains", + "label": "定义函数 run_onboarding" + }, + { + "id": "edge:33a79787", + "source": "file:src/agentkit/cli/pair.py", + "target": "func:_generate_api_key", + "type": "contains", + "label": "定义函数 _generate_api_key" + }, + { + "id": "edge:ddd18246", + "source": "file:src/agentkit/cli/pair.py", + "target": "func:_load_clients", + "type": "contains", + "label": "定义函数 _load_clients" + }, + { + "id": "edge:1d75928e", + "source": "file:src/agentkit/cli/pair.py", + "target": "func:_save_clients", + "type": "contains", + "label": "定义函数 _save_clients" + }, + { + "id": "edge:3723861a", + "source": "file:src/agentkit/cli/pair.py", + "target": "func:pair", + "type": "contains", + "label": "定义函数 pair" + }, + { + "id": "edge:ef1ea432", + "source": "file:src/agentkit/cli/skill.py", + "target": "func:list_skills", + "type": "contains", + "label": "定义函数 list_skills" + }, + { + "id": "edge:d0723fd7", + "source": "file:src/agentkit/cli/skill.py", + "target": "func:load_skill", + "type": "contains", + "label": "定义函数 load_skill" + }, + { + "id": "edge:2adb192f", + "source": "file:src/agentkit/cli/skill.py", + "target": "func:skill_create", + "type": "contains", + "label": "定义函数 skill_create" + }, + { + "id": "edge:ffaeee74", + "source": "file:src/agentkit/cli/skill.py", + "target": "func:skill_info", + "type": "contains", + "label": "定义函数 skill_info" + }, + { + "id": "edge:7903ad3d", + "source": "file:src/agentkit/cli/task.py", + "target": "func:submit", + "type": "contains", + "label": "定义函数 submit" + }, + { + "id": "edge:8ddae403", + "source": "file:src/agentkit/cli/task.py", + "target": "func:_submit_remote", + "type": "contains", + "label": "定义函数 _submit_remote" + }, + { + "id": "edge:5e1a6163", + "source": "file:src/agentkit/cli/task.py", + "target": "func:_submit_local", + "type": "contains", + "label": "定义函数 _submit_local" + }, + { + "id": "edge:af164bcf", + "source": "file:src/agentkit/cli/task.py", + "target": "func:status", + "type": "contains", + "label": "定义函数 status" + }, + { + "id": "edge:2851349d", + "source": "file:src/agentkit/cli/task.py", + "target": "func:list_tasks", + "type": "contains", + "label": "定义函数 list_tasks" + }, + { + "id": "edge:7858180a", + "source": "file:src/agentkit/cli/task.py", + "target": "func:cancel", + "type": "contains", + "label": "定义函数 cancel" + }, + { + "id": "edge:8efc3180", + "source": "file:src/agentkit/cli/usage.py", + "target": "func:usage", + "type": "contains", + "label": "定义函数 usage" + }, + { + "id": "edge:f81834b8", + "source": "file:src/agentkit/core/compressor.py", + "target": "func:create_compressor", + "type": "contains", + "label": "定义函数 create_compressor" + }, + { + "id": "edge:0a73674b", + "source": "file:src/agentkit/core/compressor.py", + "target": "func:render_cached", + "type": "contains", + "label": "定义函数 render_cached" + }, + { + "id": "edge:b3487b0b", + "source": "file:src/agentkit/core/compressor.py", + "target": "func:clear_cache", + "type": "contains", + "label": "定义函数 clear_cache" + }, + { + "id": "edge:98d01d95", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "func:_validate_callback_url", + "type": "contains", + "label": "定义函数 _validate_callback_url" + }, + { + "id": "edge:380da046", + "source": "file:src/agentkit/core/headroom_compressor.py", + "target": "func:_is_json_content", + "type": "contains", + "label": "定义函数 _is_json_content" + }, + { + "id": "edge:a1167675", + "source": "file:src/agentkit/core/headroom_compressor.py", + "target": "func:_is_code_content", + "type": "contains", + "label": "定义函数 _is_code_content" + }, + { + "id": "edge:300d9958", + "source": "file:src/agentkit/core/logging.py", + "target": "func:setup_structured_logging", + "type": "contains", + "label": "定义函数 setup_structured_logging" + }, + { + "id": "edge:c1a35f35", + "source": "file:src/agentkit/core/logging.py", + "target": "func:get_logger", + "type": "contains", + "label": "定义函数 get_logger" + }, + { + "id": "edge:4d29d670", + "source": "file:src/agentkit/core/standalone.py", + "target": "func:main", + "type": "contains", + "label": "定义函数 main" + }, + { + "id": "edge:4832f3c7", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "func:create_evolution_store", + "type": "contains", + "label": "定义函数 create_evolution_store" + }, + { + "id": "edge:09bef76a", + "source": "file:src/agentkit/evolution/experience_store.py", + "target": "func:_parse_time_window", + "type": "contains", + "label": "定义函数 _parse_time_window" + }, + { + "id": "edge:b1c608ad", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "func:_compute_name_similarity", + "type": "contains", + "label": "定义函数 _compute_name_similarity" + }, + { + "id": "edge:4f5b5151", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "func:_extract_keywords", + "type": "contains", + "label": "定义函数 _extract_keywords" + }, + { + "id": "edge:272c1d97", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "func:_determine_warning_level", + "type": "contains", + "label": "定义函数 _determine_warning_level" + }, + { + "id": "edge:29a4a839", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "func:_warning_level_order", + "type": "contains", + "label": "定义函数 _warning_level_order" + }, + { + "id": "edge:7ba700bf", + "source": "file:src/agentkit/evolution/pitfall_detector.py", + "target": "func:_build_suggestion", + "type": "contains", + "label": "定义函数 _build_suggestion" + }, + { + "id": "edge:f21ad735", + "source": "file:src/agentkit/evolution/prompt_optimizer.py", + "target": "func:create_prompt_optimizer", + "type": "contains", + "label": "定义函数 create_prompt_optimizer" + }, + { + "id": "edge:6d785875", + "source": "file:src/agentkit/llm/retry.py", + "target": "func:_is_retryable_error", + "type": "contains", + "label": "定义函数 _is_retryable_error" + }, + { + "id": "edge:016260d4", + "source": "file:src/agentkit/memory/adapters/confluence.py", + "target": "func:_escape_cql", + "type": "contains", + "label": "定义函数 _escape_cql" + }, + { + "id": "edge:e365db72", + "source": "file:src/agentkit/memory/document_loader.py", + "target": "func:_detect_format", + "type": "contains", + "label": "定义函数 _detect_format" + }, + { + "id": "edge:457b936b", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "func:_loader_doc_to_kb_doc", + "type": "contains", + "label": "定义函数 _loader_doc_to_kb_doc" + }, + { + "id": "edge:8841fa0c", + "source": "file:src/agentkit/memory/models.py", + "target": "func:create_episodic_session_factory", + "type": "contains", + "label": "定义函数 create_episodic_session_factory" + }, + { + "id": "edge:25e7ad5f", + "source": "file:src/agentkit/memory/models.py", + "target": "func:ensure_episodic_table", + "type": "contains", + "label": "定义函数 ensure_episodic_table" + }, + { + "id": "edge:e1548e26", + "source": "file:src/agentkit/memory/multi_source_retriever.py", + "target": "func:_content_hash", + "type": "contains", + "label": "定义函数 _content_hash" + }, + { + "id": "edge:e8cdc699", + "source": "file:src/agentkit/memory/query_transformer.py", + "target": "func:create_query_transformer", + "type": "contains", + "label": "定义函数 create_query_transformer" + }, + { + "id": "edge:c5f0b341", + "source": "file:src/agentkit/memory/retriever.py", + "target": "func:_estimate_tokens", + "type": "contains", + "label": "定义函数 _estimate_tokens" + }, + { + "id": "edge:aa69d628", + "source": "file:src/agentkit/orchestrator/retry.py", + "target": "func:execute_with_retry", + "type": "contains", + "label": "定义函数 execute_with_retry" + }, + { + "id": "edge:dcea38d5", + "source": "file:src/agentkit/server/app.py", + "target": "func:_build_llm_gateway", + "type": "contains", + "label": "定义函数 _build_llm_gateway" + }, + { + "id": "edge:96b47c86", + "source": "file:src/agentkit/server/app.py", + "target": "func:_build_skill_registry", + "type": "contains", + "label": "定义函数 _build_skill_registry" + }, + { + "id": "edge:378be43a", + "source": "file:src/agentkit/server/app.py", + "target": "func:lifespan", + "type": "contains", + "label": "定义函数 lifespan" + }, + { + "id": "edge:28674149", + "source": "file:src/agentkit/server/app.py", + "target": "func:_on_config_change", + "type": "contains", + "label": "定义函数 _on_config_change" + }, + { + "id": "edge:64718367", + "source": "file:src/agentkit/server/app.py", + "target": "func:create_app", + "type": "contains", + "label": "定义函数 create_app" + }, + { + "id": "edge:2d5e645c", + "source": "file:src/agentkit/server/config.py", + "target": "func:_resolve_env_vars", + "type": "contains", + "label": "定义函数 _resolve_env_vars" + }, + { + "id": "edge:2b38c86d", + "source": "file:src/agentkit/server/config.py", + "target": "func:_deep_resolve", + "type": "contains", + "label": "定义函数 _deep_resolve" + }, + { + "id": "edge:c907c106", + "source": "file:src/agentkit/server/config.py", + "target": "func:find_config_path", + "type": "contains", + "label": "定义函数 find_config_path" + }, + { + "id": "edge:2e97e84d", + "source": "file:src/agentkit/server/middleware.py", + "target": "func:_load_client_keys", + "type": "contains", + "label": "定义函数 _load_client_keys" + }, + { + "id": "edge:13be585e", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "func:_get_pool", + "type": "contains", + "label": "定义函数 _get_pool" + }, + { + "id": "edge:2fa61c71", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "func:_get_skill_registry", + "type": "contains", + "label": "定义函数 _get_skill_registry" + }, + { + "id": "edge:a2bce01c", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "func:create_agent", + "type": "contains", + "label": "定义函数 create_agent" + }, + { + "id": "edge:6e55fc45", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "func:list_agents", + "type": "contains", + "label": "定义函数 list_agents" + }, + { + "id": "edge:04dce750", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "func:get_agent", + "type": "contains", + "label": "定义函数 get_agent" + }, + { + "id": "edge:ae51251a", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "func:delete_agent", + "type": "contains", + "label": "定义函数 delete_agent" + }, + { + "id": "edge:2565cf20", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:_get_session_manager", + "type": "contains", + "label": "定义函数 _get_session_manager" + }, + { + "id": "edge:fbd1cd5c", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:_session_to_response", + "type": "contains", + "label": "定义函数 _session_to_response" + }, + { + "id": "edge:99ba4405", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:_message_to_response", + "type": "contains", + "label": "定义函数 _message_to_response" + }, + { + "id": "edge:9cce8a44", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:list_sessions", + "type": "contains", + "label": "定义函数 list_sessions" + }, + { + "id": "edge:e88bf2a6", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:create_session", + "type": "contains", + "label": "定义函数 create_session" + }, + { + "id": "edge:d2e59fba", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:get_session", + "type": "contains", + "label": "定义函数 get_session" + }, + { + "id": "edge:7020f135", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:get_messages", + "type": "contains", + "label": "定义函数 get_messages" + }, + { + "id": "edge:2237a7d9", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:send_message", + "type": "contains", + "label": "定义函数 send_message" + }, + { + "id": "edge:4c933796", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:close_session", + "type": "contains", + "label": "定义函数 close_session" + }, + { + "id": "edge:0ac71efd", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:chat_websocket", + "type": "contains", + "label": "定义函数 chat_websocket" + }, + { + "id": "edge:b93ed359", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "func:_handle_chat_message", + "type": "contains", + "label": "定义函数 _handle_chat_message" + }, + { + "id": "edge:a2489a2e", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "func:_get_evolution_store", + "type": "contains", + "label": "定义函数 _get_evolution_store" + }, + { + "id": "edge:b6d0a31e", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "func:list_evolution_events", + "type": "contains", + "label": "定义函数 list_evolution_events" + }, + { + "id": "edge:70e3078a", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "func:get_skill_versions", + "type": "contains", + "label": "定义函数 get_skill_versions" + }, + { + "id": "edge:1ddcbc0a", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "func:trigger_evolution", + "type": "contains", + "label": "定义函数 trigger_evolution" + }, + { + "id": "edge:4a088390", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "func:list_ab_tests", + "type": "contains", + "label": "定义函数 list_ab_tests" + }, + { + "id": "edge:11198ded", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:_verify_api_key", + "type": "contains", + "label": "定义函数 _verify_api_key" + }, + { + "id": "edge:0e4acb39", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:_get_experience_store", + "type": "contains", + "label": "定义函数 _get_experience_store" + }, + { + "id": "edge:99ebe42e", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:_get_pitfall_detector", + "type": "contains", + "label": "定义函数 _get_pitfall_detector" + }, + { + "id": "edge:f0fa3c1c", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:_get_path_optimizer", + "type": "contains", + "label": "定义函数 _get_path_optimizer" + }, + { + "id": "edge:4881d90f", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:list_experiences", + "type": "contains", + "label": "定义函数 list_experiences" + }, + { + "id": "edge:efb33982", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:record_experience", + "type": "contains", + "label": "定义函数 record_experience" + }, + { + "id": "edge:eef414d8", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:get_metrics", + "type": "contains", + "label": "定义函数 get_metrics" + }, + { + "id": "edge:df59ffee", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:_generate_trends", + "type": "contains", + "label": "定义函数 _generate_trends" + }, + { + "id": "edge:413b50dc", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:_compute_metrics_from_memory", + "type": "contains", + "label": "定义函数 _compute_metrics_from_memory" + }, + { + "id": "edge:3ec608a6", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:get_usage", + "type": "contains", + "label": "定义函数 get_usage" + }, + { + "id": "edge:4e5a36b2", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:check_pitfalls", + "type": "contains", + "label": "定义函数 check_pitfalls" + }, + { + "id": "edge:f6d4437b", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:list_path_optimizations", + "type": "contains", + "label": "定义函数 list_path_optimizations" + }, + { + "id": "edge:ad10b567", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:record_path_optimization", + "type": "contains", + "label": "定义函数 record_path_optimization" + }, + { + "id": "edge:4bd62d91", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:evolution_dashboard_ws", + "type": "contains", + "label": "定义函数 evolution_dashboard_ws" + }, + { + "id": "edge:0feb7ae1", + "source": "file:src/agentkit/server/routes/evolution_dashboard.py", + "target": "func:_broadcast_event", + "type": "contains", + "label": "定义函数 _broadcast_event" + }, + { + "id": "edge:1f82cafe", + "source": "file:src/agentkit/server/routes/health.py", + "target": "func:health_check", + "type": "contains", + "label": "定义函数 health_check" + }, + { + "id": "edge:5e08b3e7", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:_verify_api_key", + "type": "contains", + "label": "定义函数 _verify_api_key" + }, + { + "id": "edge:89580d1f", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:list_sources", + "type": "contains", + "label": "定义函数 list_sources" + }, + { + "id": "edge:89ee5e0d", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:add_source", + "type": "contains", + "label": "定义函数 add_source" + }, + { + "id": "edge:aa2f5827", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:remove_source", + "type": "contains", + "label": "定义函数 remove_source" + }, + { + "id": "edge:1d56efdd", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:sync_source", + "type": "contains", + "label": "定义函数 sync_source" + }, + { + "id": "edge:8527ce27", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:update_source", + "type": "contains", + "label": "定义函数 update_source" + }, + { + "id": "edge:b38755fa", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:list_documents", + "type": "contains", + "label": "定义函数 list_documents" + }, + { + "id": "edge:7565f937", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:delete_document", + "type": "contains", + "label": "定义函数 delete_document" + }, + { + "id": "edge:326fc607", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:upload_document", + "type": "contains", + "label": "定义函数 upload_document" + }, + { + "id": "edge:7bcc9e0b", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:search_knowledge", + "type": "contains", + "label": "定义函数 search_knowledge" + }, + { + "id": "edge:9e024698", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "func:check_source_health", + "type": "contains", + "label": "定义函数 check_source_health" + }, + { + "id": "edge:d8b76ab7", + "source": "file:src/agentkit/server/routes/llm.py", + "target": "func:get_usage", + "type": "contains", + "label": "定义函数 get_usage" + }, + { + "id": "edge:eaed78be", + "source": "file:src/agentkit/server/routes/memory.py", + "target": "func:_get_memory_retriever", + "type": "contains", + "label": "定义函数 _get_memory_retriever" + }, + { + "id": "edge:1f9ca114", + "source": "file:src/agentkit/server/routes/memory.py", + "target": "func:search_episodic_memory", + "type": "contains", + "label": "定义函数 search_episodic_memory" + }, + { + "id": "edge:f0616af9", + "source": "file:src/agentkit/server/routes/memory.py", + "target": "func:search_semantic_memory", + "type": "contains", + "label": "定义函数 search_semantic_memory" + }, + { + "id": "edge:03e8e02b", + "source": "file:src/agentkit/server/routes/memory.py", + "target": "func:delete_episodic_memory", + "type": "contains", + "label": "定义函数 delete_episodic_memory" + }, + { + "id": "edge:d8597e15", + "source": "file:src/agentkit/server/routes/metrics.py", + "target": "func:get_metrics", + "type": "contains", + "label": "定义函数 get_metrics" + }, + { + "id": "edge:6585d091", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:_verify_api_key", + "type": "contains", + "label": "定义函数 _verify_api_key" + }, + { + "id": "edge:10d69557", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:_resolve_for_chat", + "type": "contains", + "label": "定义函数 _resolve_for_chat" + }, + { + "id": "edge:c99d4084", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:chat", + "type": "contains", + "label": "定义函数 chat" + }, + { + "id": "edge:744bbe75", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:chat_stream", + "type": "contains", + "label": "定义函数 chat_stream" + }, + { + "id": "edge:66d9af21", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:get_capabilities", + "type": "contains", + "label": "定义函数 get_capabilities" + }, + { + "id": "edge:d00ce103", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:list_conversations", + "type": "contains", + "label": "定义函数 list_conversations" + }, + { + "id": "edge:c5f75d80", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:_derive_conversation_title", + "type": "contains", + "label": "定义函数 _derive_conversation_title" + }, + { + "id": "edge:f23a88f8", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:get_conversation", + "type": "contains", + "label": "定义函数 get_conversation" + }, + { + "id": "edge:c6801601", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "func:portal_websocket", + "type": "contains", + "label": "定义函数 portal_websocket" + }, + { + "id": "edge:99b2a845", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:_mask_api_key", + "type": "contains", + "label": "定义函数 _mask_api_key" + }, + { + "id": "edge:8d8d5f6e", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:_read_yaml_config", + "type": "contains", + "label": "定义函数 _read_yaml_config" + }, + { + "id": "edge:512f4d18", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:_write_yaml_config", + "type": "contains", + "label": "定义函数 _write_yaml_config" + }, + { + "id": "edge:6f3a61ab", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:_get_config_path", + "type": "contains", + "label": "定义函数 _get_config_path" + }, + { + "id": "edge:bc7bd9a1", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:get_llm_settings", + "type": "contains", + "label": "定义函数 get_llm_settings" + }, + { + "id": "edge:f45409b9", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:update_llm_settings", + "type": "contains", + "label": "定义函数 update_llm_settings" + }, + { + "id": "edge:f8e34fab", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:get_skills_settings", + "type": "contains", + "label": "定义函数 get_skills_settings" + }, + { + "id": "edge:6f63c0d6", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:update_skills_settings", + "type": "contains", + "label": "定义函数 update_skills_settings" + }, + { + "id": "edge:9e074726", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:get_kb_settings", + "type": "contains", + "label": "定义函数 get_kb_settings" + }, + { + "id": "edge:03145c55", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:update_kb_settings", + "type": "contains", + "label": "定义函数 update_kb_settings" + }, + { + "id": "edge:fd3090c2", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:get_general_settings", + "type": "contains", + "label": "定义函数 get_general_settings" + }, + { + "id": "edge:094a8973", + "source": "file:src/agentkit/server/routes/settings.py", + "target": "func:update_general_settings", + "type": "contains", + "label": "定义函数 update_general_settings" + }, + { + "id": "edge:df15d627", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "func:_skill_to_info", + "type": "contains", + "label": "定义函数 _skill_to_info" + }, + { + "id": "edge:1e74cbcf", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "func:_skill_to_detail", + "type": "contains", + "label": "定义函数 _skill_to_detail" + }, + { + "id": "edge:eb4a3fa7", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "func:list_skills", + "type": "contains", + "label": "定义函数 list_skills" + }, + { + "id": "edge:0b89bf66", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "func:get_skill_detail", + "type": "contains", + "label": "定义函数 get_skill_detail" + }, + { + "id": "edge:bc843f9c", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "func:check_skill_health", + "type": "contains", + "label": "定义函数 check_skill_health" + }, + { + "id": "edge:c4866957", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "func:list_capabilities", + "type": "contains", + "label": "定义函数 list_capabilities" + }, + { + "id": "edge:caa0960c", + "source": "file:src/agentkit/server/routes/skill_management.py", + "target": "func:reload_skill", + "type": "contains", + "label": "定义函数 reload_skill" + }, + { + "id": "edge:49ad0fcb", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:_validate_skill_name", + "type": "contains", + "label": "定义函数 _validate_skill_name" + }, + { + "id": "edge:c46cede6", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:_get_skills_dir", + "type": "contains", + "label": "定义函数 _get_skills_dir" + }, + { + "id": "edge:bd22ce98", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:_validate_source_url", + "type": "contains", + "label": "定义函数 _validate_source_url" + }, + { + "id": "edge:423c7ad0", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:_validate_yaml_content", + "type": "contains", + "label": "定义函数 _validate_yaml_content" + }, + { + "id": "edge:c479c53b", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:register_skill", + "type": "contains", + "label": "定义函数 register_skill" + }, + { + "id": "edge:e4df51a3", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:list_skills", + "type": "contains", + "label": "定义函数 list_skills" + }, + { + "id": "edge:9aa5f9eb", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:install_skill", + "type": "contains", + "label": "定义函数 install_skill" + }, + { + "id": "edge:09b5e4da", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:uninstall_skill", + "type": "contains", + "label": "定义函数 uninstall_skill" + }, + { + "id": "edge:3209be7a", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:create_pipeline", + "type": "contains", + "label": "定义函数 create_pipeline" + }, + { + "id": "edge:4212078b", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:list_pipelines", + "type": "contains", + "label": "定义函数 list_pipelines" + }, + { + "id": "edge:b6de8b93", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "func:execute_pipeline", + "type": "contains", + "label": "定义函数 execute_pipeline" + }, + { + "id": "edge:4910a42e", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "func:_validate_input_size", + "type": "contains", + "label": "定义函数 _validate_input_size" + }, + { + "id": "edge:2a675282", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "func:list_tasks", + "type": "contains", + "label": "定义函数 list_tasks" + }, + { + "id": "edge:5e8b5f5f", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "func:submit_task", + "type": "contains", + "label": "定义函数 submit_task" + }, + { + "id": "edge:5fae5d42", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "func:get_task_status", + "type": "contains", + "label": "定义函数 get_task_status" + }, + { + "id": "edge:62752bd7", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "func:cancel_task", + "type": "contains", + "label": "定义函数 cancel_task" + }, + { + "id": "edge:ec33c6e6", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "func:stream_task", + "type": "contains", + "label": "定义函数 stream_task" + }, + { + "id": "edge:95f9157d", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:_get_or_create_session", + "type": "contains", + "label": "定义函数 _get_or_create_session" + }, + { + "id": "edge:50a6404f", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:_cleanup_session", + "type": "contains", + "label": "定义函数 _cleanup_session" + }, + { + "id": "edge:359f4460", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:_is_single_command_dangerous", + "type": "contains", + "label": "定义函数 _is_single_command_dangerous" + }, + { + "id": "edge:bf653383", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:_is_dangerous", + "type": "contains", + "label": "定义函数 _is_dangerous" + }, + { + "id": "edge:868ad543", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:_check_command_safety", + "type": "contains", + "label": "定义函数 _check_command_safety" + }, + { + "id": "edge:62ca3d54", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:execute_command", + "type": "contains", + "label": "定义函数 execute_command" + }, + { + "id": "edge:a00cf8e6", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:list_sessions", + "type": "contains", + "label": "定义函数 list_sessions" + }, + { + "id": "edge:ac7f6b17", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:get_session_history", + "type": "contains", + "label": "定义函数 get_session_history" + }, + { + "id": "edge:4bbf1693", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:close_session", + "type": "contains", + "label": "定义函数 close_session" + }, + { + "id": "edge:0c2ad79f", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "func:terminal_websocket", + "type": "contains", + "label": "定义函数 terminal_websocket" + }, + { + "id": "edge:32e6d736", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_verify_api_key", + "type": "contains", + "label": "定义函数 _verify_api_key" + }, + { + "id": "edge:d1627850", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_ws_subscribe", + "type": "contains", + "label": "定义函数 _ws_subscribe" + }, + { + "id": "edge:5793965d", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_ws_unsubscribe", + "type": "contains", + "label": "定义函数 _ws_unsubscribe" + }, + { + "id": "edge:cb4118c1", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_get_store", + "type": "contains", + "label": "定义函数 _get_store" + }, + { + "id": "edge:c7413070", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_validate_workflow_stages", + "type": "contains", + "label": "定义函数 _validate_workflow_stages" + }, + { + "id": "edge:43263764", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_execute_workflow", + "type": "contains", + "label": "定义函数 _execute_workflow" + }, + { + "id": "edge:bca6bbfe", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_evaluate_condition", + "type": "contains", + "label": "定义函数 _evaluate_condition" + }, + { + "id": "edge:f1e30263", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:_broadcast_ws", + "type": "contains", + "label": "定义函数 _broadcast_ws" + }, + { + "id": "edge:38b0a330", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:list_workflows", + "type": "contains", + "label": "定义函数 list_workflows" + }, + { + "id": "edge:76284b23", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:create_workflow", + "type": "contains", + "label": "定义函数 create_workflow" + }, + { + "id": "edge:0fce1373", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:get_workflow", + "type": "contains", + "label": "定义函数 get_workflow" + }, + { + "id": "edge:4beaa741", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:list_workflow_executions", + "type": "contains", + "label": "定义函数 list_workflow_executions" + }, + { + "id": "edge:560b6bc4", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:update_workflow", + "type": "contains", + "label": "定义函数 update_workflow" + }, + { + "id": "edge:0974e432", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:delete_workflow", + "type": "contains", + "label": "定义函数 delete_workflow" + }, + { + "id": "edge:b029197b", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:execute_workflow", + "type": "contains", + "label": "定义函数 execute_workflow" + }, + { + "id": "edge:46f494c0", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:get_execution", + "type": "contains", + "label": "定义函数 get_execution" + }, + { + "id": "edge:5d70a747", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:approve_execution", + "type": "contains", + "label": "定义函数 approve_execution" + }, + { + "id": "edge:6aa262bc", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:cancel_execution", + "type": "contains", + "label": "定义函数 cancel_execution" + }, + { + "id": "edge:0b4c747e", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "func:workflow_websocket", + "type": "contains", + "label": "定义函数 workflow_websocket" + }, + { + "id": "edge:a0d82d1f", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "func:_authenticate", + "type": "contains", + "label": "定义函数 _authenticate" + }, + { + "id": "edge:e931a4fa", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "func:task_websocket", + "type": "contains", + "label": "定义函数 task_websocket" + }, + { + "id": "edge:8da9dc52", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "func:_resolve_agent", + "type": "contains", + "label": "定义函数 _resolve_agent" + }, + { + "id": "edge:a76cdaf0", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "func:_run_react_and_stream", + "type": "contains", + "label": "定义函数 _run_react_and_stream" + }, + { + "id": "edge:24d184a4", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "func:_listen_client_messages", + "type": "contains", + "label": "定义函数 _listen_client_messages" + }, + { + "id": "edge:4abf5d2d", + "source": "file:src/agentkit/server/task_store.py", + "target": "func:create_task_store", + "type": "contains", + "label": "定义函数 create_task_store" + }, + { + "id": "edge:5efba9d4", + "source": "file:src/agentkit/server/task_store.py", + "target": "func:_sanitize_redis_url", + "type": "contains", + "label": "定义函数 _sanitize_redis_url" + }, + { + "id": "edge:8dfde61f", + "source": "file:src/agentkit/session/store.py", + "target": "func:create_session_store", + "type": "contains", + "label": "定义函数 create_session_store" + }, + { + "id": "edge:792ff066", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "func:create_geo_pipeline_steps", + "type": "contains", + "label": "定义函数 create_geo_pipeline_steps" + }, + { + "id": "edge:4b1e3487", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:get_meter", + "type": "contains", + "label": "定义函数 get_meter" + }, + { + "id": "edge:b9c5b00d", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:_get_counter", + "type": "contains", + "label": "定义函数 _get_counter" + }, + { + "id": "edge:46882b28", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:_get_histogram", + "type": "contains", + "label": "定义函数 _get_histogram" + }, + { + "id": "edge:28315975", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:agent_request_counter", + "type": "contains", + "label": "定义函数 agent_request_counter" + }, + { + "id": "edge:3c27a2f2", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:agent_duration_histogram", + "type": "contains", + "label": "定义函数 agent_duration_histogram" + }, + { + "id": "edge:5c3b735b", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:llm_token_histogram", + "type": "contains", + "label": "定义函数 llm_token_histogram" + }, + { + "id": "edge:c0ecfae2", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:tool_duration_histogram", + "type": "contains", + "label": "定义函数 tool_duration_histogram" + }, + { + "id": "edge:2b2d1232", + "source": "file:src/agentkit/telemetry/metrics.py", + "target": "func:pipeline_step_histogram", + "type": "contains", + "label": "定义函数 pipeline_step_histogram" + }, + { + "id": "edge:07c3e22a", + "source": "file:src/agentkit/telemetry/setup.py", + "target": "func:setup_telemetry", + "type": "contains", + "label": "定义函数 setup_telemetry" + }, + { + "id": "edge:1b0b1de5", + "source": "file:src/agentkit/telemetry/tracer.py", + "target": "func:get_tracer", + "type": "contains", + "label": "定义函数 get_tracer" + }, + { + "id": "edge:92988f77", + "source": "file:src/agentkit/telemetry/tracer.py", + "target": "func:init_telemetry", + "type": "contains", + "label": "定义函数 init_telemetry" + }, + { + "id": "edge:48cd5101", + "source": "file:src/agentkit/telemetry/tracing.py", + "target": "func:get_tracer", + "type": "contains", + "label": "定义函数 get_tracer" + }, + { + "id": "edge:0a1cf7a6", + "source": "file:src/agentkit/telemetry/tracing.py", + "target": "func:start_span", + "type": "contains", + "label": "定义函数 start_span" + }, + { + "id": "edge:3c812766", + "source": "file:src/agentkit/telemetry/tracing.py", + "target": "func:trace_agent", + "type": "contains", + "label": "定义函数 trace_agent" + }, + { + "id": "edge:dee4e06e", + "source": "file:src/agentkit/telemetry/tracing.py", + "target": "func:trace_tool", + "type": "contains", + "label": "定义函数 trace_tool" + }, + { + "id": "edge:ec45c30b", + "source": "file:src/agentkit/telemetry/tracing.py", + "target": "func:trace_llm", + "type": "contains", + "label": "定义函数 trace_llm" + }, + { + "id": "edge:edfceddc", + "source": "file:src/agentkit/telemetry/tracing.py", + "target": "func:trace_pipeline_step", + "type": "contains", + "label": "定义函数 trace_pipeline_step" + }, + { + "id": "edge:c7f74d0b", + "source": "file:src/agentkit/utils/security.py", + "target": "func:is_safe_url", + "type": "contains", + "label": "定义函数 is_safe_url" + }, + { + "id": "edge:59dd5ab1", + "source": "file:src/agentkit/utils/security.py", + "target": "func:_is_unsafe_ip", + "type": "contains", + "label": "定义函数 _is_unsafe_ip" + }, + { + "id": "edge:7611e31a", + "source": "file:src/agentkit/utils/security.py", + "target": "func:is_safe_url_async", + "type": "contains", + "label": "定义函数 is_safe_url_async" + }, + { + "id": "edge:396fc39b", + "source": "file:src/agentkit/utils/vector_math.py", + "target": "func:compute_cosine_similarity", + "type": "contains", + "label": "定义函数 compute_cosine_similarity" + }, + { + "id": "edge:8d0954b8", + "source": "file:configs/geo_handlers.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:8fe1373c", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/core/agent_pool.py", + "type": "imports", + "label": "导入 AgentPool" + }, + { + "id": "edge:eb993e45", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/llm/config.py", + "type": "imports", + "label": "导入 LLMConfig" + }, + { + "id": "edge:211a3e9b", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:3c9dac5e", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:a654afc6", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityGate" + }, + { + "id": "edge:c5d58516", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 OutputStandardizer" + }, + { + "id": "edge:81c6d863", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 IntentRouter" + }, + { + "id": "edge:6030c1de", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/server/app.py", + "type": "imports", + "label": "导入 create_app" + }, + { + "id": "edge:e6754e12", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:326604cd", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:72584436", + "source": "file:configs/geo_server.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:1a82804e", + "source": "file:configs/geo_server.py", + "target": "file:configs/geo_tools.py", + "type": "imports", + "label": "导入 register_geo_tools" + }, + { + "id": "edge:9389c489", + "source": "file:configs/geo_tools.py", + "target": "file:src/agentkit/tools/function_tool.py", + "type": "imports", + "label": "导入 FunctionTool" + }, + { + "id": "edge:ea058603", + "source": "file:configs/geo_tools.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:8e64b77e", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/base.py", + "type": "imports", + "label": "导入 BaseAgent" + }, + { + "id": "edge:7e149f70", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 AgentConfig" + }, + { + "id": "edge:be849581", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:2a69161a", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentCapability" + }, + { + "id": "edge:f006da46", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentStatus" + }, + { + "id": "edge:d3984611", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 HandoffMessage" + }, + { + "id": "edge:ebd1e482", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:20c486ca", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskProgress" + }, + { + "id": "edge:90ad7760", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:d11c54a3", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:8885e991", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:28242c32", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActResult" + }, + { + "id": "edge:4a3dc053", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActStep" + }, + { + "id": "edge:c2c7b478", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:cdc9cdf0", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMProvider" + }, + { + "id": "edge:1beca61a", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:c24b052e", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:52a7a716", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:da6a201a", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 ToolCall" + }, + { + "id": "edge:10242231", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:8a06452c", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:ee9c2e3c", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 IntentConfig" + }, + { + "id": "edge:7d1c2222", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 QualityGateConfig" + }, + { + "id": "edge:005d50a9", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:e90b0000", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 IntentRouter" + }, + { + "id": "edge:97f260f1", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 RoutingResult" + }, + { + "id": "edge:b628bc96", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityGate" + }, + { + "id": "edge:f2645c5e", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityResult" + }, + { + "id": "edge:20223ca3", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityCheck" + }, + { + "id": "edge:a2f50cb7", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 OutputStandardizer" + }, + { + "id": "edge:09f4a238", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 StandardOutput" + }, + { + "id": "edge:b6e3b3ce", + "source": "file:src/agentkit/__init__.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 OutputMetadata" + }, + { + "id": "edge:512b8130", + "source": "file:src/agentkit/__main__.py", + "target": "file:src/agentkit/cli/main.py", + "type": "imports", + "label": "导入 app" + }, + { + "id": "edge:959206e8", + "source": "file:src/agentkit/bus/__init__.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:47dcb559", + "source": "file:src/agentkit/bus/__init__.py", + "target": "file:src/agentkit/bus/interface.py", + "type": "imports", + "label": "导入 MessageBus" + }, + { + "id": "edge:bc7982b1", + "source": "file:src/agentkit/bus/__init__.py", + "target": "file:src/agentkit/bus/protocol.py", + "type": "imports", + "label": "导入 MessageBus" + }, + { + "id": "edge:95047c9a", + "source": "file:src/agentkit/bus/__init__.py", + "target": "file:src/agentkit/bus/memory_bus.py", + "type": "imports", + "label": "导入 InMemoryMessageBus" + }, + { + "id": "edge:c689db95", + "source": "file:src/agentkit/bus/__init__.py", + "target": "file:src/agentkit/bus/redis_bus.py", + "type": "imports", + "label": "导入 RedisMessageBus" + }, + { + "id": "edge:cddb865b", + "source": "file:src/agentkit/bus/__init__.py", + "target": "file:src/agentkit/bus/redis_bus.py", + "type": "imports", + "label": "导入 create_message_bus" + }, + { + "id": "edge:85c17f21", + "source": "file:src/agentkit/bus/interface.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:ec770026", + "source": "file:src/agentkit/bus/memory_bus.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:5a07daa1", + "source": "file:src/agentkit/bus/protocol.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:795cea1c", + "source": "file:src/agentkit/bus/redis_bus.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:bf730b6a", + "source": "file:src/agentkit/bus/redis_bus.py", + "target": "file:src/agentkit/bus/memory_bus.py", + "type": "imports", + "label": "导入 InMemoryMessageBus" + }, + { + "id": "edge:c5d5723d", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "file:src/agentkit/marketplace/auction.py", + "type": "imports", + "label": "导入 AuctionHouse" + }, + { + "id": "edge:2e963eca", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "file:src/agentkit/marketplace/auction.py", + "type": "imports", + "label": "导入 Bid" + }, + { + "id": "edge:32d0b8bf", + "source": "file:src/agentkit/chat/skill_routing.py", + "target": "file:src/agentkit/telemetry/tracer.py", + "type": "imports", + "label": "导入 get_tracer" + }, + { + "id": "edge:ba276769", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/cli/onboarding.py", + "type": "imports", + "label": "导入 run_onboarding" + }, + { + "id": "edge:af5e6831", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 ServerConfig" + }, + { + "id": "edge:00be1e46", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 find_config_path" + }, + { + "id": "edge:76bde917", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/session/manager.py", + "type": "imports", + "label": "导入 SessionManager" + }, + { + "id": "edge:adf5fa27", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/session/store.py", + "type": "imports", + "label": "导入 InMemorySessionStore" + }, + { + "id": "edge:71e7416f", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 MessageRole" + }, + { + "id": "edge:f325541d", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:b8d5ebf8", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:d36e943e", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryStore" + }, + { + "id": "edge:a20beacc", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/tools/memory_tool.py", + "type": "imports", + "label": "导入 MemoryTool" + }, + { + "id": "edge:7991e95b", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 ShellTool" + }, + { + "id": "edge:cc603724", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/tools/web_search.py", + "type": "imports", + "label": "导入 WebSearchTool" + }, + { + "id": "edge:588a3d01", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/tools/web_crawl.py", + "type": "imports", + "label": "导入 WebCrawlTool" + }, + { + "id": "edge:9ba0e5dc", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:b36729aa", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:392d7371", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:1f317475", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 IntentRouter" + }, + { + "id": "edge:4cf3eca7", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:b84ecb35", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/llm/providers/anthropic.py", + "type": "imports", + "label": "导入 AnthropicProvider" + }, + { + "id": "edge:01438a14", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/llm/providers/gemini.py", + "type": "imports", + "label": "导入 GeminiProvider" + }, + { + "id": "edge:52429f46", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:456982a1", + "source": "file:src/agentkit/cli/chat.py", + "target": "file:src/agentkit/chat/skill_routing.py", + "type": "imports", + "label": "导入 resolve_skill_routing" + }, + { + "id": "edge:f4e32933", + "source": "file:src/agentkit/cli/init.py", + "target": "file:src/agentkit/cli/templates.py", + "type": "imports", + "label": "导入 AGENTKIT_YAML" + }, + { + "id": "edge:69efc675", + "source": "file:src/agentkit/cli/init.py", + "target": "file:src/agentkit/cli/templates.py", + "type": "imports", + "label": "导入 ENV_EXAMPLE" + }, + { + "id": "edge:7a8f67d1", + "source": "file:src/agentkit/cli/init.py", + "target": "file:src/agentkit/cli/templates.py", + "type": "imports", + "label": "导入 DOCKER_COMPOSE" + }, + { + "id": "edge:64c8f466", + "source": "file:src/agentkit/cli/init.py", + "target": "file:src/agentkit/cli/templates.py", + "type": "imports", + "label": "导入 EXAMPLE_SKILL" + }, + { + "id": "edge:43811b29", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/task.py", + "type": "imports", + "label": "导入 task_app" + }, + { + "id": "edge:55c519f9", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/skill.py", + "type": "imports", + "label": "导入 skill_app" + }, + { + "id": "edge:7fe6dcaf", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/init.py", + "type": "imports", + "label": "导入 init" + }, + { + "id": "edge:e7c5a6db", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/usage.py", + "type": "imports", + "label": "导入 usage" + }, + { + "id": "edge:14a9f0ea", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/pair.py", + "type": "imports", + "label": "导入 pair" + }, + { + "id": "edge:be18b5e9", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/chat.py", + "type": "imports", + "label": "导入 chat" + }, + { + "id": "edge:55995dc0", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 ServerConfig" + }, + { + "id": "edge:611ad5e8", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 find_config_path" + }, + { + "id": "edge:c34e9c9b", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/onboarding.py", + "type": "imports", + "label": "导入 run_onboarding" + }, + { + "id": "edge:83d9803b", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/server/app.py", + "type": "imports", + "label": "导入 create_app" + }, + { + "id": "edge:98a43270", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 ServerConfig" + }, + { + "id": "edge:d41ee0ec", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 find_config_path" + }, + { + "id": "edge:7d65ed30", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/onboarding.py", + "type": "imports", + "label": "导入 needs_onboarding" + }, + { + "id": "edge:eb856d9c", + "source": "file:src/agentkit/cli/main.py", + "target": "file:src/agentkit/cli/onboarding.py", + "type": "imports", + "label": "导入 run_onboarding" + }, + { + "id": "edge:cd8a477f", + "source": "file:src/agentkit/cli/onboarding.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 find_config_path" + }, + { + "id": "edge:e9cdd749", + "source": "file:src/agentkit/cli/onboarding.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryStore" + }, + { + "id": "edge:5d34f283", + "source": "file:src/agentkit/cli/skill.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:1d560e0c", + "source": "file:src/agentkit/cli/skill.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:6db4ae97", + "source": "file:src/agentkit/cli/skill.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:e4985524", + "source": "file:src/agentkit/cli/skill.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:bdd73dca", + "source": "file:src/agentkit/cli/skill.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:32e51a89", + "source": "file:src/agentkit/cli/skill.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:a3ac0bfd", + "source": "file:src/agentkit/cli/skill.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:9c0ec683", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/server/client.py", + "type": "imports", + "label": "导入 AgentKitClient" + }, + { + "id": "edge:2623c028", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 ServerConfig" + }, + { + "id": "edge:d24df1f9", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 find_config_path" + }, + { + "id": "edge:f73bea8a", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/server/app.py", + "type": "imports", + "label": "导入 create_app" + }, + { + "id": "edge:82b53894", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/server/client.py", + "type": "imports", + "label": "导入 AgentKitClient" + }, + { + "id": "edge:b80a716d", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/server/client.py", + "type": "imports", + "label": "导入 AgentKitClient" + }, + { + "id": "edge:40ce54b8", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/server/client.py", + "type": "imports", + "label": "导入 AgentKitClient" + }, + { + "id": "edge:cfeb620b", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:e939d8e9", + "source": "file:src/agentkit/cli/task.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:1310cfd0", + "source": "file:src/agentkit/cli/usage.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:00a07d87", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/base.py", + "type": "imports", + "label": "导入 BaseAgent" + }, + { + "id": "edge:d9b05e1e", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 CompressionStrategy" + }, + { + "id": "edge:6396a367", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 ContextCompressor" + }, + { + "id": "edge:88e80f15", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 create_compressor" + }, + { + "id": "edge:d66024c2", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 AgentConfig" + }, + { + "id": "edge:b860749e", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:7d9fdd17", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentAlreadyRegisteredError" + }, + { + "id": "edge:56034bdf", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentFrameworkError" + }, + { + "id": "edge:f14888a2", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentNotFoundError" + }, + { + "id": "edge:bfadda24", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentNotReadyError" + }, + { + "id": "edge:b0f32b72", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentUnavailableError" + }, + { + "id": "edge:0dbf5ab2", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ConfigValidationError" + }, + { + "id": "edge:55349842", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 EvolutionError" + }, + { + "id": "edge:57783952", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 HandoffError" + }, + { + "id": "edge:c4c448b1", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMError" + }, + { + "id": "edge:7c01400f", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMProviderError" + }, + { + "id": "edge:6b9a0667", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ModelNotFoundError" + }, + { + "id": "edge:7f03da3e", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 NoAvailableAgentError" + }, + { + "id": "edge:a1d87112", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 SchemaValidationError" + }, + { + "id": "edge:ebf8929a", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskCancelledError" + }, + { + "id": "edge:7f0ed62d", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskDispatchError" + }, + { + "id": "edge:58a56e8e", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskExecutionError" + }, + { + "id": "edge:c26e0eea", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskNotFoundError" + }, + { + "id": "edge:b390b713", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskTimeoutError" + }, + { + "id": "edge:6e3b8504", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ToolExecutionError" + }, + { + "id": "edge:8b0d15ab", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ToolNotFoundError" + }, + { + "id": "edge:8caa35e5", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentCapability" + }, + { + "id": "edge:3f74d027", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentStatus" + }, + { + "id": "edge:fac32171", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:662b67df", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 EvolutionEvent" + }, + { + "id": "edge:3d3850e0", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 HandoffMessage" + }, + { + "id": "edge:3fb6402d", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:ed63f904", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskProgress" + }, + { + "id": "edge:6e464e5e", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:6bda0c2d", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:a631310c", + "source": "file:src/agentkit/core/__init__.py", + "target": "file:src/agentkit/core/headroom_compressor.py", + "type": "imports", + "label": "导入 HeadroomCompressor" + }, + { + "id": "edge:5a09a8bb", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:68c651f0", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentStatus" + }, + { + "id": "edge:f553ec04", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:23116850", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:31c4b957", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:8b8b5073", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:a91900a5", + "source": "file:src/agentkit/core/agent_pool.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 CompressionStrategy" + }, + { + "id": "edge:2890eb30", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentNotReadyError" + }, + { + "id": "edge:c3e92dda", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 SchemaValidationError" + }, + { + "id": "edge:c73d642f", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskCancelledError" + }, + { + "id": "edge:d36a0f7e", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskTimeoutError" + }, + { + "id": "edge:ce72e9d9", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentCapability" + }, + { + "id": "edge:e67a8816", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentStatus" + }, + { + "id": "edge:1452f21e", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:3410d05d", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 HandoffMessage" + }, + { + "id": "edge:ecc469b3", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:53df998c", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskProgress" + }, + { + "id": "edge:670f0bc1", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:71bc09e3", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:958d2837", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 Memory" + }, + { + "id": "edge:091d52ca", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:714e3a37", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:28caa9f2", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:095083e7", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityGate" + }, + { + "id": "edge:65bfd6c8", + "source": "file:src/agentkit/core/base.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityGate" + }, + { + "id": "edge:451b3b5e", + "source": "file:src/agentkit/core/compressor.py", + "target": "file:src/agentkit/core/headroom_compressor.py", + "type": "imports", + "label": "导入 HeadroomCompressor" + }, + { + "id": "edge:2b311ac0", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/base.py", + "type": "imports", + "label": "导入 BaseAgent" + }, + { + "id": "edge:d7024497", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ConfigValidationError" + }, + { + "id": "edge:e4244e73", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentCapability" + }, + { + "id": "edge:742f27de", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:92095ea9", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/evolution/lifecycle.py", + "type": "imports", + "label": "导入 EvolutionMixin" + }, + { + "id": "edge:4fcec067", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/evolution/reflector.py", + "type": "imports", + "label": "导入 Reflector" + }, + { + "id": "edge:a698d772", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/prompts/section.py", + "type": "imports", + "label": "导入 PromptSection" + }, + { + "id": "edge:cb6ffa9c", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/prompts/template.py", + "type": "imports", + "label": "导入 PromptTemplate" + }, + { + "id": "edge:568284fa", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:16067e55", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:68d0a9ba", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:b92a04a6", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:94698590", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityGate" + }, + { + "id": "edge:47b42ee6", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 OutputStandardizer" + }, + { + "id": "edge:ff7a21d2", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 Module" + }, + { + "id": "edge:57a7602f", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 Signature" + }, + { + "id": "edge:dec8d4a5", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/mcp/client.py", + "type": "imports", + "label": "导入 MCPClient" + }, + { + "id": "edge:d10ebcab", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/rewoo.py", + "type": "imports", + "label": "导入 ReWOOEngine" + }, + { + "id": "edge:8c41121c", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/plan_exec_engine.py", + "type": "imports", + "label": "导入 PlanExecEngine" + }, + { + "id": "edge:c82f1236", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/reflexion.py", + "type": "imports", + "label": "导入 ReflexionEngine" + }, + { + "id": "edge:510f0b74", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:518e7b07", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMProvider" + }, + { + "id": "edge:d90529aa", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:28c3ad52", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:a832110f", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:c5baa3d9", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:ab868e6a", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/memory/retriever.py", + "type": "imports", + "label": "导入 MemoryRetriever" + }, + { + "id": "edge:b7dad1fa", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/memory/working.py", + "type": "imports", + "label": "导入 WorkingMemory" + }, + { + "id": "edge:006322e9", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/memory/semantic.py", + "type": "imports", + "label": "导入 SemanticMemory" + }, + { + "id": "edge:1eefe5ba", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/memory/http_rag.py", + "type": "imports", + "label": "导入 HttpRAGService" + }, + { + "id": "edge:2d22507a", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:f9c2e1dd", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:65b18897", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:3fa3a2e3", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:180f9ecb", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/memory/episodic.py", + "type": "imports", + "label": "导入 EpisodicMemory" + }, + { + "id": "edge:0644574d", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 OpenAIEmbedder" + }, + { + "id": "edge:f67d3890", + "source": "file:src/agentkit/core/config_driven.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 EmbeddingCache" + }, + { + "id": "edge:10c2895f", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 NoAvailableAgentError" + }, + { + "id": "edge:1439c028", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskDispatchError" + }, + { + "id": "edge:9d3e6e27", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskNotFoundError" + }, + { + "id": "edge:81926049", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentStatus" + }, + { + "id": "edge:483a8135", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:d8a7f2f0", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskProgress" + }, + { + "id": "edge:3cafca13", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:b5475ea7", + "source": "file:src/agentkit/core/dispatcher.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:fcdcaa3d", + "source": "file:src/agentkit/core/goal_planner.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 ExecutionPlan" + }, + { + "id": "edge:64a2dfdc", + "source": "file:src/agentkit/core/goal_planner.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStep" + }, + { + "id": "edge:18067e75", + "source": "file:src/agentkit/core/goal_planner.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStepStatus" + }, + { + "id": "edge:ca786e24", + "source": "file:src/agentkit/core/goal_planner.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 SkillGap" + }, + { + "id": "edge:b6df36bb", + "source": "file:src/agentkit/core/goal_planner.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 SkillGapLevel" + }, + { + "id": "edge:1ca22feb", + "source": "file:src/agentkit/core/headroom_compressor.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 CompressionStrategy" + }, + { + "id": "edge:327dd4f8", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:cbd209f7", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:ddeff694", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:b96618aa", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/core/shared_workspace.py", + "type": "imports", + "label": "导入 SharedWorkspace" + }, + { + "id": "edge:4a4b026c", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/core/goal_planner.py", + "type": "imports", + "label": "导入 GoalPlanner" + }, + { + "id": "edge:d0ac1b17", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/core/plan_executor.py", + "type": "imports", + "label": "导入 PlanExecutor" + }, + { + "id": "edge:c94eedcb", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/core/plan_checker.py", + "type": "imports", + "label": "导入 PlanChecker" + }, + { + "id": "edge:14616bd1", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:4a226018", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:d74f2621", + "source": "file:src/agentkit/core/orchestrator.py", + "target": "file:src/agentkit/bus/message.py", + "type": "imports", + "label": "导入 AgentMessage" + }, + { + "id": "edge:b480c8f9", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 ExecutionPlan" + }, + { + "id": "edge:99a39c7b", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStep" + }, + { + "id": "edge:e85e5455", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStepStatus" + }, + { + "id": "edge:06e0a84b", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "file:src/agentkit/core/plan_executor.py", + "type": "imports", + "label": "导入 PlanExecutionResult" + }, + { + "id": "edge:fc72c37d", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "file:src/agentkit/core/plan_executor.py", + "type": "imports", + "label": "导入 StepExecutionResult" + }, + { + "id": "edge:308ab0df", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 QualityGateConfig" + }, + { + "id": "edge:e1c99387", + "source": "file:src/agentkit/core/plan_checker.py", + "target": "file:src/agentkit/evolution/experience_schema.py", + "type": "imports", + "label": "导入 TaskExperience" + }, + { + "id": "edge:4ea06538", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskCancelledError" + }, + { + "id": "edge:e7aa6395", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskTimeoutError" + }, + { + "id": "edge:fb21607a", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/goal_planner.py", + "type": "imports", + "label": "导入 GoalPlanner" + }, + { + "id": "edge:04507533", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/plan_executor.py", + "type": "imports", + "label": "导入 PlanExecutor" + }, + { + "id": "edge:1d869964", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/plan_executor.py", + "type": "imports", + "label": "导入 PlanExecutionResult" + }, + { + "id": "edge:09542c71", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/plan_executor.py", + "type": "imports", + "label": "导入 StepExecutionResult" + }, + { + "id": "edge:6dd64eab", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 ExecutionPlan" + }, + { + "id": "edge:405ab925", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStep" + }, + { + "id": "edge:e704e631", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStepStatus" + }, + { + "id": "edge:523fb594", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:8e0d3543", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:91a671b5", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:b9d45b99", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:0debaafc", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEvent" + }, + { + "id": "edge:2a2a8209", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActResult" + }, + { + "id": "edge:f42e314d", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActStep" + }, + { + "id": "edge:a172d1ba", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/reflection.py", + "type": "imports", + "label": "导入 PipelineReflector" + }, + { + "id": "edge:b3f3be3c", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/reflection.py", + "type": "imports", + "label": "导入 PipelineReplanner" + }, + { + "id": "edge:797d4bb6", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 Pipeline" + }, + { + "id": "edge:0174ffc2", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineResult" + }, + { + "id": "edge:6f1df149", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 ReflectionReport" + }, + { + "id": "edge:3a6d80c5", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageResult" + }, + { + "id": "edge:bf723715", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageStatus" + }, + { + "id": "edge:de8a1b7f", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 CompressionStrategy" + }, + { + "id": "edge:398e5f58", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 ContextCompressor" + }, + { + "id": "edge:f9681034", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/core/trace.py", + "type": "imports", + "label": "导入 TraceRecorder" + }, + { + "id": "edge:21a9da76", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/memory/retriever.py", + "type": "imports", + "label": "导入 MemoryRetriever" + }, + { + "id": "edge:5e04a109", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:443b2e64", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:954a5a57", + "source": "file:src/agentkit/core/plan_exec_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineStage" + }, + { + "id": "edge:f77e2c6e", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 ExecutionPlan" + }, + { + "id": "edge:f5f6ddcf", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStep" + }, + { + "id": "edge:0944a49c", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "file:src/agentkit/core/plan_schema.py", + "type": "imports", + "label": "导入 PlanStepStatus" + }, + { + "id": "edge:09691bde", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:f62687e2", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:dfb8b506", + "source": "file:src/agentkit/core/plan_executor.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:7ccdd7a1", + "source": "file:src/agentkit/core/protocol.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskCancelledError" + }, + { + "id": "edge:4f512880", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskCancelledError" + }, + { + "id": "edge:c92a2808", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskTimeoutError" + }, + { + "id": "edge:93181301", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:92381d77", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:618929b8", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:b94873d6", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:5d68c1e0", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 get_tracer" + }, + { + "id": "edge:fd459490", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 start_span" + }, + { + "id": "edge:75c47599", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 _OTEL_AVAILABLE" + }, + { + "id": "edge:fc23164a", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_request_counter" + }, + { + "id": "edge:d75398c7", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_duration_histogram" + }, + { + "id": "edge:a0ede96d", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 CompressionStrategy" + }, + { + "id": "edge:35f3431b", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 ContextCompressor" + }, + { + "id": "edge:7520f358", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/core/trace.py", + "type": "imports", + "label": "导入 TraceRecorder" + }, + { + "id": "edge:d48b80ec", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/memory/retriever.py", + "type": "imports", + "label": "导入 MemoryRetriever" + }, + { + "id": "edge:0a4838dd", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:6ae24529", + "source": "file:src/agentkit/core/react.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:355f0605", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskCancelledError" + }, + { + "id": "edge:35c4855b", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskTimeoutError" + }, + { + "id": "edge:983fb74d", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:c7332057", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:0c7bd048", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEvent" + }, + { + "id": "edge:d04af720", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActResult" + }, + { + "id": "edge:940f7063", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActStep" + }, + { + "id": "edge:ba8b8408", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:f4b9d537", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:d8ea80b8", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 start_span" + }, + { + "id": "edge:8189acaa", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 _OTEL_AVAILABLE" + }, + { + "id": "edge:9aff857c", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_request_counter" + }, + { + "id": "edge:62419dd5", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_duration_histogram" + }, + { + "id": "edge:d9943794", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 CompressionStrategy" + }, + { + "id": "edge:2e6b5ec2", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/core/trace.py", + "type": "imports", + "label": "导入 TraceRecorder" + }, + { + "id": "edge:3037259a", + "source": "file:src/agentkit/core/reflexion.py", + "target": "file:src/agentkit/memory/retriever.py", + "type": "imports", + "label": "导入 MemoryRetriever" + }, + { + "id": "edge:342694c7", + "source": "file:src/agentkit/core/registry.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentNotFoundError" + }, + { + "id": "edge:307ca36d", + "source": "file:src/agentkit/core/registry.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 AgentUnavailableError" + }, + { + "id": "edge:d156588a", + "source": "file:src/agentkit/core/registry.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 NoAvailableAgentError" + }, + { + "id": "edge:9c51c882", + "source": "file:src/agentkit/core/registry.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentCapability" + }, + { + "id": "edge:461da51c", + "source": "file:src/agentkit/core/registry.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 AgentStatus" + }, + { + "id": "edge:ecee8ab1", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskCancelledError" + }, + { + "id": "edge:4e51e106", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 TaskTimeoutError" + }, + { + "id": "edge:445f6afb", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:b3e0dcb2", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:46fd5b15", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEvent" + }, + { + "id": "edge:bfe77cb6", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActResult" + }, + { + "id": "edge:ebc16293", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActStep" + }, + { + "id": "edge:9f6d53a7", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:65513f48", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:ab39ec13", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:345a8a2f", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 get_tracer" + }, + { + "id": "edge:0e5f4d85", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 start_span" + }, + { + "id": "edge:472c965d", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 _OTEL_AVAILABLE" + }, + { + "id": "edge:049b6de8", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_request_counter" + }, + { + "id": "edge:0e9cb0b6", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_duration_histogram" + }, + { + "id": "edge:db899554", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 CompressionStrategy" + }, + { + "id": "edge:7bc06af3", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 ContextCompressor" + }, + { + "id": "edge:fe3f6935", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/core/trace.py", + "type": "imports", + "label": "导入 TraceRecorder" + }, + { + "id": "edge:43a69a50", + "source": "file:src/agentkit/core/rewoo.py", + "target": "file:src/agentkit/memory/retriever.py", + "type": "imports", + "label": "导入 MemoryRetriever" + }, + { + "id": "edge:da4586ad", + "source": "file:src/agentkit/core/standalone.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 AgentConfig" + }, + { + "id": "edge:af0099a2", + "source": "file:src/agentkit/core/standalone.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:d9f0a66f", + "source": "file:src/agentkit/core/standalone.py", + "target": "file:src/agentkit/tools/function_tool.py", + "type": "imports", + "label": "导入 FunctionTool" + }, + { + "id": "edge:76860be7", + "source": "file:src/agentkit/core/standalone.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:c19d41c3", + "source": "file:src/agentkit/evaluation/__init__.py", + "target": "file:src/agentkit/evaluation/ragas_evaluator.py", + "type": "imports", + "label": "导入 EvalDatasetBuilder" + }, + { + "id": "edge:18ad54fb", + "source": "file:src/agentkit/evaluation/__init__.py", + "target": "file:src/agentkit/evaluation/ragas_evaluator.py", + "type": "imports", + "label": "导入 EvalMetrics" + }, + { + "id": "edge:b4e5e3f1", + "source": "file:src/agentkit/evaluation/__init__.py", + "target": "file:src/agentkit/evaluation/ragas_evaluator.py", + "type": "imports", + "label": "导入 EvalResult" + }, + { + "id": "edge:61d781f1", + "source": "file:src/agentkit/evaluation/__init__.py", + "target": "file:src/agentkit/evaluation/ragas_evaluator.py", + "type": "imports", + "label": "导入 EvalSample" + }, + { + "id": "edge:27509fc0", + "source": "file:src/agentkit/evaluation/__init__.py", + "target": "file:src/agentkit/evaluation/ragas_evaluator.py", + "type": "imports", + "label": "导入 RagasEvaluator" + }, + { + "id": "edge:f1dcae01", + "source": "file:src/agentkit/evaluation/ragas_evaluator.py", + "target": "file:src/agentkit/memory/relevance_scorer.py", + "type": "imports", + "label": "导入 RelevanceScorer" + }, + { + "id": "edge:f1075bc8", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/reflector.py", + "type": "imports", + "label": "导入 Reflector" + }, + { + "id": "edge:f1784f33", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 BootstrapPromptOptimizer" + }, + { + "id": "edge:678f19df", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 PromptOptimizer" + }, + { + "id": "edge:7397ecf3", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 LLMPromptOptimizer" + }, + { + "id": "edge:8d88027c", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 Signature" + }, + { + "id": "edge:9ed6e467", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 Module" + }, + { + "id": "edge:a8e6e897", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 create_prompt_optimizer" + }, + { + "id": "edge:c326f7c1", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/strategy_tuner.py", + "type": "imports", + "label": "导入 StrategyTuner" + }, + { + "id": "edge:6bb0f921", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/ab_tester.py", + "type": "imports", + "label": "导入 ABTester" + }, + { + "id": "edge:f21e4937", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/evolution_store.py", + "type": "imports", + "label": "导入 EvolutionStore" + }, + { + "id": "edge:42ee9843", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/evolution_store.py", + "type": "imports", + "label": "导入 InMemoryEvolutionStore" + }, + { + "id": "edge:efbe57f6", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/evolution_store.py", + "type": "imports", + "label": "导入 PersistentEvolutionStore" + }, + { + "id": "edge:9ec65294", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/evolution_store.py", + "type": "imports", + "label": "导入 create_evolution_store" + }, + { + "id": "edge:f5373850", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/lifecycle.py", + "type": "imports", + "label": "导入 EvolutionMixin" + }, + { + "id": "edge:0287ee46", + "source": "file:src/agentkit/evolution/__init__.py", + "target": "file:src/agentkit/evolution/lifecycle.py", + "type": "imports", + "label": "导入 EvolutionLogEntry" + }, + { + "id": "edge:0173ca21", + "source": "file:src/agentkit/evolution/ab_tester.py", + "target": "file:src/agentkit/evolution/evolution_store.py", + "type": "imports", + "label": "导入 InMemoryEvolutionStore" + }, + { + "id": "edge:7b1fea39", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 EvolutionEvent" + }, + { + "id": "edge:46eef218", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "file:src/agentkit/evolution/models.py", + "type": "imports", + "label": "导入 ABTestResultModel" + }, + { + "id": "edge:355819ef", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "file:src/agentkit/evolution/models.py", + "type": "imports", + "label": "导入 Base" + }, + { + "id": "edge:195aaebf", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "file:src/agentkit/evolution/models.py", + "type": "imports", + "label": "导入 EvolutionEventModel" + }, + { + "id": "edge:9a9a5e57", + "source": "file:src/agentkit/evolution/evolution_store.py", + "target": "file:src/agentkit/evolution/models.py", + "type": "imports", + "label": "导入 SkillVersionModel" + }, + { + "id": "edge:6672ac9d", + "source": "file:src/agentkit/evolution/experience_store.py", + "target": "file:src/agentkit/evolution/experience_schema.py", + "type": "imports", + "label": "导入 EvolutionMetrics" + }, + { + "id": "edge:c599fffc", + "source": "file:src/agentkit/evolution/experience_store.py", + "target": "file:src/agentkit/evolution/experience_schema.py", + "type": "imports", + "label": "导入 TaskExperience" + }, + { + "id": "edge:cb506654", + "source": "file:src/agentkit/evolution/experience_store.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 Embedder" + }, + { + "id": "edge:e13b6a90", + "source": "file:src/agentkit/evolution/experience_store.py", + "target": "file:src/agentkit/utils/vector_math.py", + "type": "imports", + "label": "导入 compute_cosine_similarity" + }, + { + "id": "edge:622d6437", + "source": "file:src/agentkit/evolution/fitness.py", + "target": "file:src/agentkit/evolution/genetic.py", + "type": "imports", + "label": "导入 FitnessScore" + }, + { + "id": "edge:eeeb2280", + "source": "file:src/agentkit/evolution/genetic.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 Module" + }, + { + "id": "edge:fe50bf78", + "source": "file:src/agentkit/evolution/genetic.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 Signature" + }, + { + "id": "edge:776fbd81", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 EvolutionEvent" + }, + { + "id": "edge:602fe432", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:52a16416", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:166c4c65", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/ab_tester.py", + "type": "imports", + "label": "导入 ABTestConfig" + }, + { + "id": "edge:7d2d0313", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/ab_tester.py", + "type": "imports", + "label": "导入 ABTestResult" + }, + { + "id": "edge:7c059772", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/ab_tester.py", + "type": "imports", + "label": "导入 ABTester" + }, + { + "id": "edge:562f6a23", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/evolution_store.py", + "type": "imports", + "label": "导入 EvolutionStore" + }, + { + "id": "edge:2f3ecb1a", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/llm_reflector.py", + "type": "imports", + "label": "导入 LLMReflector" + }, + { + "id": "edge:f17757ef", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 Module" + }, + { + "id": "edge:9ecad871", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 PromptOptimizer" + }, + { + "id": "edge:05ae0e15", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/reflector.py", + "type": "imports", + "label": "导入 Reflection" + }, + { + "id": "edge:7d3fa3af", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/reflector.py", + "type": "imports", + "label": "导入 Reflector" + }, + { + "id": "edge:da91ad53", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/reflector.py", + "type": "imports", + "label": "导入 RuleBasedReflector" + }, + { + "id": "edge:95b3b236", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/strategy_tuner.py", + "type": "imports", + "label": "导入 StrategyConfig" + }, + { + "id": "edge:175758bb", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/strategy_tuner.py", + "type": "imports", + "label": "导入 StrategyTuner" + }, + { + "id": "edge:700f3d30", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryStore" + }, + { + "id": "edge:ce4a3286", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/evolution/prompt_optimizer.py", + "type": "imports", + "label": "导入 LLMPromptOptimizer" + }, + { + "id": "edge:f4339f10", + "source": "file:src/agentkit/evolution/lifecycle.py", + "target": "file:src/agentkit/tools/memory_tool.py", + "type": "imports", + "label": "导入 MemoryTool" + }, + { + "id": "edge:d7f67b07", + "source": "file:src/agentkit/evolution/llm_reflector.py", + "target": "file:src/agentkit/core/trace.py", + "type": "imports", + "label": "导入 ExecutionTrace" + }, + { + "id": "edge:6bfa53cf", + "source": "file:src/agentkit/evolution/llm_reflector.py", + "target": "file:src/agentkit/evolution/reflector.py", + "type": "imports", + "label": "导入 Reflection" + }, + { + "id": "edge:0f5d200e", + "source": "file:src/agentkit/evolution/path_optimizer.py", + "target": "file:src/agentkit/evolution/experience_store.py", + "type": "imports", + "label": "导入 InMemoryExperienceStore" + }, + { + "id": "edge:c5943e6d", + "source": "file:src/agentkit/evolution/reflector.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:f6e4e73d", + "source": "file:src/agentkit/evolution/reflector.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskResult" + }, + { + "id": "edge:bd90dd84", + "source": "file:src/agentkit/evolution/reflector.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:809668d5", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/config.py", + "type": "imports", + "label": "导入 LLMConfig" + }, + { + "id": "edge:66a8deae", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/config.py", + "type": "imports", + "label": "导入 ProviderConfig" + }, + { + "id": "edge:63cd5b70", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:78c68d46", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMProvider" + }, + { + "id": "edge:0df92e7c", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:2fba3082", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:d77d8288", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:2a078504", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 ToolCall" + }, + { + "id": "edge:edcad41d", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/providers/anthropic.py", + "type": "imports", + "label": "导入 AnthropicProvider" + }, + { + "id": "edge:8942381b", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:d7039533", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageRecord" + }, + { + "id": "edge:812c8d10", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageSummary" + }, + { + "id": "edge:d57363ac", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageTracker" + }, + { + "id": "edge:38d465db", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreaker" + }, + { + "id": "edge:8cdeafdc", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreakerConfig" + }, + { + "id": "edge:a3ec3c96", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitOpenError" + }, + { + "id": "edge:a707ed12", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitState" + }, + { + "id": "edge:022f834e", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryConfig" + }, + { + "id": "edge:37c7900e", + "source": "file:src/agentkit/llm/__init__.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryPolicy" + }, + { + "id": "edge:0a65b5a5", + "source": "file:src/agentkit/llm/config.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreakerConfig" + }, + { + "id": "edge:294312ab", + "source": "file:src/agentkit/llm/config.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryConfig" + }, + { + "id": "edge:85509ea0", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMProviderError" + }, + { + "id": "edge:46b8a15e", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ModelNotFoundError" + }, + { + "id": "edge:53035c03", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/config.py", + "type": "imports", + "label": "导入 LLMConfig" + }, + { + "id": "edge:d9416235", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMProvider" + }, + { + "id": "edge:21a7cfce", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:410c3199", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:774e2df2", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 StreamChunk" + }, + { + "id": "edge:6031c16a", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:36fc6267", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageSummary" + }, + { + "id": "edge:feffabca", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageTracker" + }, + { + "id": "edge:5a666875", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 get_tracer" + }, + { + "id": "edge:490a7eac", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 _OTEL_AVAILABLE" + }, + { + "id": "edge:12128472", + "source": "file:src/agentkit/llm/gateway.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 llm_token_histogram" + }, + { + "id": "edge:d365a1ef", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/anthropic.py", + "type": "imports", + "label": "导入 AnthropicProvider" + }, + { + "id": "edge:93f809cb", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/doubao.py", + "type": "imports", + "label": "导入 DoubaoProvider" + }, + { + "id": "edge:bdff593a", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/gemini.py", + "type": "imports", + "label": "导入 GeminiProvider" + }, + { + "id": "edge:1f95de8b", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:3d4c2c67", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageRecord" + }, + { + "id": "edge:46be8f9d", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageSummary" + }, + { + "id": "edge:332d838f", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/tracker.py", + "type": "imports", + "label": "导入 UsageTracker" + }, + { + "id": "edge:5c0b2d6c", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/wenxin.py", + "type": "imports", + "label": "导入 WenxinProvider" + }, + { + "id": "edge:ad759f78", + "source": "file:src/agentkit/llm/providers/__init__.py", + "target": "file:src/agentkit/llm/providers/yuanbao.py", + "type": "imports", + "label": "导入 YuanbaoProvider" + }, + { + "id": "edge:570bd57e", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMProviderError" + }, + { + "id": "edge:759624a4", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMProvider" + }, + { + "id": "edge:2914d73d", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:a098aaf3", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:da1be1bd", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 StreamChunk" + }, + { + "id": "edge:d53aa953", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:5dd238f8", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 ToolCall" + }, + { + "id": "edge:70e01f1c", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreaker" + }, + { + "id": "edge:c9abed94", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreakerConfig" + }, + { + "id": "edge:fb6a5542", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryConfig" + }, + { + "id": "edge:9152c013", + "source": "file:src/agentkit/llm/providers/anthropic.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryPolicy" + }, + { + "id": "edge:ad6f0767", + "source": "file:src/agentkit/llm/providers/doubao.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:ff91e7db", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMProviderError" + }, + { + "id": "edge:fa1285d4", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMProvider" + }, + { + "id": "edge:156415f4", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:7187db38", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:d7d25325", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 StreamChunk" + }, + { + "id": "edge:2ebfdb79", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:18e8cd0e", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 ToolCall" + }, + { + "id": "edge:ea4f886d", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreaker" + }, + { + "id": "edge:16029fff", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreakerConfig" + }, + { + "id": "edge:5b8d694f", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryConfig" + }, + { + "id": "edge:5ee9683a", + "source": "file:src/agentkit/llm/providers/gemini.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryPolicy" + }, + { + "id": "edge:77797a08", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMProviderError" + }, + { + "id": "edge:f6a6facb", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMProvider" + }, + { + "id": "edge:c5bf14fc", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:4c83d723", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:87f29b02", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 StreamChunk" + }, + { + "id": "edge:bcbc35cd", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:4112d821", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 ToolCall" + }, + { + "id": "edge:d7891198", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreaker" + }, + { + "id": "edge:1f8bd672", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 CircuitBreakerConfig" + }, + { + "id": "edge:9b484723", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryConfig" + }, + { + "id": "edge:d70200e5", + "source": "file:src/agentkit/llm/providers/openai.py", + "target": "file:src/agentkit/llm/retry.py", + "type": "imports", + "label": "导入 RetryPolicy" + }, + { + "id": "edge:cca4a16a", + "source": "file:src/agentkit/llm/providers/tracker.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 TokenUsage" + }, + { + "id": "edge:1d8bd8c3", + "source": "file:src/agentkit/llm/providers/wenxin.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:845e012d", + "source": "file:src/agentkit/llm/providers/wenxin.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:c8126b95", + "source": "file:src/agentkit/llm/providers/wenxin.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:9128b725", + "source": "file:src/agentkit/llm/providers/yuanbao.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:69497efe", + "source": "file:src/agentkit/llm/providers/yuanbao.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMRequest" + }, + { + "id": "edge:a9ee0017", + "source": "file:src/agentkit/llm/providers/yuanbao.py", + "target": "file:src/agentkit/llm/protocol.py", + "type": "imports", + "label": "导入 LLMResponse" + }, + { + "id": "edge:43a43977", + "source": "file:src/agentkit/llm/retry.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMProviderError" + }, + { + "id": "edge:bae537c2", + "source": "file:src/agentkit/marketplace/__init__.py", + "target": "file:src/agentkit/marketplace/auction.py", + "type": "imports", + "label": "导入 AuctionHouse" + }, + { + "id": "edge:7ecda67e", + "source": "file:src/agentkit/marketplace/__init__.py", + "target": "file:src/agentkit/marketplace/auction.py", + "type": "imports", + "label": "导入 AuctionResult" + }, + { + "id": "edge:101c7da4", + "source": "file:src/agentkit/marketplace/__init__.py", + "target": "file:src/agentkit/marketplace/auction.py", + "type": "imports", + "label": "导入 Bid" + }, + { + "id": "edge:ae7588ca", + "source": "file:src/agentkit/marketplace/__init__.py", + "target": "file:src/agentkit/marketplace/wealth.py", + "type": "imports", + "label": "导入 WealthTracker" + }, + { + "id": "edge:e58ba23d", + "source": "file:src/agentkit/marketplace/auction.py", + "target": "file:src/agentkit/marketplace/wealth.py", + "type": "imports", + "label": "导入 WealthTracker" + }, + { + "id": "edge:5da8cfcd", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/client.py", + "type": "imports", + "label": "导入 MCPClient" + }, + { + "id": "edge:5da1a471", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/manager.py", + "type": "imports", + "label": "导入 MCPManager" + }, + { + "id": "edge:a39a7b02", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/server.py", + "type": "imports", + "label": "导入 MCPServer" + }, + { + "id": "edge:90fc6d5f", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 HTTPTransport" + }, + { + "id": "edge:5d4514f2", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 SSETransport" + }, + { + "id": "edge:7f9c1eb7", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 StdioTransport" + }, + { + "id": "edge:dda91bca", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 Transport" + }, + { + "id": "edge:49b9e0f8", + "source": "file:src/agentkit/mcp/__init__.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 TransportError" + }, + { + "id": "edge:97da0fea", + "source": "file:src/agentkit/mcp/client.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 HTTPTransport" + }, + { + "id": "edge:b3d4fc47", + "source": "file:src/agentkit/mcp/client.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 SSETransport" + }, + { + "id": "edge:d2dd3198", + "source": "file:src/agentkit/mcp/client.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 StdioTransport" + }, + { + "id": "edge:0f25f91f", + "source": "file:src/agentkit/mcp/client.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 Transport" + }, + { + "id": "edge:55ccdece", + "source": "file:src/agentkit/mcp/client.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:dd45e0ef", + "source": "file:src/agentkit/mcp/manager.py", + "target": "file:src/agentkit/mcp/client.py", + "type": "imports", + "label": "导入 MCPClient" + }, + { + "id": "edge:5e5ae66d", + "source": "file:src/agentkit/mcp/manager.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 HTTPTransport" + }, + { + "id": "edge:1e27dee0", + "source": "file:src/agentkit/mcp/manager.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 SSETransport" + }, + { + "id": "edge:3ecc77e4", + "source": "file:src/agentkit/mcp/manager.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 StdioTransport" + }, + { + "id": "edge:a396096a", + "source": "file:src/agentkit/mcp/manager.py", + "target": "file:src/agentkit/mcp/transport.py", + "type": "imports", + "label": "导入 Transport" + }, + { + "id": "edge:af7f1d2c", + "source": "file:src/agentkit/mcp/manager.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:8c1f95ee", + "source": "file:src/agentkit/mcp/manager.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 MCPServerConfig" + }, + { + "id": "edge:4790d0c5", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 Memory" + }, + { + "id": "edge:cb25c244", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 MemoryItem" + }, + { + "id": "edge:fc2e1b79", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/working.py", + "type": "imports", + "label": "导入 WorkingMemory" + }, + { + "id": "edge:85bad874", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/episodic.py", + "type": "imports", + "label": "导入 EpisodicMemory" + }, + { + "id": "edge:6b9b5fb6", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/semantic.py", + "type": "imports", + "label": "导入 SemanticMemory" + }, + { + "id": "edge:6e67ea7c", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/http_rag.py", + "type": "imports", + "label": "导入 HttpRAGService" + }, + { + "id": "edge:8dee2a85", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/retriever.py", + "type": "imports", + "label": "导入 MemoryRetriever" + }, + { + "id": "edge:02127312", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/multi_source_retriever.py", + "type": "imports", + "label": "导入 MultiSourceRetriever" + }, + { + "id": "edge:37a0c941", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 QueryTransformerBase" + }, + { + "id": "edge:bcb672a4", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 LLMQueryTransformer" + }, + { + "id": "edge:1c806be0", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 RuleQueryTransformer" + }, + { + "id": "edge:47c53fd0", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 NoOpQueryTransformer" + }, + { + "id": "edge:315844cf", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 TransformedQuery" + }, + { + "id": "edge:632cc802", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 create_query_transformer" + }, + { + "id": "edge:83f5f8cc", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryFile" + }, + { + "id": "edge:bb77f4ae", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryStore" + }, + { + "id": "edge:444d7669", + "source": "file:src/agentkit/memory/__init__.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemorySnapshot" + }, + { + "id": "edge:d882600b", + "source": "file:src/agentkit/memory/adapters/__init__.py", + "target": "file:src/agentkit/memory/adapters/base.py", + "type": "imports", + "label": "导入 KBAdapter" + }, + { + "id": "edge:6dd753eb", + "source": "file:src/agentkit/memory/adapters/__init__.py", + "target": "file:src/agentkit/memory/adapters/feishu.py", + "type": "imports", + "label": "导入 FeishuKBAdapter" + }, + { + "id": "edge:1b509cf8", + "source": "file:src/agentkit/memory/adapters/__init__.py", + "target": "file:src/agentkit/memory/adapters/confluence.py", + "type": "imports", + "label": "导入 ConfluenceAdapter" + }, + { + "id": "edge:cf8b01ac", + "source": "file:src/agentkit/memory/adapters/__init__.py", + "target": "file:src/agentkit/memory/adapters/generic_http.py", + "type": "imports", + "label": "导入 GenericHTTPAdapter" + }, + { + "id": "edge:634f3422", + "source": "file:src/agentkit/memory/adapters/base.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 Document" + }, + { + "id": "edge:63ae6b48", + "source": "file:src/agentkit/memory/adapters/base.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 QueryResult" + }, + { + "id": "edge:8e0919a7", + "source": "file:src/agentkit/memory/adapters/base.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 SourceInfo" + }, + { + "id": "edge:faf95ecc", + "source": "file:src/agentkit/memory/adapters/confluence.py", + "target": "file:src/agentkit/memory/adapters/base.py", + "type": "imports", + "label": "导入 KBAdapter" + }, + { + "id": "edge:f916b1e2", + "source": "file:src/agentkit/memory/adapters/confluence.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 Document" + }, + { + "id": "edge:b6b4a375", + "source": "file:src/agentkit/memory/adapters/confluence.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 QueryResult" + }, + { + "id": "edge:acf1823f", + "source": "file:src/agentkit/memory/adapters/confluence.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 SourceInfo" + }, + { + "id": "edge:dbaccd71", + "source": "file:src/agentkit/memory/adapters/confluence.py", + "target": "file:src/agentkit/utils/security.py", + "type": "imports", + "label": "导入 is_safe_url" + }, + { + "id": "edge:466ed836", + "source": "file:src/agentkit/memory/adapters/feishu.py", + "target": "file:src/agentkit/memory/adapters/base.py", + "type": "imports", + "label": "导入 KBAdapter" + }, + { + "id": "edge:9f9a9f7c", + "source": "file:src/agentkit/memory/adapters/feishu.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 Document" + }, + { + "id": "edge:64083b0f", + "source": "file:src/agentkit/memory/adapters/feishu.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 QueryResult" + }, + { + "id": "edge:542d714f", + "source": "file:src/agentkit/memory/adapters/feishu.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 SourceInfo" + }, + { + "id": "edge:3760f952", + "source": "file:src/agentkit/memory/adapters/feishu.py", + "target": "file:src/agentkit/utils/security.py", + "type": "imports", + "label": "导入 is_safe_url" + }, + { + "id": "edge:1239bb37", + "source": "file:src/agentkit/memory/adapters/generic_http.py", + "target": "file:src/agentkit/memory/adapters/base.py", + "type": "imports", + "label": "导入 KBAdapter" + }, + { + "id": "edge:d5e2be45", + "source": "file:src/agentkit/memory/adapters/generic_http.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 Document" + }, + { + "id": "edge:1262f83f", + "source": "file:src/agentkit/memory/adapters/generic_http.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 QueryResult" + }, + { + "id": "edge:119f439a", + "source": "file:src/agentkit/memory/adapters/generic_http.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 SourceInfo" + }, + { + "id": "edge:4195089f", + "source": "file:src/agentkit/memory/adapters/generic_http.py", + "target": "file:src/agentkit/utils/security.py", + "type": "imports", + "label": "导入 is_safe_url" + }, + { + "id": "edge:877d427d", + "source": "file:src/agentkit/memory/contextual_retrieval.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 EmbeddingCache" + }, + { + "id": "edge:267e565a", + "source": "file:src/agentkit/memory/episodic.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 Memory" + }, + { + "id": "edge:c72ec23c", + "source": "file:src/agentkit/memory/episodic.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 MemoryItem" + }, + { + "id": "edge:79ff26aa", + "source": "file:src/agentkit/memory/episodic.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 Embedder" + }, + { + "id": "edge:0c4e492b", + "source": "file:src/agentkit/memory/episodic.py", + "target": "file:src/agentkit/utils/vector_math.py", + "type": "imports", + "label": "导入 compute_cosine_similarity" + }, + { + "id": "edge:d53db485", + "source": "file:src/agentkit/memory/http_rag.py", + "target": "file:src/agentkit/memory/contextual_retrieval.py", + "type": "imports", + "label": "导入 ContextualChunker" + }, + { + "id": "edge:8a651c37", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/chunking.py", + "type": "imports", + "label": "导入 Chunk" + }, + { + "id": "edge:66a28625", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/chunking.py", + "type": "imports", + "label": "导入 StructuralChunker" + }, + { + "id": "edge:4dc4eb3b", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/chunking.py", + "type": "imports", + "label": "导入 TextChunker" + }, + { + "id": "edge:817133cf", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/document_loader.py", + "type": "imports", + "label": "导入 Document" + }, + { + "id": "edge:51f708c8", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 Embedder" + }, + { + "id": "edge:62018da5", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 Document" + }, + { + "id": "edge:1260da20", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 KnowledgeBase" + }, + { + "id": "edge:b3b2e51c", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 QueryResult" + }, + { + "id": "edge:def7ca53", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 SourceInfo" + }, + { + "id": "edge:cbe68a1a", + "source": "file:src/agentkit/memory/local_rag.py", + "target": "file:src/agentkit/utils/vector_math.py", + "type": "imports", + "label": "导入 compute_cosine_similarity" + }, + { + "id": "edge:2a468f10", + "source": "file:src/agentkit/memory/multi_source_retriever.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 KnowledgeBase" + }, + { + "id": "edge:04cc2609", + "source": "file:src/agentkit/memory/multi_source_retriever.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 QueryResult" + }, + { + "id": "edge:6d594824", + "source": "file:src/agentkit/memory/multi_source_retriever.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 SourceInfo" + }, + { + "id": "edge:f983d119", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 MemoryItem" + }, + { + "id": "edge:e442c5bd", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 QueryTransformerBase" + }, + { + "id": "edge:b04d5e3e", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 NoOpQueryTransformer" + }, + { + "id": "edge:09af4cfd", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "file:src/agentkit/memory/relevance_scorer.py", + "type": "imports", + "label": "导入 RelevanceScorer" + }, + { + "id": "edge:fc5793d9", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "file:src/agentkit/memory/relevance_scorer.py", + "type": "imports", + "label": "导入 RelevanceVerdict" + }, + { + "id": "edge:651aaa4a", + "source": "file:src/agentkit/memory/rag_loop.py", + "target": "file:src/agentkit/memory/relevance_scorer.py", + "type": "imports", + "label": "导入 RetrievalEvaluation" + }, + { + "id": "edge:483449ef", + "source": "file:src/agentkit/memory/relevance_scorer.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 MemoryItem" + }, + { + "id": "edge:b7a52bde", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 Memory" + }, + { + "id": "edge:187e4405", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 MemoryItem" + }, + { + "id": "edge:9a084abc", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/working.py", + "type": "imports", + "label": "导入 WorkingMemory" + }, + { + "id": "edge:9efef676", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/episodic.py", + "type": "imports", + "label": "导入 EpisodicMemory" + }, + { + "id": "edge:dc2f2749", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/semantic.py", + "type": "imports", + "label": "导入 SemanticMemory" + }, + { + "id": "edge:06e76169", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/query_transformer.py", + "type": "imports", + "label": "导入 QueryTransformerBase" + }, + { + "id": "edge:d170877a", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/rag_loop.py", + "type": "imports", + "label": "导入 RAGSelfCorrectionLoop" + }, + { + "id": "edge:74c289a8", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/relevance_scorer.py", + "type": "imports", + "label": "导入 RelevanceScorer" + }, + { + "id": "edge:2b3a12a7", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 KnowledgeBase" + }, + { + "id": "edge:06ee3071", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/knowledge_base.py", + "type": "imports", + "label": "导入 QueryResult" + }, + { + "id": "edge:b2e3779b", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/memory/multi_source_retriever.py", + "type": "imports", + "label": "导入 MultiSourceRetriever" + }, + { + "id": "edge:551b7325", + "source": "file:src/agentkit/memory/retriever.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:8f16a1df", + "source": "file:src/agentkit/memory/semantic.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 Memory" + }, + { + "id": "edge:6e5ece1c", + "source": "file:src/agentkit/memory/semantic.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 MemoryItem" + }, + { + "id": "edge:a8aa7c5d", + "source": "file:src/agentkit/memory/working.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 Memory" + }, + { + "id": "edge:976b0fd0", + "source": "file:src/agentkit/memory/working.py", + "target": "file:src/agentkit/memory/base.py", + "type": "imports", + "label": "导入 MemoryItem" + }, + { + "id": "edge:9a8180c6", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 Pipeline" + }, + { + "id": "edge:13a63e91", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineStage" + }, + { + "id": "edge:30d297d5", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageStatus" + }, + { + "id": "edge:66682061", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 AdaptiveConfig" + }, + { + "id": "edge:d50cf5a0", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 ReflectionReport" + }, + { + "id": "edge:c9ac1afd", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_engine.py", + "type": "imports", + "label": "导入 PipelineEngine" + }, + { + "id": "edge:054e0013", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_loader.py", + "type": "imports", + "label": "导入 PipelineLoader" + }, + { + "id": "edge:bcc9f54a", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/handoff.py", + "type": "imports", + "label": "导入 HandoffManager" + }, + { + "id": "edge:c08cfe81", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/dynamic_pipeline.py", + "type": "imports", + "label": "导入 DynamicPipeline" + }, + { + "id": "edge:b10dd91c", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_state.py", + "type": "imports", + "label": "导入 PipelineStateMemory" + }, + { + "id": "edge:b2262d6d", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_state.py", + "type": "imports", + "label": "导入 PipelineStateRedis" + }, + { + "id": "edge:598b0db4", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_state.py", + "type": "imports", + "label": "导入 PipelineStatePG" + }, + { + "id": "edge:5e2ad3c4", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/pipeline_state.py", + "type": "imports", + "label": "导入 PipelineStateManager" + }, + { + "id": "edge:c0386a56", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 StepRetryPolicy" + }, + { + "id": "edge:44d069de", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 execute_with_retry" + }, + { + "id": "edge:f842aba8", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/compensation.py", + "type": "imports", + "label": "导入 CompletedStep" + }, + { + "id": "edge:3d53fe6a", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/compensation.py", + "type": "imports", + "label": "导入 CompensationResult" + }, + { + "id": "edge:d4c19150", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/compensation.py", + "type": "imports", + "label": "导入 SagaOrchestrator" + }, + { + "id": "edge:a3358e88", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/reflection.py", + "type": "imports", + "label": "导入 PipelineReflector" + }, + { + "id": "edge:f9f619e7", + "source": "file:src/agentkit/orchestrator/__init__.py", + "target": "file:src/agentkit/orchestrator/reflection.py", + "type": "imports", + "label": "导入 PipelineReplanner" + }, + { + "id": "edge:4fd2f7da", + "source": "file:src/agentkit/orchestrator/dynamic_pipeline.py", + "target": "file:src/agentkit/orchestrator/pipeline_engine.py", + "type": "imports", + "label": "导入 PipelineEngine" + }, + { + "id": "edge:80e5917a", + "source": "file:src/agentkit/orchestrator/dynamic_pipeline.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 Pipeline" + }, + { + "id": "edge:7099858b", + "source": "file:src/agentkit/orchestrator/dynamic_pipeline.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineResult" + }, + { + "id": "edge:d0eb3d91", + "source": "file:src/agentkit/orchestrator/dynamic_pipeline.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageStatus" + }, + { + "id": "edge:9c10ed21", + "source": "file:src/agentkit/orchestrator/handoff.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 HandoffMessage" + }, + { + "id": "edge:96a23b23", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/compensation.py", + "type": "imports", + "label": "导入 SagaOrchestrator" + }, + { + "id": "edge:f3f21d7a", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 AdversarialState" + }, + { + "id": "edge:e79d74f9", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 AdaptiveConfig" + }, + { + "id": "edge:ee41b3c8", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 Pipeline" + }, + { + "id": "edge:2d08c1da", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineResult" + }, + { + "id": "edge:a88c6dc6", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineStage" + }, + { + "id": "edge:5f1edfef", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 ReflectionReport" + }, + { + "id": "edge:4effbda8", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 ReviewFeedback" + }, + { + "id": "edge:0e3d3f54", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 ReviewIssue" + }, + { + "id": "edge:73e5dba1", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageResult" + }, + { + "id": "edge:0f0221bd", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageStatus" + }, + { + "id": "edge:8567f657", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/reflection.py", + "type": "imports", + "label": "导入 PipelineReflector" + }, + { + "id": "edge:3f2c189e", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/reflection.py", + "type": "imports", + "label": "导入 PipelineReplanner" + }, + { + "id": "edge:991e02b7", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 StepRetryPolicy" + }, + { + "id": "edge:134d7f48", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 execute_with_retry" + }, + { + "id": "edge:79828f8a", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:dc24f786", + "source": "file:src/agentkit/orchestrator/pipeline_engine.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:988cb518", + "source": "file:src/agentkit/orchestrator/pipeline_loader.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 Pipeline" + }, + { + "id": "edge:88dbee83", + "source": "file:src/agentkit/orchestrator/pipeline_loader.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineStage" + }, + { + "id": "edge:c57428e3", + "source": "file:src/agentkit/orchestrator/pipeline_schema.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 StepRetryPolicy" + }, + { + "id": "edge:a18a9521", + "source": "file:src/agentkit/orchestrator/pipeline_state.py", + "target": "file:src/agentkit/orchestrator/pipeline_models.py", + "type": "imports", + "label": "导入 PipelineExecutionModel" + }, + { + "id": "edge:5aa2cb78", + "source": "file:src/agentkit/orchestrator/pipeline_state.py", + "target": "file:src/agentkit/orchestrator/pipeline_models.py", + "type": "imports", + "label": "导入 PipelineStepHistoryModel" + }, + { + "id": "edge:8805e6bd", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 Pipeline" + }, + { + "id": "edge:0ffe4f77", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineResult" + }, + { + "id": "edge:d75d50ca", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineStage" + }, + { + "id": "edge:6a8999f9", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 ReflectionReport" + }, + { + "id": "edge:a723b715", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageResult" + }, + { + "id": "edge:3b46f4c4", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 StageStatus" + }, + { + "id": "edge:5871baae", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 StepRetryPolicy" + }, + { + "id": "edge:529f7061", + "source": "file:src/agentkit/orchestrator/reflection.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 StepRetryPolicy" + }, + { + "id": "edge:4883ca21", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 Pipeline" + }, + { + "id": "edge:6efced71", + "source": "file:src/agentkit/orchestrator/workflow_schema.py", + "target": "file:src/agentkit/orchestrator/pipeline_schema.py", + "type": "imports", + "label": "导入 PipelineStage" + }, + { + "id": "edge:ab88e842", + "source": "file:src/agentkit/org/__init__.py", + "target": "file:src/agentkit/org/context.py", + "type": "imports", + "label": "导入 AgentProfile" + }, + { + "id": "edge:e6532411", + "source": "file:src/agentkit/org/__init__.py", + "target": "file:src/agentkit/org/context.py", + "type": "imports", + "label": "导入 OrganizationContext" + }, + { + "id": "edge:ea4feb47", + "source": "file:src/agentkit/org/__init__.py", + "target": "file:src/agentkit/org/discovery.py", + "type": "imports", + "label": "导入 AgentDiscovery" + }, + { + "id": "edge:45fecc43", + "source": "file:src/agentkit/org/discovery.py", + "target": "file:src/agentkit/org/context.py", + "type": "imports", + "label": "导入 AgentProfile" + }, + { + "id": "edge:8d9d6bc0", + "source": "file:src/agentkit/org/discovery.py", + "target": "file:src/agentkit/org/context.py", + "type": "imports", + "label": "导入 OrganizationContext" + }, + { + "id": "edge:07a48178", + "source": "file:src/agentkit/prompts/__init__.py", + "target": "file:src/agentkit/prompts/template.py", + "type": "imports", + "label": "导入 PromptTemplate" + }, + { + "id": "edge:48f4c73f", + "source": "file:src/agentkit/prompts/__init__.py", + "target": "file:src/agentkit/prompts/section.py", + "type": "imports", + "label": "导入 PromptSection" + }, + { + "id": "edge:460e1152", + "source": "file:src/agentkit/prompts/template.py", + "target": "file:src/agentkit/prompts/section.py", + "type": "imports", + "label": "导入 PromptSection" + }, + { + "id": "edge:e933e600", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 AlignmentCheckResult" + }, + { + "id": "edge:9ab197d0", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 AlignmentConfig" + }, + { + "id": "edge:f0a1f9ce", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 AlignmentGuard" + }, + { + "id": "edge:821b7c44", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 CascadeAlert" + }, + { + "id": "edge:08c9f7db", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 ConstraintInjector" + }, + { + "id": "edge:9e8d0cc3", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/cascade_detector.py", + "type": "imports", + "label": "导入 CascadeDetector" + }, + { + "id": "edge:3b6bdf51", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityCheck" + }, + { + "id": "edge:8fa10bb5", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityGate" + }, + { + "id": "edge:9f813a7a", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityResult" + }, + { + "id": "edge:f5e3cffe", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 OutputMetadata" + }, + { + "id": "edge:20daf58d", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 OutputStandardizer" + }, + { + "id": "edge:08b865a0", + "source": "file:src/agentkit/quality/__init__.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 StandardOutput" + }, + { + "id": "edge:0076f9de", + "source": "file:src/agentkit/quality/alignment.py", + "target": "file:src/agentkit/telemetry/tracer.py", + "type": "imports", + "label": "导入 get_tracer" + }, + { + "id": "edge:e977a5c5", + "source": "file:src/agentkit/quality/gate.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:6b56aa45", + "source": "file:src/agentkit/quality/output.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityResult" + }, + { + "id": "edge:3fc4528f", + "source": "file:src/agentkit/quality/output.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:8f7f8a8f", + "source": "file:src/agentkit/router/__init__.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 IntentRouter" + }, + { + "id": "edge:647e7d32", + "source": "file:src/agentkit/router/__init__.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 RoutingResult" + }, + { + "id": "edge:f1fe2dab", + "source": "file:src/agentkit/router/intent.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:a6a0b97f", + "source": "file:src/agentkit/router/intent.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:ad3adbf3", + "source": "file:src/agentkit/server/__init__.py", + "target": "file:src/agentkit/server/app.py", + "type": "imports", + "label": "导入 create_app" + }, + { + "id": "edge:c79ba7d8", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/core/agent_pool.py", + "type": "imports", + "label": "导入 AgentPool" + }, + { + "id": "edge:b249ade2", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/llm/gateway.py", + "type": "imports", + "label": "导入 LLMGateway" + }, + { + "id": "edge:6647e529", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/llm/providers/anthropic.py", + "type": "imports", + "label": "导入 AnthropicProvider" + }, + { + "id": "edge:7d3cc964", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/llm/providers/gemini.py", + "type": "imports", + "label": "导入 GeminiProvider" + }, + { + "id": "edge:f42d73c6", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/llm/providers/openai.py", + "type": "imports", + "label": "导入 OpenAICompatibleProvider" + }, + { + "id": "edge:df74aa8a", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/mcp/manager.py", + "type": "imports", + "label": "导入 MCPManager" + }, + { + "id": "edge:94456290", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/quality/gate.py", + "type": "imports", + "label": "导入 QualityGate" + }, + { + "id": "edge:d0b18bf2", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/quality/output.py", + "type": "imports", + "label": "导入 OutputStandardizer" + }, + { + "id": "edge:c02d2b6f", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 IntentRouter" + }, + { + "id": "edge:6ae117c4", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:850e7c22", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:9e40e870", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:f955021a", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:1c17b338", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/skill_install.py", + "type": "imports", + "label": "导入 SkillInstallTool" + }, + { + "id": "edge:a68e7998", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/config.py", + "type": "imports", + "label": "导入 ServerConfig" + }, + { + "id": "edge:e72598c6", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 agents" + }, + { + "id": "edge:35e3a63c", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 tasks" + }, + { + "id": "edge:afced291", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 skills" + }, + { + "id": "edge:1012f542", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 llm" + }, + { + "id": "edge:2f24bf52", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 health" + }, + { + "id": "edge:17cf68d4", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 metrics" + }, + { + "id": "edge:0a815763", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 ws" + }, + { + "id": "edge:8b66dbe5", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 evolution" + }, + { + "id": "edge:8d705ebb", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 memory" + }, + { + "id": "edge:e4521676", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 portal" + }, + { + "id": "edge:a461d792", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 evolution_dashboard" + }, + { + "id": "edge:9f31d5ca", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 kb_management" + }, + { + "id": "edge:1a657047", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 skill_management" + }, + { + "id": "edge:ec085e7c", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 workflows" + }, + { + "id": "edge:a2df7973", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 chat" + }, + { + "id": "edge:01f68054", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 terminal" + }, + { + "id": "edge:83fbf580", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 settings" + }, + { + "id": "edge:1138a8c9", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/middleware.py", + "type": "imports", + "label": "导入 APIKeyAuthMiddleware" + }, + { + "id": "edge:0128b5ba", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/middleware.py", + "type": "imports", + "label": "导入 RateLimitMiddleware" + }, + { + "id": "edge:fa28ca17", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/task_store.py", + "type": "imports", + "label": "导入 create_task_store" + }, + { + "id": "edge:91708aed", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/server/runner.py", + "type": "imports", + "label": "导入 BackgroundRunner" + }, + { + "id": "edge:7ccdd111", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/core/logging.py", + "type": "imports", + "label": "导入 setup_structured_logging" + }, + { + "id": "edge:11ef648b", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/telemetry/setup.py", + "type": "imports", + "label": "导入 setup_telemetry" + }, + { + "id": "edge:09d9f4e0", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/core/compressor.py", + "type": "imports", + "label": "导入 create_compressor" + }, + { + "id": "edge:bd69574e", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/bus/redis_bus.py", + "type": "imports", + "label": "导入 create_message_bus" + }, + { + "id": "edge:b1aafe7a", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/org/context.py", + "type": "imports", + "label": "导入 OrganizationContext" + }, + { + "id": "edge:559a3c1c", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 AlignmentGuard" + }, + { + "id": "edge:457e46b4", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 AlignmentConfig" + }, + { + "id": "edge:629262e8", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/chat/skill_routing.py", + "type": "imports", + "label": "导入 CostAwareRouter" + }, + { + "id": "edge:d3e19721", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/session/manager.py", + "type": "imports", + "label": "导入 SessionManager" + }, + { + "id": "edge:72163202", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/session/store.py", + "type": "imports", + "label": "导入 create_session_store" + }, + { + "id": "edge:3faf67da", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 AgentConfig" + }, + { + "id": "edge:d44e7ed3", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryStore" + }, + { + "id": "edge:9aba14dd", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/memory_tool.py", + "type": "imports", + "label": "导入 MemoryTool" + }, + { + "id": "edge:2d9ea182", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 ShellTool" + }, + { + "id": "edge:7474120e", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/web_search.py", + "type": "imports", + "label": "导入 WebSearchTool" + }, + { + "id": "edge:ca790ff9", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/web_crawl.py", + "type": "imports", + "label": "导入 WebCrawlTool" + }, + { + "id": "edge:eca5c78e", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/baidu_search.py", + "type": "imports", + "label": "导入 BaiduSearchTool" + }, + { + "id": "edge:d4d8d5f0", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:856f9170", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/core/headroom_compressor.py", + "type": "imports", + "label": "导入 HeadroomCompressor" + }, + { + "id": "edge:df017662", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/evolution/evolution_store.py", + "type": "imports", + "label": "导入 create_evolution_store" + }, + { + "id": "edge:a92062d4", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/retriever.py", + "type": "imports", + "label": "导入 MemoryRetriever" + }, + { + "id": "edge:5999e28b", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/working.py", + "type": "imports", + "label": "导入 WorkingMemory" + }, + { + "id": "edge:9eb3d1d6", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/semantic.py", + "type": "imports", + "label": "导入 SemanticMemory" + }, + { + "id": "edge:2b5390a9", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/http_rag.py", + "type": "imports", + "label": "导入 HttpRAGService" + }, + { + "id": "edge:5c7f582d", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryStore" + }, + { + "id": "edge:e80260db", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/tools/headroom_retrieve.py", + "type": "imports", + "label": "导入 HeadroomRetrieveTool" + }, + { + "id": "edge:0035a592", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/episodic.py", + "type": "imports", + "label": "导入 EpisodicMemory" + }, + { + "id": "edge:20483fde", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 OpenAIEmbedder" + }, + { + "id": "edge:132cd516", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/embedder.py", + "type": "imports", + "label": "导入 EmbeddingCache" + }, + { + "id": "edge:41a123fc", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/models.py", + "type": "imports", + "label": "导入 EpisodeModel" + }, + { + "id": "edge:797fbf3e", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/memory/models.py", + "type": "imports", + "label": "导入 create_episodic_session_factory" + }, + { + "id": "edge:b51cdc65", + "source": "file:src/agentkit/server/app.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:941f0850", + "source": "file:src/agentkit/server/config.py", + "target": "file:src/agentkit/llm/config.py", + "type": "imports", + "label": "导入 LLMConfig" + }, + { + "id": "edge:f1ab8188", + "source": "file:src/agentkit/server/config.py", + "target": "file:src/agentkit/llm/config.py", + "type": "imports", + "label": "导入 ProviderConfig" + }, + { + "id": "edge:9bdfe035", + "source": "file:src/agentkit/server/config.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:dd4946ce", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 agents" + }, + { + "id": "edge:0d9b0688", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 tasks" + }, + { + "id": "edge:fb279ec2", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 skills" + }, + { + "id": "edge:a7c40543", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 llm" + }, + { + "id": "edge:e67e3324", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 health" + }, + { + "id": "edge:560741f1", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 metrics" + }, + { + "id": "edge:00ac9935", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 ws" + }, + { + "id": "edge:f3353c89", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 evolution" + }, + { + "id": "edge:7c5e4c86", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 memory" + }, + { + "id": "edge:bd9fc594", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 portal" + }, + { + "id": "edge:2867996f", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 evolution_dashboard" + }, + { + "id": "edge:4aa49388", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 kb_management" + }, + { + "id": "edge:a909044d", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 skill_management" + }, + { + "id": "edge:dd70984f", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 workflows" + }, + { + "id": "edge:5bdbe616", + "source": "file:src/agentkit/server/routes/__init__.py", + "target": "file:src/agentkit/server/routes/__init__.py", + "type": "imports", + "label": "导入 terminal" + }, + { + "id": "edge:5e58b8b3", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 AgentConfig" + }, + { + "id": "edge:2860dcde", + "source": "file:src/agentkit/server/routes/agents.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:b35d1677", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:a83ff725", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:90ba1864", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "file:src/agentkit/session/manager.py", + "type": "imports", + "label": "导入 SessionManager" + }, + { + "id": "edge:75e1ef82", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 MessageRole" + }, + { + "id": "edge:e60eb897", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 SessionStatus" + }, + { + "id": "edge:2ce7edeb", + "source": "file:src/agentkit/server/routes/chat.py", + "target": "file:src/agentkit/chat/skill_routing.py", + "type": "imports", + "label": "导入 resolve_skill_routing" + }, + { + "id": "edge:291c77e5", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 EvolutionEvent" + }, + { + "id": "edge:5db0a408", + "source": "file:src/agentkit/server/routes/evolution.py", + "target": "file:src/agentkit/evolution/models.py", + "type": "imports", + "label": "导入 ABTestResultModel" + }, + { + "id": "edge:7b4082e8", + "source": "file:src/agentkit/server/routes/kb_management.py", + "target": "file:src/agentkit/memory/document_loader.py", + "type": "imports", + "label": "导入 DocumentLoader" + }, + { + "id": "edge:649a75b1", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:38b4f2dc", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:a9f3e1e9", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "file:src/agentkit/chat/skill_routing.py", + "type": "imports", + "label": "导入 ExecutionMode" + }, + { + "id": "edge:b8737fe8", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "file:src/agentkit/router/intent.py", + "type": "imports", + "label": "导入 IntentRouter" + }, + { + "id": "edge:491c8531", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "file:src/agentkit/server/routes/evolution_dashboard.py", + "type": "imports", + "label": "导入 _experiences" + }, + { + "id": "edge:0ec55821", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "file:src/agentkit/server/routes/evolution_dashboard.py", + "type": "imports", + "label": "导入 DashboardExperience" + }, + { + "id": "edge:973770f7", + "source": "file:src/agentkit/server/routes/portal.py", + "target": "file:src/agentkit/server/routes/evolution_dashboard.py", + "type": "imports", + "label": "导入 _broadcast_event" + }, + { + "id": "edge:542ae9af", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:e0e7dcc6", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:fa3eb83c", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "file:src/agentkit/skills/pipeline.py", + "type": "imports", + "label": "导入 SkillPipeline" + }, + { + "id": "edge:e76a181e", + "source": "file:src/agentkit/server/routes/skills.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:77d222d7", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:9a321558", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:e1cc73ca", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 LLMProviderError" + }, + { + "id": "edge:8d3e55cd", + "source": "file:src/agentkit/server/routes/tasks.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:c152024a", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "file:src/agentkit/tools/pty_session.py", + "type": "imports", + "label": "导入 PTYSession" + }, + { + "id": "edge:a6dec17c", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 _SAFE_COMMAND_PREFIXES" + }, + { + "id": "edge:fc877c71", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 _DANGEROUS_BINARIES" + }, + { + "id": "edge:21e4aa79", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 _DANGEROUS_BINARY_FLAGS" + }, + { + "id": "edge:eeb9eaa0", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 _DANGEROUS_ARG_PATTERNS" + }, + { + "id": "edge:36de98e0", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 _SHELL_PIPE_OPERATORS" + }, + { + "id": "edge:26154cc5", + "source": "file:src/agentkit/server/routes/terminal.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 _SHELL_CHAIN_OPERATORS" + }, + { + "id": "edge:2bcde323", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "imports", + "label": "导入 ApproveRequest" + }, + { + "id": "edge:be8e24f5", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "imports", + "label": "导入 CreateWorkflowRequest" + }, + { + "id": "edge:3dc42bc5", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "imports", + "label": "导入 ExecuteWorkflowRequest" + }, + { + "id": "edge:4771edbf", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "imports", + "label": "导入 WorkflowDefinition" + }, + { + "id": "edge:78ba391c", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "imports", + "label": "导入 WorkflowExecution" + }, + { + "id": "edge:58eff70d", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "imports", + "label": "导入 WorkflowStage" + }, + { + "id": "edge:7ce7ad6a", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/orchestrator/workflow_schema.py", + "type": "imports", + "label": "导入 WorkflowSummary" + }, + { + "id": "edge:157f2a1a", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:c663614a", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:5c1900ee", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:f4ea8ce5", + "source": "file:src/agentkit/server/routes/workflows.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:5d5d7ad7", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 CancellationToken" + }, + { + "id": "edge:cc491138", + "source": "file:src/agentkit/server/routes/ws.py", + "target": "file:src/agentkit/core/react.py", + "type": "imports", + "label": "导入 ReActEngine" + }, + { + "id": "edge:e8952934", + "source": "file:src/agentkit/server/runner.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:fdfde7e0", + "source": "file:src/agentkit/server/runner.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:54a647d3", + "source": "file:src/agentkit/server/runner.py", + "target": "file:src/agentkit/server/task_store.py", + "type": "imports", + "label": "导入 TaskStore" + }, + { + "id": "edge:3bbc7bb0", + "source": "file:src/agentkit/server/task_store.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskStatus" + }, + { + "id": "edge:85e34dac", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 Message" + }, + { + "id": "edge:e5c80114", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 MessageRole" + }, + { + "id": "edge:8d6f5961", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 Session" + }, + { + "id": "edge:72a74b60", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 SessionStatus" + }, + { + "id": "edge:de79c914", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/manager.py", + "type": "imports", + "label": "导入 SessionManager" + }, + { + "id": "edge:d1897bc3", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/store.py", + "type": "imports", + "label": "导入 InMemorySessionStore" + }, + { + "id": "edge:85ffe4d0", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/store.py", + "type": "imports", + "label": "导入 RedisSessionStore" + }, + { + "id": "edge:44a5c258", + "source": "file:src/agentkit/session/__init__.py", + "target": "file:src/agentkit/session/store.py", + "type": "imports", + "label": "导入 create_session_store" + }, + { + "id": "edge:eb6e6a13", + "source": "file:src/agentkit/session/manager.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 Message" + }, + { + "id": "edge:ae507dd5", + "source": "file:src/agentkit/session/manager.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 MessageRole" + }, + { + "id": "edge:b43165d3", + "source": "file:src/agentkit/session/manager.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 Session" + }, + { + "id": "edge:ad0d1d34", + "source": "file:src/agentkit/session/manager.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 SessionStatus" + }, + { + "id": "edge:0f6408d8", + "source": "file:src/agentkit/session/manager.py", + "target": "file:src/agentkit/session/store.py", + "type": "imports", + "label": "导入 InMemorySessionStore" + }, + { + "id": "edge:fd3356dd", + "source": "file:src/agentkit/session/manager.py", + "target": "file:src/agentkit/session/store.py", + "type": "imports", + "label": "导入 SessionStore" + }, + { + "id": "edge:0b26cc60", + "source": "file:src/agentkit/session/store.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 Message" + }, + { + "id": "edge:2de5d339", + "source": "file:src/agentkit/session/store.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 Session" + }, + { + "id": "edge:1b21913f", + "source": "file:src/agentkit/session/store.py", + "target": "file:src/agentkit/session/models.py", + "type": "imports", + "label": "导入 SessionStatus" + }, + { + "id": "edge:d54a5162", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 IntentConfig" + }, + { + "id": "edge:047a9b2a", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 QualityGateConfig" + }, + { + "id": "edge:f3c5f931", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:2194945c", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:2f0365dd", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:7bc00382", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/pipeline.py", + "type": "imports", + "label": "导入 SkillPipeline" + }, + { + "id": "edge:18515efc", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:c54b4baa", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 CapabilityTag" + }, + { + "id": "edge:f7f55909", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 DependencyDecl" + }, + { + "id": "edge:993e50a9", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 HealthCheckResult" + }, + { + "id": "edge:8b70cdb9", + "source": "file:src/agentkit/skills/__init__.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 SkillSpec" + }, + { + "id": "edge:3554562f", + "source": "file:src/agentkit/skills/base.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 AgentConfig" + }, + { + "id": "edge:caf1d8ec", + "source": "file:src/agentkit/skills/base.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ConfigValidationError" + }, + { + "id": "edge:7f6c70c1", + "source": "file:src/agentkit/skills/base.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 CapabilityTag" + }, + { + "id": "edge:f0ab5a03", + "source": "file:src/agentkit/skills/base.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 DependencyDecl" + }, + { + "id": "edge:93996ef8", + "source": "file:src/agentkit/skills/base.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:8cc43013", + "source": "file:src/agentkit/skills/base.py", + "target": "file:src/agentkit/quality/alignment.py", + "type": "imports", + "label": "导入 AlignmentConfig" + }, + { + "id": "edge:5b17e9c3", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:29725d05", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "file:src/agentkit/core/shared_workspace.py", + "type": "imports", + "label": "导入 SharedWorkspace" + }, + { + "id": "edge:b27b540f", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "file:src/agentkit/orchestrator/compensation.py", + "type": "imports", + "label": "导入 SagaOrchestrator" + }, + { + "id": "edge:648d2c6e", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 StepRetryPolicy" + }, + { + "id": "edge:d64ec189", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "file:src/agentkit/orchestrator/retry.py", + "type": "imports", + "label": "导入 execute_with_retry" + }, + { + "id": "edge:8c66a4bf", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:23efac9f", + "source": "file:src/agentkit/skills/geo_pipeline.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:d98ebe49", + "source": "file:src/agentkit/skills/loader.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:f0255062", + "source": "file:src/agentkit/skills/loader.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:6291781b", + "source": "file:src/agentkit/skills/loader.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:ec382ab3", + "source": "file:src/agentkit/skills/loader.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:58ad6bc7", + "source": "file:src/agentkit/skills/loader.py", + "target": "file:src/agentkit/skills/skill_md.py", + "type": "imports", + "label": "导入 SkillMdParser" + }, + { + "id": "edge:0717d522", + "source": "file:src/agentkit/skills/pipeline.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:6d79c5cb", + "source": "file:src/agentkit/skills/pipeline.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:a889eb46", + "source": "file:src/agentkit/skills/pipeline.py", + "target": "file:src/agentkit/skills/registry.py", + "type": "imports", + "label": "导入 SkillRegistry" + }, + { + "id": "edge:0b141ac3", + "source": "file:src/agentkit/skills/pipeline.py", + "target": "file:src/agentkit/core/config_driven.py", + "type": "imports", + "label": "导入 ConfigDrivenAgent" + }, + { + "id": "edge:f043a46c", + "source": "file:src/agentkit/skills/pipeline.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:26c14081", + "source": "file:src/agentkit/skills/registry.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 SkillNotFoundError" + }, + { + "id": "edge:a8e6c364", + "source": "file:src/agentkit/skills/registry.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 Skill" + }, + { + "id": "edge:b580be9e", + "source": "file:src/agentkit/skills/registry.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:bab68dad", + "source": "file:src/agentkit/skills/registry.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 DependencyDecl" + }, + { + "id": "edge:837ced01", + "source": "file:src/agentkit/skills/registry.py", + "target": "file:src/agentkit/skills/schema.py", + "type": "imports", + "label": "导入 HealthCheckResult" + }, + { + "id": "edge:e36eb5d0", + "source": "file:src/agentkit/skills/registry.py", + "target": "file:src/agentkit/skills/pipeline.py", + "type": "imports", + "label": "导入 SkillPipeline" + }, + { + "id": "edge:74b0daf0", + "source": "file:src/agentkit/skills/skill_md.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ConfigValidationError" + }, + { + "id": "edge:1a00d1e2", + "source": "file:src/agentkit/skills/skill_md.py", + "target": "file:src/agentkit/skills/base.py", + "type": "imports", + "label": "导入 SkillConfig" + }, + { + "id": "edge:0ded3d96", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 get_tracer" + }, + { + "id": "edge:9b9af6c0", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 start_span" + }, + { + "id": "edge:b11f7658", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 trace_agent" + }, + { + "id": "edge:0d17e33f", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 trace_tool" + }, + { + "id": "edge:b336b746", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 trace_llm" + }, + { + "id": "edge:b6a500e8", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 trace_pipeline_step" + }, + { + "id": "edge:b3e7bb60", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 _OTEL_AVAILABLE" + }, + { + "id": "edge:73d3408a", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_request_counter" + }, + { + "id": "edge:ff6ebecd", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 agent_duration_histogram" + }, + { + "id": "edge:eb09c224", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 llm_token_histogram" + }, + { + "id": "edge:e08a6ed8", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 tool_duration_histogram" + }, + { + "id": "edge:4fc00b64", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 pipeline_step_histogram" + }, + { + "id": "edge:9a27e806", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/setup.py", + "type": "imports", + "label": "导入 setup_telemetry" + }, + { + "id": "edge:7e72e6c4", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracer.py", + "type": "imports", + "label": "导入 TelemetryConfig" + }, + { + "id": "edge:350a46db", + "source": "file:src/agentkit/telemetry/__init__.py", + "target": "file:src/agentkit/telemetry/tracer.py", + "type": "imports", + "label": "导入 NoOpTracer" + }, + { + "id": "edge:fd96d282", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:c213cf0d", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/function_tool.py", + "type": "imports", + "label": "导入 FunctionTool" + }, + { + "id": "edge:bfe01f17", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/agent_tool.py", + "type": "imports", + "label": "导入 AgentTool" + }, + { + "id": "edge:776454d7", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/mcp_tool.py", + "type": "imports", + "label": "导入 MCPTool" + }, + { + "id": "edge:2358282d", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/registry.py", + "type": "imports", + "label": "导入 ToolRegistry" + }, + { + "id": "edge:ca43d95a", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/composition.py", + "type": "imports", + "label": "导入 SequentialChain" + }, + { + "id": "edge:1a757d78", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/composition.py", + "type": "imports", + "label": "导入 ParallelFanOut" + }, + { + "id": "edge:ccf9d137", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/composition.py", + "type": "imports", + "label": "导入 DynamicSelector" + }, + { + "id": "edge:abab7e7b", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/web_crawl.py", + "type": "imports", + "label": "导入 WebCrawlTool" + }, + { + "id": "edge:25f9484f", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/schema_tools.py", + "type": "imports", + "label": "导入 SchemaExtractTool" + }, + { + "id": "edge:4ecaf846", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/schema_tools.py", + "type": "imports", + "label": "导入 SchemaGenerateTool" + }, + { + "id": "edge:5ac83c1c", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/baidu_search.py", + "type": "imports", + "label": "导入 BaiduSearchTool" + }, + { + "id": "edge:8798e86e", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/shell.py", + "type": "imports", + "label": "导入 ShellTool" + }, + { + "id": "edge:e93250a6", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/terminal_session.py", + "type": "imports", + "label": "导入 TerminalSession" + }, + { + "id": "edge:507d6a9a", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/terminal_session.py", + "type": "imports", + "label": "导入 TerminalSessionManager" + }, + { + "id": "edge:24e7e623", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/pty_session.py", + "type": "imports", + "label": "导入 PTYSession" + }, + { + "id": "edge:2390b91a", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/output_parser.py", + "type": "imports", + "label": "导入 OutputParser" + }, + { + "id": "edge:bac21b82", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/output_parser.py", + "type": "imports", + "label": "导入 ParsedOutput" + }, + { + "id": "edge:2e9fee9c", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/output_parser.py", + "type": "imports", + "label": "导入 ErrorType" + }, + { + "id": "edge:e2c2714f", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/ask_human.py", + "type": "imports", + "label": "导入 AskHumanTool" + }, + { + "id": "edge:50fbf1bf", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/memory_tool.py", + "type": "imports", + "label": "导入 MemoryTool" + }, + { + "id": "edge:fae059b7", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/web_search.py", + "type": "imports", + "label": "导入 WebSearchTool" + }, + { + "id": "edge:88f668be", + "source": "file:src/agentkit/tools/__init__.py", + "target": "file:src/agentkit/tools/headroom_retrieve.py", + "type": "imports", + "label": "导入 HeadroomRetrieveTool" + }, + { + "id": "edge:c5ff362b", + "source": "file:src/agentkit/tools/agent_tool.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:02f1256e", + "source": "file:src/agentkit/tools/agent_tool.py", + "target": "file:src/agentkit/core/protocol.py", + "type": "imports", + "label": "导入 TaskMessage" + }, + { + "id": "edge:64e2bdfe", + "source": "file:src/agentkit/tools/ask_human.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:0807c78a", + "source": "file:src/agentkit/tools/baidu_search.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:da627cc3", + "source": "file:src/agentkit/tools/base.py", + "target": "file:src/agentkit/telemetry/tracing.py", + "type": "imports", + "label": "导入 start_span" + }, + { + "id": "edge:8f92ed1e", + "source": "file:src/agentkit/tools/base.py", + "target": "file:src/agentkit/telemetry/metrics.py", + "type": "imports", + "label": "导入 tool_duration_histogram" + }, + { + "id": "edge:884f60a2", + "source": "file:src/agentkit/tools/composition.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:e37cb0eb", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:2dc884f8", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "file:src/agentkit/tools/computer_use_session.py", + "type": "imports", + "label": "导入 ComputerUseSession" + }, + { + "id": "edge:7d247ed8", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "file:src/agentkit/tools/computer_use_session.py", + "type": "imports", + "label": "导入 InMemoryComputerUseSession" + }, + { + "id": "edge:9ccf7c2b", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "file:src/agentkit/tools/computer_use_session.py", + "type": "imports", + "label": "导入 ComputerUseSessionManager" + }, + { + "id": "edge:742b52c0", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "file:src/agentkit/tools/computer_use_session.py", + "type": "imports", + "label": "导入 ActionResult" + }, + { + "id": "edge:aad5d1ca", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "file:src/agentkit/tools/computer_use_recorder.py", + "type": "imports", + "label": "导入 ComputerUseRecorder" + }, + { + "id": "edge:c93ebd9b", + "source": "file:src/agentkit/tools/computer_use.py", + "target": "file:src/agentkit/utils/security.py", + "type": "imports", + "label": "导入 is_safe_url" + }, + { + "id": "edge:a87aa3e4", + "source": "file:src/agentkit/tools/computer_use_recorder.py", + "target": "file:src/agentkit/tools/computer_use_session.py", + "type": "imports", + "label": "导入 ComputerUseSession" + }, + { + "id": "edge:1a413ee8", + "source": "file:src/agentkit/tools/computer_use_recorder.py", + "target": "file:src/agentkit/tools/computer_use_session.py", + "type": "imports", + "label": "导入 ActionResult" + }, + { + "id": "edge:b09afeab", + "source": "file:src/agentkit/tools/function_tool.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:6a797867", + "source": "file:src/agentkit/tools/headroom_retrieve.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:34eba040", + "source": "file:src/agentkit/tools/mcp_tool.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:117f3e28", + "source": "file:src/agentkit/tools/memory_tool.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryFile" + }, + { + "id": "edge:43a1837f", + "source": "file:src/agentkit/tools/memory_tool.py", + "target": "file:src/agentkit/memory/profile.py", + "type": "imports", + "label": "导入 MemoryStore" + }, + { + "id": "edge:bd2a0997", + "source": "file:src/agentkit/tools/memory_tool.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:46cc9956", + "source": "file:src/agentkit/tools/registry.py", + "target": "file:src/agentkit/core/exceptions.py", + "type": "imports", + "label": "导入 ToolNotFoundError" + }, + { + "id": "edge:8b4b924b", + "source": "file:src/agentkit/tools/registry.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:3d3c9a10", + "source": "file:src/agentkit/tools/schema_tools.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:bbab8e6c", + "source": "file:src/agentkit/tools/shell.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:6746c254", + "source": "file:src/agentkit/tools/shell.py", + "target": "file:src/agentkit/tools/output_parser.py", + "type": "imports", + "label": "导入 OutputParser" + }, + { + "id": "edge:f2042cb8", + "source": "file:src/agentkit/tools/shell.py", + "target": "file:src/agentkit/tools/output_parser.py", + "type": "imports", + "label": "导入 ParsedOutput" + }, + { + "id": "edge:2d75cf36", + "source": "file:src/agentkit/tools/shell.py", + "target": "file:src/agentkit/tools/terminal_session.py", + "type": "imports", + "label": "导入 TerminalSession" + }, + { + "id": "edge:3422b8cb", + "source": "file:src/agentkit/tools/shell.py", + "target": "file:src/agentkit/tools/terminal_session.py", + "type": "imports", + "label": "导入 TerminalSessionManager" + }, + { + "id": "edge:9cdfd9ee", + "source": "file:src/agentkit/tools/shell.py", + "target": "file:src/agentkit/tools/pty_session.py", + "type": "imports", + "label": "导入 PTYSession" + }, + { + "id": "edge:39620589", + "source": "file:src/agentkit/tools/skill_install.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:8493e97b", + "source": "file:src/agentkit/tools/skill_install.py", + "target": "file:src/agentkit/skills/loader.py", + "type": "imports", + "label": "导入 SkillLoader" + }, + { + "id": "edge:76a84934", + "source": "file:src/agentkit/tools/terminal_session.py", + "target": "file:src/agentkit/tools/output_parser.py", + "type": "imports", + "label": "导入 OutputParser" + }, + { + "id": "edge:be608b85", + "source": "file:src/agentkit/tools/terminal_session.py", + "target": "file:src/agentkit/tools/output_parser.py", + "type": "imports", + "label": "导入 ParsedOutput" + }, + { + "id": "edge:d4b61da0", + "source": "file:src/agentkit/tools/web_crawl.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + }, + { + "id": "edge:ee66e481", + "source": "file:src/agentkit/tools/web_search.py", + "target": "file:src/agentkit/tools/base.py", + "type": "imports", + "label": "导入 Tool" + } + ], + "tours": [ + { + "id": "tour:entry-points", + "name": "入口点导览", + "description": "从项目入口开始,了解如何启动和使用AgentKit", + "steps": [ + { + "nodeId": "file:src/agentkit/__main__.py", + "why": "Python模块入口,python -m agentkit" + }, + { + "nodeId": "file:src/agentkit/__init__.py", + "why": "包入口,导出核心公共API" + }, + { + "nodeId": "file:src/agentkit/cli/main.py", + "why": "CLI主入口,Typer应用定义" + }, + { + "nodeId": "file:src/agentkit/server/app.py", + "why": "HTTP服务入口,FastAPI应用创建" + } + ] + }, + { + "id": "tour:agent-lifecycle", + "name": "Agent生命周期导览", + "description": "深入理解Agent从创建到执行任务的完整生命周期", + "steps": [ + { + "nodeId": "class:BaseAgent", + "why": "Agent基类,定义标准生命周期和可插拔能力" + }, + { + "nodeId": "func:BaseAgent.start", + "why": "Agent启动流程:连接Redis→注册→心跳→监听" + }, + { + "nodeId": "func:BaseAgent.execute", + "why": "任务执行框架方法:on_task_start→handle_task→quality_gate→on_task_complete" + }, + { + "nodeId": "func:BaseAgent.handle_task", + "why": "抽象方法,子类实现业务逻辑" + }, + { + "nodeId": "class:ConfigDrivenAgent", + "why": "配置驱动Agent,从YAML自动组装" + }, + { + "nodeId": "func:ConfigDrivenAgent.handle_task", + "why": "根据execution_mode路由到react/direct/custom模式" + }, + { + "nodeId": "class:AgentConfig", + "why": "Agent配置模型,支持YAML/Dict构建" + } + ] + }, + { + "id": "tour:react-engine", + "name": "ReAct引擎导览", + "description": "理解ReAct推理-行动循环的核心实现", + "steps": [ + { + "nodeId": "class:ReActEngine", + "why": "ReAct引擎核心,Think→Act→Observe循环" + }, + { + "nodeId": "func:ReActEngine.execute", + "why": "执行ReAct循环,支持超时和取消" + }, + { + "nodeId": "func:ReActEngine.execute_stream", + "why": "流式执行,逐步yield事件" + }, + { + "nodeId": "func:ReActEngine._execute_tool", + "why": "工具调用执行,处理成功和失败" + }, + { + "nodeId": "func:ReActEngine._parse_text_tool_calls", + "why": "文本解析模式,支持Action和代码块格式" + }, + { + "nodeId": "class:ReActStep", + "why": "单步记录数据结构" + }, + { + "nodeId": "class:ReActResult", + "why": "ReAct执行结果数据结构" + }, + { + "nodeId": "class:ReActEvent", + "why": "流式执行事件数据结构" + } + ] + }, + { + "id": "tour:llm-gateway", + "name": "LLM网关导览", + "description": "了解多Provider统一网关的设计和实现", + "steps": [ + { + "nodeId": "class:LLMGateway", + "why": "LLM网关核心,统一多Provider调用接口" + }, + { + "nodeId": "file:src/agentkit/llm/protocol.py", + "why": "LLM协议定义,LLMProvider/LLMRequest/LLMResponse" + }, + { + "nodeId": "file:src/agentkit/llm/config.py", + "why": "模型别名和Provider配置" + }, + { + "nodeId": "file:src/agentkit/llm/providers/openai.py", + "why": "OpenAI Provider实现" + }, + { + "nodeId": "file:src/agentkit/llm/providers/anthropic.py", + "why": "Anthropic Provider实现" + }, + { + "nodeId": "file:src/agentkit/llm/retry.py", + "why": "LLM重试策略" + } + ] + }, + { + "id": "tour:memory-system", + "name": "记忆系统导览", + "description": "理解多层记忆系统的架构和实现", + "steps": [ + { + "nodeId": "file:src/agentkit/memory/base.py", + "why": "记忆基类接口定义" + }, + { + "nodeId": "file:src/agentkit/memory/retriever.py", + "why": "统一记忆检索器,整合工作/情景/语义记忆" + }, + { + "nodeId": "file:src/agentkit/memory/working.py", + "why": "工作记忆 - 基于Redis的短期记忆" + }, + { + "nodeId": "file:src/agentkit/memory/episodic.py", + "why": "情景记忆 - 基于向量的长期记忆" + }, + { + "nodeId": "file:src/agentkit/memory/semantic.py", + "why": "语义记忆 - RAG服务集成" + }, + { + "nodeId": "file:src/agentkit/memory/embedder.py", + "why": "文本向量化嵌入器" + } + ] + }, + { + "id": "tour:orchestration", + "name": "编排系统导览", + "description": "了解多Agent协作编排和Pipeline引擎", + "steps": [ + { + "nodeId": "class:Orchestrator", + "why": "多Agent协作编排器,Orchestrator-Worker模式" + }, + { + "nodeId": "func:Orchestrator.execute", + "why": "编排执行:分解→执行→汇总" + }, + { + "nodeId": "func:Orchestrator.execute_adaptive", + "why": "自适应编排:执行→评估→再分解循环" + }, + { + "nodeId": "file:src/agentkit/orchestrator/pipeline_engine.py", + "why": "Pipeline引擎,执行DAG工作流" + }, + { + "nodeId": "file:src/agentkit/orchestrator/pipeline_schema.py", + "why": "Pipeline配置模型" + }, + { + "nodeId": "file:src/agentkit/orchestrator/reflection.py", + "why": "执行后反思模块" + } + ] + }, + { + "id": "tour:skills-router", + "name": "技能与路由导览", + "description": "了解技能定义、注册和意图路由机制", + "steps": [ + { + "nodeId": "file:src/agentkit/skills/base.py", + "why": "技能基类和配置定义" + }, + { + "nodeId": "class:SkillRegistry", + "why": "技能注册中心" + }, + { + "nodeId": "file:src/agentkit/skills/loader.py", + "why": "从YAML加载技能定义" + }, + { + "nodeId": "class:IntentRouter", + "why": "意图路由器,匹配用户输入到技能" + }, + { + "nodeId": "file:src/agentkit/router/intent.py", + "why": "意图路由实现" + } + ] + }, + { + "id": "tour:evolution", + "name": "进化系统导览", + "description": "了解Agent自我进化的机制和实现", + "steps": [ + { + "nodeId": "file:src/agentkit/evolution/lifecycle.py", + "why": "进化生命周期Mixin" + }, + { + "nodeId": "file:src/agentkit/evolution/reflector.py", + "why": "反思器 - 分析结果生成改进建议" + }, + { + "nodeId": "file:src/agentkit/evolution/prompt_optimizer.py", + "why": "Prompt自动优化" + }, + { + "nodeId": "file:src/agentkit/evolution/genetic.py", + "why": "遗传算法进化" + }, + { + "nodeId": "file:src/agentkit/evolution/ab_tester.py", + "why": "A/B测试对比" + } + ] + }, + { + "id": "tour:infrastructure", + "name": "基础设施导览", + "description": "了解消息总线、会话管理、遥测等基础设施", + "steps": [ + { + "nodeId": "file:src/agentkit/bus/protocol.py", + "why": "消息总线协议接口" + }, + { + "nodeId": "file:src/agentkit/bus/redis_bus.py", + "why": "Redis Pub/Sub消息总线" + }, + { + "nodeId": "file:src/agentkit/bus/memory_bus.py", + "why": "进程内消息总线" + }, + { + "nodeId": "file:src/agentkit/session/manager.py", + "why": "会话管理器" + }, + { + "nodeId": "file:src/agentkit/telemetry/tracing.py", + "why": "OpenTelemetry追踪集成" + }, + { + "nodeId": "file:src/agentkit/telemetry/metrics.py", + "why": "运行指标收集" + } + ] + } + ] +} \ No newline at end of file diff --git a/.understand-anything/meta.json b/.understand-anything/meta.json new file mode 100644 index 0000000..b810a20 --- /dev/null +++ b/.understand-anything/meta.json @@ -0,0 +1,6 @@ +{ + "lastAnalyzedAt": "2026-06-12T17:39:05.023556+00:00", + "gitCommitHash": "09698d7a06c8d77b411e5a34ea27343ce9e8b42c", + "version": "1.0.0", + "analyzedFiles": 248 +} \ No newline at end of file diff --git a/README.md b/README.md index 4480168..c4a5711 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,20 @@ # Fischer AgentKit -统一 Agent 开发框架 -- 将 LLM、Tool、Prompt 组装为可执行的 Skill,通过 ReAct 推理引擎自主完成任务。 +统一 AI Agent 开发框架 -- 将 LLM、Tool、Prompt 组装为可执行的 Skill,通过 ReAct 推理引擎自主完成任务,支持记忆持久化、自进化、Pipeline 编排和桌面客户端。 ## 项目简介 AgentKit 解决的核心问题:**从写 150 行 Agent 代码降为 10-20 行 YAML 配置**。 -传统方式下,每新增一个 Agent 需要编写子类、处理 LLM 调用、管理工具绑定、校验输出质量。AgentKit 将这些能力标准化为 8 个可组合模块,开发者只需编写 YAML 配置即可定义一个完整的 Skill(Prompt + Tool + 质量门禁),框架自动完成 ReAct 推理循环、模型路由降级、产出质量检查和标准化输出。 +传统方式下,每新增一个 Agent 需要编写子类、处理 LLM 调用、管理工具绑定、校验输出质量。AgentKit 将这些能力标准化为可组合模块,开发者只需编写 YAML 配置即可定义一个完整的 Skill(Prompt + Tool + 质量门禁),框架自动完成 ReAct 推理循环、模型路由降级、产出质量检查和标准化输出。 核心定位: - **配置驱动** -- YAML 定义 Skill,无需写 Agent 子类 - **生产就绪** -- 内置质量门禁、模型降级、用量统计 -- **三种使用** -- Python 库引用、CLI 聊天、Web GUI 界面 +- **四种使用** -- Python 库引用、CLI 聊天、Web GUI、桌面客户端 +- **记忆持久化** -- SOUL/USER/MEMORY/DAILY 四层记忆,写入即生效 +- **自进化** -- 反思驱动 Soul 更新,经验积累与陷阱检测 - **工具丰富** -- 内置 Shell、搜索、爬虫、记忆等工具,支持 MCP 扩展 - **Pipeline 编排** -- 多 Agent 协同、Saga 补偿、动态流水线 @@ -34,15 +36,53 @@ Skill = SkillConfig + 绑定 Tools。一个 Skill 代表一个可执行技能, 两级路由:Level 1 关键词匹配(零成本,~0ms),Level 2 LLM 分类(回退方案,~200 tokens)。自动将用户输入路由到最佳匹配的 Skill。 -### 5. 产出质量管理 +### 5. 记忆系统 + +四层持久化记忆,写入即生效(无需重启): + +| 层级 | 文件 | 说明 | +|------|------|------| +| 身份 | `SOUL.md` | Agent 身份、性格、做事准则、版本追踪 | +| 用户 | `USER.md` | 用户基本信息和偏好 | +| 笔记 | `MEMORY.md` | Agent 主动记录的重要信息 | +| 日志 | `DAILY/` | 按日期归档的交互摘要 | + +- **Section-based CRUD**:每个记忆文件按 `## Section` 组织,支持原子读写 +- **容量保护**:`trim_to_budget` 按 section 边界裁剪,保护"版本"和"更新历史" +- **即时刷新**:MemoryTool 写入后自动触发 `notify_change()`,所有 Agent 的 system_prompt 实时更新 +- **RAG 检索**:向量嵌入 + 多源检索器,支持飞书/Confluence 适配器 + +### 6. 自进化系统 + +反思驱动的 Agent 自我改进: + +- **Reflector** -- 任务完成后自动反思,生成质量评分和改进建议 +- **Soul Evolution** -- 累积反思触发阈值后自动更新 SOUL.md,版本追踪 +- **经验存储** -- 成功/失败经验持久化,陷阱检测避免重复错误 +- **Prompt 优化** -- 遗传算法 + A/B 测试自动优化 Prompt +- **路径优化** -- 分析工具调用路径,推荐更优执行策略 + +### 7. 三层意图路由 + +CostAwareRouter 三层路由,从零成本到高成本逐层升级: + +| Layer | 方法 | 延迟 | Token 消耗 | 说明 | +|-------|------|------|-----------|------| +| 0 | 正则规则 | ~0ms | 0 | 问候/简单对话直接回复 | +| 1 | 启发式分类 | ~0ms | 0 | 关键词 + 模式匹配 | +| 2 | LLM 分类 | ~500ms | ~200 | 回退方案,LLM 判断意图 | + +路由结果携带 `ExecutionMode` 枚举(`DIRECT_CHAT` / `REACT` / `SKILL_REACT`),作为路由层与执行层的架构契约,杜绝硬编码。 + +### 8. 产出质量管理 四维质量检查:必填字段、最低字数、JSON Schema 校验、自定义验证器。检查不通过时自动重试(可配置 max_retries),重试时携带质量反馈信息。 -### 6. 标准化输出 +### 9. 标准化输出 Schema 验证 + 字段类型归一化(str -> int/float/bool)+ 元数据附加(version、produced_at、quality_score)。所有 Skill 产出统一为 StandardOutput 格式。 -### 7. 内置工具集 +### 10. 内置工具集 开箱即用的工具插件,覆盖常见 Agent 需求: @@ -60,7 +100,7 @@ Schema 验证 + 字段类型归一化(str -> int/float/bool)+ 元数据附 工具组合:`SequentialChain`(顺序链)、`ParallelFanOut`(并行扇出)、`DynamicSelector`(动态选择)。 -### 8. Pipeline 编排 +### 11. Pipeline 编排 多 Agent 协同编排,支持复杂工作流: @@ -73,73 +113,63 @@ Schema 验证 + 字段类型归一化(str -> int/float/bool)+ 元数据附 ## 架构图 ``` - +-------------------+ +-------------------+ - | Web GUI Chat | | CLI Chat | - | (WebSocket) | | (agentkit chat) | - +--------+----------+ +--------+----------+ - | | - +----------+----------+ - | - +----------v----------+ - | Skill Routing | - | (keyword -> LLM) | - +----------+----------+ - | - matched_skill - | - +-------------------v-------------------+ - | ConfigDrivenAgent | - | (SkillConfig-driven) | - +-------------------+------------------+ - | - +--------------+--------------+ - | | - v v - +---------+--------+ +----------+---------+ - | ReActEngine | | Traditional Mode | - | Think->Act->Observe| | llm_generate/ | - +---------+--------+ | tool_call/custom | - | +---------------------+ - v - +----------+----------+ - | LLM Gateway | - | resolve -> chat | - | fallback -> track | - +----------+----------+ - | - +------+------+ - | | - v v - +-----+----+ +-----+-----+ - | DashScope | | OpenAI | ... - +-----+----+ +-----+-----+ - | - +----------+----------+ - | Tool Registry | - | shell / search / | - | crawl / memory / ... | - +----------+----------+ - | - v - +----------+----------+ - | Quality Gate | - | required_fields | - | min_word_count | - | schema validation | - | custom validator | - +----------+----------+ - | - v - +----------+----------+ - | OutputStandardizer | - | schema + normalize | - | + metadata | - +----------+----------+ - | - v - StandardOutput + ┌──────────────────────────────────────────────────────────────┐ + │ 桌面客户端 (Tauri 2.x) │ + │ splash → main窗口 → sidecar进程管理 → 系统托盘 │ + └──────────────────────────┬───────────────────────────────────┘ + │ + ┌──────────────────────────┼───────────────────────────────────┐ + │ 前端 (Vue 3 + Ant Design Vue) │ + │ ChatView · EvolutionView · WorkflowView · TerminalView │ + │ KnowledgeBase · SkillsView · SettingsView · ComputerUse │ + └──────────────────────────┼───────────────────────────────────┘ + │ WebSocket / SSE / HTTP + ┌──────────────────────────┼───────────────────────────────────┐ + │ 服务端 (FastAPI + Uvicorn) │ + │ portal.py · chat.py · evolution.py · workflows.py · ... │ + │ 17个路由模块 · Agent Pool · Memory Store │ + └──────────────────────────┼───────────────────────────────────┘ + │ + ┌──────────────┼──────────────┐ + │ CostAwareRouter │ + │ Layer 0: 正则规则 (0ms) │ + │ Layer 1: 启发式分类 (0ms) │ + │ Layer 2: LLM分类 (~500ms) │ + │ → ExecutionMode 枚举契约 │ + └──────┬───────────────┬───────┘ + │ │ + DIRECT_CHAT │ │ REACT / SKILL_REACT + ▼ ▼ + ┌─────────────┐ ┌──────────────────┐ + │ Direct LLM │ │ ConfigDrivenAgent│ + │ (简单对话) │ │ (ReAct Engine) │ + └─────────────┘ └────────┬─────────┘ + │ + ┌────────────────┼────────────────┐ + │ │ │ + ▼ ▼ ▼ + ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ + │ LLM Gateway │ │ Tool Registry│ │ Memory System│ + │ resolve→chat │ │ shell/search │ │ SOUL/USER │ + │ fallback→track│ │ crawl/memory │ │ MEMORY/DAILY │ + └──────┬───────┘ └──────────────┘ └──────────────┘ + │ + ┌─────────┼─────────┐ + ▼ ▼ ▼ + ┌─────────┐ ┌────────┐ ┌──────────┐ + │DashScope│ │ OpenAI │ │ DeepSeek │ ... + └─────────┘ └────────┘ └──────────┘ ``` +### 模块分层 + +| 层级 | 模块 | 说明 | +|------|------|------| +| **API** | `server/` `cli/` | 服务端路由 + 命令行入口 | +| **Service** | `core/` `chat/` `skills/` | Agent 引擎、路由、技能系统 | +| **Data** | `memory/` `session/` `bus/` | 记忆持久化、会话管理、消息总线 | +| **Utility** | `llm/` `tools/` `evolution/` `quality/` `mcp/` | LLM 网关、工具、进化、质量、MCP | + ## 快速开始 ### 安装 @@ -372,6 +402,81 @@ if __name__ == "__main__": python server.py ``` +### Docker 部署 + +```bash +# 启动完整环境(AgentKit + Redis + PostgreSQL + pgvector) +docker-compose up -d + +# 查看日志 +docker-compose logs -f agentkit + +# 健康检查 +docker-compose exec agentkit agentkit doctor + +# 停止 +docker-compose down +``` + +`docker-compose.yaml` 包含三个服务: + +| 服务 | 镜像 | 端口 | 说明 | +|------|------|------|------| +| `agentkit` | 自建 (python:3.11-slim) | 8001 | AgentKit 服务端 | +| `redis` | redis:7-alpine | 6379 | 消息总线 + 缓存 | +| `postgres` | pgvector/pgvector:pg15 | 5432 | 语义记忆向量存储 | + +### 桌面客户端 (Tauri 2.x) + +跨平台桌面应用,Rust Shell + Vue 3 前端 + Python Sidecar。 + +**前置条件**:Rust 工具链 + Node.js 18+ + Python 3.11+ + +```bash +# 1. 构建 Python sidecar +pip install pyinstaller +pyinstaller --onefile --name agentkit-server src/agentkit/__main__.py + +# 2. 放置 sidecar(带平台后缀) +# macOS Apple Silicon: +cp dist/agentkit-server src-tauri/binaries/agentkit-server-aarch64-apple-darwin +# macOS Intel: +cp dist/agentkit-server src-tauri/binaries/agentkit-server-x86_64-apple-darwin +# Linux: +cp dist/agentkit-server src-tauri/binaries/agentkit-server-x86_64-unknown-linux-gnu +# Windows: +copy dist\agentkit-server.exe src-tauri\binaries\agentkit-server-x86_64-pc-windows-msvc.exe + +# 3. 构建前端 +cd src/agentkit/server/frontend +npm install +npm run build:frontend + +# 4. 开发模式(热重载) +npm run tauri dev + +# 5. 生产构建 +npm run tauri build +# 产物: +# macOS: src-tauri/target/release/bundle/dmg/Fischer AgentKit.dmg +# macOS: src-tauri/target/release/bundle/macos/Fischer AgentKit.app +# Windows: src-tauri/target/release/bundle/msi/ +# Linux: src-tauri/target/release/bundle/deb/ +``` + +**架构**: + +``` +Tauri Shell (Rust) +├── 窗口管理(splash + main) +├── 系统托盘(显示窗口 / 退出) +└── Sidecar 进程管理 + └── agentkit-server(PyInstaller 打包的 Python 服务端) + └── Uvicorn + FastAPI (--port 0 动态分配) +``` + +Tauri 启动时以 `--port 0` 启动 sidecar,解析 stdout 获取实际端口,前端通过该端口连接后端。 + ## 调用方式 ### Import 模式示例 @@ -830,6 +935,20 @@ ReActEngine 实现 Think -> Act -> Observe 循环: 停止条件:LLM 不返回 tool_calls,或达到 max_steps。 +危险工具确认流:非白名单命令触发 `needs_confirmation`,用户确认后以 `_skip_dangerous_check=True` 重新执行,避免无限循环。 + +### chat/skill_routing -- CostAwareRouter 三层路由 + +三层路由从零成本到高成本逐层升级: + +| Layer | 组件 | 延迟 | Token | +|-------|------|------|-------| +| 0 | `RegexRules` | ~0ms | 0 | +| 1 | `HeuristicClassifier` | ~0ms | 0 | +| 2 | `LLMClassifier` | ~500ms | ~200 | + +路由结果包含 `ExecutionMode` 枚举(`DIRECT_CHAT` / `REACT` / `SKILL_REACT`),作为路由层与执行层的架构契约。`complexity` 评分使用 `if is not None` 判断,避免 `0.0 or default` 误覆盖。 + ### llm/gateway -- LLM Gateway 统一 LLM 调用入口,核心能力: @@ -851,16 +970,9 @@ Skill = SkillConfig + 绑定 Tools。SkillConfig 扩展自 AgentConfig,新增 SkillRegistry 管理 Skill 的注册、发现、更新。 -### router/intent -- 意图路由 +### router/intent -- 意图路由(已升级为 chat/skill_routing) -两级路由策略: - -| Level | 方法 | 延迟 | Token 消耗 | 置信度 | -|-------|------|------|-----------|--------| -| 1 | 关键词匹配 | ~0ms | 0 | 1.0 | -| 2 | LLM 分类 | ~500ms | ~200 | 0.0-1.0 | - -关键词匹配对 input_data 中所有字符串值(包括嵌套)进行大小写不敏感匹配。LLM 分类构建 prompt 列出所有 Skill 的名称、描述和示例,让 LLM 返回 JSON 格式的匹配结果。 +原两级路由已升级为 CostAwareRouter 三层路由(详见 chat/skill_routing 模块详解)。 ### quality/gate -- 产出质量管理 @@ -909,6 +1021,62 @@ v2 增强:接受 SkillConfig 时自动创建 Skill 并启用 ReAct 模式,Qu 运行时 Agent 实例池,管理 Agent 的创建、获取、删除。支持从已注册的 Skill 创建 Agent。 +### memory -- 记忆系统 + +四层持久化记忆,基于 Markdown section 的 CRUD 操作: + +- **MemoryFile** -- 单个记忆文件(SOUL/USER/MEMORY/DAILY),支持 `read_section`/`write_section`/`add_section`/`remove_section` +- **MemoryStore** -- 管理所有记忆文件,`build_system_prompt()` 将记忆注入 system_prompt +- **即时刷新** -- `notify_change()` 回调机制,MemoryTool 写入后自动刷新所有 Agent 的 system_prompt +- **容量保护** -- `trim_to_budget` 按 section 边界裁剪,`protected_sections` 确保版本/更新历史不被裁剪 +- **原子写入** -- `_update_soul` 在内存中构建完整内容后一次性写入,避免先删后加导致数据丢失 +- **RAG** -- 向量嵌入 + 多源检索器,支持飞书/Confluence 适配器 + +记忆注入格式: + +``` + +## 身份 +我是AK,一个专业的 AI 助手。 + + + +## 基本信息 +- 姓名:张三 + + + +## 重要事项 +... + + + +## 2026-06-14 +... + + +[base_prompt 行为指令] +``` + +### evolution -- 自进化系统 + +反思驱动的 Agent 自我改进: + +- **Reflector** -- 任务完成后自动反思,生成 quality_score 和 suggestions +- **evolve_soul** -- 累积反思达到阈值后触发 SOUL.md 更新,汇总所有反思建议(去重取 top 5) +- **ExperienceStore** -- 成功/失败经验持久化 +- **PitfallDetector** -- 陷阱检测,避免重复错误 +- **PromptOptimizer** -- 遗传算法优化 Prompt +- **PathOptimizer** -- 分析工具调用路径,推荐更优策略 +- **ABTester** -- A/B 测试验证优化效果 + +### bus -- 消息总线 + +进程内/跨进程消息传递: + +- **MemoryBus** -- 进程内同步消息总线,集成 CascadeDetector 和 AlignmentGuard 进行消息质量管控 +- **RedisBus** -- 基于 Redis Pub/Sub 的分布式消息总线,支持多实例部署 + ### server -- FastAPI Server 独立部署模式,提供 RESTful API 和 Web GUI: @@ -927,16 +1095,28 @@ v2 增强:接受 SkillConfig 时自动创建 Skill 并启用 ReAct 模式,Qu | `/api/v1/llm/usage` | GET | 查询 LLM 用量 | | `/api/v1/health` | GET | 健康检查 | -### Web GUI 聊天界面 +### Web GUI -通过 `agentkit gui` 启动,特性: +通过 `agentkit gui` 启动,8 个页面视图: -- **实时对话** -- WebSocket 流式传输,逐 token 显示 -- **Markdown 渲染** -- 自动检测并渲染标题、列表、代码块、表格等 -- **工具确认卡片** -- 危险命令(如 `rm`)执行前弹出确认卡片,用户批准后才执行 -- **Loading 动画** -- 等待 AI 响应时显示思考动画 -- **Skill 路由** -- 输入 `@skill_name:` 前缀可指定使用特定 Skill -- **会话管理** -- 多会话并行,历史记录持久化 +| 视图 | 说明 | +|------|------| +| ChatView | 实时对话,WebSocket 流式传输,代码高亮,工具调用卡片 | +| EvolutionView | 自进化仪表盘,任务/经验/指标/优化面板 | +| WorkflowView | 工作流编辑器,Vue Flow 可视化编排 | +| TerminalView | 终端模拟器,PTY 会话 | +| KnowledgeBaseView | 知识库管理,文档上传/搜索/源配置 | +| SkillsView | 技能市场,技能卡片/详情 | +| SettingsView | 系统设置 | +| ComputerUseView | 计算机使用,桌面操控 | + +### 桌面客户端 (Tauri 2.x) + +跨平台桌面应用,架构: + +- **Rust Shell** -- 窗口管理(splash + main)、系统托盘、单实例锁 +- **Sidecar 管理** -- 以 `--port 0` 启动 Python 后端,解析 stdout 获取动态端口 +- **前端** -- Vue 3 SPA,通过动态端口连接后端 ### orchestrator -- Pipeline 编排 @@ -1087,26 +1267,70 @@ async def generate_content(keyword: str, brand: str) -> dict: ## 开发指南 -### 运行测试 +### 项目结构 + +``` +fischer-agentkit/ +├── src/agentkit/ # Python 后端 +│ ├── bus/ # 消息总线(MemoryBus + RedisBus) +│ ├── chat/ # 聊天路由(CostAwareRouter + ExecutionMode) +│ ├── cli/ # CLI 命令(Typer) +│ ├── core/ # 核心引擎(ReAct/Reflexion/ReWOO/ConfigDriven) +│ ├── evaluation/ # 评估系统(RAGAS) +│ ├── evolution/ # 自进化(反思/优化/陷阱检测/A/B测试) +│ ├── llm/ # LLM 网关(多供应商适配) +│ ├── marketplace/ # 多Agent市场(拍卖/财富) +│ ├── mcp/ # MCP 协议 +│ ├── memory/ # 记忆系统(SOUL/USER/MEMORY/DAILY + RAG) +│ ├── orchestrator/ # Pipeline 编排(Saga/动态流水线) +│ ├── org/ # 组织发现 +│ ├── prompts/ # Prompt 模板 +│ ├── quality/ # 质量保障(对齐/级联检测/门控) +│ ├── router/ # 意图路由 +│ ├── server/ # FastAPI 服务端 + Vue 3 前端 +│ ├── session/ # 会话管理 +│ ├── skills/ # 技能系统 +│ ├── telemetry/ # 遥测追踪 +│ ├── tools/ # 工具插件(21个) +│ └── utils/ # 工具函数 +├── src-tauri/ # Tauri 桌面客户端(Rust) +│ ├── src/ # main.rs + lib.rs + sidecar.rs + tray.rs +│ └── binaries/ # Sidecar 二进制(平台相关) +├── configs/ # 配置文件(技能/LLM/GEO) +├── tests/ # 测试(unit + integration) +├── docs/ # 文档(brainstorms + plans) +├── Dockerfile # Docker 镜像构建 +├── docker-compose.yaml # 生产编排 +└── pyproject.toml # Python 项目配置 +``` + +### 常用开发命令 ```bash -# 安装开发依赖 -pip install -e ".[dev]" +# 后端 +pip install -e ".[dev]" # 安装开发依赖 +agentkit gui --port 8002 # 启动 Web GUI +agentkit serve --port 8001 # 启动 API 服务器 +pytest # 运行全部测试 +pytest -m "not integration" # 仅单元测试 +pytest --cov=agentkit # 覆盖率 +ruff check src/ && ruff format src/ # 代码检查和格式化 -# 运行全部测试 -pytest +# 前端 +cd src/agentkit/server/frontend +npm install # 安装依赖 +npm run dev # Vite 开发服务器 +npm run build:frontend # 生产构建 +npm run typecheck # TypeScript 类型检查 -# 运行单元测试(跳过集成测试) -pytest -m "not integration" +# 桌面客户端 +cd src/agentkit/server/frontend +npm run tauri dev # Tauri 开发模式 +npm run tauri build # Tauri 生产构建 -# 运行并查看覆盖率 -pytest --cov=agentkit --cov-report=term-missing - -# 仅运行 Redis 相关测试 -pytest -m redis - -# 仅运行 PostgreSQL 相关测试 -pytest -m postgres +# Docker +docker-compose up -d # 启动完整环境 +docker-compose logs -f agentkit # 查看日志 ``` ### 添加新 Skill diff --git a/docs/GEO-INTEGRATION-GUIDE.md b/docs/GEO-INTEGRATION-GUIDE.md index 0a92557..f2e3cbc 100644 --- a/docs/GEO-INTEGRATION-GUIDE.md +++ b/docs/GEO-INTEGRATION-GUIDE.md @@ -9,10 +9,11 @@ AgentKit 是一个**统一 Agent 开发框架**,核心能力: | **ReAct 推理引擎** | Think → Act → Observe 循环,LLM 自主选择工具、决定何时输出 | | **LLM Gateway** | 统一 LLM 调用入口,管理 API Key、模型路由、降级策略、用量统计 | | **Skill 系统** | YAML 配置定义技能(Prompt + Tool + 质量门禁),无需写代码 | -| **意图路由** | 关键词匹配(零成本)+ LLM 分类(兜底),自动路由到最佳 Skill | +| **意图路由** | CostAwareRouter 三层路由:正则规则(0ms) → 启发式分类(0ms) → LLM分类(~500ms),ExecutionMode 枚举契约 | | **产出质量管理** | 必填字段、最低字数、Schema 校验、自定义验证器,不通过自动重试 | | **标准化输出** | Schema 验证 + 类型归一化 + 元数据附加,所有 Skill 产出格式统一 | -| **记忆系统** | 语义记忆(pgvector)+ 情景记忆(Redis)+ 工作记忆 | +| **记忆系统** | SOUL/USER/MEMORY/DAILY 四层持久化记忆,写入即生效 + RAG 检索 | +| **自进化** | 反思驱动 Soul 更新,经验积累与陷阱检测 | | **MCP 协议** | 支持 Model Context Protocol,可连接外部工具服务器 | | **CLI 工具** | `agentkit` 命令行,支持 init/serve/task/skill/pair/doctor/usage | | **独立部署** | FastAPI Server + Docker,业务系统通过 HTTP API 调用 | diff --git a/docs/brainstorms/2026-06-09-agentkit-capability-matrix/plan.md b/docs/brainstorms/2026-06-09-agentkit-capability-matrix/plan.md new file mode 100644 index 0000000..277584c --- /dev/null +++ b/docs/brainstorms/2026-06-09-agentkit-capability-matrix/plan.md @@ -0,0 +1,765 @@ +--- +date: 2026-06-09 +deepened: 2026-06-09 +status: active +origin: docs/brainstorms/2026-06-09-agentkit-capability-matrix/requirements.md +--- + +## Summary + +基于内核+插件架构,为 AgentKit 构建 7 项企业级能力:自主闭环执行引擎(内核)、Skill 标准规范升级、知识库与 RAG 增强、智能终端交互、Computer Use 集成、可视化 Workflow、自进化经验积累。分 6 个阶段交付,先建内核再逐步接入插件能力,最终通过端到端企业场景验证。 + +## Problem Frame + +企业想用 AI Agent 但不会落地。AgentKit 已具备 Skill/ReAct/Pipeline/RAG/Shell 等基础能力,但缺少自主闭环执行、Computer Use、可视化 Workflow、任务经验积累等高级能力,且各能力之间缺乏统一调度中枢。需要以自主闭环执行引擎为内核,其他能力作为 Skill 插件接入,形成企业综合门户。 + +--- + +## Key Technical Decisions + +**KTD-1. GoalPlanner 包装 Orchestrator._decompose_task(),而非独立实现** + +现有 `Orchestrator._decompose_task()`(`src/agentkit/core/orchestrator.py`)已实现 LLM 驱动任务分解 + `_build_parallel_groups()` 并行组构建 + 单任务 fallback。GoalPlanner 作为前置增强层包装此方法:先通过结构化目标分解(规则/模板)生成初始方案,再让 LLM 细化调整;如果 GoalPlanner 返回了有效方案可直接跳过 LLM 调用。保持 fallback 机制不变,确保向后兼容。PlanExecutor 同理扩展 `Orchestrator.execute()`,注入执行策略,保留默认 `_execute_plan` 作为 fallback。 + +**KTD-2. 经验库使用 PostgreSQL + pgvector 混合存储** + +结构化字段(task_type, outcome, duration)存 PostgreSQL 表,语义向量存 pgvector,全文检索用 tsvector。与现有 `EpisodicMemory` 共享基础设施,无需引入新依赖(ChromaDB/FAISS)。 + +**KTD-3. Computer Use 作为 Tool 插件集成** + +新增 `ComputerUseTool`(继承 `Tool` 基类),内部调用 Anthropic Computer Use API。与 `ShellTool` 形成降级链:ComputerUseTool 失败 → ShellTool/API → AskHumanTool。符合 Skill 插件架构,无需修改核心引擎。 + +**KTD-4. Vue Flow 作为 Workflow 可视化编辑器** + +Vue Flow 是 Vue3 原生组件,轻量(~60KB gzip),DAG 天然支持,自定义节点丰富。与现有 `PipelineEngine` 的 DAG 模型完美对应。Vue Flow JSON 可直接映射为 `PipelineStage` 配置。 + +**KTD-5. 智能终端增强现有 ShellTool** + +在现有 `ShellTool` 基础上增加 `TerminalSession`(会话状态管理)和 `PTYSession`(交互式命令支持),而非替换。保持向后兼容,新功能通过配置开关启用。 + +**KTD-6. 前端独立 SPA,通过 API 与后端交互** + +Vue3 前端作为独立 SPA,通过 FastAPI REST API + WebSocket 与后端通信。前端代码放在 `src/agentkit/server/frontend/` 目录,构建产物输出到 `src/agentkit/server/static/`。与现有 Server 架构无缝集成。 + +**KTD-7. KBAdapter 使用独立 KnowledgeBase 协议,不直接实现 Memory 接口** + +Memory 接口的 `retrieve(key)`/`delete(key)` 是精确 key-value 语义,与知识库的语义检索模型不匹配。创建独立的 `KnowledgeBase` 协议(`ingest`/`query`/`delete_by_id`/`list_sources`/`health_check`),`SemanticMemory` 内部组合使用 `KnowledgeBase`,而非强制适配。这避免了 `retrieve(key)` 的人为映射和性能损失。 + +**KTD-8. PipelineStage 扩展 type/config 字段,WorkflowDefinition 继承 Pipeline** + +现有 `PipelineStage` 没有 `type` 字段,`action` 隐含类型语义。新增 `type: str = "skill"`(默认值不破坏现有数据)和 `config: dict = {}`(类型特定配置)。`WorkflowDefinition` 继承 `Pipeline`(而非 `PipelineStage`),新增 `workflow_id`/`triggers`/`variables_schema`/`output_schema` 字段。 + +--- + +## High-Level Technical Design + +```mermaid +flowchart TB + subgraph Portal["企业 Agent 门户 (Vue3 SPA)"] + Chat["统一对话界面"] + WF["Workflow 编辑器"] + KB["知识库管理"] + Term["智能终端"] + CU["Computer Use"] + EVO["自进化仪表盘"] + end + + subgraph Kernel["自主闭环执行引擎"] + GP["GoalPlanner
目标→计划"] + PE["PlanExecutor
并行执行"] + PC["PlanChecker
检查+复盘"] + end + + subgraph Plugins["Skill 插件"] + RAG["RAG Skill
本地+外部"] + ST["TerminalSkill
智能终端"] + CUT["ComputerUseSkill
UI自动化"] + end + + subgraph Foundation["现有基础设施"] + RE["ReActEngine"] + ORC["Orchestrator"] + PL["PipelineEngine"] + SR["SkillRegistry"] + TR["ToolRegistry"] + MR["MemoryRetriever"] + ES["ExperienceStore
(新增)"] + end + + Chat --> GP + GP --> PE + PE --> PC + PC --> ES + + PE --> RAG + PE --> ST + PE --> CUT + + RAG --> MR + ST --> TR + CUT --> TR + PE --> ORC + PE --> PL + GP --> SR + + WF --> PL + EVO --> ES +``` + +--- + +## Requirements Traceability + +| Origin R-ID | Plan Coverage | +|---|---| +| R1-R6 | U1 (GoalPlanner), U2 (PlanExecutor), U3 (PlanChecker) | +| R7-R10 | U4 (Skill 标准规范升级) | +| R11-R14 | U9 (本地文档摄取), U10 (外部知识库适配器), U11 (多源 RAG) | +| R15-R18 | U8 (智能终端交互) | +| R19-R22 | U12 (Computer Use 集成) | +| R24-R28 | U14 (Workflow 可视化编辑器) | +| R29-R33 | U5 (ExperienceStore), U6 (PitfallDetector), U7 (PathOptimizer) | +| R34 | U13a (对话界面与路由) | +| R35 | U13b (管理页面) | +| R36 | U13c (自进化仪表盘) | + +--- + +## Implementation Units + +### Phase 1: 核心内核与经验基础 + +### U1. GoalPlanner — 目标分析与计划生成 + +**Goal:** 用户给定自然语言目标后,自动生成结构化执行计划,包含任务拆解、依赖关系、并行度识别。 + +**Requirements:** R1, R2 + +**Dependencies:** 无 + +**Files:** +- `src/agentkit/core/goal_planner.py` (新建) +- `src/agentkit/core/plan_schema.py` (新建) +- `src/agentkit/core/orchestrator.py` (修改 — 增加 GoalPlanner 分支) +- `tests/unit/core/test_goal_planner.py` (新建) + +**Approach:** +- 新增 `GoalPlanner` 类,包装 `Orchestrator._decompose_task()` 作为前置增强层(见 KTD-1) +- `GoalPlanner.generate_plan(goal, context, available_skills)` → `ExecutionPlan` +- 执行流程:GoalPlanner 先通过结构化目标分解(规则/模板)生成初始方案 → 如果有效则跳过 LLM 调用 → 否则将初始方案作为上下文注入 `_decompose_task()` 的 LLM prompt → LLM 细化调整 +- `ExecutionPlan` 包含 `PlanStep` 列表,每个 step 有 name/description/dependencies/parallel_group/required_skills +- 依赖识别:复用 `_build_parallel_groups()` 的拓扑排序逻辑 +- 人工确认:`ExecutionPlan` 序列化为可读格式,通过 `AskHumanTool` 请求确认/修改 +- 修改 `Orchestrator._decompose_task()`:增加 `if self._goal_planner:` 分支 + +**Patterns to follow:** `Orchestrator._decompose_task()` 的 LLM 调用模式(`src/agentkit/core/orchestrator.py`) + +**Test scenarios:** +- 简单目标(单步任务)→ 生成单步计划 +- 复杂目标(多步任务)→ 生成多步计划,正确识别依赖和并行关系 +- 无可用 Skill 的目标 → 计划标注能力缺口,请求人工介入 +- 用户修改计划 → 更新后重新验证依赖关系 +- Covers AE1: 3 个竞品调研自动识别为并行步骤 + +**Verification:** `GoalPlanner` 能将"调研 3 个竞品 SEO 策略并生成对比报告"分解为包含并行步骤的结构化计划 + +### U2. PlanExecutor — 计划执行与并行调度 + +**Goal:** 按确认后的 ExecutionPlan 执行,自动并行调度无依赖步骤,支持执行中调整。 + +**Requirements:** R3, R5 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/core/plan_executor.py` (新建) +- `tests/unit/core/test_plan_executor.py` (新建) + +**Approach:** +- 新增 `PlanExecutor` 类,扩展 `Orchestrator.execute()` 的执行策略(见 KTD-1) +- 在 `Orchestrator.execute()` 中注入 PlanExecutor:`if self._plan_executor: await self._plan_executor.execute(plan, task) else: await self._execute_plan(plan, task)` +- 按 `parallel_group` 分组执行:复用 `_execute_plan()` 的 `asyncio.gather` 并行模式 +- 执行状态机:PENDING → RUNNING → COMPLETED/FAILED → CHECKING → RETRYING +- 失败处理:检查步骤失败时,根据失败类型决定重试/调整计划/请求人工 +- 与 `AgentPool` 集成:每个步骤通过 `AgentPool.create_agent_from_skill()` 创建 Agent 执行 +- 兼容现有的 `subtask_results` 累积模式 + +**Patterns to follow:** `Orchestrator.execute()` 的并行组执行模式(`src/agentkit/core/orchestrator.py`) + +**Test scenarios:** +- 3 个并行步骤全部成功 → 结果正确汇总 +- 并行步骤中 1 个失败 → 其他步骤继续,失败步骤进入检查 +- 步骤失败后自动重试成功 +- 步骤失败后调整计划(跳过/替换)继续执行 +- 执行中请求人工介入后继续 + +**Verification:** PlanExecutor 能并行执行无依赖步骤,失败步骤正确处理 + +### U3. PlanChecker — 检查与复盘闭环 + +**Goal:** 每步执行后检查产出质量,全部完成后复盘总结并写入经验库。 + +**Requirements:** R4, R5, R6 + +**Dependencies:** U2, U5 + +**Files:** +- `src/agentkit/core/plan_checker.py` (新建) +- `tests/unit/core/test_plan_checker.py` (新建) + +**Approach:** +- 新增 `PlanChecker` 类,集成 `QualityGate` 和 `LLMReflector` +- 检查环节:每步完成后,`QualityGate` 验证产出 + LLM 评估是否达标 +- 复盘环节:全部完成后,`LLMReflector` 生成复盘报告(成功路径、失败原因、耗时分布) +- 经验写入:复盘结果写入 `ExperienceStore`(U5) +- 闭环:检查不通过 → 触发重试或计划调整(与 U2 的失败处理联动) + +**Patterns to follow:** `EvolutionMixin.evolve_after_task()` 的反思-优化流程(`src/agentkit/evolution/lifecycle.py`) + +**Test scenarios:** +- 所有步骤通过检查 → 生成复盘报告,经验写入 ExperienceStore +- 某步骤检查不通过 → 触发重试 +- 重试后仍不通过 → 请求人工介入 +- 复盘报告包含成功路径和失败原因 +- Covers AE3: 错误经验写入后,后续任务能检索到避坑预警 + +**Verification:** 完整的 分析→计划→执行→检查→复盘→总结 闭环可运行 + +### U4. Skill 标准规范升级 + +**Goal:** 定义 Skill 标准接口规范,支持动态注册、版本管理、能力查询,确保 7 项能力以 Skill 插件形式接入。 + +**Requirements:** R7, R8, R9, R10 + +**Dependencies:** 无 + +**Files:** +- `src/agentkit/skills/base.py` (修改) +- `src/agentkit/skills/registry.py` (修改) +- `src/agentkit/skills/loader.py` (修改) +- `src/agentkit/skills/schema.py` (新建) +- `tests/unit/skills/test_skill_registry_v2.py` (新建) + +**Approach:** +- 扩展 `SkillConfig`:新增 `version`(语义版本)、`dependencies`(依赖的 Skill/Tool 声明)、`capabilities`(能力标签,用于查询) +- 新增 `SkillSpec` schema:定义 Skill 的标准接口规范(元数据、输入输出 Schema、依赖声明、质量门禁配置) +- 增强 `SkillRegistry`:新增 `query_by_capability()`(按能力标签查询)、`get_versions()`(版本管理)、`health_check()`(依赖检查) +- 增强 `SkillLoader`:支持从 Python 包自动发现 Skill(entry_points 机制) +- RAG/Terminal/ComputerUse 等新能力均以 Skill 插件形式注册 + +**Patterns to follow:** 现有 `SkillConfig` 的 Pydantic 模型模式(`src/agentkit/skills/base.py`) + +**Test scenarios:** +- 注册带版本和依赖的 Skill → 成功注册,依赖检查通过 +- 注册缺少依赖的 Skill → 依赖检查失败,返回错误信息 +- 按能力标签查询 → 返回匹配的 Skill 列表 +- 同名 Skill 注册新版本 → 版本历史保留,默认使用最新版 +- 从 Python 包自动发现 Skill → 正确加载 + +**Verification:** 开发者可用 10-20 行 YAML 定义一个 Skill 并注册到平台(SC2) + +### U5. ExperienceStore — 任务经验库 + +**Goal:** 存储任务执行经验(成功路径、失败原因、耗时分布),支持按任务类型检索和语义搜索。 + +**Requirements:** R29, R30, R33 + +**Dependencies:** U4 + +**Files:** +- `src/agentkit/evolution/experience_store.py` (新建) +- `src/agentkit/evolution/experience_schema.py` (新建) +- `tests/unit/evolution/test_experience_store.py` (新建) + +**Approach:** +- 新增 `ExperienceStore` 类,独立于现有 `EvolutionStore` +- `TaskExperience` 数据模型:task_type, goal, steps, outcome, duration, success_rate, failure_reasons, optimization_tips, embedding, created_at +- 存储:PostgreSQL 表 + pgvector 向量索引 + tsvector 全文索引 +- 检索:精确匹配 task_type + 语义相似度排序 + 时效性衰减 +- 与 `EvolutionMixin` 集成:`evolve_after_task()` 完成后自动调用 `ExperienceStore.record_experience()` +- 指标追踪:`EvolutionMetrics` 追踪完成率/耗时/重试率趋势(R33) + +**Patterns to follow:** `EpisodicMemory` 的 pgvector + PostgreSQL 存储模式(`src/agentkit/memory/episodic.py`) + +**Test scenarios:** +- 记录成功任务经验 → 正确存储,可按 task_type 检索 +- 记录失败任务经验 → failure_reasons 正确存储 +- 语义检索 → 返回与查询语义相似的经验 +- 时效性衰减 → 近期经验权重高于旧经验 +- 指标趋势查询 → 返回完成率/耗时/重试率变化 + +**Verification:** 任务完成后经验自动写入,新任务可检索到相关经验 + +--- + +### Phase 2: 智能终端与自进化增强 + +### U6. PitfallDetector — 避坑预警 + +**Goal:** 新任务启动时检索错误经验,匹配当前计划步骤,自动预警。 + +**Requirements:** R32 + +**Dependencies:** U5 + +**Files:** +- `src/agentkit/evolution/pitfall_detector.py` (新建) +- `tests/unit/evolution/test_pitfall_detector.py` (新建) + +**Approach:** +- 新增 `PitfallDetector` 类 +- `check_pitfalls(task_type, planned_steps)` → `list[PitfallWarning]` +- 匹配逻辑:检索同类任务的失败经验,将失败步骤与当前计划步骤进行语义匹配 +- 预警级别:HIGH(历史高失败率步骤)、MEDIUM(有失败记录但频率低)、LOW(仅提示) +- 集成到 `GoalPlanner`:计划生成后可选调用 `PitfallDetector`,预警信息附加到计划中(GoalPlanner 在 Phase 1 已可独立运行,PitfallDetector 是 Phase 2 的可选增强) + +**Patterns to follow:** `RuleBasedReflector` 的规则匹配模式(`src/agentkit/evolution/reflector.py`) + +**Test scenarios:** +- 计划包含历史高失败率步骤 → 返回 HIGH 级别预警 +- 计划无历史失败记录 → 返回空列表 +- 多个步骤有风险 → 按严重程度排序返回 +- Covers AE3: "调用 X 系统 API 在高峰期超时率 60%" → 新任务调用时自动预警 + +**Verification:** 新任务计划包含历史失败步骤时,自动返回避坑预警 + +### U7. PathOptimizer — 执行路径优化 + +**Goal:** 发现更优执行路径时自动更新经验库中的推荐路径。 + +**Requirements:** R31 + +**Dependencies:** U5 + +**Files:** +- `src/agentkit/evolution/path_optimizer.py` (新建) +- `tests/unit/evolution/test_path_optimizer.py` (新建) + +**Approach:** +- 新增 `PathOptimizer` 类 +- `ExecutionPath` 数据模型:steps, total_duration, success_rate, sample_count +- 对比逻辑:新路径与现有最优路径比较(综合耗时和成功率),决定是否更新 +- 更新策略:新路径成功率更高或同成功率但耗时更短 → 更新推荐路径 +- 集成到 `PlanChecker`:复盘时可选调用 `PathOptimizer.evaluate_and_update()`(PlanChecker 在 Phase 1 已可独立运行,PathOptimizer 是 Phase 2 的可选增强) + +**Patterns to follow:** `ABTester` 的统计比较模式(`src/agentkit/evolution/ab_tester.py`) + +**Test scenarios:** +- 新路径耗时更短 → 更新推荐路径 +- 新路径成功率更高 → 更新推荐路径 +- 新路径无明显优势 → 保留现有推荐路径 +- 样本量不足 → 不更新,记录待观察 + +**Verification:** 同类任务执行多次后,推荐路径自动优化 + +### U8. TerminalSession — 智能终端交互 + +**Goal:** 增强现有 ShellTool,支持会话状态维护、交互式命令、输出理解。 + +**Requirements:** R15, R16, R17, R18 + +**Dependencies:** U4 + +**Files:** +- `src/agentkit/tools/terminal_session.py` (新建) +- `src/agentkit/tools/pty_session.py` (新建) +- `src/agentkit/tools/shell.py` (修改) +- `src/agentkit/tools/output_parser.py` (新建) +- `tests/unit/tools/test_terminal_session.py` (新建) +- `tests/unit/tools/test_pty_session.py` (新建) + +**Approach:** +- 新增 `TerminalSession` 类:维护 cwd/env/history,跨命令保持状态 +- 新增 `PTYSession` 类:基于 `pexpect` 或 `asyncio` + `os.openpty()` 实现伪终端,支持交互式命令 +- 增强 `ShellTool`:新增 `session_id` 参数,指定会话执行;无 session_id 时保持现有行为(向后兼容) +- 新增 `OutputParser`:结构化解析命令输出(错误类型、退出码含义、可操作建议) +- 安全控制:危险操作通过 `AskHumanTool` 请求确认,所有操作记录审计日志 + +**Patterns to follow:** 现有 `ShellTool` 的白名单 + 危险命令拦截模式(`src/agentkit/tools/shell.py`) + +**Test scenarios:** +- 跨命令保持 cwd → cd 后执行 pwd 返回正确目录 +- 跨命令保持 env → export 后执行 echo 返回正确值 +- 交互式命令自动应答 → 命令等待输入时自动提供 +- 危险命令需确认 → rm 命令触发 AskHumanTool +- 输出解析 → 错误输出结构化为错误类型+建议 +- 无 session_id 时保持现有行为 + +**Verification:** Agent 能在终端会话中跨命令保持状态,处理交互式命令 + +--- + +### Phase 3: 知识库与 RAG 增强 + +### U9. LocalDocumentIngestion — 本地文档摄取 + +**Goal:** 支持上传文档(PDF/Word/Markdown 等),自动分块、向量化、索引。 + +**Requirements:** R11 + +**Dependencies:** U4 + +**Files:** +- `src/agentkit/memory/document_loader.py` (新建) +- `src/agentkit/memory/local_rag.py` (新建) +- `src/agentkit/memory/chunking.py` (新建) +- `tests/unit/memory/test_document_loader.py` (新建) +- `tests/unit/memory/test_local_rag.py` (新建) + +**Approach:** +- 新增 `DocumentLoader`:支持 PDF(PyMuPDF/pdfplumber)、Word(python-docx)、Markdown(mistune)、HTML(BeautifulSoup)、纯文本 +- 新增 `LocalRAGService`:实现 `KnowledgeBase` 协议(见 KTD-7),使用 pgvector 存储 + 检索(复用 `EpisodicMemory` 的 pgvector 基础设施) +- 分块策略:复用 `ContextualChunker`(`src/agentkit/memory/contextual_retrieval.py`),新增按文档结构的分块(按标题/段落) +- 嵌入:复用 `OpenAIEmbedder`(`src/agentkit/memory/embedder.py`) +- 摄取 Pipeline:上传 → 解析 → 分块 → 嵌入 → 写入 pgvector + +**Patterns to follow:** `HttpRAGService` 的 HTTP 客户端模式(`src/agentkit/memory/http_rag.py`),`KnowledgeBase` 协议(KTD-7) + +**Test scenarios:** +- 上传 PDF → 正确解析、分块、向量化、可检索 +- 上传 Markdown → 按标题结构分块 +- 上传 Word → 正确解析文本和表格 +- 检索上传的文档 → 返回相关内容+来源追溯 +- 大文件分块 → 块大小在配置范围内 + +**Verification:** 上传企业文档后可通过 RAG 检索到相关内容 + +### U10. ExternalKBAdapters — 外部知识库适配器 + +**Goal:** 对接飞书知识库、Confluence、企业 Wiki 等外部知识库,统一检索接口。 + +**Requirements:** R12 + +**Dependencies:** U4 + +**Files:** +- `src/agentkit/memory/knowledge_base.py` (新建 — KnowledgeBase 协议定义) +- `src/agentkit/memory/adapters/base.py` (新建) +- `src/agentkit/memory/adapters/feishu.py` (新建) +- `src/agentkit/memory/adapters/confluence.py` (新建) +- `src/agentkit/memory/adapters/generic_http.py` (新建) +- `tests/unit/memory/test_adapters.py` (新建) + +**Approach:** +- 定义独立 `KnowledgeBase` 协议(见 KTD-7):`ingest(docs)`/`query(text, top_k)`/`delete_by_id(id)`/`list_sources()`/`health_check()` +- 定义 `KBAdapter` 抽象基类实现 `KnowledgeBase` 协议:`search()`, `get_document()`, `list_sources()`, `health_check()` +- `FeishuKBAdapter`:对接飞书知识库 API +- `ConfluenceAdapter`:对接 Confluence REST API +- `GenericHTTPAdapter`:通用 HTTP 适配器,配置 API endpoint + auth 即可对接任意 HTTP 知识库 +- 所有适配器实现 `KnowledgeBase` 协议(非 `Memory` 接口),可被 `MultiSourceRetriever` 统一调度 +- `SemanticMemory` 内部组合使用 `KnowledgeBase`,而非强制适配 `Memory` 的 `retrieve(key)` 语义 + +**Patterns to follow:** `HttpRAGService` 的 HTTP 客户端模式(`src/agentkit/memory/http_rag.py`) + +**Test scenarios:** +- FeishuKBAdapter 检索 → 返回飞书知识库内容 +- ConfluenceAdapter 检索 → 返回 Confluence 页面内容 +- GenericHTTPAdapter 检索 → 返回配置的 HTTP API 内容 +- 适配器健康检查 → 正确报告连接状态 +- 认证失败 → 返回明确错误信息 + +**Verification:** 可通过统一接口检索飞书知识库和 Confluence 内容 + +### U11. MultiSourceRAG — 多源 RAG 与信息源指定 + +**Goal:** 用户可在任务级别指定信息源,支持多源混合检索,结果包含来源追溯。 + +**Requirements:** R13, R14 + +**Dependencies:** U9, U10 + +**Files:** +- `src/agentkit/memory/multi_source_retriever.py` (新建) +- `src/agentkit/memory/retriever.py` (修改) +- `tests/unit/memory/test_multi_source_rag.py` (新建) + +**Approach:** +- 新增 `MultiSourceRetriever`:管理多个 `KnowledgeBase` 协议实现(LocalRAGService、各 KBAdapter、HttpRAGService 适配器) +- 信息源指定:`search(query, sources=["feishu", "local:合规文档"])` → 仅从指定源检索 +- 混合检索:并行查询多个源,按权重融合排序 +- 来源追溯:每个检索结果附带 `source_id` + `document_title` + `chunk_location` +- 集成到 `MemoryRetriever`:新增 `sources` 参数,传递给 `MultiSourceRetriever` +- 所有 RAG 源统一实现 `KnowledgeBase` 协议(KTD-7),`MultiSourceRetriever` 不再区分 Memory 和 KBAdapter 接口 + +**Patterns to follow:** `MemoryRetriever` 的混合检索模式(`src/agentkit/memory/retriever.py`) + +**Test scenarios:** +- 指定单个信息源 → 仅从该源检索 +- 指定多个信息源 → 并行检索,结果融合排序 +- 不指定信息源 → 从所有可用源检索 +- 来源追溯 → 每个结果包含来源信息 +- Covers AE4: 指定"合规文档库"和"法务知识库" → 仅从这两个源检索 + +**Verification:** 用户可指定信息源检索,结果包含来源追溯 + +--- + +### Phase 4: Computer Use 集成 + +### U12. ComputerUseTool — Computer Use 集成 + +**Goal:** 集成 Anthropic Computer Use API,支持截屏识别、UI 操作、降级策略、录制回放。 + +**Requirements:** R19, R20, R21, R22 + +**Dependencies:** U4 + +**Files:** +- `src/agentkit/tools/computer_use.py` (新建) +- `src/agentkit/tools/computer_use_session.py` (新建) +- `src/agentkit/tools/computer_use_recorder.py` (新建) +- `tests/unit/tools/test_computer_use.py` (新建) + +**Approach:** +- 新增 `ComputerUseTool`(继承 `Tool`):封装 Anthropic Computer Use API 调用 +- 新增 `ComputerUseSession`:管理虚拟桌面会话(Docker 沙箱),维护操作上下文 +- 操作类型:screenshot → click → type → scroll → drag → key → wait +- 降级链:ComputerUseTool 失败 → 检查是否有 API/CLI 替代 → ShellTool → AskHumanTool +- 新增 `ComputerUseRecorder`:记录每次截屏和操作,支持回放和审核 +- 注册为 Skill 插件:`computer_use` Skill,可被自主执行引擎调用 + +**Patterns to follow:** `ShellTool` 的 Tool 基类实现 + 安全控制模式(`src/agentkit/tools/shell.py`) + +**Test scenarios:** +- 截屏并识别 UI 元素 → 返回可操作区域列表 +- 点击指定坐标 → 操作成功 +- 输入文本到输入框 → 操作成功 +- 多步骤 UI 操作 → 每步根据结果决定下一步 +- API 不可用时降级到 ShellTool → 正确降级 +- Covers AE2: Computer Use 失败 → 降级到 OA 系统 API +- 操作录制回放 → 可回放操作序列 + +**Verification:** Computer Use 可在企业 Web 系统上完成基本操作(登录、填表、提交)(SC4) + +--- + +### Phase 5: 前端门户 + +### U13a. Vue3 门户基础 — 对话界面与路由 + +**Goal:** 搭建 Vue3 SPA 骨架,实现统一对话界面作为 7 项能力的入口,IntentRouter 自动路由到对应能力。 + +**Requirements:** R34 + +**Dependencies:** U1, U2, U3 + +**Files:** +- `src/agentkit/server/frontend/` (新建目录) +- `src/agentkit/server/frontend/src/App.vue` (新建) +- `src/agentkit/server/frontend/src/views/ChatView.vue` (新建) +- `src/agentkit/server/frontend/src/components/chat/` (新建目录) +- `src/agentkit/server/frontend/src/stores/` (新建目录) +- `src/agentkit/server/frontend/src/api/` (新建目录) +- `src/agentkit/server/frontend/src/router/index.ts` (新建) +- `src/agentkit/server/routes/portal.py` (新建) +- `tests/unit/server/test_portal_routes.py` (新建) + +**Approach:** +- Vue3 + TypeScript + Pinia + Vue Router + Ant Design Vue +- 对话界面为主入口,IntentRouter 自动路由到对应能力 +- 侧边导航骨架:对话/工作流/知识库/技能/终端/Computer Use/自进化/设置 +- API 层:封装 FastAPI REST API + WebSocket 调用 +- 新增 Portal API 路由:对话消息、意图路由、能力状态查询 +- 构建产物输出到 `src/agentkit/server/static/`,替换现有 `index.html` + +**Patterns to follow:** 现有 FastAPI 路由结构(`src/agentkit/server/routes/`) + +**Test scenarios:** +- 对话界面发送消息 → 正确路由到对应能力 +- 侧边导航切换 → 正确加载对应视图 +- WebSocket 实时推送 → 执行进度正确显示 +- 意图路由 → "帮我查知识库"路由到 RAG 能力 + +**Verification:** 用户通过对话界面发送消息,系统能正确识别意图并路由到对应能力 + +### U13b. 管理页面 — 知识库/技能/终端/设置 + +**Goal:** 实现知识库管理、技能浏览、终端交互、系统设置等管理页面。 + +**Requirements:** R35 + +**Dependencies:** U13a, U9, U10, U8 + +**Files:** +- `src/agentkit/server/frontend/src/views/KnowledgeBaseView.vue` (新建) +- `src/agentkit/server/frontend/src/views/SkillsView.vue` (新建) +- `src/agentkit/server/frontend/src/views/TerminalView.vue` (新建) +- `src/agentkit/server/frontend/src/views/SettingsView.vue` (新建) +- `src/agentkit/server/frontend/src/components/kb/` (新建目录) +- `src/agentkit/server/frontend/src/components/skills/` (新建目录) +- `src/agentkit/server/frontend/src/components/terminal/` (新建目录) +- `src/agentkit/server/routes/kb_management.py` (新建) +- `src/agentkit/server/routes/skill_management.py` (新建) + +**Approach:** +- 知识库管理页:文档上传、信息源配置、检索测试、来源追溯展示 +- 技能浏览页:已注册 Skill 列表、能力标签筛选、版本管理、依赖检查 +- 终端交互页:WebSocket 终端会话、命令历史、输出高亮 +- 设置页:LLM 配置、Skill 配置、知识库连接配置 +- 各页面通过 Pinia store 管理状态,API 层统一封装 + +**Patterns to follow:** U13a 的 API 层和 Store 模式 + +**Test scenarios:** +- 知识库管理页面上传文档 → 文档正确摄取 +- 技能浏览页按能力标签筛选 → 返回匹配 Skill +- 终端交互页发送命令 → 输出正确显示 +- 设置页面配置 LLM → 配置生效 + +**Verification:** 管理员可通过管理页面完成知识库管理、技能浏览、终端交互、系统配置 + +### U13c. 自进化仪表盘 — 经验可视化与指标监控 + +**Goal:** 实现自进化经验的可视化展示和指标监控,让用户了解 Agent 的进化状态。 + +**Requirements:** R36 + +**Dependencies:** U13a, U5, U6, U7 + +**Files:** +- `src/agentkit/server/frontend/src/views/EvolutionView.vue` (新建) +- `src/agentkit/server/frontend/src/components/evolution/` (新建目录) +- `src/agentkit/server/routes/evolution_dashboard.py` (新建) +- `tests/unit/server/test_evolution_dashboard.py` (新建) + +**Approach:** +- 经验时间线:展示任务经验积累历程,成功/失败分布 +- 指标趋势图:完成率、耗时、重试率变化曲线(ECharts/AntV) +- 避坑预警面板:当前任务的风险提示,历史失败步骤高亮 +- 路径优化记录:推荐路径变更历史,新旧路径对比 +- 实时更新:WebSocket 推送新经验和指标变化 + +**Patterns to follow:** U13a 的 WebSocket 实时推送模式 + +**Test scenarios:** +- 经验时间线展示 → 正确显示成功/失败分布 +- 指标趋势图 → 完成率/耗时曲线正确渲染 +- 避坑预警面板 → 当前任务风险提示正确显示 +- 实时更新 → 新经验写入后仪表盘自动刷新 + +**Verification:** 用户可通过仪表盘直观了解 Agent 的经验积累和进化状态 + +### U14. Workflow 可视化编辑器 + +**Goal:** 基于 Vue Flow 构建可视化拖拽编排界面,支持条件分支、并行执行、人工审批、动态调整。 + +**Requirements:** R24, R25, R26, R27, R28 + +**Dependencies:** U13a + +**Files:** +- `src/agentkit/server/frontend/src/views/WorkflowEditorView.vue` (新建) +- `src/agentkit/server/frontend/src/components/workflow/FlowCanvas.vue` (新建) +- `src/agentkit/server/frontend/src/components/workflow/NodePalette.vue` (新建) +- `src/agentkit/server/frontend/src/components/workflow/PropertyPanel.vue` (新建) +- `src/agentkit/server/frontend/src/components/workflow/SkillNode.vue` (新建) +- `src/agentkit/server/frontend/src/components/workflow/ConditionNode.vue` (新建) +- `src/agentkit/server/frontend/src/components/workflow/ApprovalNode.vue` (新建) +- `src/agentkit/server/frontend/src/utils/workflowSerializer.ts` (新建) +- `src/agentkit/server/routes/workflows.py` (新建) +- `src/agentkit/orchestrator/workflow_schema.py` (新建) +- `tests/unit/server/test_workflow_routes.py` (新建) + +**Approach:** +- Vue Flow 画布:拖拽节点构建 Workflow +- 自定义节点类型:SkillNode(引用已注册 Skill)、ConditionNode(条件分支)、ApprovalNode(人工审批)、ParallelNode(并行分组) +- 序列化:Vue Flow JSON → `WorkflowDefinition`(继承 `Pipeline`,见 KTD-8),其中每个节点映射为扩展后的 `PipelineStage`(含 `type`/`config` 字段) +- 后端 API:Workflow CRUD + 执行 + 状态查询 + WebSocket 进度推送 +- `WorkflowDefinition` 继承 `Pipeline`,新增 `workflow_id`/`triggers`/`variables_schema`/`output_schema` 字段 +- `PipelineStage` 扩展 `type: str = "skill"` 和 `config: dict = {}`,默认值不破坏现有数据 +- 人工审批:执行到 ApprovalNode 时暂停,通知审批人,确认后继续 +- 动态调整:执行中可通过 API 增删节点或切换分支 + +**Patterns to follow:** `PipelineEngine` 的 DAG 执行模式(`src/agentkit/orchestrator/pipeline_engine.py`) + +**Test scenarios:** +- 拖拽 Skill 节点到画布 → 节点正确渲染 +- 连接节点建立依赖 → 边正确创建 +- 添加条件分支节点 → 条件配置正确 +- 添加人工审批节点 → 审批流程正确 +- 序列化为 YAML → 与 PipelineEngine 格式兼容 +- Covers AE5: Workflow 包含审批节点 → 执行到该节点暂停等待确认 + +**Verification:** 用户可通过拖拽构建 Workflow 并执行 + +--- + +### Phase 6: 端到端验证 + +### U15. 端到端企业场景验证 + +**Goal:** 用"目标驱动的复杂任务"场景端到端验证 7 项能力集成。 + +**Requirements:** R1-R36 (集成验证) + +**Dependencies:** U1-U14 全部完成(含 U13a/U13b/U13c) + +**Files:** +- `tests/integration/test_goal_driven_scenario.py` (新建) +- `configs/skills/goal_driven_agent.yaml` (新建) +- `configs/pipelines/goal_driven_pipeline.yaml` (新建) + +**Approach:** +- 验证场景:"分析竞品 SEO 策略并生成优化方案" +- 覆盖能力:自主闭环(目标→计划→执行→检查→复盘)+ RAG(检索企业知识库)+ Skill 调度(调用搜索/分析/生成 Skill) +- 验证指标:端到端完成率、并行执行效率、经验积累效果 +- 补充验证:知识库问答+系统操作场景、Workflow 编排场景 + +**Test scenarios:** +- 目标驱动场景端到端执行 → 生成完整优化方案 +- 并行步骤自动调度 → 3 个竞品调研并行执行 +- 经验积累 → 第二次执行同类任务耗时减少 +- 知识库指定信息源 → 仅从指定源检索 +- Workflow 人工审批 → 执行到审批节点暂停 + +**Verification:** 一个完整企业场景端到端走通,覆盖自主闭环+RAG+Skill 调度(SC1) + +--- + +## Scope Boundaries + +**Deferred for later:** +- Skill 市场/社区 +- 多租户隔离 +- 企业级认证/权限体系(RBAC/LDAP/SSO) +- 移动端适配 +- Workflow 模板市场 +- Computer Use 自研视觉识别(替代第三方 API) +- 经验库跨组织共享 + +**Outside this product's identity:** +- LLM 训练/微调平台 +- 数据标注平台 +- 低代码应用开发平台 + +--- + +## Risks & Dependencies + +| Risk | Impact | Mitigation | +|------|--------|-----------| +| Anthropic Computer Use API 可靠性有限 | Computer Use 能力不稳定 | 降级链(API → ShellTool → AskHuman),Docker 沙箱隔离 | +| Vue3 前端重构工作量大 | 延迟 Phase 5 交付 | 后端 API 先行,前端可分批交付(先对话界面,再 Workflow 编辑器) | +| 经验库初期数据为空 | 自进化效果不明显 | 预置种子经验(从测试和文档中提取),冷启动策略 | +| pgvector 性能瓶颈 | 大规模知识库检索慢 | 分区索引、查询优化、缓存层 | +| PipelineEngine 强依赖 Redis+SQLAlchemy | 无 Redis/PG 环境无法运行 | 提供 LocalRAGService 和内存 PipelineState 降级方案 | + +--- + +## Outstanding Questions + +**Deferred to implementation:** +- OQ1. 经验库的精确表结构和索引策略——实现时根据数据量调整 +- OQ2. PTY 实现选型:pexpect vs asyncio+openpty——U8 实现时根据跨平台需求决定 +- OQ3. HttpRAGService 如何适配 KnowledgeBase 协议——U10 实现时决定是包装适配还是重构 + +--- + +## Sources & Research + +- 现有架构分析:`src/agentkit/core/`, `src/agentkit/skills/`, `src/agentkit/orchestrator/`, `src/agentkit/memory/`, `src/agentkit/tools/`, `src/agentkit/evolution/` +- Anthropic Computer Use API 文档:beta API,支持 computer/text_editor/bash 三种工具类型 +- Vue Flow:Vue3 原生流程图库,6k+ stars,DAG 支持,自定义节点 +- Agent 自进化模式:Reflexion(反思-修正)、Experience Replay(经验回放)、Genetic Evolution(遗传进化) +- 企业门户架构:Dify/Coze/FastGPT 的对话驱动+能力面板模式 +- 智能终端模式:Claude Code 的执行-观察-决策循环 + PTY 会话模式 diff --git a/docs/brainstorms/2026-06-09-agentkit-capability-matrix/requirements.md b/docs/brainstorms/2026-06-09-agentkit-capability-matrix/requirements.md new file mode 100644 index 0000000..54ca9d2 --- /dev/null +++ b/docs/brainstorms/2026-06-09-agentkit-capability-matrix/requirements.md @@ -0,0 +1,212 @@ +--- +date: 2026-06-09 +topic: agentkit-capability-matrix +--- + +## Summary + +构建企业级 AI Agent 门户,采用内核+插件架构:自主闭环执行引擎作为调度中枢,RAG、智能终端、Computer Use、可视化 Workflow、自进化作为可插拔能力接入,Skill 标准规范作为统一接口。内外统一平台,解决企业"想用 AI Agent 但不会落地"的核心痛点。 + +## Problem Frame + +企业对 AI Agent 的需求明确但落地困难。当前市场上,低代码平台(Dify/Coze)擅长可视化编排但自主性弱,自主 Agent 框架(AutoGPT/CrewAI)擅长自主规划但集成能力差,Computer Use 类产品(Anthropic/Operator)擅长 UI 自动化但场景窄,编排框架(LangChain/LlamaIndex)擅长工具链但门槛高。企业需要的是一个统一入口,能同时覆盖知识问答、系统操作、复杂任务编排、桌面自动化等全场景,而不是在多个工具间切换。 + +AgentKit 已具备 Skill 系统、ReAct 引擎、Pipeline 编排、RAG 服务、ShellTool 等基础能力,但各能力之间缺乏统一调度中枢,缺少 Computer Use 和智能终端交互,Workflow 不可视化且不支持动态编排,自主闭环执行能力尚未形成,自进化停留在 Prompt 优化层面而非任务经验积累。 + +## Key Decisions + +**内核+插件架构,而非能力矩阵同步建设** +自主闭环执行引擎是所有能力的调度中枢,其他能力作为 Skill 插件接入。这避免了 6+1 项能力各自为政的集成问题——自主执行引擎天然就是集成点,每个能力接入后立即可被调用。 + +**计划驱动+人工确认,而非完全自主循环** +用户给定目标后,Agent 自动生成计划,人工确认后执行。完全自主循环在企业场景下风险过高,计划驱动既保证可控性又保留灵活性。 + +**Workflow 与自主闭环执行作为两种独立编排模式** +Workflow 是人工设计的固定流程(可视化+动态编排),自主闭环是 Agent 动态生成的流程。两者独立使用,互不替代,满足不同场景需求。 + +**Computer Use 调用第三方 API** +调用第三方 Computer Use API(如 Anthropic),最快实现,依赖外部服务但避免自研视觉识别的可靠性问题。 + +**Vue3 重构整体 UI 并集成 Workflow 编辑器** +现有 Web UI 是纯 HTML,用 Vue3 重构整体 UI 并集成可视化 Workflow 编辑器,统一技术栈。 + +**自进化从 Prompt 优化升级为任务经验积累** +现有 evolution 模块聚焦 Prompt 优化(Reflector/PromptOptimizer/ABTester),新增任务经验积累能力:记住错误避免重犯、总结正确路径、发现更优解时更新经验。两者并存,服务不同目的。 + +**Skill 标准规范+注册调度,而非 Skill 市场** +定义 Skill 的标准接口和规范,任何人都按规范开发 Skill,平台负责注册和调度。不做社区市场,降低运营复杂度。 + +## Actors + +- A1. **企业开发者** — 使用 AgentKit SDK/框架构建 Agent 应用的技术人员,通过 YAML 配置和 Python API 使用 7 项能力 +- A2. **企业终端用户** — 通过 AgentKit 门户直接使用 Agent 完成工作的非技术人员,给定目标获取结果 +- A3. **AgentKit 平台** — 自主闭环执行引擎,作为调度中枢协调 7 项能力 +- A4. **企业系统** — ERP/CRM/OA 等企业后台系统,Agent 通过 API 或 Computer Use 操作 + +## Requirements + +### 自主闭环执行引擎(内核) + +- R1. 用户给定自然语言目标后,Agent 自动生成结构化执行计划,包含任务拆解、依赖关系、预估步骤和并行度识别 +- R2. 执行计划需经人工确认后方可执行,用户可修改计划、调整步骤顺序、增删步骤 +- R3. 执行过程中支持自动并行——当识别到多个步骤无依赖关系时,自动调度多个 Agent 并行执行 +- R4. 执行过程遵循 分析→计划→执行→检查→复盘→总结 的闭环框架,每步的具体内容由 Agent 动态决定 +- R5. 检查环节发现问题时,Agent 可自动重试、调整计划或请求人工介入,而非直接失败 +- R6. 复盘环节将执行经验写入经验库,供后续任务参考 + +### Skill 标准规范与注册调度 + +- R7. 定义 Skill 标准接口规范,包含元数据(名称/描述/版本/作者)、输入输出 Schema、依赖声明、质量门禁配置 +- R8. Skill 注册中心支持动态注册、发现、版本管理和能力查询 +- R9. 内置 Skill 加载器支持从 YAML、Python 函数、Markdown 文件加载 Skill +- R10. RAG、智能终端、Computer Use 等能力均以 Skill 插件形式注册,可被自主执行引擎和其他 Skill 调用 + +### 知识库与 RAG + +- R11. 支持本地文档摄取(PDF/Word/网页/Markdown 等),自动分块、向量化、索引 +- R12. 支持对接外部知识库系统(飞书知识库、Confluence、企业 Wiki 等),通过标准适配器统一检索 +- R13. 用户可在任务级别指定信息源——选择使用哪些知识库或文档集合,支持多源混合检索 +- R14. RAG 检索结果包含来源追溯,用户可验证信息出处 + +### 智能终端交互 + +- R15. Agent 能理解终端命令输出,根据输出内容决定下一步操作,而非仅执行预设命令 +- R16. 支持交互式命令的自动应答——当命令等待用户输入时,Agent 根据上下文自动提供输入 +- R17. 维护终端会话状态,跨命令保持工作目录、环境变量、进程状态 +- R18. 安全控制:危险操作需人工确认,支持操作审计日志 + +### Computer Use + +- R19. 集成第三方 Computer Use API(如 Anthropic),支持截屏识别 UI 元素和模拟用户操作 +- R20. 支持多步骤 UI 操作流程,Agent 根据每步结果决定下一步操作 +- R21. 当第三方 API 不可用或操作失败时,自动降级到 API/CLI 方式(如有可用),或请求人工介入 +- R22. 操作过程可录制回放,支持人工审核和纠错 + +### 可视化 Workflow + +- R24. 提供可视化拖拽编排界面,用户可通过拖拽节点构建 Workflow +- R25. 支持条件分支、循环、并行执行、子流程调用等动态编排能力 +- R26. 支持人工审批节点——Workflow 执行到审批节点时暂停,等待人工确认后继续 +- R27. Workflow 可引用已注册的 Skill 作为节点,Skill 更新后 Workflow 自动使用最新版本 +- R28. 支持运行时动态调整——执行中可根据条件动态增删节点或切换分支 + +### 自进化(任务经验积累) + +- R29. 每次任务完成后,Agent 自动总结执行经验:成功路径、失败原因、耗时分布 +- R30. 经验库按任务类型组织,新任务启动时自动检索相关经验作为参考 +- R31. 当发现更优执行路径时(如更少的步骤、更高的成功率),自动更新经验库中的推荐路径 +- R32. 错误经验标记为避坑指南,后续任务遇到类似场景时自动预警 +- R33. 经验积累效果可量化——展示任务完成率、平均耗时、重试率等指标的变化趋势 + +### 企业门户集成 + +- R34. 统一入口:终端用户通过一个对话界面即可使用全部 7 项能力,无需切换工具 +- R35. 开发者入口:提供 SDK 和 API,开发者可将 AgentKit 集成到自己的应用中 +- R36. 支持接入企业系统获取操作权限和数据,通过标准适配器对接 ERP/CRM/OA 等 + +## Key Flows + +- F1. 目标驱动的复杂任务 + - **Trigger:** 用户输入自然语言目标(如"分析竞品并生成优化方案") + - **Actors:** A2, A3 + - **Steps:** + 1. Agent 分析目标,识别所需能力和信息源 + 2. 生成结构化执行计划,标注并行步骤 + 3. 用户确认或修改计划 + 4. Agent 按计划执行,并行步骤自动调度多 Agent + 5. 检查环节验证每步产出,发现问题自动调整 + 6. 复盘总结,经验写入经验库 + 7. 输出最终结果 + - **Covered by:** R1, R2, R3, R4, R5, R6 + +- F2. 知识库问答+系统操作 + - **Trigger:** 用户提问涉及企业知识或需操作企业系统 + - **Actors:** A2, A3, A4 + - **Steps:** + 1. Agent 识别问题需要知识检索还是系统操作 + 2. 检索指定知识库获取相关信息(R11-R14) + 3. 如需操作企业系统,通过 Computer Use API 或 API/CLI 执行(R19-R21) + 4. 组合信息生成回答或确认操作结果 + - **Covered by:** R11, R12, R13, R14, R19, R22 + +- F3. 可视化 Workflow 编排 + - **Trigger:** 用户需要设计可复用的固定流程 + - **Actors:** A1, A2 + - **Steps:** + 1. 用户在可视化界面拖拽节点构建 Workflow + 2. 配置条件分支、审批节点、并行执行等 + 3. 引用已注册 Skill 作为节点 + 4. 保存并发布 Workflow + 5. 触发执行,运行时可动态调整 + - **Covered by:** R24, R25, R26, R27, R28 + +## Acceptance Examples + +- AE1. **目标驱动任务——并行执行** + - **Covers R3, R5.** + - **Given:** 用户目标"调研 3 个竞品的 SEO 策略并生成对比报告" + - **When:** Agent 生成计划后识别 3 个竞品调研无依赖关系 + - **Then:** 自动调度 3 个 Agent 并行调研,汇总后生成对比报告 + +- AE2. **Computer Use 降级** + - **Covers R21.** + - **Given:** Agent 尝试通过第三方 Computer Use API 在企业 OA 系统提交审批 + - **When:** API 不可用或操作失败 + - **Then:** 自动降级到 OA 系统 API 提交审批,或暂停请求人工介入 + +- AE3. **经验积累与避坑** + - **Covers R30, R32.** + - **Given:** 经验库中记录"调用 X 系统 API 在高峰期超时率 60%" + - **When:** 新任务需要调用 X 系统 API + - **Then:** Agent 自动预警并建议错峰调用或使用重试策略 + +- AE4. **知识库指定信息源** + - **Covers R13.** + - **Given:** 用户提问"我们公司对数据导出有什么合规要求" + - **When:** 用户指定信息源为"合规文档库"和"法务知识库" + - **Then:** Agent 仅从指定知识库检索,不检索无关信息源 + +- AE5. **Workflow 人工审批** + - **Covers R26.** + - **Given:** Workflow 包含"发送客户报价"步骤 + - **When:** 执行到该步骤 + - **Then:** Workflow 暂停,通知审批人确认,确认后继续执行 + +## Success Criteria + +- SC1. 一个完整企业场景(目标驱动的复杂任务)端到端走通,覆盖自主闭环+RAG+Skill 调度 +- SC2. 开发者可用 10-20 行 YAML 配置定义一个 Skill 并注册到平台 +- SC3. 终端用户通过一个对话界面完成知识问答、系统操作、复杂任务编排,无需切换工具 +- SC4. Computer Use 在 3 个以上企业 Web 系统上完成基本操作(登录、填表、提交) +- SC5. 自进化使同类任务的平均完成时间随执行次数递减 + +## Scope Boundaries + +**Deferred for later:** +- Skill 市场/社区——先做标准规范和注册调度,社区生态后续再建 +- 多租户隔离——企业门户隐含需要,但 v1 先做单租户 +- 企业级认证/权限体系——v1 先做基础 API Key 认证 +- 移动端适配——先做 Web 端,移动端后续扩展 +- Workflow 模板市场——先支持自建 Workflow,模板市场后续再建 + +**Outside this product's identity:** +- LLM 训练/微调平台——AgentKit 使用 LLM,不训练 LLM +- 数据标注平台——AgentKit 消费数据,不标注数据 +- 低代码应用开发平台——AgentKit 是 Agent 平台,不是通用应用开发平台 + +## Dependencies / Assumptions + +- D1. Computer Use 依赖第三方 API(如 Anthropic)的可用性和稳定性,需要 API Key 和网络访问 +- D2. 外部知识库对接依赖各系统的 API 开放程度,部分企业系统可能无 API 需通过 Computer Use 操作 +- D3. 自进化的经验积累效果依赖任务执行量,初期经验库为空时效果有限 +- D4. Vue3 重构整体 UI 需要前端开发能力,当前项目后端为主(Python/FastAPI),前端资源可能不足 + +## Outstanding Questions + +**Resolve Before Planning:** +- (All resolved — see Key Decisions below) + +**Deferred to Planning:** +- OQ1. 经验库的存储和检索方案——向量数据库 vs 结构化存储 vs 混合 +- OQ2. 自主闭环执行引擎与现有 ReAct 引擎的关系——增强还是替换 +- OQ3. 智能终端交互与现有 ShellTool 的关系——增强还是替换 diff --git a/docs/brainstorms/2026-06-09-clawith-research-prompt.md b/docs/brainstorms/2026-06-09-clawith-research-prompt.md new file mode 100644 index 0000000..ffe1fa5 --- /dev/null +++ b/docs/brainstorms/2026-06-09-clawith-research-prompt.md @@ -0,0 +1,183 @@ +# Clawith 架构研究与 AgentKit 改进分析 + +## 研究背景 + +Clawith (clawith.ai) 是一个开源的多智能体协作平台,基于 OpenClaw 构建,旨在将 AI 代理从简单的聊天机器人提升为组织的"数字员工"。 + +GitHub: https://github.com/dataelement/Clawith +许可证: MIT +技术栈: React 19 + TypeScript / FastAPI + PostgreSQL + Redis + +--- + +## Clawith 核心架构 + +### 1. Agent Plaza — 协作知识流 +**设计理念**:代理共享的社交空间,代理在其中发布更新、分享发现、评论彼此的工作,实现知识流动而非被动查询。 + +**核心组件**: +- `PlazaFeed`:类似社交 feed,支持 post、comment、tag 过滤 +- `KnowledgeBase`:组织级共享知识池 +- 代理可订阅相关领域 feed,实现"被动发现" + +### 2. Persistent Identity — Soul & Memory +**设计理念**:每个代理有跨会话的持久身份,而非每次会话从头开始。 + +**核心组件**: +- `soul.md`:代理的个性、价值观、工作风格(持久存储) +- `memory.md`:长期上下文和学习到的偏好 +- 代理启动时加载 Soul,用于 Prompt 注入 + +### 3. Organization Awareness — 组织感知 +**设计理念**:代理理解完整组织结构,知道谁是同事,能自主建立工作关系和委派任务。 + +**核心组件**: +- `OrganizationContext`:组织架构、代理能力矩阵 +- 代理之间可以自发 `handoff`,而非只能通过中央编排器 +- 像新员工加入团队一样自然融入 + +### 4. Supervision Tasks — 主动跟进 +**设计理念**:代理可以代表组织主动跟进同事,确保待办事项完成。 + +**核心组件**: +- `SupervisorAgent`:可配置自动跟进规则 +- `deadline`、`reminder`、`escalation` 机制 + +### 5. Self-Evolution — 自我进化 +**设计理念**:代理遇到无法处理的任务时,主动搜索 MCP 注册表发现并安装新工具。 + +**核心组件**: +- 从 Smithery + ModelScope MCP 注册表搜索工具 +- 代理可为自己或同事创建新 Skill +- `SkillCreator` 工具 + +### 6. Enterprise Governance — 企业治理 +**设计理念**:组织级控制能力。 + +**核心组件**: +- `UsageQuota`:每个用户/代理的消息限制、Token 配额、代理 TTL +- `ApprovalWorkflow`:危险操作需人工审批 +- `AuditLog`:全链路操作可追溯 +- RBAC + 多租户隔离 + +--- + +## AgentKit 当前架构 + +### 项目结构 +``` +src/agentkit/ +├── core/ # BaseAgent、Orchestrator、Dispatcher、Registry +├── skills/ # SkillConfig、Skill、SkillRegistry、SkillLoader +├── memory/ # WorkingMemory、EpisodicMemory、SemanticMemory、RAG +├── evolution/ # EvolutionMixin、Reflector、PromptOptimizer、ABTester +├── llm/ # LLMGateway、Provider(OpenAI/Anthropic/Gemini/DeepSeek/国产) +├── orchestrator/ # PipelineEngine、HandoffManager、DynamicPipeline +├── mcp/ # MCPClient、MCPServer、MCPManager +├── tools/ # Tool基类、FunctionTool、AgentTool、MCPTool +├── server/ # FastAPI Server、routes、middleware +└── telemetry/ # OpenTelemetry tracing + metrics +``` + +### 已实现的核心能力 +- **ReAct Engine**:`react.py` 实现推理-行动循环 +- **LLM Gateway**:`llm/gateway.py` 统一调用、路由、计量 +- **Intent Router**:`router/intent.py` 三级路由(关键词+LLM) +- **Quality Gate**:`quality/gate.py` 产出质量管理 +- **Skill System**:`skills/base.py` SkillConfig + Skill + SkillRegistry +- **Evolution System**:`evolution/lifecycle.py` 反思→优化→A/B测试→应用 +- **Pipeline**:`orchestrator/pipeline_engine.py` 多步骤编排+重试+补偿 + +--- + +## 差距分析 + +### 功能对比表 + +| 功能 | Clawith | AgentKit | 差距 | +|------|---------|----------|------| +| Agent Plaza | ✅ | ❌ | 需要新增 plaza/ 模块 | +| Soul/Memory 持久身份 | ✅ | ⚠️ 部分 | Soul 缺失,memory 是会话级非代理级 | +| 组织感知 | ✅ | ❌ | Agent 不知道可以向谁求助 | +| Supervision Tasks | ✅ | ❌ | 任务即结束,无跟进机制 | +| 主动 Self-Evolution | ✅ | ⚠️ 被动 | evolve_after_task 是完成后触发 | +| Enterprise Governance | ✅ | ⚠️ 部分 | QualityGate 有,Quota/审批/RBAC 无 | +| 多渠道 Gateway | ✅ | ⚠️ MCP | 当前是 Agent 平台,Clawith 是 Channel | +| 意图路由 | ✅ | ✅ | 已有 Intent Router | + +--- + +## 建议优先实现的功能 + +### P0 — 组织感知 + 主动进化 + +**1. OrganizationContext(组织上下文)** +- 新增 `src/agentkit/org/context.py` +- `OrganizationModel`:组织架构、代理能力注册表 +- `Agent.on_task_start()` 自动注入组织上下文 +- 支持代理主动 `handoff` 给合适的同事 + +**2. 主动工具发现** +- 当 ReAct 循环遇到未知任务时,触发 MCP 注册表搜索 +- 新增 `ToolDiscovery` 类 +- 集成 Smithery + ModelScope MCP 注册表 + +### P1 — Agent Plaza + Persistent Identity + +**3. Agent Plaza** +- 新增 `src/agentkit/plaza/` 模块 +- `PlazaFeed`、`KnowledgeShare`、`SubscriptionManager` +- 代理可发布状态、评论、发现 + +**4. Soul & LongTermMemory** +- 新增 `src/agentkit/identity/` 模块 +- `SoulManager`:管理代理 soul.md +- `LongTermMemory`:跨任务的持续记忆 + +### P2 — Supervision + Enterprise Governance + +**5. Supervision Tasks** +- 新增 `SupervisionTask` 类型 +- `SupervisorAgent` 主动跟进机制 + +**6. Enterprise Governance 补齐** +- `UsageQuota` +- `ApprovalWorkflow` +- 完善 RBAC + +--- + +## 深入分析任务 + +请在另一个会话中完成以下分析: + +1. **OrganizationContext 详细设计** + - 如何表示组织架构和代理能力 + - Agent 如何感知可用的同事 + - handoff 协议如何扩展支持自发协作 + +2. **Agent Plaza 技术方案** + - Feed 数据模型设计 + - 与现有 Memory 系统如何集成 + - 订阅/推送机制实现 + +3. **Persistent Identity 实现路径** + - soul.md 的 Schema 设计 + - LongTermMemory 与 WorkingMemory/EpisodicMemory 的关系 + - 跨会话记忆如何注入 Prompt + +4. **Self-Evolution 主动性增强** + - 何时触发工具发现 + - 如何平衡探索成本和任务需求 + - 发现新工具后如何学习使用 + +5. **与现有 Phase 6/7/8 规划的关系** + - Layered Memory(Phase 8) + - Adaptive Chat(Phase 8) + - Headroom(Phase 7) + - 如何避免重复建设 + +6. **实现优先级和依赖关系** + - 哪些功能可以并行开发 + - 哪些必须依赖其他模块先完成 + - 建议的迭代顺序 diff --git a/docs/brainstorms/2026-06-13-agentkit-platform-experience-upgrade-requirements.md b/docs/brainstorms/2026-06-13-agentkit-platform-experience-upgrade-requirements.md new file mode 100644 index 0000000..f41398c --- /dev/null +++ b/docs/brainstorms/2026-06-13-agentkit-platform-experience-upgrade-requirements.md @@ -0,0 +1,191 @@ +--- +date: "2026-06-13" +topic: "agentkit-platform-experience-upgrade" +--- + +## Summary + +Fischer AgentKit 平台体验全面升级——布局重构为左对话+右双栏、对话体验深化(首 Token 即渲染+消息格式增强+@-mention 四类引用)、响应速度核心优化(启发式路由+合并 LLM 调用)、暗色主题与交互增强、Computer Use MVP——分三个冲击波迭代交付。 + +## Problem Frame + +当前 AgentKit 处于"后端能力丰富、前端体验粗糙"的失衡状态。后端已实现 ReAct 推理、Skill 系统、Pipeline 编排、三层记忆、自进化、多 Agent 市场等完整能力,但 GUI 仍停留在功能可用层面:四象限等分布局让对话空间被压缩到 1/4 屏幕;消息仅支持纯文本渲染,代码块无高亮、工具调用无可视化;用户输入后需等待 5-10 秒才看到首个响应 Token;无暗色主题、无过渡动画、无操作反馈;Computer Use 前后端均为占位状态。 + +竞品(Devin、Cursor、v0.dev)已普遍采用 Agent-First 布局 + 统一设计系统 + 流式渲染 + 视觉操作能力。AgentKit 需要对齐这一标准,将"能用"升级为"好用"。 + +## Key Decisions + +**冲击波迭代策略。** 三个迭代各聚焦一个体验质变:迭代 1 解决对话"快且宽敞"(布局+速度+格式),迭代 2 解决"丰富且精准"(双主题+@-mention+交互),迭代 3 解决"专业且全能"(Computer Use+剩余优化)。每个迭代交付后用户都能感受到明确的体验提升。 + +**四线并行。** GUI 产品化、Chat 体验深化、响应速度优化、Computer Use 四条线并行推进,每个迭代从每条线各取一部分,交叉组合为端到端可交付的体验升级。 + +**Computer Use MVP 先截屏后容器。** 先实现截屏查看+简单点击操作的前后端闭环,Docker 容器化隔离延后。MVP 让用户能通过对话让 Agent"看到"屏幕并执行简单操作,验证价值后再投入容器化成本。 + +**@-mention 四类全覆盖。** 支持 @文件、@技能、@工作流、@Agent 四类引用,在对话输入框中通过 autocomplete 下拉选择,选中后作为上下文注入 Agent 推理。 + +**Cmd+K 内联编辑延后。** AgentKit 当前没有代码编辑器,Cmd+K 的场景定义不清,延后到代码预览集成完成后再评估。 + +## Actors + +- A1. **开发者/运维工程师** — 通过对话面板与 Agent 交互,使用 @-mention 引用上下文,通过 Computer Use 让 Agent 操作远程环境 +- A2. **Agent** — 接收用户消息,执行推理和工具调用,流式返回结果,响应 @-mention 注入的上下文 + +## Requirements + +### 迭代 1:对话体验质变 + +#### 布局重构 + +R1. 左对话 + 右双栏布局 — AgentLayout 从四象限等分布局重构为左半屏对话面板 + 右半屏上下双栏(上:代码/工作流/知识库,下:监控/技能/设置),左右分割默认 55:45,右侧上下分割默认 60:40,分割比例保存到 localStorage + +R2. 面板折叠为 Tab 栏 — 每个面板可独立折叠为约 38px 的 Tab 栏,折叠状态保存到 localStorage,折叠/展开有 200ms ease 过渡动画 + +R3. 侧边导航精简为图标模式 — 32px 宽图标导航栏,点击图标切换右侧面板 Tab 并展开,当前激活图标高亮,导航栏可通过 TopNav 按钮折叠/展开 + +R4. 小屏幕适配 — <1024px 显示提示,1024-1280px 右下面板默认折叠,≥1280px 完整展示 + +#### 响应速度核心 + +R5. 启发式分类器替代 LLM quick_classify — 用零成本的本地启发式规则(消息长度、关键词密度、工具提示检测)替代 `CostAwareRouter.quick_classify()` 的 LLM 调用,通过配置开关可回退到 LLM 模式 + +R6. 合并路由 LLM 调用 — 当启发式不确定需要 LLM 路由时,将复杂度评分和意图分类合并为单次 LLM 调用,而非两次串行调用 + +R7. 首 Token 即渲染 — 前端 WebSocket 接收到首个流式 Token 即开始渲染,不等完整块;后端 ReActEngine 流式输出与前端渲染对齐 + +#### 消息格式增强 + +R8. 代码块语法高亮 — 消息中的代码块自动识别语言并语法高亮,支持复制按钮 + +R9. 工具调用可视化 — 工具调用显示为可折叠的步骤卡片,展示工具名称、参数摘要、执行状态、结果预览,替代当前的纯文本标签 + +R10. 图片和文件预览 — 消息中的图片内联显示缩略图,文件显示为可下载卡片(文件名+大小+类型图标) + +### 迭代 2:专业感 + 精准度 + +#### 设计系统 + +R11. 暗色主题 — 在浅色 Token 基础上新增暗色主题 Token 变体,TopNav 增加主题切换按钮,偏好保存到 localStorage,暗色配色为深色背景+荧光强调色+终端原生感 + +R12. 组件样式统一 — 所有组件统一引用 Design Token,消除硬编码值,Ant Design 全局覆盖通过 Token 驱动 + +#### @-mention 上下文引用 + +R13. @-mention Autocomplete — 对话输入框中输入 `@` 触发下拉选择器,支持 @文件(知识库文档)、@技能(已注册技能)、@工作流(已有工作流)、@Agent(已配置 Agent),支持模糊搜索 + +R14. @-mention 上下文注入 — 选中的引用项作为结构化上下文注入 Agent 推理,后端解析引用类型和 ID,将对应内容(文档片段、技能描述、工作流定义、Agent 配置)加入对话上下文 + +R15. @-mention 引用标签 — 输入框中已选引用显示为可删除的标签(类似 ContextPill),发送后消息中显示为可点击的引用链接 + +#### 交互增强 + +R16. 过渡动画 — 面板折叠/展开 200ms ease、Tab 切换 150ms 淡入淡出、列表项交错渐入 stagger 50ms、路由切换 200ms 淡入淡出 + +R17. 操作反馈 — 按钮点击波纹/缩放反馈、加载状态骨架屏替代 `a-spin`、成功/失败 Toast 提示、WebSocket 断连顶部横幅 + +R18. 空状态设计 — 对话/工作流/监控/知识库/技能空状态各有品牌化插图和引导文案 + +### 迭代 3:能力扩展 + +#### Computer Use MVP + +R19. 截屏查看 — Agent 可对目标环境执行截屏操作,截图实时显示在 Computer Use 面板中,支持缩放和滚动 + +R20. 简单点击操作 — Agent 可在截屏上执行点击操作(指定坐标),操作结果通过新的截屏反馈 + +R21. Computer Use 面板 — 右上面板新增 Computer Use Tab,展示截屏画面和操作历史,支持手动截屏触发 + +#### 响应速度剩余优化 + +R22. 并行工具执行 — ReActEngine 中多个独立 tool_calls 使用 `asyncio.gather()` 并行执行,结果按 tool_call_id 顺序追加,通过配置开关可回退串行模式 + +R23. 异步会话写入 — SessionManager 的 `append_message()` 改为非阻塞,使用写前缓冲区防止消息丢失,优雅关闭时 flush + +#### 拖拽交互增强 + +R24. 分割线拖拽增强 — 拖拽时高亮分割线,显示当前比例百分比 + +R25. 面板折叠缩略预览 — 面板折叠时显示缩略内容预览 + +## Key Flows + +- F1. 对话为主的工作流 + - **Trigger:** 用户打开 AgentKit + - **Steps:** 左侧对话面板占满左半屏 → 用户输入消息 → 启发式分类器即时判断复杂度 → ReActEngine 流式推理 → 首 Token 即渲染 → 工具调用显示为步骤卡片 → 代码块语法高亮 → 右侧按需展示辅助信息 + - **Covered by:** R1, R5, R7, R8, R9 + +- F2. @-mention 上下文引用 + - **Trigger:** 用户在对话输入框输入 `@` + - **Steps:** 下拉选择器弹出 → 用户输入关键词模糊搜索 → 选择引用项 → 引用显示为标签 → 发送消息 → 后端解析引用 → 对应内容注入 Agent 上下文 → Agent 基于引用内容推理 + - **Covered by:** R13, R14, R15 + +- F3. Computer Use 操作 + - **Trigger:** 用户让 Agent 执行视觉操作(如"帮我点击屏幕上的保存按钮") + - **Steps:** Agent 调用截屏工具 → 截图显示在 Computer Use 面板 → Agent 分析截图定位目标 → 执行点击操作 → 新截屏反馈操作结果 → 用户可在面板中查看操作历史 + - **Covered by:** R19, R20, R21 + +- F4. 主题切换 + - **Trigger:** 用户点击 TopNav 主题切换按钮 + - **Steps:** 点击月亮/太阳图标 → 所有 Token 变量切换 → 界面平滑过渡 → 偏好保存到 localStorage + - **Covered by:** R11 + +## Scope Boundaries + +**在范围内:** +- 布局重构(左对话 + 右双栏) +- Design Token 体系 + 双主题 +- 组件样式统一 +- 首 Token 即渲染 +- 消息格式增强(代码高亮、工具调用卡片、图片/文件预览) +- @-mention 四类引用(文件、技能、工作流、Agent) +- 响应速度优化(启发式路由、合并调用、并行工具、异步写入) +- Computer Use MVP(截屏+点击,不含 Docker 容器化) +- 过渡动画、操作反馈、空状态、拖拽增强 +- 侧边导航精简 +- 小屏幕适配 + +**延迟到后续迭代:** +- Cmd+K 内联编辑 +- Computer Use Docker 容器化隔离 +- 代码 Diff 查看器实现(右上「代码」Tab 仍为占位) +- 代码 Diff 的 Accept/Reject 实际回滚功能 +- 响应式移动端适配 +- httpx 连接池配置优化 +- A/B 测试框架和性能基准 CI + +**不在本产品身份内:** +- 多用户协作/实时协同编辑 +- 插件市场 +- 代码编辑器(只读预览,不提供编辑能力) + +## Success Criteria + +1. **布局合理** — 对话面板占左半屏,右侧辅助信息可按需折叠 +2. **首 Token <1s** — 简单对话(问候、Q&A)首 Token 延迟低于 1 秒 +3. **消息丰富** — 代码块有语法高亮,工具调用有可视化卡片,图片/文件有预览 +4. **@-mention 可用** — 四类引用均可 autocomplete 选择并注入上下文 +5. **双主题可用** — 浅色/暗色一键切换,所有组件在两种主题下正常显示 +6. **Computer Use MVP** — Agent 能截屏查看并执行点击操作 +7. **交互流畅** — 所有过渡动画 ≤200ms,操作有即时反馈 +8. **渐进交付** — 分 3 个迭代完成,每个迭代可独立部署 + +## Dependencies / Assumptions + +- 现有 SplitPane 和 QuadrantPanel 组件支持水平和垂直分割,可直接复用 +- Ant Design Vue 4.x 的 ConfigProvider 支持 CSS 变量主题注入 +- ChatView 的 ChatSidebar 默认折叠,不影响左侧对话面板的空间利用 +- Vue 3 的 `` 和 `` 可满足过渡动画需求 +- `CostAwareRouter` 已有 `_tokenize_content()` 和 `_match_layer0()` 规则基础,启发式分类器可复用 +- `IntentRouter._classify_with_llm()` 的 prompt 结构可扩展为同时返回复杂度评分 +- Computer Use MVP 不依赖 Docker,可直接在宿主环境执行截屏和点击 +- 现有 `tools/computer_use_session.py` 的 TODO 占位需要替换为实际实现 +- 响应速度优化已有详细实施计划(docs/plans/2026-06-12-021-feat-chat-response-speed-optimization-plan.md),U1-U6 可直接沿用 + +## Outstanding Questions + +**Resolved:** +- Computer Use MVP 的截屏实现方式:使用 OpenCLI + +**Deferred to Planning:** +- @-mention 后端解析的具体协议:引用项如何在 WebSocket 消息中编码,与现有 `chat` 消息类型如何兼容 +- 工具调用步骤卡片的折叠/展开交互细节 +- 骨架屏的具体形状和占位内容 diff --git a/docs/brainstorms/2026-06-13-gui-productization-requirements.md b/docs/brainstorms/2026-06-13-gui-productization-requirements.md new file mode 100644 index 0000000..58cc940 --- /dev/null +++ b/docs/brainstorms/2026-06-13-gui-productization-requirements.md @@ -0,0 +1,190 @@ +--- +date: "2026-06-13" +topic: "gui-productization" +status: active +--- + +## Summary + +对 Fischer AgentKit GUI 进行产品级提升,三线并行推进:布局重构为「左对话 + 右双栏」、建立双主题设计系统、增强交互体验。分 3 个迭代交付,每个迭代可独立部署。 + +## Problem Frame + +当前 GUI 处于"功能可用但体验粗糙"状态:四象限等分布局让对话空间被压缩到 1/4 屏幕,终端面板大多时间空闲浪费空间;颜色/间距/圆角全部硬编码散落在 30+ 组件中,视觉不统一;无过渡动画、操作无反馈、空状态单调、加载态简陋。竞品(Devin、Cursor、v0.dev)已普遍采用 Agent-First 布局 + 统一设计系统,AgentKit 需要对齐这一标准。 + +## Key Decisions + +**左对话 + 右双栏布局。** 对话是用户 80% 时间停留的区域,应占据左半屏全部空间。右侧上下分割为代码/工作流(右上)和监控(右下),提供辅助信息。 + +**全面设计系统重构 + 双主题。** 建立 CSS 变量体系(颜色/间距/圆角/字体/阴影),所有组件统一引用。同时支持浅色极简和暗色科技两种主题,用户可一键切换。 + +**三线并行,分迭代交付。** 布局/视觉/交互三线并行推进,分 3 个迭代交付:迭代 1 布局骨架 + 设计 Token 基础,迭代 2 双主题 + 组件样式统一,迭代 3 交互增强。 + +## Actors + +- A1. **开发者/运维工程师** — 通过对话面板与 Agent 交互,右侧面板提供工作流编辑、监控数据等辅助信息 + +## Requirements + +### 迭代 1:布局骨架 + 设计 Token 基础 + +#### R1. 左对话 + 右双栏布局 + +将 AgentLayout 从四象限等分布局重构为「左对话 + 右双栏」布局。 + +- 左半屏:对话面板(ChatView),占满左侧全部高度 +- 右半屏上半:代码/工作流面板,Tab 切换代码(占位)/工作流/知识库 +- 右半屏下半:监控面板,Tab 切换监控/技能/设置 +- 左右分割线可拖拽调整宽度,默认比例 55:45 +- 右侧上下分割线可拖拽调整高度,默认比例 60:40 +- 分割比例保存到 localStorage,刷新后恢复 +- 最小比例 20%,最大比例 80% + +#### R2. 面板折叠为 Tab 栏 + +每个面板可独立折叠,折叠后仅显示 Tab 栏(约 38px 高度)。 + +- 右上面板折叠后仅显示 Tab 栏(代码/工作流/知识库 图标+文字) +- 右下面板折叠后仅显示 Tab 栏(监控/技能/设置 图标+文字) +- 折叠状态保存到 localStorage +- 折叠/展开有平滑过渡动画(200ms ease) +- 两个面板可同时折叠,对话面板获得最大空间 + +#### R3. 侧边导航精简为图标模式 + +侧边导航栏精简为 32px 宽的图标导航,点击图标切换右侧面板 Tab 内容。 + +- 导航项:对话、工作流、知识库、技能、监控、设置 +- 点击导航图标:对应面板切换到指定 Tab 并展开 +- 当前激活的导航图标高亮显示 +- 导航栏可通过 TopNav 按钮折叠/展开 + +#### R4. Design Token 体系基础 + +建立 CSS 变量体系,定义所有设计令牌。 + +- 创建 `src/styles/tokens.css`,定义浅色主题 Token:颜色、间距、圆角、字体、阴影 +- Ant Design Vue 主题通过 ConfigProvider 注入 Token 值 +- 所有组件引用 Token 变量,不再硬编码颜色/间距值 +- 主色统一为一种(消除 `#1677ff`/`#1890ff` 混用) + +#### R5. 小屏幕适配 + +- 屏幕宽度 < 1024px 时显示提示"请使用更大的屏幕" +- 屏幕宽度 1024-1280px 时右侧下面板默认折叠 +- 屏幕宽度 ≥ 1280px 时完整展示所有面板 + +### 迭代 2:双主题 + 组件样式统一 + +#### R6. 暗色主题 + +在浅色主题基础上新增暗色主题 Token 变体。 + +- `src/styles/tokens-dark.css` 定义暗色主题 Token +- TopNav 增加主题切换按钮(太阳/月亮图标) +- 主题偏好保存到 localStorage +- 暗色主题配色:深色背景(#1a1a2e)、荧光强调色、终端原生感 +- 代码/终端区域在浅色主题下也使用深色背景(One Dark Pro 配色) + +#### R7. 组件样式统一 + +所有组件统一引用 Design Token,消除硬编码值。 + +- 对话面板:消息气泡、工具调用标签、流式输出样式 +- 工作流面板:节点卡片、属性面板、画布样式 +- 监控面板:指标卡片、图表容器、时间线样式 +- 通用:按钮、输入框、标签、徽章、模态框统一圆角和间距 +- Ant Design 全局覆盖通过 Token 驱动,而非逐组件 `!important` + +### 迭代 3:交互增强 + +#### R8. 过渡动画 + +为所有交互添加过渡动画。 + +- 象限折叠/展开:平滑过渡(200ms ease) +- Tab 切换:淡入淡出(150ms) +- 列表项加载:交错渐入(stagger 50ms) +- 路由切换:淡入淡出(200ms) + +#### R9. 操作反馈 + +为用户操作提供即时反馈。 + +- 按钮点击:波纹效果或缩放反馈 +- 加载状态:骨架屏替代 `` +- 成功/失败:Toast 提示(替代 `alert`) +- WebSocket 断连:顶部横幅提示 + +#### R10. 空状态设计 + +为所有空状态提供品牌化插图和引导文案。 + +- 对话空状态:引导用户输入第一条消息 +- 工作流空状态:引导创建第一个工作流 +- 监控空状态:说明数据来源和更新频率 +- 知识库空状态:引导上传文档或配置信息源 +- 技能空状态:说明如何注册技能 + +#### R11. 拖拽交互增强 + +优化拖拽操作的视觉反馈。 + +- 分割线拖拽:拖拽时高亮分割线,显示当前比例百分比 +- 工作流节点拖拽:放置预览指示,对齐网格 +- 面板折叠:折叠时显示缩略预览 + +## Key Flows + +- F1. 对话为主的工作流 + - **Trigger:** 用户打开 AgentKit + - **Steps:** 左侧对话面板占满左半屏 → 右侧显示工作流/监控 Tab 栏 → 用户在对话面板输入 → Agent 回复 → 右侧按需展示辅助信息 + - **Covered by:** R1 + +- F2. 主题切换 + - **Trigger:** 用户点击 TopNav 主题切换按钮 + - **Steps:** 点击月亮图标 → 所有 Token 变量切换为暗色值 → 界面平滑过渡到暗色主题 → 偏好保存到 localStorage + - **Covered by:** R6 + +- F3. 面板折叠获取最大对话空间 + - **Trigger:** 用户需要专注对话 + - **Steps:** 点击右上面板折叠按钮 → 面板折叠为 Tab 栏(200ms 动画)→ 点击右下面板折叠按钮 → 同样折叠 → 对话面板获得最大空间 + - **Covered by:** R2, R8 + +## Scope Boundaries + +**在范围内:** +- 布局重构(左对话 + 右双栏) +- Design Token 体系 + 双主题 +- 组件样式统一 +- 过渡动画、操作反馈、空状态、拖拽增强 +- 侧边导航精简 +- 小屏幕适配 + +**延迟到后续迭代:** +- 代码 Diff 查看器实现(右上「代码」Tab 仍为占位) +- Cmd+K 内联编辑(类似 Cursor) +- @-mention 上下文引用 +- 代码 Diff 的 Accept/Reject 实际回滚功能 +- 响应式移动端适配 + +**不在本产品身份内:** +- 多用户协作/实时协同编辑 +- 插件市场 +- 代码编辑器(只读预览,不提供编辑能力) + +## Success Criteria + +1. **布局合理** — 对话面板占左半屏,右侧辅助信息可按需折叠 +2. **视觉一致** — 零硬编码颜色值,所有样式通过 Design Token 引用 +3. **双主题可用** — 浅色/暗色一键切换,所有组件在两种主题下正常显示 +4. **交互流畅** — 所有过渡动画 ≤200ms,操作有即时反馈 +5. **渐进交付** — 分 3 个迭代完成,每个迭代可独立部署 + +## Dependencies / Assumptions + +- 现有 SplitPane 组件支持水平和垂直分割,可直接复用 +- 现有 QuadrantPanel 组件支持 Tab 切换和折叠,可直接复用 +- Ant Design Vue 4.x 的 ConfigProvider 支持 CSS 变量主题注入 +- ChatView 的 ChatSidebar 默认折叠(collapsed = true),不影响左侧对话面板的空间利用 +- Vue 3 的 `` 和 `` 组件可满足过渡动画需求 diff --git a/docs/brainstorms/2026-06-13-gui-redesign-requirements.md b/docs/brainstorms/2026-06-13-gui-redesign-requirements.md new file mode 100644 index 0000000..cb9b7fc --- /dev/null +++ b/docs/brainstorms/2026-06-13-gui-redesign-requirements.md @@ -0,0 +1,220 @@ +# Fischer AgentKit GUI 重构需求文档 + +**日期:** 2026-06-13 +**状态:** Active +**范围:** Deep — Feature + +--- + +## 1. 问题陈述 + +当前 Fischer AgentKit GUI 处于"功能可用但视觉粗糙"状态,存在以下核心问题: + +1. **布局范式落后** — SideNav 多页面布局无法同时展示 Agent 的对话、代码修改、终端执行和预览结果,用户需要频繁切换页面才能理解 Agent 在做什么 +2. **设计系统缺失** — 无 Design Token,颜色(`#1677ff`/`#1890ff` 混用)、间距、圆角、字体大小全部硬编码散落在 30+ 组件中 +3. **视觉质量低** — 无过渡动画、空状态单调、加载态粗糙、信息层级平铺 +4. **响应式完全缺失** — 所有面板宽度固定,小屏幕下内容被严重挤压 + +竞品(Devin、Cursor、Trae、v0.dev)已普遍采用 Agent-First 全屏布局 + 统一设计系统,Fischer AgentKit 需要对齐这一标准。 + +## 2. 目标用户 + +**主要用户:** 使用 Fischer AgentKit 执行自动化任务的开发者和运维工程师。他们提交任务后需要实时观察 Agent 执行过程,并在必要时干预。 + +**核心场景:** 用户提交一个多步任务(如"部署新版本到测试环境"),Agent 自主执行,用户在四象限界面中实时观察对话推理、代码修改、终端执行和结果预览,随时可以点击干预。 + +## 3. 设计方向 + +### 3.1 布局范式:Agent-First 全屏 + +采用类似 Devin 的四象限布局,Agent 执行过程全屏实时展示: + +``` +┌──────────────────────────────────────────────────────┐ +│ 顶部导航栏 (48px) — Logo / 任务选择 / 状态 / 设置 │ +├──────────────────────┬───────────────────────────────┤ +│ │ │ +│ 对话面板 │ 代码/预览面板 │ +│ (Chat + Agent │ (代码 Diff / 文件树 / │ +│ 推理过程) │ 工作流画布 / 知识库) │ +│ │ │ +│ │ │ +├──────────────────────┼───────────────────────────────┤ +│ │ │ +│ 终端面板 │ 状态/监控面板 │ +│ (实时终端输出 │ (执行进度 / 节点状态 / │ +│ + 命令确认) │ 指标图表 / 日志) │ +│ │ │ +└──────────────────────┴───────────────────────────────┘ +``` + +**四象限可独立缩放和折叠**,象限之间的分隔线可拖拽调整比例。 + +### 3.2 视觉风格:浅色极简 + +- **主背景:** 白色 / 极浅灰(`#fafafa`) +- **强调色:** 紫黑渐变(类似 v0.dev 的 Vercel 品牌色) +- **代码/终端区域:** 深色背景(One Dark Pro 配色),与浅色主界面形成对比 +- **设计语言:** 大量留白、细线条、柔和阴影、圆角 8px +- **字体:** 系统字体栈(UI)+ 等宽字体栈(代码/终端) + +### 3.3 交互模式 + +- **任务提交:** 顶部输入栏或对话面板底部输入 +- **实时观察:** 四象限同步更新,WebSocket 推送 +- **干预机制:** 每个象限内的操作可暂停/审批/接管 +- **模式切换:** 对话模式(Chat-First)↔ 代理模式(Agent-First)一键切换 + +## 4. 功能需求 + +### R1: Design Token 体系 + +建立统一的设计令牌系统,替代当前硬编码散落的样式值。 + +**完成标准:** +- 创建 `src/styles/tokens.css`,定义所有 Design Token(颜色、间距、圆角、字体、阴影) +- Ant Design Vue 主题通过 ConfigProvider 注入 Token 值 +- 所有组件引用 Token 变量,不再硬编码颜色/间距值 +- 主色统一为一种(消除 `#1677ff`/`#1890ff` 混用) + +### R2: Agent-First 全屏布局 + +将 SideNav 多页面布局重构为四象限全屏布局。 + +**完成标准:** +- 顶部导航栏(48px):Logo、任务选择器、Agent 状态指示、模式切换、设置入口 +- 四象限可拖拽调整比例,每个象限可折叠 +- 象限内容根据当前任务动态切换(对话/代码/终端/状态) +- 保留 Vue Router,但页面切换变为象限内容切换而非整页跳转 +- 侧边导航改为顶部极简导航 + 下拉菜单 + +### R3: 对话面板重构 + +将 ChatView 重构为对话面板,作为四象限的左上象限。 + +**完成标准:** +- 支持 Markdown 渲染(替代当前 `v-html`) +- 流式输出 + 打字机效果 +- 工具调用指示器(类似 Claude Code 的 `[Read]`/`[Edit]`/`[Bash]` 彩色标签) +- 上下文胶囊(Context Pills):显示当前关联的文件、技能 +- 对话历史侧栏可折叠 + +### R4: 代码/预览面板 + +新增代码 Diff 查看和文件预览能力,作为右上象限。 + +**完成标准:** +- 代码 Diff 查看器:逐行 diff 高亮,支持 Accept/Reject +- 文件树浏览器:展示 Agent 修改的文件列表 +- 工作流画布:当前 FlowCanvas 集成为此象限的一个 Tab +- 知识库管理:当前 KnowledgeBaseView 集成为此象限的一个 Tab +- Tab 切换:代码 / 工作流 / 知识库 + +### R5: 终端面板重构 + +将 TerminalView 重构为终端面板,作为左下象限。 + +**完成标准:** +- 暗色背景终端(One Dark Pro 配色) +- 命令确认弹窗使用 Ant Design Modal(替代当前原生 HTML) +- 命令历史可折叠侧栏 +- ANSI 颜色完整支持 + +### R6: 状态/监控面板 + +将 EvolutionView 精简后集成为右下象限。 + +**完成标准:** +- 进化面板从 6 个精简为 2-3 个核心面板:概览+指标、经验+坑点、用量 +- 执行进度条:顶部显示当前任务完成度估算 +- 节点状态动画:运行中节点脉冲动画 +- 技能卡片网格:当前 SkillsView 集成为此象限的一个 Tab +- 设置页:当前 SettingsView 集成为此象限的一个 Tab(分组化) +- Tab 切换:监控 / 技能 / 设置 + +### R7: 工作流单页化 + +将工作流列表和编辑合并为单页 Tab 切换。 + +**完成标准:** +- 列表和编辑在同一象限内通过 Tab 切换,无需整页跳转 +- 编辑模式:NodePalette + FlowCanvas + PropertyPanel 保留 +- 执行历史面板可折叠 + +### R8: 设置分组化 + +将设置页从平铺长表单拆分为 Tab 分组。 + +**完成标准:** +- 4 个分组 Tab:LLM 配置、技能管理、知识库设置、系统设置 +- 每组最大宽度 600px,居中布局 +- 保存按钮每组独立 + +### R9: 过渡动画与微交互 + +为所有交互添加过渡动画。 + +**完成标准:** +- 象限折叠/展开:平滑过渡(200ms ease) +- Tab 切换:淡入淡出(150ms) +- 列表项加载:交错渐入(stagger 50ms) +- 空状态:品牌化插图 + 引导文案 +- 加载态:骨架屏替代 `` + +### R10: 响应式断点 + +支持 1280px+ 桌面端断点。 + +**完成标准:** +- ≥1440px:四象限完整展示 +- 1280-1440px:右下象限自动折叠为 Tab 栏 +- <1280px:显示提示"请使用更大屏幕" +- 象限比例记忆:localStorage 保存用户调整的比例 + +## 5. 范围边界 + +### 在范围内 +- Design Token 体系建立 +- 四象限全屏布局重构 +- 所有现有功能的迁移(对话、工作流、知识库、技能、终端、进化、设置) +- 浅色极简视觉风格实现 +- 过渡动画和微交互 +- 1280px+ 响应式断点 + +### 延迟到后续迭代 +- 暗色模式(需 Design Token 暗色变体) +- 移动端适配 +- Computer Use 功能实现(保留路由,显示"即将推出") +- Cmd+K 内联编辑(类似 Cursor) +- @-mention 上下文引用 +- 代码 Diff 的 Accept/Reject 实际回滚功能 + +### 不在本产品身份内 +- 多用户协作/实时协同编辑 +- 插件市场 +- 代码编辑器(只读预览,不提供编辑能力) + +## 6. 成功标准 + +1. **视觉一致性** — 零硬编码颜色值,所有样式通过 Design Token 引用 +2. **信息密度** — 四象限同时展示 Agent 全部活动,无需切换页面 +3. **交互流畅度** — 所有过渡动画 ≤200ms,无卡顿 +4. **响应式** — 1280px+ 屏幕正常使用,象限比例可调 +5. **渐进式交付** — 分 2-3 个迭代完成,每个迭代可独立部署 + +## 7. 依赖与假设 + +- **假设** Vue Flow 和 ECharts 可在象限内正常渲染(需验证尺寸变化时的 resize) +- **假设** Ant Design Vue 4.x 的 ConfigProvider 主题注入满足 Design Token 需求 +- **依赖** 后端 WebSocket 推送已就绪(上一轮已实现) +- **依赖** 后端 API 路径不变,前端仅重构 UI 层 + +## 8. 竞品参考 + +| 参考工具 | 借鉴要素 | +|----------|----------| +| Devin | 四象限布局、Action Timeline、Intervention Button | +| v0.dev | 浅色极简风格、紫黑渐变强调色、Preview-First | +| Cursor | Cmd+K 交互理念(后续迭代)、Chat Panel 设计 | +| Claude Code | Tool Use Indicators、Permission Prompts | +| Trae Solo | Chat-First 全屏布局、Agent Mode Toggle | diff --git a/docs/plans/2026-06-07-015-feat-agentkit-phase8-chat-adaptive-plan.md b/docs/plans/2026-06-07-015-feat-agentkit-phase8-chat-adaptive-plan.md new file mode 100644 index 0000000..e90259c --- /dev/null +++ b/docs/plans/2026-06-07-015-feat-agentkit-phase8-chat-adaptive-plan.md @@ -0,0 +1,550 @@ +--- +title: "feat: AgentKit Phase 8 — 对话式 Agent 与自适应编排" +status: completed +created: 2026-06-07 +plan_type: feat +depth: deep +origin: Phase 1-7 完成后架构能力评估 — 对话模式(20%)、多Agent协作(70%)、自适应规划(10%)三大差距 +branch: feat/agentkit-phase8-chat-adaptive +--- + +# AgentKit Phase 8 — 对话式 Agent 与自适应编排 + +## Summary + +Phase 8 将 AgentKit 从"任务执行框架"演进为"对话式 Agent 平台",补齐三大核心差距:Chat 模式(多轮对话 + Human-in-the-Loop)、自适应编排(反思-重规划闭环)、高级多 Agent 协作(Agent 间直接通信 + 动态角色协商)。分三个阶段交付:先建立对话基础设施(U1-U3),再实现自适应编排(U4-U5),最后补齐多 Agent 协作(U6-U8)。 + +## Problem Frame + +Phase 1-7 构建了完整的 Agent 执行框架:ReAct 引擎、三层记忆、Pipeline 编排、MCP 协议、上下文压缩、自进化系统。但当前架构是 **"计划-执行"** 模式,存在三大差距: + +1. **对话能力缺失(20%)**:无会话管理、无多轮对话、无 Human-in-the-Loop。`conversation_id` 字段存在但从未使用。每次任务提交是独立的,ReAct 引擎不保留对话历史。 +2. **自适应规划缺失(10%)**:Pipeline 定义是静态的,执行失败后无"分析原因→修改计划→重新执行"闭环。Orchestrator 分解一次执行一次,无迭代优化。 +3. **多 Agent 高级协作不足(70%)**:Worker 之间只能通过 SharedWorkspace 间接传递数据,无直接通信。角色固定,无运行时协商。无 Supervisor 监控。 + +## Requirements + +- R1: 支持多轮对话:用户可在同一会话中持续与 Agent 交互,对话历史自动持久化 +- R2: 支持 Human-in-the-Loop:Agent 可主动向用户提问并等待回复,用户可在执行中追问/打断 +- R3: 支持流式 LLM 输出:ReAct 引擎的 LLM 调用支持 token-by-token streaming +- R4: 支持自适应编排:Pipeline 执行失败后可触发反思→重规划→重新执行闭环 +- R5: 支持 Agent 间直接通信:Worker Agent 之间可发送消息,无需通过 SharedWorkspace 间接传递 +- R6: 支持动态角色协商:Agent 可在运行时协商分工,而非固定角色分配 +- R7: 所有新功能向后兼容,现有 Task 模式不受影响 +- R8: Chat 模式和 Task 模式可共存,同一 Agent 实例可同时服务两种模式 + +--- + +## Key Technical Decisions + +### KTD-1: 会话模型设计 — Session + Message 双层模型 + +**决策**:采用 `Session`(会话)+ `Message`(消息)双层模型,Session 持有对话元数据和 Agent 绑定,Message 持有单条消息内容和角色。 + +**理由**: +- Session 管理生命周期(创建/活跃/暂停/关闭),支持超时自动归档 +- Message 按 role 分类(user/assistant/tool/system),与 ReAct 引擎的 messages 列表自然映射 +- Session 可关联多个 Agent(Orchestrator 模式下),Message 可标注来源 Agent + +**替代方案**: +- 单层 Conversation 模型:简单但无法表达多 Agent 参与、会话状态管理 +- 纯 Redis 存储:高性能但无持久化保证,重启丢失 + +### KTD-2: Human-in-the-Loop 实现 — AskHumanTool + WebSocket 双向通信 + +**决策**:注册 `AskHumanTool` 作为 ReAct 可调用工具,Agent 调用时通过 WebSocket 向客户端推送问题并等待回复。 + +**理由**: +- 工具化实现与现有 ReAct 循环无缝集成,无需修改引擎核心 +- WebSocket 已有基础设施,只需扩展为双向通信 +- 非对话模式下 AskHumanTool 不注册,零侵入 + +**替代方案**: +- 特殊消息类型:需要修改 ReAct 引擎核心循环,侵入性高 +- HTTP 轮询:延迟高,用户体验差 + +### KTD-3: 流式 LLM 输出 — LLMGateway.chat_stream() + ReActEvent 扩展 + +**决策**:在 LLMGateway 新增 `chat_stream()` 方法返回 `AsyncIterator[str]`,ReAct 引擎在 `execute_stream()` 中消费并包装为 `token` 类型 ReActEvent。 + +**理由**: +- 流式输出是 Chat 模式的基本要求,用户需要实时看到 Agent 的"思考过程" +- 在 LLM Gateway 层实现流式,所有 Provider 统一接口 +- ReActEvent 已有 streaming 机制,只需新增 `token` 事件类型 + +### KTD-4: 自适应编排 — Reflect-then-Replan 模式 + +**决策**:在 PipelineEngine 执行失败时,触发 LLM 反思分析失败原因,生成修正后的 Pipeline 重新执行,最多重试 N 次。 + +**理由**: +- 与现有 PipelineEngine 的重试机制互补:重试处理瞬态错误,反思处理结构性错误 +- LLM 反思可利用执行上下文(哪步失败、错误信息、已完成步骤的输出)做出更智能的调整 +- 可配置开关,默认关闭,不影响现有 Pipeline 行为 + +### KTD-5: Agent 间通信 — MessageBus 抽象层 + +**决策**:新增 `MessageBus` 抽象层,基于 Redis Streams 实现,支持 Agent 间点对点和广播通信。 + +**理由**: +- Redis Streams 比 Pub/Sub 可靠(消息持久化 + 消费者组),比 Queue 灵活(多消费者) +- 抽象层解耦底层实现,未来可替换为 Kafka/NATS +- 与现有 SharedWorkspace 互补:Workspace 用于共享状态,MessageBus 用于事件通知 + +--- + +## High-Level Technical Design + +```mermaid +flowchart TB + subgraph Chat["Chat 模式(新增)"] + Client[客户端] <-->|WebSocket 双向| WS[WS Handler] + WS -->|发送消息| SM[SessionManager] + SM -->|加载会话| SP[Session + Messages] + SM -->|调用 Agent| Agent[ReAct Engine] + Agent -->|AskHumanTool| WS + Agent -->|token streaming| WS + end + + subgraph Task["Task 模式(现有)"] + API[REST API] -->|提交任务| Dispatcher[TaskDispatcher] + Dispatcher -->|分发| Agent + end + + subgraph Adaptive["自适应编排(新增)"] + PE[PipelineEngine] -->|执行失败| Reflector[LLM Reflector] + Reflector -->|分析原因| Replanner[Replanner] + Replanner -->|生成新计划| PE + end + + subgraph MultiAgent["多 Agent 协作(增强)"] + Orch[Orchestrator] -->|分配任务| W1[Worker 1] + Orch -->|分配任务| W2[Worker 2] + W1 <-->|MessageBus| W2 + Orch -->|动态协商| Negotiator[Role Negotiator] + end + + Agent --> PE + Agent --> Orch + + style Chat fill:#c8e6c9,color:#1a5e20 + style Adaptive fill:#bbdefb,color:#0d47a1 + style MultiAgent fill:#fff3e0,color:#e65100 +``` + +--- + +## Scope Boundaries + +### In Scope +- Session/Message 模型与持久化 +- Chat API(REST + WebSocket 双向通信) +- AskHumanTool 实现 +- LLMGateway.chat_stream() 流式输出 +- ReAct 引擎 token streaming +- PipelineEngine 反思-重规划闭环 +- MessageBus 抽象层与 Redis Streams 实现 +- Agent 间点对点通信 + +### Deferred to Follow-Up Work +- 多租户隔离与用户认证(OAuth/JWT) +- Agent 沙箱与工具权限控制 +- 声明式 Pipeline YAML 定义 +- Pipeline 运行时监控/可视化 +- 跨 Agent 记忆共享 +- 记忆主动遗忘/压缩策略 +- 性能基准测试与混沌测试 +- 动态角色协商(Phase 8 仅实现基础通信,协商逻辑留待 Phase 9) + +--- + +## Implementation Units + +### U1. Session/Message 模型与持久化 + +**Goal:** 建立对话基础设施 — Session 生命周期管理 + Message 持久化存储 + +**Requirements:** R1, R7 + +**Dependencies:** 无 + +**Files:** +- `src/agentkit/session/__init__.py` (新建) +- `src/agentkit/session/models.py` (新建) — Session + Message 数据模型 +- `src/agentkit/session/manager.py` (新建) — SessionManager 会话管理器 +- `src/agentkit/session/store.py` (新建) — 会话存储(InMemory + Redis 双后端) +- `tests/unit/test_session_models.py` (新建) +- `tests/unit/test_session_manager.py` (新建) +- `tests/unit/test_session_store.py` (新建) + +**Approach:** +- `Session` 模型:`session_id`, `agent_name`, `status` (active/paused/closed), `metadata`, `created_at`, `updated_at`, `ttl` +- `Message` 模型:`message_id`, `session_id`, `role` (user/assistant/tool/system), `content`, `tool_call_id` (可选), `agent_name` (可选,多 Agent 场景), `created_at` +- `SessionManager`:创建/获取/暂停/关闭会话,追加消息,加载对话历史,超时归档 +- `SessionStore`:InMemory(测试用)+ Redis(生产用)双后端,接口统一 +- Session 与 Agent 绑定:创建时指定 `agent_name`,后续消息自动路由到该 Agent +- 对话历史加载:`get_messages(session_id)` 返回完整消息列表,可直接传入 ReAct 引擎 + +**Patterns to follow:** `TaskStore` 的 InMemory + Redis 双后端模式(`src/agentkit/server/task_store.py`) + +**Test scenarios:** +- 创建 Session 返回有效 session_id,状态为 active +- 追加 Message 后通过 get_messages 获取完整历史 +- Session 状态转换:active → paused → active → closed +- 关闭的 Session 不接受新 Message +- InMemory 和 Redis Store 行为一致 +- Session TTL 过期后自动归档为 closed +- 获取不存在的 Session 返回 None +- 大量消息的会话加载性能(1000+ messages) + +**Verification:** Session 模型可创建、持久化、加载,Message 可追加和查询,状态转换正确 + +--- + +### U2. Chat API 与 WebSocket 双向通信 + +**Goal:** 暴露 Chat 模式的 REST + WebSocket API,支持多轮对话和实时交互 + +**Requirements:** R1, R2, R7, R8 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/routes/chat.py` (新建) — Chat REST + WebSocket 路由 +- `src/agentkit/server/app.py` (修改) — 注册 Chat 路由,注入 SessionManager +- `src/agentkit/server/config.py` (修改) — 新增 session 配置 +- `tests/unit/test_chat_routes.py` (新建) +- `tests/integration/test_chat_e2e.py` (新建) + +**Approach:** +- REST 端点: + - `POST /api/v1/chat/sessions` — 创建会话 + - `GET /api/v1/chat/sessions/{id}` — 获取会话信息 + - `POST /api/v1/chat/sessions/{id}/messages` — 发送消息(同步模式,等待 Agent 完整回复) + - `GET /api/v1/chat/sessions/{id}/messages` — 获取对话历史 + - `DELETE /api/v1/chat/sessions/{id}` — 关闭会话 +- WebSocket 端点:`/ws/chat/{session_id}` — 双向通信 + - 客户端 → 服务端:`{"type": "message", "content": "..."}`, `{"type": "cancel"}` + - 服务端 → 客户端:`{"type": "token", "content": "..."}`, `{"type": "tool_call", ...}`, `{"type": "ask_human", "question": "..."}`, `{"type": "final_answer", ...}` +- Chat 路由与现有 Task 路由共存,同一 Agent 实例可同时服务两种模式 +- WebSocket handler 接收用户消息后,加载 Session 历史 + 新消息,调用 Agent.execute_stream() + +**Patterns to follow:** 现有 `routes/tasks.py` 的 stream 端点 + `routes/ws.py` 的 WebSocket handler + +**Test scenarios:** +- POST /chat/sessions 创建会话返回 session_id +- POST /chat/sessions/{id}/messages 发送消息获得 Agent 回复 +- GET /chat/sessions/{id}/messages 返回完整对话历史 +- WebSocket 连接后发送消息收到 token 流式事件 +- WebSocket 发送 cancel 消息取消 Agent 执行 +- 关闭的 Session 发送消息返回 400 错误 +- 不存在的 Session 返回 404 +- 同一 Agent 同时服务 Chat 和 Task 模式 + +**Verification:** Chat API 端到端可用,WebSocket 双向通信正常,多轮对话历史持久化 + +--- + +### U3. AskHumanTool + 流式 LLM 输出 + +**Goal:** 实现 Human-in-the-Loop 和 token-by-token 流式输出 + +**Requirements:** R2, R3, R7 + +**Dependencies:** U1, U2 + +**Files:** +- `src/agentkit/tools/ask_human.py` (新建) — AskHumanTool +- `src/agentkit/tools/__init__.py` (修改) — 导出 AskHumanTool +- `src/agentkit/llm/gateway.py` (修改) — 新增 chat_stream() 方法 +- `src/agentkit/llm/protocol.py` (修改) — 新增 LLMStreamResponse +- `src/agentkit/core/react.py` (修改) — execute_stream() 支持 token 事件 +- `src/agentkit/core/config_driven.py` (修改) — Chat 模式下注册 AskHumanTool +- `tests/unit/test_ask_human_tool.py` (新建) +- `tests/unit/test_llm_streaming.py` (新建) +- `tests/unit/test_react_token_streaming.py` (新建) + +**Approach:** +- `AskHumanTool`: + - 参数:`question: str`, `options: list[str] | None` + - 执行时通过 `context` 获取 WebSocket 连接,向客户端推送问题 + - 使用 `asyncio.Future` 等待用户回复,设置超时(默认 60s) + - 超时返回默认回复或取消当前 ReAct 循环 + - 仅在 Chat 模式下注册(通过 ConfigDrivenAgent 的 mode 参数判断) +- `LLMGateway.chat_stream()`: + - 新增方法,签名与 `chat()` 一致,返回 `AsyncIterator[LLMStreamChunk]` + - `LLMStreamChunk`:`content: str`, `finish_reason: str | None`, `usage: dict | None` + - 各 Provider 实现 `_stream_chat()` 方法,调用底层 SDK 的 stream API + - 优先实现 OpenAI 和 Anthropic 的流式(覆盖 80% 用例) +- ReAct token streaming: + - `execute_stream()` 中调用 `llm_gateway.chat_stream()` 替代 `chat()` + - 新增 `ReActEvent` 类型:`type="token", content=str` + - token 事件直接透传到 WebSocket 客户端 + +**Patterns to follow:** `HeadroomRetrieveTool` 的条件注册模式;现有 Provider 的 `chat()` 实现模式 + +**Test scenarios:** +- AskHumanTool 执行后向客户端推送问题 +- AskHumanTool 收到用户回复后返回结果 +- AskHumanTool 超时后返回默认回复 +- 非 Chat 模式下 AskHumanTool 不注册 +- LLMGateway.chat_stream() 返回 AsyncIterator +- 流式输出的内容拼接后与完整输出一致 +- ReAct execute_stream() 产出 token 类型事件 +- 流式输出中断(取消)时正确清理资源 + +**Verification:** Agent 可在执行中向用户提问并等待回复,LLM 输出以 token 粒度流式推送 + +--- + +### U4. PipelineEngine 反思-重规划闭环 + +**Goal:** Pipeline 执行失败后自动反思分析原因,生成修正计划重新执行 + +**Requirements:** R4, R7 + +**Dependencies:** 无(独立于 U1-U3) + +**Files:** +- `src/agentkit/orchestrator/reflection.py` (新建) — PipelineReflector + PipelineReplanner +- `src/agentkit/orchestrator/pipeline_engine.py` (修改) — 集成反思-重规划 +- `src/agentkit/orchestrator/pipeline_schema.py` (修改) — 新增 AdaptiveConfig +- `tests/unit/test_pipeline_reflection.py` (新建) +- `tests/integration/test_adaptive_pipeline.py` (新建) + +**Approach:** +- `PipelineReflector`: + - 输入:失败的 Pipeline + 执行上下文(哪步失败、错误信息、已完成步骤输出) + - 调用 LLM 分析失败原因,输出结构化反思报告(failure_type, root_cause, suggested_fix) + - failure_type 分类:`input_error`(输入问题)、`resource_error`(资源不可用)、`logic_error`(步骤逻辑错误)、`timeout`(超时) +- `PipelineReplanner`: + - 输入:原始 Pipeline + 反思报告 + - 调用 LLM 生成修正后的 Pipeline(调整步骤顺序、替换失败步骤、增加前置检查) + - 保留已完成步骤的结果,仅重新执行失败及后续步骤 +- `AdaptiveConfig`: + - `enabled: bool = False` — 默认关闭 + - `max_reflections: int = 3` — 最大反思次数 + - `reflection_model: str = "default"` — 反思使用的 LLM 模型 + - `skip_stages: list[str] = []` — 不参与反思的步骤 +- PipelineEngine 集成: + - 执行失败时检查 AdaptiveConfig.enabled + - 启用则触发反思→重规划→重新执行循环 + - 每次反思记录到 PipelineResult.metadata + +**Patterns to follow:** `StepRetryPolicy` 的配置模式;`SagaOrchestrator` 的补偿追踪模式 + +**Test scenarios:** +- Pipeline 执行失败且 adaptive 未启用时,行为与现有一致 +- Pipeline 执行失败且 adaptive 启用时,触发反思 +- 反思报告包含 failure_type 和 root_cause +- 重规划生成的新 Pipeline 保留已完成步骤结果 +- 达到 max_reflections 后停止重试 +- 反思-重规划成功后 Pipeline 最终完成 +- 连续反思仍失败时返回最终失败结果 +- 集成测试:模拟资源错误→反思→调整→成功 + +**Verification:** Pipeline 执行失败后可自动反思并重规划,最终完成或达到最大重试次数 + +--- + +### U5. Orchestrator 自适应任务分解 + +**Goal:** Orchestrator 支持迭代式任务分解 — 执行→评估→再分解 + +**Requirements:** R4, R7 + +**Dependencies:** U4 + +**Files:** +- `src/agentkit/core/orchestrator.py` (修改) — 新增 execute_adaptive() 方法 +- `tests/unit/test_orchestrator_adaptive.py` (新建) +- `tests/integration/test_orchestrator_adaptive.py` (新建) + +**Approach:** +- `execute_adaptive()` 方法: + - 第一轮:与现有 execute() 一致,分解任务并执行 + - 评估:LLM 评估子任务结果质量(0-1 评分 + 改进建议) + - 如果评估不通过且未达 max_iterations: + - 基于评估反馈重新分解未达标的子任务 + - 保留已完成的子任务结果 + - 执行新分解的子任务 + - 如果评估通过或达到 max_iterations:汇总结果返回 +- 新增 `OrchestratorConfig`: + - `adaptive: bool = False` + - `max_iterations: int = 3` + - `quality_threshold: float = 0.7` + +**Patterns to follow:** `DynamicPipeline.execute_loop()` 的迭代模式 + +**Test scenarios:** +- adaptive=False 时行为与现有 execute() 一致 +- 第一轮评估通过时直接返回结果 +- 第一轮评估不通过时触发再分解 +- 再分解保留已完成子任务结果 +- 达到 max_iterations 时返回当前最佳结果 +- 评估反馈正确传递给 LLM 用于再分解 +- 集成测试:复杂任务经两轮分解后完成 + +**Verification:** Orchestrator 可根据执行结果迭代优化任务分解 + +--- + +### U6. MessageBus 抽象层与 Redis Streams 实现 + +**Goal:** 新增 Agent 间通信基础设施 — MessageBus 抽象 + Redis Streams 实现 + +**Requirements:** R5, R7 + +**Dependencies:** 无(独立于 U1-U5) + +**Files:** +- `src/agentkit/bus/__init__.py` (新建) +- `src/agentkit/bus/protocol.py` (新建) — MessageBus Protocol 定义 +- `src/agentkit/bus/message.py` (新建) — AgentMessage 消息模型 +- `src/agentkit/bus/redis_bus.py` (新建) — Redis Streams 实现 +- `src/agentkit/bus/memory_bus.py` (新建) — InMemory 实现(测试用) +- `tests/unit/test_bus_protocol.py` (新建) +- `tests/unit/test_redis_bus.py` (新建) +- `tests/unit/test_memory_bus.py` (新建) + +**Approach:** +- `AgentMessage` 模型: + - `message_id: str` — UUID + - `sender: str` — 发送者 Agent 名称 + - `recipient: str | None` — 接收者(None 为广播) + - `topic: str` — 消息主题(如 "task.result", "agent.status") + - `payload: dict[str, Any]` — 消息内容 + - `timestamp: datetime` — 发送时间 + - `correlation_id: str | None` — 关联 ID(请求-响应模式) +- `MessageBus` Protocol: + - `publish(message: AgentMessage) -> None` — 发布消息 + - `subscribe(agent_name: str, handler: Callable) -> None` — 订阅消息 + - `unsubscribe(agent_name: str) -> None` — 取消订阅 + - `request(message: AgentMessage, timeout: float) -> AgentMessage` — 请求-响应模式 + - `broadcast(message: AgentMessage) -> None` — 广播消息 +- `RedisMessageBus`: + - 使用 Redis Streams(XADD/XREADGROUP)实现 + - 每个 Agent 一个 Consumer Group,支持多消费者 + - 消息确认机制(XACK),防止消息丢失 + - 死信队列:超过重试次数的消息转入死信 +- `InMemoryMessageBus`: + - asyncio.Queue 实现,测试用 + - 行为与 Redis 实现一致 + +**Patterns to follow:** `SharedWorkspace` 的 Redis + InMemory 双模式;`TaskDispatcher` 的 Redis Queue 模式 + +**Test scenarios:** +- 点对点消息:Agent A 发送消息给 Agent B,B 收到 +- 广播消息:Agent A 广播,所有订阅者收到 +- 请求-响应:Agent A 发送请求,Agent B 回复,A 收到响应 +- 请求超时:Agent A 发送请求,无响应,超时后抛出异常 +- 取消订阅后不再收到消息 +- InMemory 和 Redis 实现行为一致 +- 消息确认:消费者处理完消息后 XACK +- 死信队列:消息重试 3 次后转入死信 + +**Verification:** Agent 间可通过 MessageBus 点对点和广播通信,请求-响应模式正常工作 + +--- + +### U7. Orchestrator 集成 MessageBus + +**Goal:** Orchestrator 通过 MessageBus 协调 Worker,支持 Worker 间直接通信 + +**Requirements:** R5, R7 + +**Dependencies:** U6 + +**Files:** +- `src/agentkit/core/orchestrator.py` (修改) — 注入 MessageBus,Worker 间通信 +- `src/agentkit/core/agent_pool.py` (修改) — Agent 注册到 MessageBus +- `src/agentkit/server/app.py` (修改) — 初始化 MessageBus +- `tests/unit/test_orchestrator_bus.py` (新建) +- `tests/integration/test_multi_agent_communication.py` (新建) + +**Approach:** +- Orchestrator 注入 MessageBus: + - 创建 Orchestrator 时传入可选的 MessageBus + - Worker 执行子任务时,通过 MessageBus 发布进度和中间结果 + - Worker 之间可直接通信(如 Agent A 请求 Agent B 的中间结果) +- AgentPool 集成: + - Agent 创建时自动注册到 MessageBus(订阅自己的消息) + - Agent 销毁时取消订阅 + - Agent 的 `handle_message()` 方法处理收到的消息 +- 消息路由: + - 点对点:`recipient="agent_name"` + - 广播:`topic="task.progress"` + - Orchestrator 订阅所有 Worker 的进度和结果 + +**Patterns to follow:** `MCPManager` 的生命周期管理模式 + +**Test scenarios:** +- Worker 通过 MessageBus 发布进度,Orchestrator 收到 +- Worker A 直接请求 Worker B 的中间结果 +- Agent 创建时自动注册到 MessageBus +- Agent 销毁时取消订阅 +- 无 MessageBus 时 Orchestrator 行为不变(向后兼容) +- 集成测试:两 Worker 协作完成需要中间结果交换的任务 + +**Verification:** Orchestrator 可通过 MessageBus 协调 Worker,Worker 间可直接通信 + +--- + +### U8. Chat 模式集成测试与文档更新 + +**Goal:** 端到端验证 Chat 模式 + 自适应编排 + 多 Agent 通信的集成 + +**Requirements:** R1-R8 + +**Dependencies:** U1-U7 + +**Files:** +- `tests/integration/test_chat_adaptive_e2e.py` (新建) — Chat + 自适应编排 E2E +- `tests/integration/test_chat_multi_agent_e2e.py` (新建) — Chat + 多 Agent 协作 E2E +- `configs/llm_config.yaml` (修改) — 新增 session/bus/adaptive 配置段 + +**Approach:** +- Chat + 自适应 E2E: + - 创建会话 → 发送复杂任务 → Agent 执行 Pipeline → 失败触发反思 → 重规划 → 成功 → 多轮对话继续 +- Chat + 多 Agent E2E: + - 创建会话 → 发送多 Agent 任务 → Orchestrator 分解 → Worker 通过 MessageBus 协作 → 结果汇总 → 用户追问 +- 配置更新: + - `session` 段:`backend: redis`, `ttl: 3600` + - `bus` 段:`backend: redis_streams` + - `adaptive` 段:`enabled: true`, `max_reflections: 3` + +**Test scenarios:** +- Chat + 自适应:多轮对话中 Pipeline 失败后自动反思重规划 +- Chat + 多 Agent:用户通过 Chat 模式触发多 Agent 协作 +- AskHumanTool:Agent 在执行中向用户提问,用户回复后继续 +- 流式输出:Chat 模式下 token-by-token 推送 +- 配置加载:新配置段正确解析 + +**Verification:** 所有新功能端到端可用,配置正确加载 + +--- + +## Risks & Mitigations + +| 风险 | 影响 | 缓解 | +|------|------|------| +| WebSocket 双向通信复杂度高 | 中 | 先实现 REST 同步模式,WebSocket 作为增强 | +| LLM 流式输出 Provider 适配工作量大 | 中 | 优先适配 OpenAI/Anthropic,其余 Provider 降级为非流式 | +| 反思-重规划 LLM 调用增加成本 | 低 | 默认关闭,可配置;反思使用低成本模型 | +| Redis Streams 运维复杂度 | 低 | InMemory 实现可用于开发/测试,生产用 Redis | +| Session 大量消息加载性能 | 中 | 分页加载 + 摘要压缩(长期消息自动摘要) | + +## Open Questions + +- Q1: Session 消息的分页策略?默认按时间倒序分页,还是按 ReAct 循环分页? +- Q2: AskHumanTool 超时后的默认行为?返回默认回复还是抛出异常让 ReAct 处理? +- Q3: 反思-重规划是否需要人工确认?自动执行还是需要用户审批后才能重规划? + +## System-Wide Impact + +- **API 层**:新增 5 个 REST 端点 + 1 个 WebSocket 端点 +- **ReAct 引擎**:execute_stream() 扩展 token 事件类型,非破坏性变更 +- **LLM Gateway**:新增 chat_stream() 方法,所有 Provider 需实现(可降级为非流式) +- **Orchestrator**:新增 execute_adaptive(),现有 execute() 不变 +- **PipelineEngine**:反思-重规划为可选增强,默认关闭 +- **新模块**:`session/`, `bus/` — 两个新子包 +- **配置**:新增 session/bus/adaptive 配置段 diff --git a/docs/plans/2026-06-08-016-feat-agentkit-layered-memory-plan.md b/docs/plans/2026-06-08-016-feat-agentkit-layered-memory-plan.md new file mode 100644 index 0000000..06c1513 --- /dev/null +++ b/docs/plans/2026-06-08-016-feat-agentkit-layered-memory-plan.md @@ -0,0 +1,308 @@ +--- +title: "feat: AgentKit 分层记忆系统 — SOUL/USER/MEMORY/DAILY 注入" +status: completed +created: 2026-06-08 +plan_type: feat +depth: standard +--- + +## Summary + +为 AgentKit 实现分层记忆注入系统,参考 Hermes/OpenClaw 架构,在每次会话启动时将 SOUL.md(Agent 人格)、USER.md(用户档案)、MEMORY.md(Agent 工作笔记)、DAILY.md(最近日志)注入 system prompt,并提供 MemoryTool 让 Agent 在对话中读写记忆。采用 TDD 方式开发。 + +## Problem Frame + +当前 `agentkit chat` 的 system prompt 是硬编码的一句话,Agent 无法: +1. 拥有持久人格(名字、性格、说话方式) +2. 记住用户信息(称呼、习惯、职业) +3. 跨会话保留工作笔记 +4. 回顾近期决策和对话摘要 + +虽然已有 `memory/` 模块(Working/Episodic/Semantic),但这些是面向 Pipeline 编排的底层记忆,不是面向 Chat 场景的"人格+档案+笔记"注入。 + +## Requirements + +- **R1**: SOUL.md — Agent 人格定义,每次会话必须加载 +- **R2**: USER.md — 用户档案,每次会话必须加载 +- **R3**: MEMORY.md — Agent 工作笔记,每次会话必须加载,Agent 可通过工具修改 +- **R4**: DAILY.md — 最近 2 天日志,每次会话自动加载,Agent 可通过工具追加 +- **R5**: MemoryTool — Agent 可在对话中 add/replace/remove 记忆条目 +- **R6**: 文件存储在 `~/.agentkit/` 目录下,首次运行自动创建默认 SOUL.md +- **R7**: 容量上限 — SOUL ~2000 字符、USER ~1400 字符、MEMORY ~2200 字符、DAILY ~1000 字符/天 +- **R8**: 注入方式 — 会话开始时一次性注入 system prompt,会话内不变(利于 KV 缓存) +- **R9**: 与现有 `agentkit chat` 命令集成 + +## Key Technical Decisions + +### KTD1: 记忆文件格式 — Markdown sections + +每个 .md 文件使用 `## Section` 格式组织内容,方便 Agent 通过 MemoryTool 的 `replace` 操作精确替换某个 section,而非重写整个文件。 + +``` +## 身份 +我是小王,一个专业的 AI 助手。 + +## 性格 +友好、耐心、注重细节 + +## 说话方式 +简洁专业,偶尔使用比喻 +``` + +### KTD2: 注入格式 — 分段注入 system prompt + +将记忆内容作为 system prompt 的结构化段落注入,每段用明确的标记分隔: + +``` + +[SOUL.md content] + + + +[USER.md content] + + + +[MEMORY.md content] + + + +[DAILY.md content] + + +[原始 system prompt 或默认指令] +``` + +### KTD3: MemoryTool 操作模型 — section 级别 CRUD + +- `memory_add(section, content)` — 追加内容到指定 section(不存在则创建) +- `memory_replace(file, section, old_text, new_text)` — 精确替换 section 内的文本 +- `memory_remove(file, section)` — 删除整个 section +- `memory_read(file)` — 读取整个文件内容 + +file 参数: `soul` | `user` | `memory` | `daily` + +### KTD4: 日志自动生成 — 会话结束时摘要 + +会话结束时(用户 /quit 或 Ctrl+C),自动调用 LLM 生成当天日志摘要追加到 DAILY.md。保留最近 2 天日志,更早的自动归档。 + +### KTD5: 存储路径 — `~/.agentkit/memories/` + +``` +~/.agentkit/ +├── SOUL.md # Agent 人格 +├── memories/ +│ ├── USER.md # 用户档案 +│ ├── MEMORY.md # 工作笔记 +│ └── daily/ +│ ├── 2026-06-07.md +│ └── 2026-06-08.md +└── agentkit.yaml # 配置文件(已存在) +``` + +## Implementation Units + +### U1. MemoryFile — 记忆文件读写与容量管理 + +**Goal:** 实现记忆文件的读写、容量限制、section 级别操作 + +**Dependencies:** None + +**Files:** +- `src/agentkit/memory/profile.py` — MemoryFile 类 +- `tests/unit/test_memory_profile.py` — 测试 + +**Approach:** +- `MemoryFile` 类:封装单个 .md 文件的读写、section 解析、容量检查 +- `read()` / `write()` — 读写整个文件 +- `read_section(name)` / `add_section(name, content)` / `replace_section(name, old, new)` / `remove_section(name)` — section 级别操作 +- `trim_to_budget(char_budget)` — 超出容量时从末尾裁剪(保留前面的 section) +- 文件不存在时返回空字符串,不抛异常 + +**Execution note:** TDD — 先写测试再实现 + +**Test scenarios:** +- 读取不存在的文件返回空字符串 +- 写入并读回完整内容 +- 解析 `## Section` 格式,read_section 返回指定 section 内容 +- add_section 追加新 section +- replace_section 精确替换 section 内文本 +- remove_section 删除指定 section +- 超出 char_budget 时 trim_to_budget 裁剪 +- 空文件 read_section 返回空 + +**Verification:** 所有测试通过 + +--- + +### U2. MemoryStore — 多文件记忆管理器 + +**Goal:** 管理 SOUL/USER/MEMORY/DAILY 四类记忆文件,提供统一的加载和注入接口 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/memory/profile.py` — MemoryStore 类(同文件) +- `tests/unit/test_memory_profile.py` — 追加测试 + +**Approach:** +- `MemoryStore(base_dir)` — 接受 `~/.agentkit` 路径 +- `load_all()` — 加载所有记忆文件,返回 `MemorySnapshot` dataclass +- `build_system_prompt(snapshot, base_prompt)` — 将记忆注入 system prompt +- `get_file(file_key)` — 返回指定 MemoryFile(file_key: soul/user/memory/daily) +- `load_daily_logs(days=2)` — 加载最近 N 天日志 +- `archive_old_dailies(days=2)` — 归档超过 N 天的日志 +- `ensure_defaults()` — 首次运行创建默认 SOUL.md +- `MemorySnapshot` dataclass: soul, user, memory, daily, total_chars + +**Execution note:** TDD + +**Test scenarios:** +- MemoryStore 初始化,目录不存在时自动创建 +- load_all() 返回 MemorySnapshot +- build_system_prompt() 正确注入所有段落 +- build_system_prompt() 无记忆文件时只返回 base_prompt +- ensure_defaults() 创建默认 SOUL.md +- load_daily_logs() 加载最近 2 天日志 +- archive_old_dailies() 归档旧日志 +- 容量超限时 build_system_prompt 仍能工作(trim) + +**Verification:** 所有测试通过 + +--- + +### U3. MemoryTool — Agent 可调用的记忆操作工具 + +**Goal:** 实现 Agent 在对话中读写记忆的工具 + +**Dependencies:** U1, U2 + +**Files:** +- `src/agentkit/tools/memory_tool.py` — MemoryTool 类 +- `tests/unit/test_memory_tool.py` — 测试 + +**Approach:** +- 继承 `Tool` 基类 +- `memory_add(file, section, content)` — 追加内容 +- `memory_replace(file, section, old_text, new_text)` — 替换内容 +- `memory_remove(file, section)` — 删除 section +- `memory_read(file)` — 读取文件 +- file 参数限定为 `soul` | `user` | `memory` | `daily` +- 操作后自动 trim 到容量上限 +- 返回操作结果和当前文件内容摘要 + +**Execution note:** TDD + +**Test scenarios:** +- memory_add 创建新 section +- memory_add 追加到已有 section +- memory_replace 精确替换文本 +- memory_replace old_text 不存在时返回错误 +- memory_remove 删除 section +- memory_read 返回文件内容 +- 无效 file 参数返回错误 +- 操作后内容不超容量上限 + +**Verification:** 所有测试通过 + +--- + +### U4. Chat 集成 — 记忆注入 + MemoryTool + 日志生成 + +**Goal:** 将记忆系统集成到 `agentkit chat` 命令 + +**Dependencies:** U2, U3 + +**Files:** +- `src/agentkit/cli/chat.py` — 修改 +- `tests/unit/test_chat_memory_integration.py` — 测试 + +**Approach:** +- `_chat_async()` 启动时: + 1. 初始化 `MemoryStore(base_dir=~/.agentkit)` + 2. 调用 `ensure_defaults()` 创建默认文件 + 3. `load_all()` 加载记忆 + 4. `build_system_prompt(snapshot, base_prompt)` 构建完整 system prompt + 5. 将 `MemoryTool(memory_store)` 加入 tools 列表 +- 会话结束时: + 1. 调用 LLM 生成当天对话摘要 + 2. 追加到 DAILY.md + 3. 归档旧日志 +- `/clear` 命令不清除记忆文件,只清除会话历史 + +**Execution note:** TDD + +**Test scenarios:** +- chat 启动时自动加载记忆注入 system prompt +- 无记忆文件时使用默认 SOUL.md +- MemoryTool 在对话中可用 +- 会话结束时生成日志摘要 +- /clear 不影响记忆文件 +- 记忆跨 /clear 会话持久化 + +**Verification:** 所有测试通过,手动 `agentkit chat` 验证 + +--- + +### U5. Onboarding 集成 — 首次引导创建 SOUL.md + +**Goal:** 在 onboarding 向导中增加 Agent 人格配置步骤 + +**Dependencies:** U2 + +**Files:** +- `src/agentkit/cli/onboarding.py` — 修改 +- `tests/unit/test_onboarding.py` — 追加测试 + +**Approach:** +- onboarding 最后一步增加可选的 Agent 人格配置: + - Agent 名字(默认 "AgentKit") + - 性格描述(默认 "专业、友好、注重细节") + - 说话方式(默认 "简洁清晰") +- 写入默认 SOUL.md +- 可跳过(使用默认值) + +**Execution note:** TDD + +**Test scenarios:** +- onboarding 生成默认 SOUL.md +- 自定义名字写入 SOUL.md +- 跳过时使用默认值 + +**Verification:** 所有测试通过 + +## Scope Boundaries + +### In Scope +- SOUL/USER/MEMORY/DAILY 四层记忆文件 +- MemoryFile section 级别 CRUD +- MemoryStore 统一加载和注入 +- MemoryTool Agent 可调用工具 +- Chat 命令集成 +- Onboarding 集成 +- 日志自动生成 + +### Out of Scope +- 向量检索记忆(已有 EpisodicMemory) +- Redis/PostgreSQL 后端(已有 WorkingMemory/SemanticMemory) +- 多 Agent 共享记忆(后续) +- 记忆版本控制(后续) +- 记忆加密(后续) + +### Deferred to Follow-Up Work +- 记忆导入/导出命令 +- 记忆搜索(在大量笔记中搜索) +- 与 EpisodicMemory 的整合(将 DAILY 日志同步到 Episodic) + +## Open Questions + +None — 所有设计决策已在 KTD 中明确。 + +## Risks & Mitigations + +| 风险 | 缓解措施 | +|------|---------| +| system prompt 过长占用 token | 容量上限 + trim_to_budget | +| Agent 恶意修改 SOUL.md | SOUL.md 可设为只读(后续),当前信任 Agent | +| 日志文件无限增长 | archive_old_dailies 自动归档,保留最近 2 天 | +| 文件并发写入冲突 | 单进程 chat 场景无并发问题 | diff --git a/docs/plans/2026-06-09-017-feat-agentkit-multi-agent-marketplace-plan.md b/docs/plans/2026-06-09-017-feat-agentkit-multi-agent-marketplace-plan.md new file mode 100644 index 0000000..150b537 --- /dev/null +++ b/docs/plans/2026-06-09-017-feat-agentkit-multi-agent-marketplace-plan.md @@ -0,0 +1,597 @@ +--- +title: "feat: AgentKit Multi-Agent Marketplace 架构演进(修订版)" +status: active +date: 2026-06-09 +depth: deep +origin: docs/brainstorms/2026-06-09-clawith-research-prompt.md +revision: v2 +revision_reason: "基于 2026-06-10 代码增量分析(+36863 行,161 文件),修正原方案中与现有代码重叠/冲突/不适用的部分" +--- + +# AgentKit Multi-Agent Marketplace 架构演进方案(修订版) + +## 修订说明 + +原方案(v1)基于 Phase 1-8 代码编写,但代码库在 2026-06-10 有大量新增(161 files, +36863 lines),包含多个与原方案重叠的实现。本次修订基于最新代码逐项评估,修正不适用的部分。 + +--- + +## 原方案问题评估 + +### 问题 1:U6 Plan-and-Execute 引擎 — 与现有代码大量重叠 + +**现有实现**: +- `core/goal_planner.py`(594 行):GoalPlanner 已实现目标→结构化执行计划的分解,含规则/模板+LLM 双模式 +- `core/plan_executor.py`(518 行):PlanExecutor 已实现按计划逐步执行 +- `core/plan_checker.py`(739 行):PlanChecker 已实现计划检查和复盘 +- `core/plan_schema.py`(148 行):ExecutionPlan/PlanStep/PlanStepStatus/SkillGap 数据模型 +- `orchestrator/reflection.py`(370 行):PipelineReflector + PipelineReplanner 已实现反思-重规划 + +**原方案 U6 的问题**:计划"新增 `core/plan_exec.py`",但 `core/plan_executor.py` 已存在且功能完整。GoalPlanner + PlanExecutor + PipelineReplanner 三者组合已覆盖 Plan-and-Execute 的核心流程。 + +**修正**:U6 不再新建引擎,而是将现有 GoalPlanner/PlanExecutor/PipelineReplanner 封装为 `plan_exec` execution_mode 的执行引擎适配器。 + +### 问题 2:U7 Reflexion 引擎 — 与现有代码部分重叠 + +**现有实现**: +- `orchestrator/reflection.py`:PipelineReflector 已实现 LLM 反思分析 +- `evolution/reflector.py` + `evolution/llm_reflector.py`:LLMReflector 已实现反思 +- `evolution/lifecycle.py`:EvolutionMixin 已实现反思→优化→A/B测试闭环 + +**原方案 U7 的问题**:Reflexion 的核心逻辑(反思+重试)在 EvolutionMixin 和 PipelineReflector 中已有实现,但缺少"执行中自我评估+重试"的循环。 + +**修正**:U7 简化为在 ReActEngine 基础上增加 Evaluate→Reflect→Retry 循环节点,复用 LLMReflector。 + +### 问题 3:U1 Concierge — 与现有 Chat 系统重叠 + +**现有实现**: +- `chat/skill_routing.py`(168 行):SkillRoutingResult + parse_skill_prefix() + route_to_skill() +- `cli/chat.py`(422 行):CLI Chat 界面,含 @skill: 前缀路由 +- `server/routes/chat.py`:REST + WebSocket Chat API +- `session/store.py`:Session/Message 管理 + +**原方案 U1 的问题**:Concierge 的"统一入口+对话上下文+路由"功能在现有 Chat 系统中已部分实现。skill_routing.py 已实现 @skill: 前缀路由,chat.py 已实现对话上下文管理。 + +**修正**:U1 不再新建 Concierge 模块,而是在现有 Chat 系统上扩展 CostAwareRouter 能力。Concierge 的对话管理复用 SessionManager,路由扩展复用 skill_routing.py。 + +### 问题 4:U2 CostAwareRouter — 与现有路由重叠 + +**现有实现**: +- `chat/skill_routing.py`:已实现 Skill 路由(@skill: 前缀 + 关键词匹配) +- `router/intent.py`:IntentRouter 三级路由(关键词+LLM) +- `skills/registry.py`(259 行):SkillRegistry 已实现 Skill 查找和匹配 + +**原方案 U2 的问题**:Layer 0 的 Skill 匹配和 Layer 1 的 LLM 分类在现有路由中已有实现。 + +**修正**:U2 简化为在 skill_routing.py 基础上增加 complexity 评估和拍卖触发逻辑,不新建独立模块。 + +### 问题 5:U10 Soul — 与现有 Memory 系统重叠 + +**现有实现**: +- `tools/memory_tool.py`(117 行):MemoryTool 已实现 SOUL/USER/MEMORY/DAILY 四层记忆操作 +- `memory/profile.py`(294 行):MemoryProfile 已实现记忆配置和注入 + +**原方案 U10 的问题**:Soul 的 CRUD 已通过 MemoryTool 实现,不需要新建 SoulManager。 + +**修正**:U10 简化为扩展 MemoryTool 的 SOUL section 支持动态演变(版本号+反思触发更新),不新建 identity/ 模块。 + +### 问题 6:拍卖机制的适用性存疑 + +**原方案 KTD1**:用拍卖机制替代中央编排器。 + +**问题**: +1. 拍卖机制需要每个 Agent 都能"竞标"——但当前 ConfigDrivenAgent 没有 `bid()` 方法,需要给所有 Agent 增加竞标能力 +2. Economy of Minds 论文的环境是"弱 Agent 群体",而 AgentKit 的 Agent 是"强 Agent + 工具",场景不同 +3. 拍卖机制的"财富积累"概念在单用户场景下意义不大——谁给 Agent 发工资? +4. 拍卖增加了系统复杂度,但实际收益不确定——大多数场景下,基于能力的路由(OrganizationContext.find_best_agent)比拍卖更直接有效 + +**修正**:拍卖机制降级为可选实验特性。默认使用"能力匹配路由"(基于 OrganizationContext),拍卖作为高级模式可启用。 + +### 问题 7:对齐护栏的边界不清 + +**原方案 KTD3**:AlignmentGuard 包含全局约束注入、输出审计、级联失败检测。 + +**问题**: +1. "全局约束"由谁定义?用户?开发者?运维?——需要约束配置机制 +2. "输出审计"用 LLM 检查输出——这本身又是一次 LLM 调用,增加成本和延迟 +3. "级联失败检测"的阈值(10 次交互、3 层循环)是经验值,需要可配置 +4. 对齐护栏与现有 QualityGate 的关系不清——是替代还是补充? + +**修正**:AlignmentGuard 明确为 QualityGate 的扩展,约束来源为 YAML 配置,级联检测阈值可配置,LLM 审计默认关闭(仅高风险场景启用)。 + +--- + +## 修订后的需求 + +| ID | 需求 | 变更说明 | +|----|------|---------| +| R1 | 用户通过现有 Chat 系统对话,路由层自动选择 Agent | 从"新建 Concierge"改为"扩展现有 Chat" | +| R2 | 简单任务走单 Agent 直连,零额外开销 | 不变 | +| R3 | 中等任务走能力匹配路由,可选拍卖模式 | 从"必须拍卖"改为"默认能力匹配,拍卖可选" | +| R4 | 复杂任务支持多 Agent 协作,需成本论证 | 不变 | +| R5 | 多 Agent 协作时注入全局约束 | 不变,约束来源明确为 YAML 配置 | +| R6 | 检测级联失败,自动中断 | 不变,阈值可配置 | +| R7 | 不同 Agent 可配置不同 LLM 模型 | 不变,已有 llm.model 配置支持 | +| R8 | 支持 ReAct/ReWOO/Plan-and-Execute/Reflexion/Direct 五种执行架构 | Plan-and-Execute 改为适配器模式 | +| R9 | Agent 具备持久身份(Soul),跨会话保持个性 | 从"新建 identity 模块"改为"扩展 MemoryTool" | +| R10 | Agent 具备组织感知 | 不变 | +| R11 | Agent 可主动发现新工具 | 降级为 Out of Scope(依赖 Marketplace 先就绪) | +| R12 | 执行透明度可调 | 不变 | + +--- + +## 修订后的 Key Technical Decisions + +### KTD1(修订): 扩展现有 Chat 系统,不新建 Concierge + +**决策**:在现有 `chat/skill_routing.py` + `server/routes/chat.py` 基础上扩展 CostAwareRouter 能力,不新建 Concierge 模块。 + +**理由**: +- `chat/skill_routing.py` 已实现 @skill: 前缀路由和 Skill 匹配 +- `server/routes/chat.py` 已实现 REST + WebSocket Chat API +- `session/store.py` 已实现对话上下文管理 +- 新建 Concierge 会与现有 Chat 系统功能重复,增加维护成本 + +### KTD2(不变): 分层路由 — 80% 场景单 Agent 直连 + +### KTD3(修订): AlignmentGuard 作为 QualityGate 扩展 + +**决策**:AlignmentGuard 不作为独立模块,而是扩展现有 QualityGate,增加约束注入和级联检测能力。 + +**理由**: +- QualityGate 已在 ConfigDrivenAgent.execute() 中集成 +- 独立模块需要额外的集成点,增加复杂度 +- 约束来源明确为 YAML 配置(alignment.constraints 字段) + +### KTD4(修订): Plan-and-Execute 使用适配器模式 + +**决策**:不新建 Plan-and-Execute 引擎,而是创建适配器将现有 GoalPlanner + PlanExecutor + PipelineReplanner 封装为 `plan_exec` execution_mode。 + +**理由**: +- GoalPlanner(594 行)已实现目标分解 +- PlanExecutor(518 行)已实现计划执行 +- PipelineReplanner(370 行)已实现反思-重规划 +- 重新实现是重复建设 + +### KTD5(不变): 分层模型配置 + +### KTD6(修订): Soul 扩展基于现有 MemoryTool + +**决策**:不新建 identity/ 模块,而是扩展现有 MemoryTool 的 SOUL section 支持动态演变。 + +**理由**: +- MemoryTool 已实现 SOUL section CRUD +- MemoryProfile 已实现记忆注入 +- 新建 identity/ 模块与现有 Memory 系统重复 + +### KTD7(新增): 拍卖机制降级为可选实验特性 + +**决策**:默认使用"能力匹配路由"(基于 OrganizationContext),拍卖作为可选高级模式。 + +**理由**: +- Economy of Minds 论文场景(弱 Agent 群体)与 AgentKit 场景(强 Agent + 工具)不同 +- 拍卖的"财富积累"在单用户场景下意义不大 +- 基于能力的路由更直接、更可预测 +- 拍卖增加系统复杂度,收益不确定 + +--- + +## 修订后的 Implementation Units + +### U1. CostAwareRouter — 扩展现有 Chat 路由 + +**Goal**:在现有 `chat/skill_routing.py` 基础上增加 complexity 评估和分层路由能力。 + +**Dependencies**:无 + +**Files**: +- `src/agentkit/chat/skill_routing.py` (modify — 增加 complexity 评估和拍卖触发) +- `src/agentkit/chat/__init__.py` (modify — 导出新增类) +- `tests/unit/test_cost_aware_router.py` (create) + +**Approach**: +- 在 `skill_routing.py` 中新增 `CostAwareRouter` 类 +- Layer 0:复用现有 `parse_skill_prefix()` 和 `route_to_skill()`,新增聊天模式正则匹配 +- Layer 1:新增 `quick_classify()` 方法,LLM 评估 complexity 0-1 +- Layer 2:complexity > 0.7 触发能力匹配路由(默认)或拍卖(可选) +- 透明度控制:在 SkillRoutingResult 中新增 `transparency_level` 和 `execution_trace` 字段 + +**Patterns to follow**:`chat/skill_routing.py` SkillRoutingResult + `router/intent.py` IntentRouter + +**Test scenarios**: +- 问候语 "你好" 命中 Layer 0 规则,零 token 开销 +- "搜索XX" 命中现有 Skill 路由,零 token 开销 +- "分析下这个数据" 走 Layer 1 LLM 分类 +- "做市场调研+竞品分析" complexity > 0.7,走能力匹配路由 +- 透明度从 SILENT 切换到 TRACE + +**Verification**:三层路由正确分流,与现有 Chat 系统兼容 + +--- + +### U2. ReWOO 执行引擎 + +**Goal**:实现 ReWOO 执行引擎,一次性规划所有工具调用后批量执行。 + +**Dependencies**:无 + +**Files**: +- `src/agentkit/core/rewoo.py` (create) +- `tests/unit/test_rewoo_engine.py` (create) + +**Approach**: +- Phase 1 Planning:LLM 生成完整工具调用计划(JSON 格式 steps 列表) +- Phase 2 Execution:按计划顺序执行工具调用(可并行执行无依赖步骤) +- Phase 3 Synthesis:LLM 综合所有工具结果生成最终输出 +- 参考 ReActEngine 的接口设计(execute/execute_stream),保持 API 一致性 +- 复用 LLMGateway、Tool、CancellationToken 等现有组件 + +**Patterns to follow**:`core/react.py` ReActEngine 接口模式 + +**Test scenarios**: +- 单步骤计划:规划 1 个工具调用,执行,综合 +- 多步骤计划:规划 3 个工具调用,顺序执行,综合 +- 工具调用失败时的错误处理 +- 与 ReActEngine 接口兼容(可替换使用) + +**Verification**:ReWOO 引擎能完成规划→执行→综合的完整流程 + +--- + +### U3. Plan-and-Execute 适配器 + +**Goal**:将现有 GoalPlanner + PlanExecutor + PipelineReplanner 封装为 `plan_exec` execution_mode 的执行引擎适配器。 + +**Dependencies**:无 + +**Files**: +- `src/agentkit/core/plan_exec_engine.py` (create) +- `tests/unit/test_plan_exec_engine.py` (create) + +**Approach**: +- PlanExecEngine 作为适配器,内部组合 GoalPlanner + PlanExecutor + PipelineReplanner +- 实现 ReActEngine 兼容的 execute()/execute_stream() 接口 +- Planner 阶段:调用 GoalPlanner.generate_plan() 分解任务 +- Executor 阶段:调用 PlanExecutor.execute_plan() 逐步执行 +- Replanner 阶段:执行偏离时调用 PipelineReplanner.replan() 重规划 +- 每个子步骤可选择不同执行策略(react/direct/rewoo) + +**Patterns to follow**:`core/react.py` ReActEngine 接口 + `core/goal_planner.py` + `core/plan_executor.py` + +**Test scenarios**: +- 3 步骤任务:规划 → 逐步执行 → 汇总 +- 执行偏离时触发重规划(PipelineReplanner) +- 子步骤使用不同执行策略 +- 与 ReActEngine 接口兼容 + +**Verification**:PlanExecEngine 能完成规划→执行→重规划的完整流程,复用现有组件 + +--- + +### U4. Reflexion 执行引擎 + +**Goal**:在 ReActEngine 基础上增加 Evaluate→Reflect→Retry 循环。 + +**Dependencies**:无 + +**Files**: +- `src/agentkit/core/reflexion.py` (create) +- `tests/unit/test_reflexion_engine.py` (create) + +**Approach**: +- 继承/组合 ReActEngine,在 ReAct 循环结束后增加评估步骤 +- Evaluate:LLM 评估当前结果质量(0-1 分),复用 LLMReflector 的评估逻辑 +- Reflect:评估分低于阈值时,LLM 反思失败原因,复用 evolution/reflector.py +- Retry:基于反思结果重新执行 ReAct 循环 +- 最多重试 max_reflections 次(默认 3 次) +- 分层模型:act 用中模型,evaluate/reflect 用大模型 + +**Patterns to follow**:`core/react.py` ReActEngine + `evolution/llm_reflector.py` LLMReflector + +**Test scenarios**: +- 首次执行即达标,不触发重试 +- 评估分低于阈值触发反思+重试 +- 重试后达标,返回最终结果 +- 超过 max_reflections 次重试后返回最后结果 +- 分层模型验证 + +**Verification**:Reflexion 引擎能完成执行→评估→反思→重试的完整循环 + +--- + +### U5. SkillConfig 扩展 + 专业 Agent 定义 + +**Goal**:扩展 SkillConfig 支持新执行模式,定义五种专业 Agent 的 YAML 配置。 + +**Dependencies**:U2, U3, U4 + +**Files**: +- `src/agentkit/skills/base.py` (modify — VALID_EXECUTION_MODES 扩展) +- `src/agentkit/core/config_driven.py` (modify — handle_task 路由扩展) +- `configs/skills/react_agent.yaml` (create) +- `configs/skills/rewoo_agent.yaml` (create) +- `configs/skills/plan_exec_agent.yaml` (create) +- `configs/skills/reflexion_agent.yaml` (create) +- `configs/skills/direct_agent.yaml` (create) +- `tests/unit/test_execution_modes.py` (create) + +**Approach**: +- SkillConfig.VALID_EXECUTION_MODES 新增 "rewoo", "plan_exec", "reflexion" +- ConfigDrivenAgent.handle_task() 新增 _handle_rewoo/_handle_plan_exec/_handle_reflexion 路由 +- 每种专业 Agent 的 YAML 配置指定不同的 llm.model +- 复用现有 SkillLoader 和 SkillRegistry 的加载逻辑 + +**Patterns to follow**:`skills/base.py` SkillConfig + `skills/loader.py` SkillLoader + +**Test scenarios**: +- SkillConfig 验证 "rewoo"/"plan_exec"/"reflexion" 为合法 execution_mode +- ConfigDrivenAgent 根据 execution_mode 路由到正确引擎 +- 五种专业 Agent YAML 配置加载成功 +- 不同 Agent 配置不同 llm.model + +**Verification**:五种执行模式均可通过配置启用,路由正确 + +--- + +### U6. OrganizationContext 组织感知 + +**Goal**:实现组织上下文,Agent 知道可以向谁求助,支持基于能力的 Agent 发现。 + +**Dependencies**:U5 + +**Files**: +- `src/agentkit/org/__init__.py` (create) +- `src/agentkit/org/context.py` (create) +- `src/agentkit/org/discovery.py` (create) +- `tests/unit/test_org_context.py` (create) + +**Approach**: +- AgentProfile:name, agent_type, capabilities, skills, current_load, max_concurrency, availability, specializations +- OrganizationContext:agents dict, capability_matrix(能力→Agent 映射), find_best_agent() 方法 +- AgentDiscovery:基于能力的 Agent 发现,考虑负载均衡 +- 与现有 AgentPool 集成:从 AgentPool 自动构建 OrganizationContext +- 与现有 SkillRegistry 集成:从 SkillConfig.capabilities 构建能力矩阵 +- 注入到 BaseAgent.on_task_start():Agent 启动时自动获得组织上下文 + +**Patterns to follow**:`core/agent_pool.py` AgentPool + `skills/schema.py` CapabilityTag + +**Test scenarios**: +- 根据 required_capabilities 找到匹配的 Agent +- 负载均衡:选择当前负载最低的 Agent +- 无匹配 Agent 时返回 None +- OrganizationContext 从 AgentPool + SkillRegistry 自动构建 + +**Verification**:Agent 能通过 OrganizationContext 发现合适的协作 Agent + +--- + +### U7. AlignmentGuard — QualityGate 扩展 + +**Goal**:扩展现有 QualityGate,增加全局约束注入和级联失败检测能力。 + +**Dependencies**:U6 + +**Files**: +- `src/agentkit/quality/alignment.py` (create) +- `src/agentkit/quality/cascade_detector.py` (create) +- `src/agentkit/skills/base.py` (modify — 新增 AlignmentConfig) +- `tests/unit/test_alignment_guard.py` (create) + +**Approach**: +- AlignmentConfig:constraints(全局约束列表)、cascade_threshold(级联检测阈值)、audit_enabled(LLM 审计开关,默认关闭) +- ConstraintInjector:在任务分发前注入全局约束到每个子任务的 input_data +- CascadeDetector:检测 Agent 间交互次数超限和循环深度超限,触发中断 +- LLM 审计默认关闭,仅高风险场景(标记 alignment.audit_enabled: true)启用 +- 与现有 QualityGate 集成:在 QualityGate.validate() 之后执行对齐检查 + +**Patterns to follow**:`quality/gate.py` QualityGate + `skills/base.py` QualityGateConfig + +**Test scenarios**: +- 全局约束被注入到子任务 +- 级联检测:Agent 间交互超过阈值触发中断 +- LLM 审计关闭时无额外 LLM 调用 +- LLM 审计开启时检查输出是否违反约束 + +**Verification**:对齐护栏能检测约束违反和级联失败,与 QualityGate 兼容 + +--- + +### U8. Soul 动态演变 — 扩展 MemoryTool + +**Goal**:扩展现有 MemoryTool 的 SOUL section 支持动态演变(版本号+反思触发更新)。 + +**Dependencies**:U5 + +**Files**: +- `src/agentkit/tools/memory_tool.py` (modify — SOUL section 增加版本号和更新逻辑) +- `src/agentkit/evolution/lifecycle.py` (modify — 反思结果触发 Soul 更新) +- `tests/unit/test_soul_evolution.py` (create) + +**Approach**: +- SOUL section 新增 `version` 和 `updated_at` 字段 +- MemoryTool 新增 `update_soul()` 方法:基于反思结果更新 Soul +- EvolutionMixin 新增 `evolve_soul()` 钩子:反思完成后检查是否需要更新 Soul +- Soul 更新条件:反思发现新的行为模式/偏好/能力变化 +- Soul 注入:复用现有 MemoryProfile 的 SOUL section 注入逻辑 + +**Patterns to follow**:`tools/memory_tool.py` MemoryTool + `evolution/lifecycle.py` EvolutionMixin + +**Test scenarios**: +- Soul 版本号初始为 1,更新后递增 +- 反思结果触发 Soul 更新(新增 strength/value) +- 无反思结果时不触发更新 +- Soul 信息正确注入到 System Prompt(复用现有逻辑) + +**Verification**:Agent 具备跨会话的持久身份,Soul 可动态演变 + +--- + +### U9. 拍卖机制(可选实验特性) + +**Goal**:实现拍卖机制作为可选的高级路由模式,默认不启用。 + +**Dependencies**:U6 + +**Files**: +- `src/agentkit/marketplace/__init__.py` (create) +- `src/agentkit/marketplace/auction.py` (create) +- `src/agentkit/marketplace/wealth.py` (create) +- `tests/unit/test_auction.py` (create) + +**Approach**: +- Bid 数据结构:agent_name, architecture, estimated_steps, estimated_cost, confidence, payment_offer +- 拍卖裁决:score = (confidence / estimated_cost) * wealth_factor +- 财富追踪:成功完成任务增加财富,长期表现差被标记破产 +- 默认关闭,需在配置中显式启用 `marketplace.auction_enabled: true` +- 启用后,Layer 2 路由使用拍卖而非能力匹配 + +**Patterns to follow**:`core/agent_pool.py` AgentPool + +**Test scenarios**: +- 拍卖关闭时使用能力匹配路由 +- 拍卖启用后,多 Agent 竞标选择最优 +- 财富因子影响竞标结果 +- Agent 破产检查 + +**Verification**:拍卖机制作为可选特性正确工作,不影响默认路由 + +--- + +### U10. 集成测试 + Server 集成 + +**Goal**:将所有新模块集成到现有 Server 中,实现端到端的 Chat → Router → Agent → AlignmentGuard 完整流程。 + +**Dependencies**:U1-U9 + +**Files**: +- `src/agentkit/server/app.py` (modify — 注入 OrganizationContext、AlignmentGuard) +- `src/agentkit/server/config.py` (modify — 新增 marketplace/alignment 配置段) +- `src/agentkit/chat/skill_routing.py` (modify — 集成 CostAwareRouter) +- `tests/integration/test_marketplace_e2e.py` (create) + +**Approach**: +- create_app() 中新增 OrganizationContext、AlignmentGuard 的初始化 +- CostAwareRouter 集成到现有 Chat 路由流程 +- ServerConfig 新增 marketplace 和 alignment 配置段 +- 端到端测试:用户消息 → Chat → Router → Agent → AlignmentGuard → 回复 + +**Patterns to follow**:`server/app.py` create_app() 组装模式 + +**Test scenarios**: +- 简单聊天经路由到 DirectAgent,返回正常 +- 复杂任务经能力匹配路由选择 Agent,执行完成返回 +- 对齐护栏检测到级联风险,触发中断 +- 透明度 TRACE 模式返回执行追踪信息 +- 拍卖模式启用后,复杂任务走拍卖路由 + +**Verification**:端到端流程完整可用,与现有 Chat 系统兼容 + +--- + +## 修订后的 Phased Delivery + +### Phase A — 执行引擎(U2, U3, U4, U5) +三种新引擎 + SkillConfig 扩展,可独立运行,不依赖 Marketplace + +### Phase B — 路由与组织(U1, U6, U7) +CostAwareRouter + OrganizationContext + AlignmentGuard + +### Phase C — 身份与集成(U8, U9, U10) +Soul 演变 + 拍卖(可选)+ Server 集成 + +--- + +## 修订后的 Risks & Dependencies + +| 风险 | 影响 | 缓解措施 | +|------|------|---------| +| PlanExecEngine 适配器与现有组件接口不兼容 | Plan-and-Execute 模式无法工作 | 适配器内部处理接口差异,对外暴露 ReActEngine 兼容接口 | +| Reflexion 引擎 token 成本高 | 自我评估+重试增加 2-3x token | 分层模型 + max_reflections 限制 + 默认关闭 | +| CostAwareRouter Layer 1 分类不准 | 中等任务被错误路由 | 分类结果带置信度,低置信度时回退到默认 Agent | +| AlignmentGuard 级联检测误报 | 正常多步交互被中断 | 阈值可配置,初期宽松 | +| 拍卖机制增加系统复杂度 | 维护成本高 | 默认关闭,作为可选实验特性 | +| 与 P2 Hardening 计划冲突 | 两个计划同时修改 server/app.py | P2 先行,Marketplace 后续,避免同时修改同一文件 | + +--- + +## 已明确事项 + +### 1. 拍卖机制 — 作为核心特性 + +**决策**:拍卖机制是核心差异化能力,应在 Phase B 与能力匹配路由同时实现。 + +**实现要点**: +- 需要解决"奖励信号来源"问题:任务成功 → 正奖励,任务失败 → 负奖励,由 Concierge/Router 在任务完成后发放 +- Agent 需要新增 `bid()` 方法(在 BaseAgent 中定义默认实现,ConfigDrivenAgent 覆盖) +- 拍卖与能力匹配路由并行:能力匹配作为底保,拍卖作为优选 + +### 2. AlignmentGuard 约束检查 — 分层混合 + +**决策**:系统级用规则检查,组织级用 LLM 检查,用户级用 Prompt 注入。 + +| 层级 | 检查方式 | 定义者 | 示例 | +|------|---------|--------|------| +| 系统级 | 规则检查(关键词+正则) | 开发者/运维 | "不生成恶意代码"、"不泄露 API Key" | +| 组织级 | LLM 语义检查 | 管理员 | "不引用竞品数据"、"合规审查需人工" | +| 用户级 | Prompt 注入(不检查) | 用户 | "用中文回复"、"不超过 500 字" | + +**实现要点**: +- 系统级约束硬编码在 `quality/alignment.py` 中,配置可扩展 +- 组织级约束在 `agentkit.yaml` 的 `alignment.constraints` 中配置 +- LLM 审计仅组织级约束触发,系统级约束用规则检查零额外 token + +### 3. Soul 更新频率 — 条件触发 + +**决策**:同类反思出现 ≥ 3 次才触发 Soul 更新,更新后版本号递增,可回滚。 + +**实现要点**: +- EvolutionMixin 维护 `pending_soul_updates: dict[str, list[Reflection]]` 缓冲区 +- 同类反思(相同 category)累积 ≥ 3 次时触发 `update_soul()` +- Soul 更新记录完整变更历史(before/after/trigger/evidence),支持回滚 +- Soul 版本号递增,每次更新 +1 + +### 4. 专业 Agent 工具集 — YAML 配置 + 默认推荐 + +**决策**:工具通过 YAML 配置绑定,提供默认推荐配置,用户可自定义。 + +**默认推荐**: +| Agent | 默认工具 | 原因 | +|-------|---------|------| +| ReactAgent | web_search, baidu_search, shell, memory | ReAct 需要丰富工具集 | +| RewooAgent | web_search, baidu_search, web_crawl | 批量数据采集类工具 | +| PlanExecAgent | 所有工具(子步骤按需选择) | 子步骤可能需要任何工具 | +| ReflexionAgent | 与 ReactAgent 相同 | Reflexion = ReAct + 评估 | +| DirectAgent | 无工具 | 单次 LLM 调用 | + +### 5. 与 P2 Hardening 计划 — 部分并行 + +**决策**:Phase A(执行引擎)与 P2 并行开发,Phase B/C 等 P2 完成后再开始。 + +**理由**: +- Phase A 只新增引擎文件(rewoo.py/plan_exec_engine.py/reflexion.py),不修改 server 文件,无冲突 +- Phase B/C 需要修改 server/app.py、server/config.py 等,与 P2 有文件冲突 +- P2 修复安全问题,不应被阻塞 + +### 6. 分层模型配置 — YAML 配置 + 默认推荐 + +**决策**:模型通过 YAML 的 `llm.model` 字段配置,提供默认推荐值。 + +**默认推荐**: +| Agent | 默认模型 | 预估成本/1K tokens | +|-------|---------|-------------------| +| DirectAgent | `openai/gpt-4o-mini` | $0.00015 | +| ReactAgent | `anthropic/claude-sonnet-4-20250514` | $0.003 | +| RewooAgent | `anthropic/claude-sonnet-4-20250514` | $0.003 | +| PlanExecAgent | `anthropic/claude-opus-4-20250514` | $0.015 | +| ReflexionAgent | 执行: `sonnet`, 评估: `opus` | 混合 | + +### 7. 多 Agent 协作上下文传递 — 按需升级 + +**决策**:默认用直接注入(TaskMessage.input_data),复杂场景按需升级到 SharedWorkspace 或 Redis Pub/Sub。 + +| 场景 | 传递方式 | 原因 | +|------|---------|------| +| 顺序执行(A→B) | 直接注入 | 简单直接 | +| 并行执行(A+B→C) | SharedWorkspace | A/B 并行写入,C 汇总读取 | +| 事件通知(A 通知 B) | Redis Pub/Sub | 异步解耦 | +| 对话连续性 | SessionManager + 摘要 | 跨 Agent 连续 | diff --git a/docs/plans/2026-06-12-020-feat-pipeline-adversarial-loop-plan.md b/docs/plans/2026-06-12-020-feat-pipeline-adversarial-loop-plan.md new file mode 100644 index 0000000..9cfee0f --- /dev/null +++ b/docs/plans/2026-06-12-020-feat-pipeline-adversarial-loop-plan.md @@ -0,0 +1,404 @@ +--- +title: "feat: Pipeline 级别对抗闭环(Coding Harness)" +status: active +created: 2026-06-12 +origin: 头脑风暴对话 - Worker ↔ Verifier 对抗闭环改进方案 +type: feat +--- + +# feat: Pipeline 级别对抗闭环(Coding Harness) + +## 问题框架 + +当前 Pipeline Engine 的 `retry_count` 和 `retry_policy` 实现的是**盲目重试**(指数退避重跑相同逻辑),`QualityGate` 是**单向验证**(validate → pass/fail)。Worker 产出失败后不知道具体哪里有问题,重试时无法定向修复。 + +**目标:** 实现 Worker → Verifier → 带反馈打回 Worker → 定向修复 → 再次审查的对抗闭环,通过 Pipeline YAML 配置即可启用。 + +--- + +## 高层技术设计 + +### 对抗流转状态机 + +```mermaid +stateDiagram-v2 + [*] --> Worker: 执行 Stage + Worker --> Verifier: 产出完成 + Verifier --> [*]: 审查通过 (passed=true) + Verifier --> Worker: 审查不通过 (round < max) + Worker --> Verifier: 根据反馈修复 + Verifier --> Escalate: 轮次耗尽 (round >= max) + Escalate --> [*]: 转人工或标记失败 +``` + +### 反馈数据结构 + +``` +ReviewFeedback +├── passed: bool +├── score: float (0-1) +├── summary: str (自然语言审查报告) +└── issues: list[ReviewIssue] + ├── severity: critical/major/minor + ├── category: logic_error/security/style/test_failure/architecture + ├── description: str + ├── location: str? (文件路径/行号) + └── suggestion: str? +``` + +### 配置扩展 + +在 `PipelineStage` 新增 4 个字段: +- `verifier`: str | None — Verifier Agent 名称 +- `max_adversarial_rounds`: int — 最大对抗轮次(默认 3) +- `feedback_mode`: str — 反馈模式(structured+natural / structured / natural) +- `escalate_on_exhaust`: str | None — 轮次耗尽后的升级目标 + +--- + +## 实施单元 + +### U1. 扩展 Pipeline Schema — 对抗字段和反馈数据模型 + +**Goal:** 在 `pipeline_schema.py` 中新增对抗闭环所需的数据模型和字段 + +**Requirements:** +- PipelineStage 支持配置 Verifier 和对抗参数 +- 提供结构化的 ReviewFeedback 和 ReviewIssue 数据模型 +- 提供 AdversarialState 用于追踪对抗轮次 + +**Dependencies:** 无 + +**Files:** +- `src/agentkit/orchestrator/pipeline_schema.py` (修改) +- `tests/unit/test_pipeline_schema.py` (修改) + +**Approach:** +1. 新增 `ReviewIssue` Pydantic 模型(severity, category, description, location, suggestion) +2. 新增 `ReviewFeedback` Pydantic 模型(passed, issues, summary, score) +3. 新增 `AdversarialState` Pydantic 模型(current_round, max_rounds, feedback_history, last_feedback) +4. 在 `PipelineStage` 新增 4 个字段: + - `verifier: str | None = None` + - `max_adversarial_rounds: int = 3` + - `feedback_mode: str = "structured+natural"` + - `escalate_on_exhaust: str | None = None` + +**Test scenarios:** +1. **Happy path:** 创建带 verifier 字段的 PipelineStage,验证字段默认值正确 +2. **Happy path:** 创建 ReviewFeedback 对象,验证序列化和反序列化正常 +3. **Edge case:** verifier=None 时,PipelineStage 正常创建(向后兼容) +4. **Edge case:** max_adversarial_rounds=0 时正常创建 + +--- + +### U2. Pipeline Engine 增强 — 对抗流转执行逻辑 + +**Goal:** 在 `PipelineEngine` 中实现 `_execute_stage_with_adversarial` 方法,处理 Worker ↔ Verifier 对抗循环 + +**Requirements:** +- 当 Stage 配置了 verifier 时自动进入对抗模式 +- Verifier 审查不通过时,带反馈打回 Worker 重做 +- 超过最大轮次后执行升级处理 +- 保持与现有 `_execute_stage` 的向后兼容 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/orchestrator/pipeline_engine.py` (修改) +- `tests/unit/test_pipeline_adversarial.py` (新增) + +**Approach:** + +1. **新增 `_execute_stage_with_adversarial` 方法:** + - 检查 `stage.verifier` 是否存在,不存在则走原有逻辑 + - 初始化 `AdversarialState` + - 进入对抗循环(1 到 max_adversarial_rounds): + - 执行 Worker Agent + - 执行 Verifier 审查 Worker 产出 + - 如果通过:返回成功结果 + - 如果不通过: + - 记录反馈到 feedback_history + - 如果轮次耗尽:调用 `_escalate` 处理 + - 否则:调用 `_execute_agent_with_feedback` 打回 Worker + +2. **新增 `_execute_agent_with_feedback` 方法:** + - 构建反馈上下文(previous_attempt_failed, review_feedback, instruction) + - 合并到原有上下文 + - 调用 Dispatcher 执行 Agent + +3. **新增 `_execute_verifier` 方法:** + - 调用 Verifier Agent 执行审查 + - 解析返回结果为 ReviewFeedback 对象 + - 记录审查日志 + +4. **新增 `_escalate` 方法:** + - 如果配置了 `escalate_on_exhaust`:转发到升级目标(如 human_approval) + - 否则:返回失败结果,附带审查历史 + +5. **修改 `_execute_stage` 方法:** + - 检查是否配置了 verifier + - 如果配置了,路由到 `_execute_stage_with_adversarial` + - 否则保持原有逻辑 + +**Test scenarios:** +1. **Happy path:** Stage 无 verifier → 走原有逻辑,正常完成 +2. **Happy path:** Stage 有 verifier,审查通过 → 一次完成 +3. **Happy path:** Stage 有 verifier,审查不通过 → 打回 Worker → 修复后通过 +4. **Edge case:** 超过 max_adversarial_rounds → 触发 escalate_on_exhaust +5. **Edge case:** escalate_on_exhaust=None → 返回失败,附带审查历史 +6. **Error path:** Verifier 执行异常 → 记录错误,返回失败 +7. **Error path:** Worker 重试时再次异常 → 继续下一轮或轮次耗尽 +8. **Integration:** 完整对抗流程的状态追踪正确(feedback_history 长度=实际轮次) + +--- + +### U3. 反馈上下文构建和注入机制 + +**Goal:** 实现结构化的反馈上下文构建,让 Worker Agent 能理解审查反馈并定向修复 + +**Requirements:** +- 反馈上下文包含结构化问题列表和自然语言审查报告 +- Worker 能根据反馈上下文调整生成策略 +- 支持 feedback_mode 配置(structured+natural / structured / natural) + +**Dependencies:** U2 + +**Files:** +- `src/agentkit/orchestrator/pipeline_engine.py` (修改,续 U2) +- `tests/unit/test_pipeline_adversarial.py` (修改,续 U2) + +**Approach:** + +1. **构建反馈上下文字典:** +```python +feedback_context = { + "previous_attempt_failed": True, + "review_feedback": { + "summary": feedback.summary, + "issues": [ + { + "severity": issue.severity, + "category": issue.category, + "description": issue.description, + "suggestion": issue.suggestion, + } + for issue in feedback.issues + ], + "previous_score": feedback.score, + }, + "instruction": ( + "Your previous output did not pass review. " + "Please fix the issues listed above and regenerate." + ), +} +``` + +2. **根据 feedback_mode 调整上下文:** + - `structured+natural`: 包含完整 issues 列表和 summary + - `structured`: 只包含 issues 列表 + - `natural`: 只包含 summary 和 instruction + +3. **合并到原有上下文:** + - `merged_context = {**context, **feedback_context}` + - 传递给 Agent 执行 + +**Test scenarios:** +1. **Happy path:** feedback_mode="structured+natural" → 上下文包含 issues 和 summary +2. **Happy path:** feedback_mode="structured" → 上下文只包含 issues +3. **Happy path:** feedback_mode="natural" → 上下文只包含 summary +4. **Edge case:** feedback.feedback_history 有多轮记录 → 合并所有历史反馈 + +--- + +### U4. 创建 code_reviewer Skill 配置示例 + +**Goal:** 创建代码审查 Verifier Agent 的 Skill 配置,作为对抗模式的的标准 Verifier 模板 + +**Requirements:** +- 配置为 direct 执行模式 +- system_prompt 定义严格的代码审查角色和检查维度 +- 配置 output_schema 确保返回结构化的 ReviewFeedback 格式 + +**Dependencies:** U1(需要 ReviewFeedback schema 存在) + +**Files:** +- `configs/skills/code_reviewer.yaml` (新增) + +**Approach:** + +1. 创建 `code_reviewer.yaml`: + - name: code_reviewer + - execution_mode: direct + - intent_match: "code.*review|review.*code" + - system_prompt: 定义代码审查角色、检查维度(逻辑正确性、安全漏洞、架构设计、测试覆盖、代码风格) + - tools: [shell_tool](用于运行测试用例) + - quality_gate: 配置 required_fields 和 output_schema + +2. output_schema 定义: + - passed: boolean + - issues: array of {severity, category, description, location?, suggestion?} + - summary: string + - score: number (0-1) + +**Test expectation:** none — 这是配置文件,通过 YAML 加载测试验证格式正确性 + +--- + +### U5. 创建 coding_harness Pipeline 配置示例 + +**Goal:** 创建完整的编码对抗 Pipeline 配置示例,展示如何使用对抗闭环功能 + +**Requirements:** +- 包含 develop → test → review(对抗模式) → archive 四个阶段 +- review 阶段配置 verifier、max_adversarial_rounds、escalate_on_exhaust +- 使用变量引用传递阶段间产出 + +**Dependencies:** U4 + +**Files:** +- `configs/pipelines/coding_harness.yaml` (新增) + +**Approach:** + +1. 创建 `coding_harness.yaml`: + - name: coding_harness, version: "1.0" + - 阶段 1 (develop): developer_agent 实现功能 + - 阶段 2 (test): tester_agent 运行测试,依赖 develop + - 阶段 3 (review): developer_agent 修复问题,verifier=code_reviewer, max_adversarial_rounds=3, escalate_on_exhaust=human_approval + - 阶段 4 (archive): archiver_agent 提交代码,依赖 review + +2. 配置变量引用: + - test 阶段输入: code="{{develop.code}}", test_files="{{develop.test_files}}" + - review 阶段输入: code="{{develop.code}}", test_results="{{test.test_results}}" + - archive 阶段输入: code="{{review.final_code}}" + +**Test expectation:** none — 这是配置文件,通过 YAML 加载测试验证格式和引用正确性 + +--- + +### U6. 编写单元测试 — 对抗流转和反馈注入 + +**Goal:** 为对抗闭环功能编写完整的单元测试覆盖 + +**Requirements:** +- 覆盖 U1-U3 定义的所有测试场景 +- 使用 mock 模拟 Dispatcher 和 Agent 执行 +- 验证对抗流转逻辑正确性 + +**Dependencies:** U1, U2, U3 + +**Files:** +- `tests/unit/test_pipeline_adversarial.py` (新增) + +**Approach:** + +创建以下测试类: + +1. **TestPipelineSchemaAdversarial:** + - test_stage_with_verifier + - test_stage_without_verifier_backward_compat + - test_review_feedback_serialization + - test_adversarial_state_tracking + +2. **TestAdversarialExecution:** + - test_no_verifier_passthrough + - test_verifier_passes_first_round + - test_verifier_fails_then_worker_fixes + - test_max_rounds_exhausted_escalate + - test_max_rounds_exhausted_no_escalate + - test_verifier_execution_error + - test_worker_retry_error + +3. **TestFeedbackContext:** + - test_structured_and_natural_mode + - test_structured_only_mode + - test_natural_only_mode + - test_multiple_rounds_feedback_merge + +4. **TestEscalation:** + - test_escalate_to_human_approval + - test_escalate_to_fallback_agent + - test_no_escalation_configured + +**Test scenarios:** 见各测试类定义 + +--- + +### U7. 编写集成测试 — 完整 Coding Harness Pipeline + +**Goal:** 编写集成测试验证完整的 Coding Harness Pipeline 端到端流程 + +**Requirements:** +- 加载 coding_harness.yaml 配置 +- 模拟完整的 develop → test → review → archive 流程 +- 验证对抗闭环在 review 阶段正常工作 + +**Dependencies:** U4, U5, U6 + +**Files:** +- `tests/integration/test_coding_harness_pipeline.py` (新增) + +**Approach:** + +1. 创建集成测试: + - 使用 MockDispatcher 模拟 Agent 执行 + - 模拟 develop 阶段产出代码 + - 模拟 test 阶段运行测试 + - 模拟 review 阶段:第一次审查不通过 → 打回修复 → 第二次审查通过 + - 模拟 archive 阶段提交代码 + +2. 验证点: + - Pipeline 最终状态为 COMPLETED + - review 阶段经历了 2 轮对抗 + - feedback_history 记录了审查反馈 + - 各阶段输出变量正确传递 + +**Test scenarios:** +1. **Happy path:** 完整 Pipeline 执行,review 阶段 2 轮对抗后通过 +2. **Edge case:** review 阶段 3 轮对抗后仍不通过 → escalate 到 human_approval +3. **Error path:** test 阶段失败 → Pipeline 中止,不进入 review + +--- + +## 范围边界 + +**包含:** +- Pipeline Schema 扩展(对抗字段和反馈数据模型) +- Pipeline Engine 对抗流转执行逻辑 +- 反馈上下文构建和注入 +- code_reviewer Skill 配置示例 +- coding_harness Pipeline 配置示例 +- 单元测试和集成测试 + +**不包含(延期到后续工作):** +- 任务复杂度评估器(自动判断是否启用对抗团队) +- IM 异步秒级响应(Leader 立即回执 + 后台异步调度) +- 多路并行调研对抗(多路 Researcher + 独立 Verifier) +- 对抗成本监控(Token 消耗、时间、修复成功率记录) +- Verifier 多角色拆分(LogicReviewer / SecurityReviewer / StyleReviewer 并行审查) + +--- + +## 风险和依赖 + +### 风险 + +1. **Agent 反馈理解能力:** Worker Agent 可能无法完全理解结构化反馈并定向修复。缓解措施:使用 feedback_mode="structured+natural" 提供自然语言说明。 + +2. **Verifier 审查质量:** code_reviewer 的审查质量取决于 system_prompt 和 LLM 能力。缓解措施:提供高质量的 system_prompt 模板,支持后续优化。 + +3. **Token 消耗:** 多轮对抗可能消耗大量 Token。缓解措施:max_adversarial_rounds 默认 3,可配置。 + +### 依赖 + +- 现有 Pipeline Engine 基础设施(DAG 拓扑排序、并行执行、变量解析) +- 现有 Dispatcher 接口(dispatch、get_task_status) +- 现有 Agent 配置系统(ConfigDrivenAgent、SkillConfig) + +--- + +## 系统级影响 + +- **向后兼容:** PipelineStage 新增字段都有默认值,现有 Pipeline 配置无需修改 +- **性能影响:** 无 verifier 配置的 Stage 走原有逻辑,无性能影响;有 verifier 的 Stage 可能增加执行时间(多轮对抗) +- **可观测性:** 对抗轮次和审查结果记录在 StageResult 的 output_data 中,可通过日志和状态管理查询 diff --git a/docs/plans/2026-06-12-022-feat-agentkit-phase9-integrated-next-stage-plan.md b/docs/plans/2026-06-12-022-feat-agentkit-phase9-integrated-next-stage-plan.md new file mode 100644 index 0000000..4508d7c --- /dev/null +++ b/docs/plans/2026-06-12-022-feat-agentkit-phase9-integrated-next-stage-plan.md @@ -0,0 +1,490 @@ +--- +title: "feat: AgentKit Phase 9 — Integrated Next-Stage Plan" +status: active +created: 2026-06-12 +plan-type: feat +depth: deep +origin: "整合 017/018/019/021 活跃计划剩余工作 + 本次会话发现的新问题" +--- + +# feat: AgentKit Phase 9 — Integrated Next-Stage Plan + +## Summary + +整合全部活跃计划的剩余工作,形成统一的下一阶段实施计划。核心目标:完成对话响应速度优化(sub-1s 首 Token)、补齐安全加固和劣势项改进的遗漏项、实现拍卖机制和智能并行工具执行。 + +**来源计划完成度:** + +| 计划 | 完成度 | 剩余项 | +|------|--------|--------| +| 020 Pipeline 对抗闭环 | ~100% | 验证测试覆盖度 | +| 017 Multi-Agent Marketplace | ~90% | U9 拍卖机制 | +| 018 P2 安全加固 | ~90% | U6 配置热重载防御性修复 | +| 019 劣势项改进 | ~70% | U4 集成测试、U5 ReWOO 回退链配置化 | +| 021 响应速度优化 | ~60% | U2 合并路由 LLM 调用、U6 Chat 管线优化 | + +**本次会话新增修复(已完成):** +- 确认卡片死锁修复(`pending_confirmations or {}` → `if is not None`) +- Shell 白名单扩展(30 → 90+ 命令,管道智能检测) +- SkillInstallTool 新增(Agent 可正确安装技能) +- 前端技能列表自动刷新 + +## Problem Frame + +当前 AgentKit 存在三个核心问题: + +1. **对话响应仍不够快**:启发式分类器已消除路由层 LLM 调用,但当启发式不确定时仍走独立 IntentRouter LLM 调用;Chat 管线中每次消息新建 ReActEngine、串行 Session I/O 等仍有优化空间 +2. **安全加固和测试覆盖有缺口**:配置热重载的线程安全问题、ReWOO 回退链不可配置、集成测试覆盖不足 +3. **拍卖机制未实现**:Multi-Agent Marketplace 的核心经济模型缺失 + +## Scope Boundaries + +### In Scope + +- 021-U2: 合并路由 LLM 调用(complexity + intent 单次 LLM) +- 021-U6: Chat 管线优化(ReActEngine 复用、Session 操作并行化) +- 智能并行工具执行(LLM 标注可并行性,自动判断) +- 018-U6: 配置热重载防御性修复 +- 019-U4: 集成测试补充 +- 019-U5: ReWOO 回退链配置化 +- 017-U9: 拍卖机制实现 +- 流式首 Token 前端渲染优化 + +### Out of Scope + +- 分布式消息总线(Redis 实现,后续按需) +- jieba 分词集成(可选依赖,后续按需) +- UI 可视化 trace(Jaeger/Zipkin 前端,运维配置) +- Headroom 检索优化(013,独立计划) +- 分层记忆系统(016,独立计划) + +### Deferred to Follow-Up Work + +- LLM Provider 级别 Prompt 缓存(需 LLM API 支持) +- 上下文压缩策略异步化(当前截断方案足够) +- 轻量模型自动降级(需 A/B 测试验证质量) + +--- + +## Requirements + +| ID | Requirement | Priority | Origin | +|----|-------------|----------|--------| +| R1 | 启发式分类器不确定时,complexity + intent 合并为单次 LLM 调用 | P0 | 021-U2 | +| R2 | Chat 管线中 ReActEngine 实例复用,避免每次消息重建 | P0 | 021-U6 | +| R3 | 多 tool_calls 时由 LLM 标注可并行性,自动并行执行独立工具 | P1 | 新需求 | +| R4 | 配置热重载线程安全,非 asyncio 线程调用不触发竞态 | P1 | 018-U6 | +| R5 | ReWOO 回退链可从 YAML 配置,不硬编码 | P1 | 019-U5 | +| R6 | 关键路径集成测试覆盖:路由链、ReWOO 回退、对抗闭环 | P1 | 019-U4 | +| R7 | 拍卖机制:Agent 竞标任务,基于能力+成本+历史质量评分 | P2 | 017-U9 | +| R8 | 前端流式首 Token 即渲染,不等 final_answer | P2 | 021-P1 | +| R9 | 所有改动有配置开关,可秒级回退 | P0 | 全局 | + +--- + +## Key Technical Decisions + +### KTD1: 合并路由 LLM 调用 — 单次 LLM 同时输出 complexity + intent + +当 `HeuristicClassifier` 返回 `complexity=0.5`(不确定区间)时,不再分别调用 `quick_classify()` 和 `IntentRouter._classify_with_llm()`,而是发起一次 LLM 调用,prompt 要求同时输出: + +```json +{"complexity": 0.7, "intent": "code_generation", "skill_hint": "react_agent"} +``` + +这比两次独立 LLM 调用节省 1-3s。LLM 的 structured output 能力确保格式可靠。 + +**Fallback**:若 LLM 返回格式异常,按 `complexity=0.5` 走默认 Agent。 + +### KTD2: 智能并行工具执行 — LLM 在 tool_calls 中标注 `parallelizable` + +在 `ReActEngine` 的 system prompt 中指示 LLM:当返回多个 tool_calls 时,在每个 tool_call 的 `_metadata` 中标注 `"parallelizable": true/false`。ReActEngine 收集所有 `parallelizable=true` 的工具,用 `asyncio.gather` 并行执行;`parallelizable=false` 或未标注的串行执行。 + +**为什么不用纯规则判断**:工具间的依赖关系是语义级的(如"先搜索再分析"),规则无法可靠判断。让 LLM 标注是最准确的方案。 + +**安全网**:`parallel_tools` 配置仍保留,设为 `"auto"` 时启用智能判断,设为 `true` 时全部并行,设为 `false` 时全部串行。 + +### KTD3: ReActEngine 复用 — Agent 级别持有实例 + +在 `AgentPool.create_agent()` 中创建 `ReActEngine` 实例并绑定到 Agent 对象。`_handle_chat_message` 从 Agent 获取已有实例而非每次新建。每次调用 `execute_stream()` 前重置内部状态(对话历史、step count)。 + +**为什么不用全局单例**:不同 Agent 可能有不同的 `max_steps`、`parallel_tools` 配置,需要实例隔离。 + +### KTD4: 拍卖机制 — Vickrey 拍卖 + 能力匹配 + +采用 Vickrey(次价)拍卖模型:Agent 提交密封标价(bid = cost_estimate),出价最低者赢得任务,但支付第二低价。结合能力匹配过滤不合格竞标者。 + +**为什么选 Vickrey**:激励相容——Agent 的最优策略是如实报告成本,不需要策略性报价。比英式拍卖更简单,比固定分配更高效。 + +### KTD5: 配置热重载线程安全 — asyncio.run_coroutine_threadsafe + +`_on_config_change` 从 `watchfiles` 线程调用时,通过 `asyncio.run_coroutine_threadsafe()` 将重载操作调度到事件循环,避免在非 asyncio 线程中直接操作 asyncio 对象。 + +--- + +## High-Level Technical Design + +### 路由合并流程 + +```mermaid +flowchart TD + A[用户消息] --> B{HeuristicClassifier} + B -->|complexity < 0.3| C[Layer 0: 默认 Agent] + B -->|0.3 <= complexity <= 0.7| D[合并 LLM 调用: complexity + intent] + B -->|complexity > 0.7| E[Layer 2: 能力匹配] + D -->|有 skill_hint| F[路由到指定 Skill] + D -->|无 skill_hint| C + D -->|LLM 格式异常| C + E -->|匹配成功| G[路由到最佳 Agent] + E -->|无匹配| F +``` + +### 智能并行工具执行 + +```mermaid +flowchart TD + A[LLM 返回 tool_calls] --> B{parallel_tools 配置} + B -->|false| C[全部串行执行] + B -->|true| D[全部并行执行] + B -->|auto| E[检查每个 tool_call 的 parallelizable 标注] + E --> F[parallelizable=true 的工具 asyncio.gather 并行] + E --> G[parallelizable=false 或未标注的串行执行] + F --> H[合并结果,按 tool_call_id 排序] + G --> H +``` + +### 拍卖机制 + +```mermaid +sequenceDiagram + participant Client + participant Auctioneer + participant Agent1 + participant Agent2 + + Client->>Auctioneer: 提交任务 + Auctioneer->>Agent1: 广播任务需求 + Auctioneer->>Agent2: 广播任务需求 + Agent1->>Auctioneer: 提交标价 (bid=0.3) + Agent2->>Auctioneer: 提交标价 (bid=0.5) + Auctioneer->>Auctioneer: Vickrey 拍卖: 赢家=Agent1, 支付=0.5 + Auctioneer->>Agent1: 分配任务 (payment=0.5) + Agent1->>Auctioneer: 返回结果 + Auctioneer->>Client: 返回结果 +``` + +--- + +## Implementation Units + +### U1. 合并路由 LLM 调用 + +**Goal:** 当 HeuristicClassifier 不确定时,将 complexity 评估和 intent 分类合并为单次 LLM 调用,消除路由层的第二次 LLM 调用。 + +**Requirements:** R1, R9 + +**Dependencies:** None + +**Files:** +- `src/agentkit/chat/skill_routing.py` — 新增 `MergedRouter` 类 +- `src/agentkit/chat/skill_routing.py` — 修改 `CostAwareRouter._route_layer1()` 使用合并调用 +- `tests/unit/test_cost_aware_router.py` — 新增测试 +- `configs/agentkit.yaml` — 新增 `router.merged_llm_classify: true` 配置 + +**Approach:** +1. 在 `CostAwareRouter` 中新增 `_classify_merged()` 方法,构建单次 LLM prompt 要求同时输出 complexity + intent + skill_hint +2. 修改 `_route_layer1()`:当 `HeuristicClassifier` 返回不确定区间(0.3-0.7)时,调用 `_classify_merged()` 而非分别调用 `quick_classify()` 和 `IntentRouter._classify_with_llm()` +3. LLM 返回格式:`{"complexity": float, "intent": str, "skill_hint": str|null}`,使用 JSON mode 确保格式可靠 +4. Fallback:LLM 格式异常时按 `complexity=0.5` 走默认 Agent +5. 配置开关:`router.merged_llm_classify: true`(默认),设为 false 时回退到独立调用 + +**Patterns to follow:** `HeuristicClassifier` 的配置开关模式(`classifier` 参数),`IntentRouter._classify_with_llm()` 的 LLM 调用模式 + +**Test scenarios:** +- 合并调用返回有效 JSON,正确路由到指定 skill +- 合并调用返回格式异常,fallback 到默认 Agent +- 合并调用返回 complexity < 0.3,走 Layer 0 +- 合并调用返回 complexity > 0.7,走 Layer 2 +- 配置 `merged_llm_classify: false` 时回退到独立调用 +- 合并调用超时,fallback 到默认 Agent + +**Verification:** 启用 `merged_llm_classify` 后,不确定区间的路由只产生 1 次 LLM 调用(而非 2 次) + +--- + +### U2. Chat 管线优化 + +**Goal:** ReActEngine 实例复用 + Session 操作并行化,减少每次消息的初始化和 I/O 开销。 + +**Requirements:** R2, R9 + +**Dependencies:** None + +**Files:** +- `src/agentkit/core/agent_pool.py` — Agent 创建时绑定 ReActEngine 实例 +- `src/agentkit/server/routes/chat.py` — 从 Agent 获取已有 ReActEngine +- `src/agentkit/core/react.py` — 新增 `reset()` 方法重置内部状态 +- `tests/unit/test_chat_routes.py` — 新增测试 +- `tests/unit/test_react_engine.py` — 新增 `test_reset` 测试 + +**Approach:** +1. 在 `ReActEngine` 中新增 `reset()` 方法,清空内部对话历史、step count、cancellation token +2. 在 `AgentPool.create_agent()` 中创建 `ReActEngine` 实例并绑定到 `agent._react_engine` +3. 修改 `_handle_chat_message()`:从 `agent._react_engine` 获取实例,调用 `reset()` 后执行 +4. 若 Agent 无 `_react_engine`(向后兼容),仍新建实例 +5. Session 操作:`append_message` 的 user message 和 assistant message 可并行写入(两者无依赖) + +**Patterns to follow:** `AgentPool.create_agent()` 的 Agent 初始化模式 + +**Test scenarios:** +- ReActEngine.reset() 清空内部状态后可正常执行 +- 连续两次 execute_stream() 调用互不干扰 +- Agent 无 _react_engine 时向后兼容新建实例 +- Session 并行写入后 get_messages() 返回完整消息列表 + +**Verification:** 连续发送 10 条消息,ReActEngine 实例 ID 保持不变 + +--- + +### U3. 智能并行工具执行 + +**Goal:** LLM 在 tool_calls 中标注可并行性,ReActEngine 自动判断并行/串行执行。 + +**Requirements:** R3, R9 + +**Dependencies:** None + +**Files:** +- `src/agentkit/core/react.py` — 修改 `_execute_loop()` 中的工具执行逻辑 +- `src/agentkit/core/react.py` — 修改 system prompt 指示 LLM 标注 parallelizable +- `tests/unit/test_react_engine.py` — 新增并行测试 +- `configs/agentkit.yaml` — `parallel_tools` 支持 `"auto"` 值 + +**Approach:** +1. 修改 `parallel_tools` 参数类型为 `bool | str`,支持 `True`/`False`/`"auto"` +2. 在 ReActEngine 的 system prompt 中添加指引:当返回多个 tool_calls 时,在每个 tool_call 的 arguments 中包含 `_parallelizable: true/false` +3. `_execute_loop()` 中: + - `parallel_tools=True` → 全部 `asyncio.gather` + - `parallel_tools=False` → 全部串行 + - `parallel_tools="auto"` → 收集 `parallelizable=true` 的工具并行执行,其余串行 +4. 执行顺序:先执行所有串行工具(按顺序),再并行执行所有可并行工具 +5. 结果按 `tool_call_id` 顺序追加到对话历史 + +**Patterns to follow:** 现有 `asyncio.gather` 并行执行模式(`parallel_tools=True` 分支) + +**Test scenarios:** +- `parallel_tools="auto"` + LLM 标注 2 个 parallelizable=true → 并行执行 +- `parallel_tools="auto"` + LLM 标注 1 个 true 1 个 false → 串行先执行,再并行 +- `parallel_tools="auto"` + LLM 未标注 parallelizable → 全部串行(安全默认) +- `parallel_tools=True` → 忽略标注,全部并行 +- `parallel_tools=False` → 忽略标注,全部串行 +- 并行执行结果按 tool_call_id 顺序追加 + +**Verification:** 发送需要多工具的消息,观察日志中的执行顺序和耗时 + +--- + +### U4. 配置热重载防御性修复 + +**Goal:** 修复配置热重载的线程安全问题,确保非 asyncio 线程调用不触发竞态。 + +**Requirements:** R4, R9 + +**Dependencies:** None + +**Files:** +- `src/agentkit/server/app.py` — 修改 `_on_config_change()` 使用 `asyncio.run_coroutine_threadsafe()` +- `src/agentkit/server/app.py` — 添加 shell proc.kill() 错误处理 +- `tests/unit/test_app_lifecycle.py` — 新增测试 + +**Approach:** +1. `_on_config_change()` 从 watchfiles 线程调用时,通过 `asyncio.run_coroutine_threadsafe(_async_reload_config(app, config), loop)` 调度到事件循环 +2. 新增 `_async_reload_config()` 异步方法,包含原重载逻辑 +3. 添加 `_config_reload_lock` 的线程安全版本(`threading.Lock` + `asyncio.Lock` 双锁) +4. shell proc.kill() 添加 try/except ProcessLookupError + +**Patterns to follow:** `asyncio.run_coroutine_threadsafe()` 模式 + +**Test scenarios:** +- 从非 asyncio 线程触发配置变更,重载正常完成 +- 并发配置变更,只有一个生效(锁保护) +- proc.kill() 时进程已退出,不抛异常 +- 配置变更后 LLM Gateway 正确重建 + +**Verification:** 修改 agentkit.yaml 后观察日志,确认重载在事件循环中执行 + +--- + +### U5. ReWOO 回退链配置化 + +**Goal:** ReWOO 的 fallback 策略可从 YAML 配置,不硬编码。 + +**Requirements:** R5, R9 + +**Dependencies:** None + +**Files:** +- `src/agentkit/core/rewoo.py` — `FALLBACK_STRATEGIES` 改为从配置读取 +- `configs/skills/rewoo_agent.yaml` — 新增 `fallback_strategies` 字段 +- `tests/unit/test_rewoo_engine.py` — 新增测试 + +**Approach:** +1. `ReWOOEngine.__init__()` 接受 `fallback_strategies: list[str]` 参数,默认 `["simplified_rewoo", "react", "direct"]` +2. Skill YAML 中新增 `fallback_strategies` 字段,覆盖默认值 +3. `_plan_phase()` 失败时按配置的策略顺序尝试 fallback +4. 支持的策略名:`simplified_rewoo`、`react`、`direct`、`plan_exec` + +**Patterns to follow:** `SkillConfig` 的字段扩展模式 + +**Test scenarios:** +- 默认 fallback 链:simplified_rewoo → react → direct +- 自定义 fallback 链:plan_exec → react → direct +- 空 fallback 链:直接抛异常 +- 无效策略名:跳过并警告 + +**Verification:** 修改 rewoo_agent.yaml 的 fallback_strategies,重启后观察日志 + +--- + +### U6. 集成测试补充 + +**Goal:** 补充关键路径的集成测试,保障其他模块改动的回归安全。 + +**Requirements:** R6 + +**Dependencies:** U1, U2, U3 + +**Files:** +- `tests/integration/test_router_engine_chain.py` — 路由→引擎全链路测试 +- `tests/integration/test_rewoo_fallback.py` — ReWOO 回退链测试 +- `tests/integration/test_parallel_tools.py` — 并行工具执行测试 +- `tests/integration/test_merged_router.py` — 合并路由测试 + +**Approach:** +1. 路由链测试:用户消息 → HeuristicClassifier → 合并 LLM 调用 → Skill 匹配 → ReActEngine 执行 → 结果 +2. ReWOO 回退测试:Planning 失败 → simplified_rewoo → react → direct +3. 并行工具测试:LLM 返回多个 tool_calls + parallelizable 标注 → 验证执行顺序 +4. 合并路由测试:不确定区间消息 → 单次 LLM 调用 → 正确路由 + +**Patterns to follow:** 现有 `tests/integration/test_react_loop.py` 模式 + +**Test scenarios:** +- 路由链:问候语 → Layer 0 直达;代码问题 → 合并 LLM → react_agent +- ReWOO 回退:mock LLM Planning 失败 → 验证 fallback 执行 +- 并行工具:2 个 parallelizable=true 工具 → 验证并行执行(耗时 < 串行) +- 合并路由:不确定消息 → 验证只产生 1 次 LLM 调用 + +**Verification:** `pytest tests/integration/ -v` 全部通过 + +--- + +### U7. 拍卖机制实现 + +**Goal:** 实现 Vickrey 拍卖模型,Agent 竞标任务,基于能力+成本+历史质量评分。 + +**Requirements:** R7 + +**Dependencies:** None + +**Files:** +- `src/agentkit/marketplace/auction.py` — 新增 `Auctioneer`、`Bid`、`AuctionResult` 类 +- `src/agentkit/marketplace/wealth.py` — 新增 `WealthTracker` 类 +- `src/agentkit/chat/skill_routing.py` — `CostAwareRouter._route_layer2()` 集成拍卖 +- `configs/agentkit.yaml` — 新增 `router.auction_enabled: true` 配置 +- `tests/unit/test_auction.py` — 新增测试 + +**Approach:** +1. `Bid` 数据类:agent_id、cost_estimate、capability_score、quality_history +2. `Auctioneer` 类: + - `announce_task(task_desc, required_capabilities)` → 广播给合格 Agent + - `submit_bid(bid)` → 收集标价 + - `resolve_auction()` → Vickrey 拍卖:最低价者赢,支付第二低价 + - 能力过滤:先按 `required_capabilities` 过滤不合格竞标者 +3. `WealthTracker` 类:跟踪每个 Agent 的累计收入/支出,用于后续经济分析 +4. 集成到 `CostAwareRouter._route_layer2()`:当 `auction_enabled=True` 且有多个候选 Agent 时,发起拍卖 +5. 拍卖超时:默认 5s,超时后按最低价直接分配 + +**Patterns to follow:** `CostAwareRouter` 的三层路由模式,`org_context.find_best_agent()` 的能力匹配模式 + +**Test scenarios:** +- 单一竞标者 → 直接分配,支付 0 +- 两个竞标者 → Vickrey 拍卖,低价者赢,支付第二低价 +- 竞标者能力不匹配 → 过滤掉,不参与拍卖 +- 拍卖超时 → 按已有标价分配 +- 无竞标者 → fallback 到 IntentRouter +- WealthTracker 正确累计收入/支出 + +**Verification:** 配置 `auction_enabled: true`,发送高复杂度消息,观察拍卖日志 + +--- + +### U8. 流式首 Token 前端渲染 + +**Goal:** 前端收到首个 token 即开始渲染,不等 final_answer,降低感知延迟。 + +**Requirements:** R8 + +**Dependencies:** U2 + +**Files:** +- `src/agentkit/server/static/index.html` — 修改 WebSocket 消息处理逻辑 +- `src/agentkit/core/react.py` — 流式事件增加 `is_final` 标记 + +**Approach:** +1. 当前前端收到 `token` 事件时已经在渲染文本(`currentAgentBubble.textContent += msg.content`),但 LLM 决定调工具时需要"收回"已渲染的 token +2. 新增 `thinking` 事件类型:LLM 的思考过程(如 "Let me search for..."),前端渲染为灰色斜体 +3. `token` 事件仅在 LLM 直接回答时发送(不调工具时) +4. 当 LLM 决定调工具时,发送 `tool_call` 事件,前端将 thinking 文本替换为工具调用卡片 +5. `final_answer` 事件标记 `is_final: true`,前端完成渲染 + +**关键 UX 决策**:不在 LLM 可能调工具时渲染 token,避免"文字闪烁消失"问题。只在确认是最终回答时才渲染 token 流。 + +**Patterns to follow:** 现有 `token` / `final_answer` 事件处理模式 + +**Test scenarios:** +- LLM 直接回答 → token 流式渲染,无闪烁 +- LLM 先思考再调工具 → thinking 渲染为灰色,工具调用显示为卡片 +- LLM 思考后直接回答 → thinking 后接 token 流式渲染 +- 多轮工具调用 → 每轮工具调用显示为步骤卡片 + +**Verification:** 发送需要工具调用的消息,观察前端渲染无闪烁 + +--- + +## Risks & Mitigations + +| Risk | Impact | Mitigation | +|------|--------|------------| +| 合并 LLM 调用格式不稳定 | 路由失败,走 fallback | JSON mode + 严格 schema 校验 + fallback 到默认 Agent | +| 智能并行工具执行依赖误判 | 工具结果错误 | `parallel_tools="auto"` 默认保守(未标注=串行);`true` 模式需显式启用 | +| 拍卖机制增加路由延迟 | 高复杂度任务响应更慢 | 拍卖超时 5s;单竞标者时跳过拍卖直接分配 | +| ReActEngine 复用状态泄漏 | 上下文串扰 | `reset()` 方法严格清空所有内部状态;每次执行前强制调用 | +| 流式渲染闪烁 | 用户体验差 | 只在确认不调工具时渲染 token;thinking 阶段渲染为灰色 | + +--- + +## System-Wide Impact + +- **路由层**:`skill_routing.py` 变更最大(合并 LLM + 拍卖集成) +- **引擎层**:`react.py` 变更(智能并行 + reset),`rewoo.py` 变更(配置化回退) +- **服务层**:`chat.py` 变更(ReActEngine 复用),`app.py` 变更(热重载修复) +- **前端**:`index.html` 变更(流式渲染优化) +- **新增模块**:`marketplace/auction.py`、`marketplace/wealth.py` + +--- + +## Open Questions + +- 拍卖机制的 `cost_estimate` 如何计算?当前 Agent 无自省能力,可能需要基于历史执行时间统计 +- `parallel_tools="auto"` 的 LLM 标注格式是否需要与 OpenAI function calling 兼容?当前 `_parallelizable` 字段放在 arguments 中可能被 LLM 忽略 +- 流式渲染的 thinking 文本是否需要持久化到 Session?当前不持久化,重载后丢失 + +--- + +## Acceptance Examples + +- AE1: 发送一般问题,首 Token 在 1s 内出现(当前 3-5s) +- AE2: 发送需要多工具的消息,工具并行执行,总耗时 < 串行执行 +- AE3: 修改 rewoo_agent.yaml 的 fallback_strategies,重启后生效 +- AE4: 配置 auction_enabled: true,高复杂度任务触发拍卖日志 +- AE5: 修改 agentkit.yaml 后服务自动重载,无异常日志 diff --git a/docs/plans/2026-06-13-001-feat-gui-productization-plan.md b/docs/plans/2026-06-13-001-feat-gui-productization-plan.md new file mode 100644 index 0000000..0c862a2 --- /dev/null +++ b/docs/plans/2026-06-13-001-feat-gui-productization-plan.md @@ -0,0 +1,382 @@ +--- +date: "2026-06-13" +status: active +origin: docs/brainstorms/2026-06-13-gui-productization-requirements.md +--- + +## Summary + +对 Fischer AgentKit GUI 进行产品级提升,三线并行:布局重构为「左对话 + 右双栏」、建立双主题设计系统、增强交互体验。分 3 个迭代交付。 + +## Problem Frame + +当前 GUI 处于"功能可用但体验粗糙"状态:四象限等分布局让对话空间被压缩到 1/4 屏幕;Design Token 体系仅覆盖浅色主题,暗色主题缺失;无过渡动画、操作无反馈、空状态单调。需要从布局、视觉、交互三个维度全面提升到产品级。 + +## Key Technical Decisions + +**KTD-1. 暗色主题通过 `[data-theme="dark"]` 选择器切换,而非独立 CSS 文件。** + +现有 `tokens.css` 在 `:root` 上定义了约 80 个 token。暗色主题在 `[data-theme="dark"]` 选择器上覆盖同名变量,切换时只需修改 `document.documentElement.dataset.theme`。这保持了 CSS 变量为唯一真实来源,Ant Design Vue 主题通过 `readToken()` 运行时自动跟随。无需引入 CSS-in-JS 主题切换或独立 CSS 文件。 + +**KTD-2. 布局重构通过调整 AgentLayout 的 SplitPane 嵌套结构实现,不修改子视图。** + +当前 AgentLayout 使用三层 SplitPane 嵌套(水平 → 左侧垂直 + 右侧垂直)。重构为两层:水平(左对话 + 右侧)→ 右侧垂直(右上 + 右下)。左侧不再嵌套垂直 SplitPane,ChatView 直接占满左半屏。所有子视图(ChatView、WorkflowView、EvolutionView 等)代码零修改。 + +**KTD-3. 侧边导航改为 32px 图标模式,复用现有 QuadrantPanel 的 Tab 切换机制。** + +点击导航图标时调用 QuadrantPanel 的 `setActiveTab()` 方法切换 Tab 并展开面板。导航状态通过 `activeNav` ref 与 QuadrantPanel 的 `activeTab` 双向同步。不引入新的路由机制。 + +**KTD-4. 交互增强使用 Vue 3 内置 `` 和 ``,配合现有 `transitions.css` 定义的动画类。** + +现有 `transitions.css` 已定义 7 种动画类(fade、slide-up、slide-down、slide-right、collapse、scale、stagger-list)和 3 种关键帧动画(skeleton-pulse、pulse-dot、gentle-bounce)。交互增强直接复用这些动画类,不引入第三方动画库。 + +--- + +## High-Level Technical Design + +```mermaid +flowchart LR + subgraph Layout["布局重构"] + HSplit["水平 SplitPane
55:45"] + Left["左半屏
ChatView"] + Right["右半屏"] + VSplit["垂直 SplitPane
60:40"] + TR["右上面板
代码/工作流/知识库"] + BR["右下面板
监控/技能/设置"] + Left --> HSplit + Right --> HSplit + TR --> VSplit + BR --> VSplit + VSplit --> Right + end + + subgraph Theme["双主题"] + Light["浅色 Token
:root"] + Dark["暗色 Token
[data-theme=dark]"] + Toggle["TopNav 切换按钮"] + Toggle --> Light + Toggle --> Dark + end + + subgraph Interaction["交互增强"] + Anim["过渡动画
Transition 组件"] + Feedback["操作反馈
骨架屏/Toast"] + Empty["空状态
品牌化插图"] + Drag["拖拽增强
比例提示"] + end +``` + +--- + +## Requirements Traceability + +| Origin R-ID | Plan Coverage | +|---|---| +| R1. 左对话 + 右双栏布局 | U1 | +| R2. 面板折叠为 Tab 栏 | U1 (QuadrantPanel 已支持,调整默认行为) | +| R3. 侧边导航精简为图标模式 | U2 | +| R4. Design Token 体系基础 | U3 (已有基础,补充暗色 token) | +| R5. 小屏幕适配 | U1 (调整 responsive.css 断点) | +| R6. 暗色主题 | U3 | +| R7. 组件样式统一 | U4 | +| R8. 过渡动画 | U5 | +| R9. 操作反馈 | U6 | +| R10. 空状态设计 | U7 | +| R11. 拖拽交互增强 | U8 | + +--- + +## Implementation Units + +### 迭代 1:布局骨架 + 暗色主题 + +### U1. AgentLayout 布局重构 + +**Goal:** 将四象限等分布局重构为「左对话 + 右双栏」布局。 + +**Requirements:** R1, R2, R5 + +**Dependencies:** 无 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/AgentLayout.vue` (修改) +- `src/agentkit/server/frontend/src/styles/responsive.css` (修改) +- `src/agentkit/server/frontend/src/router/index.ts` (修改) + +**Approach:** +- 修改 AgentLayout 的 SplitPane 嵌套结构:移除左侧垂直 SplitPane,ChatView 直接作为水平 SplitPane 的 first slot +- 右侧保留垂直 SplitPane(右上 + 右下),与当前相同 +- 调整水平 SplitPane 默认比例为 55:45(左:右) +- 调整路由:移除 `agent-terminal` 路由(终端不再作为独立象限),终端功能可通过右侧面板 Tab 访问 +- 调整 responsive.css 断点:小屏幕阈值从 1280px 调整为 1024px +- QuadrantPanel 的折叠功能已实现,无需修改 + +**Patterns to follow:** 现有 SplitPane + QuadrantPanel 嵌套模式 + +**Test scenarios:** +- 页面加载后左半屏显示 ChatView,右半屏上下分割为代码/工作流和监控 +- 左右分割线可拖拽,默认比例 55:45 +- 右侧上下分割线可拖拽,默认比例 60:40 +- 分割比例保存到 localStorage,刷新后恢复 +- 右上面板可折叠为 Tab 栏 +- 右下面板可折叠为 Tab 栏 +- 两个面板同时折叠后对话面板获得最大空间 +- 屏幕宽度 < 1024px 时显示小屏幕提示 +- 旧路由 `/terminal` 重定向正确 + +**Verification:** 打开 GUI 后左半屏是对话,右半屏上下分割,拖拽和折叠功能正常 + +### U2. 侧边导航精简为图标模式 + +**Goal:** 将侧边导航精简为 32px 宽的图标导航,点击切换右侧面板 Tab。 + +**Requirements:** R3 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/AgentLayout.vue` (修改) +- `src/agentkit/server/frontend/src/components/layout/TopNav.vue` (修改) + +**Approach:** +- 在 AgentLayout 的水平 SplitPane 之前添加 32px 宽的图标导航栏 +- 导航项:对话(MessageOutlined)、工作流(ApartmentOutlined)、知识库(BookOutlined)、技能(AppstoreOutlined)、监控(DashboardOutlined)、设置(SettingOutlined) +- 点击导航图标时调用对应 QuadrantPanel 的 `setActiveTab()` 方法并展开面板 +- 当前激活的导航图标高亮显示(使用 `--color-primary`) +- TopNav 添加导航栏折叠/展开按钮 +- 导航栏折叠时宽度为 0px,展开时为 32px +- 导航状态与路由同步 + +**Patterns to follow:** QuadrantPanel 的 `setActiveTab()` 方法 + +**Test scenarios:** +- 导航栏显示 6 个图标,宽度 32px +- 点击「工作流」图标 → 右上面板切换到工作流 Tab 并展开 +- 点击「监控」图标 → 右下面板切换到监控 Tab 并展开 +- 点击「对话」图标 → 聚焦左侧对话面板 +- 当前激活图标高亮 +- TopNav 按钮可折叠/展开导航栏 +- 折叠后导航栏宽度为 0px + +**Verification:** 导航栏图标可切换右侧面板内容,折叠/展开正常 + +### U3. 暗色主题 Token 定义与切换 + +**Goal:** 在现有浅色 Token 基础上新增暗色主题 Token,支持一键切换。 + +**Requirements:** R4, R6 + +**Dependencies:** 无 + +**Files:** +- `src/agentkit/server/frontend/src/styles/tokens.css` (修改 — 添加 `[data-theme="dark"]` 块) +- `src/agentkit/server/frontend/src/styles/theme.ts` (修改 — 暗色主题 Ant Design 映射) +- `src/agentkit/server/frontend/src/components/layout/TopNav.vue` (修改 — 添加主题切换按钮) +- `src/agentkit/server/frontend/src/stores/theme.ts` (新建 — 主题状态管理) + +**Approach:** +- 在 `tokens.css` 末尾添加 `[data-theme="dark"]` 选择器块,覆盖所有颜色相关 token(背景、文本、边框、主色、语义色、灰色阶、代码色) +- 暗色主题配色:深色背景(#1a1a2e 系列)、荧光强调色(保持 Indigo 主色但调亮)、终端原生感 +- 新建 `stores/theme.ts`:管理主题状态(`light`/`dark`),切换时修改 `document.documentElement.dataset.theme`,偏好保存到 localStorage +- TopNav 添加太阳/月亮图标切换按钮 +- `theme.ts` 中的 `readToken()` 已在运行时从 CSS 变量读取,暗色 token 覆盖后 Ant Design 主题自动跟随 + +**Patterns to follow:** 现有 `tokens.css` 的 `:root` 定义模式,`theme.ts` 的 `readToken()` 模式 + +**Test scenarios:** +- 点击 TopNav 月亮图标 → 界面切换到暗色主题 +- 点击太阳图标 → 切换回浅色主题 +- 暗色主题下所有组件正常显示(文字可读、边框可见、按钮可点击) +- 暗色主题下 Ant Design 组件(按钮、输入框、下拉框、模态框)正常显示 +- 主题偏好保存到 localStorage,刷新后保持 +- 代码块在暗色主题下使用暗色代码配色 + +**Verification:** 主题切换按钮可用,两种主题下所有界面元素正常显示 + +--- + +### 迭代 2:组件样式统一 + +### U4. 组件样式统一与 Ant Design 覆盖清理 + +**Goal:** 所有组件统一引用 Design Token,清理 App.vue 中的 `!important` 覆盖。 + +**Requirements:** R7 + +**Dependencies:** U3 + +**Files:** +- `src/agentkit/server/frontend/src/App.vue` (修改 — 清理全局覆盖) +- `src/agentkit/server/frontend/src/components/layout/SideNav.vue` (修改 — 迁移到 token) +- `src/agentkit/server/frontend/src/styles/theme.ts` (修改 — 增强组件级 token 映射) +- 各组件 scoped 样式中的硬编码值 (修改 — 替换为 token 引用) + +**Approach:** +- 将 App.vue 中的 `.ant-btn`、`.ant-card` 等全局覆盖迁移到 `theme.ts` 的组件级 token 映射中,消除 `!important` +- SideNav.vue 的硬编码 `rgba()` 值替换为 token 引用 +- 扫描所有组件 scoped 样式中的硬编码颜色/间距值,替换为 token 引用 +- 主色统一为 `--color-primary`(消除 `#1677ff`/`#1890ff` 残留) + +**Patterns to follow:** `theme.ts` 的组件级 token 映射模式 + +**Test scenarios:** +- App.vue 中无 `!important` 覆盖 +- 所有组件 scoped 样式中无硬编码颜色值 +- 浅色和暗色主题下所有组件样式一致 +- Ant Design 组件(按钮、卡片、标签、模态框、选择框)圆角和间距统一 + +**Verification:** 搜索代码中无硬编码颜色值(除 token 定义文件外),两种主题下样式一致 + +--- + +### 迭代 3:交互增强 + +### U5. 过渡动画 + +**Goal:** 为所有交互添加过渡动画。 + +**Requirements:** R8 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/QuadrantPanel.vue` (修改 — 折叠/展开动画) +- `src/agentkit/server/frontend/src/components/layout/AgentLayout.vue` (修改 — Tab 切换动画) +- `src/agentkit/server/frontend/src/views/ChatView.vue` (修改 — 消息列表动画) +- `src/agentkit/server/frontend/src/styles/transitions.css` (修改 — 如需新增动画类) + +**Approach:** +- QuadrantPanel 折叠/展开:使用 Vue `` 包裹 body 区域,应用 `collapse` 动画类 +- Tab 切换:使用 Vue `` 包裹 content 区域,应用 `fade` 动画类 +- ChatView 消息列表:使用 `` 包裹消息列表,应用 `stagger-list` 动画类 +- 路由切换:使用 `` 包裹 ``,应用 `fade` 动画类 + +**Patterns to follow:** 现有 `transitions.css` 定义的动画类 + +**Test scenarios:** +- 面板折叠/展开有平滑过渡(200ms ease) +- Tab 切换有淡入淡出(150ms) +- 新消息出现有交错渐入效果 +- 动画不影响操作响应速度 + +**Verification:** 所有交互有流畅的过渡动画,无生硬切换 + +### U6. 操作反馈 + +**Goal:** 为用户操作提供即时反馈。 + +**Requirements:** R9 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/common/AppToast.vue` (新建 — Toast 通知组件) +- `src/agentkit/server/frontend/src/components/common/SkeletonLoader.vue` (新建 — 骨架屏组件) +- `src/agentkit/server/frontend/src/components/layout/TopNav.vue` (修改 — WebSocket 断连横幅) +- `src/agentkit/server/frontend/src/stores/chat.ts` (修改 — 使用 Toast 替代错误提示) + +**Approach:** +- 新建 AppToast 组件:基于 Ant Design Vue `message` API 封装,支持 success/error/warning/info 四种类型 +- 新建 SkeletonLoader 组件:使用现有 `skeleton-pulse` 关键帧动画,支持不同形状(文本/卡片/列表) +- TopNav 添加 WebSocket 断连横幅:使用 `slide-down` 动画类 +- chat.ts 中的错误提示从 `console.error` 改为 Toast 通知 + +**Patterns to follow:** 现有 `transitions.css` 的 `skeleton-pulse` 动画 + +**Test scenarios:** +- 操作成功时显示绿色 Toast 通知 +- 操作失败时显示红色 Toast 通知 +- 加载状态显示骨架屏而非 `` +- WebSocket 断连时顶部显示黄色横幅 +- 重连后横幅自动消失 + +**Verification:** 所有操作有即时视觉反馈 + +### U7. 空状态设计 + +**Goal:** 为所有空状态提供品牌化插图和引导文案。 + +**Requirements:** R10 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/common/EmptyState.vue` (新建 — 通用空状态组件) +- `src/agentkit/server/frontend/src/views/ChatView.vue` (修改 — 对话空状态) +- `src/agentkit/server/frontend/src/views/WorkflowView.vue` (修改 — 工作流空状态) +- `src/agentkit/server/frontend/src/views/EvolutionView.vue` (修改 — 监控空状态) +- `src/agentkit/server/frontend/src/views/KnowledgeBaseView.vue` (修改 — 知识库空状态) +- `src/agentkit/server/frontend/src/views/SkillsView.vue` (修改 — 技能空状态) + +**Approach:** +- 新建 EmptyState 通用组件:接受 icon(Ant Design 图标组件)、title、description、action(可选操作按钮)三个 props +- 各视图的空状态使用 EmptyState 组件替换当前的纯文字提示 +- 对话空状态:MessageOutlined + "开始对话" + "输入消息与 Agent 交互" +- 工作流空状态:ApartmentOutlined + "创建工作流" + "拖拽节点构建自动化流程" +- 监控空状态:DashboardOutlined + "暂无监控数据" + "执行任务后数据将自动更新" +- 知识库空状态:BookOutlined + "添加知识源" + "上传文档或配置外部知识库" +- 技能空状态:AppstoreOutlined + "注册技能" + "通过 YAML 配置定义技能" + +**Patterns to follow:** Ant Design Vue 的 `a-empty` 组件模式 + +**Test scenarios:** +- 新用户打开对话页面显示空状态引导 +- 工作流列表为空时显示空状态引导 +- 监控数据为空时显示空状态引导 +- 空状态组件在浅色和暗色主题下正常显示 + +**Verification:** 所有空状态有品牌化插图和引导文案 + +### U8. 拖拽交互增强 + +**Goal:** 优化拖拽操作的视觉反馈。 + +**Requirements:** R11 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/SplitPane.vue` (修改 — 拖拽比例提示) +- `src/agentkit/server/frontend/src/views/WorkflowView.vue` (修改 — 节点拖拽预览,如 FlowCanvas 支持) + +**Approach:** +- SplitPane 拖拽时:在分割线旁显示当前比例百分比(如 "55%"),拖拽结束后淡出 +- SplitPane 拖拽时:分割线高亮加粗(从 2px 到 4px),颜色从 `--border-color` 变为 `--color-primary` +- 工作流节点拖拽:如果 Vue Flow 支持自定义拖拽预览,添加放置预览指示 + +**Patterns to follow:** 现有 SplitPane 的拖拽处理模式 + +**Test scenarios:** +- 拖拽分割线时显示当前比例百分比 +- 拖拽时分割线高亮加粗 +- 拖拽结束后比例提示淡出 +- 键盘调整分割线时也显示比例提示 + +**Verification:** 拖拽操作有清晰的视觉反馈 + +--- + +## Scope Boundaries + +**Deferred to follow-up work:** +- 代码 Diff 查看器实现(右上「代码」Tab 仍为占位) +- Cmd+K 内联编辑 +- @-mention 上下文引用 +- 响应式移动端适配 +- SideNav (Legacy) 组件迁移(AppLayout 保留作为回退) + +**Outside this product's identity:** +- 多用户协作/实时协同编辑 +- 插件市场 +- 代码编辑器(只读预览) + +--- + +## Risks & Dependencies + +| Risk | Impact | Mitigation | +|------|--------|-----------| +| 暗色主题 token 覆盖不完整 | 部分组件在暗色下显示异常 | 逐组件验证,优先覆盖高频组件 | +| Ant Design Vue 4.x CSS-in-JS 主题跟随 | 暗色切换后 Ant 组件可能不跟随 | `readToken()` 运行时读取确保跟随,需验证 | +| 布局重构影响子视图高度计算 | 子视图内容溢出或空白 | 子视图使用 `height: 100%` + `overflow: auto` | +| 过渡动画性能 | 大量 DOM 操作时卡顿 | 使用 CSS transform/opacity 触发 GPU 加速 | diff --git a/docs/plans/2026-06-13-003-feat-platform-experience-upgrade-plan.md b/docs/plans/2026-06-13-003-feat-platform-experience-upgrade-plan.md new file mode 100644 index 0000000..de85624 --- /dev/null +++ b/docs/plans/2026-06-13-003-feat-platform-experience-upgrade-plan.md @@ -0,0 +1,807 @@ +--- +title: "feat: AgentKit Platform Experience Upgrade" +status: active +created: 2026-06-13 +plan-type: feat +depth: deep +origin: docs/brainstorms/2026-06-13-agentkit-platform-experience-upgrade-requirements.md +--- + +# feat: AgentKit Platform Experience Upgrade + +## Summary + +对 Fischer AgentKit 进行平台级体验升级,四线并行推进:布局重构为左对话+右双栏、对话体验深化(首 Token 即渲染+消息格式增强+@-mention 四类引用)、响应速度核心优化、暗色主题与交互增强、Computer Use MVP——分三个冲击波迭代交付。 + +## Problem Frame + +AgentKit 后端能力丰富(ReAct、Skill、Pipeline、记忆、自进化、多 Agent 市场),但 GUI 仍处于"功能可用但体验粗糙"状态。核心痛点:对话空间被压缩到 1/4 屏幕、消息纯文本无高亮、首 Token 延迟 5-10 秒、无暗色主题、无交互反馈、Computer Use 为占位。需求文档(见 origin)定义了 25 个需求(R1-R25),本计划定义如何实现。 + +--- + +## Key Technical Decisions + +**KTD-1: 布局重构通过调整 SplitPane 嵌套实现,子视图零修改。** 当前 AgentLayout 使用三层 SplitPane(水平→左垂直+右垂直),重构为两层(水平→右垂直),ChatView 直接作为水平 SplitPane 的 first slot。QuadrantPanel 和 SplitPane 组件不变,只改 AgentLayout 的嵌套结构和路由映射。(see origin: R1) + +**KTD-2: 消息格式增强基于 MarkdownIt 插件扩展 + DOMPurify 白名单扩展。** 当前 ChatMessage 已使用 MarkdownIt 渲染,添加 `markdown-it-highlightjs` 插件实现代码高亮,自定义 `tool_call` 和 `file_preview` 块级渲染器实现工具调用卡片和文件预览。关键:当前 DOMPurify 的 `ALLOWED_TAGS` 白名单不包含 `div`、`img`、`button`,自定义渲染器输出的 HTML 元素会被过滤,必须扩展白名单。不引入新的 Markdown 渲染引擎。(see origin: R8, R9, R10) + +**KTD-3: @-mention 通过扩展 WebSocket 消息协议实现。** 在现有 `WsClientMessage` 的 `sources` 字段基础上扩展,引用项编码为 `{type: "mention", mention_type: "file"|"skill"|"workflow"|"agent", id: string, label: string}`,后端解析后注入 Agent 上下文。新增 `/api/v1/portal/mention-suggest` REST 端点提供 autocomplete 数据。(see origin: R13, R14) + +**KTD-4: Computer Use MVP 使用 pyautogui + screencapture 实现截屏和点击。** 替换 `DockerComputerUseSession` 的 stub 为 `LocalComputerUseSession`,macOS 使用 `screencapture` 截屏 + `pyautogui` 执行点击/输入操作,Linux 使用 `xdotool` + `scrot`。不依赖 Docker 容器化。前端新增 ComputerUseView 实际界面替代占位页。(see origin: R19, R20) + +**KTD-5: 暗色主题通过 `[data-theme="dark"]` CSS 选择器覆盖 + 响应式 Ant Design token。** 在现有 `tokens.css` 中添加 `[data-theme="dark"]` 块覆盖同名 CSS 变量,新增 `stores/theme.ts` 管理主题状态和 localStorage 持久化。关键:`styles/theme.ts` 的 `readToken()` 是模块加载时一次性执行的,切换主题后需重新调用生成新的 `themeConfig` 并传给 ConfigProvider,否则 Ant Design 组件不跟随暗色主题。(see origin: R11) + +**KTD-6: 响应速度优化 U1-U4 已实现,仅补充 portal.py 的 ReActEngine 复用。** `HeuristicClassifier`、`_classify_merged`、`parallel_tools`、`AsyncWriteQueue` 均已在代码中。`chat.py` 已有 ReActEngine 复用逻辑,但 `portal.py` 每次创建新实例,需对齐。(see origin: R5, R6, R7) + +--- + +## High-Level Technical Design + +### 迭代 1 架构:对话体验质变 + +```mermaid +flowchart TB + subgraph Frontend + AL[AgentLayout] --> SP_H[SplitPane horizontal 55:45] + SP_H --> CV[ChatView 全高] + SP_H --> SP_V[SplitPane vertical 60:40] + SP_V --> QP_TR[QuadrantPanel 右上] + SP_V --> QP_BR[QuadrantPanel 右下] + + CV --> CI[ChatInput] + CV --> CM[ChatMessage] + CM --> MD[MarkdownIt + highlightjs] + CM --> TC[ToolCallCard 渲染器] + CM --> FP[FilePreview 渲染器] + + CI --> WS[WebSocket] + end + + subgraph Backend + WS --> PORTAL[portal.py] + PORTAL --> HC[HeuristicClassifier 已实现] + PORTAL --> MERGE[_classify_merged 已实现] + PORTAL --> RE[ReActEngine 复用] + RE --> STREAM[execute_stream] + STREAM --> |token 事件| WS + end +``` + +### @-mention 数据流(迭代 2) + +```mermaid +sequenceDiagram + participant U as User + participant CI as ChatInput + participant API as /mention-suggest + participant WS as WebSocket + participant PORTAL as portal.py + participant AGENT as Agent + + U->>CI: 输入 @ + CI->>API: GET /mention-suggest?q=keyword + API-->>CI: [{type, id, label, icon}] + U->>CI: 选择引用项 + CI->>CI: 添加 ContextPill + U->>CI: 发送消息 + CI->>WS: {type:chat, message, mentions:[...]} + WS->>PORTAL: 解析 mentions + PORTAL->>PORTAL: 查询引用内容 + PORTAL->>AGENT: 注入上下文 + AGENT-->>WS: 流式响应 + WS-->>CI: 渲染响应 +``` + +--- + +## Requirements Traceability + +| Requirement | Iteration | Implementation Unit(s) | +|-------------|-----------|----------------------| +| R1. 左对话+右双栏 | 1 | U1 | +| R2. 面板折叠 | 1 | U1 | +| R3. 侧边导航图标 | 1 | U2 | +| R4. 小屏幕适配 | 1 | U1 | +| R5. 启发式分类器 | 1 | 已实现 | +| R6. 合并路由调用 | 1 | 已实现 | +| R7. 首 Token 即渲染 | 1 | U3 | +| R8. 代码块高亮 | 1 | U4 | +| R9. 工具调用可视化 | 1 | U5 | +| R10. 图片/文件预览 | 1 | U6 | +| R11. 暗色主题 | 2 | U7 | +| R12. 组件样式统一 | 2 | U8 | +| R13. @-mention Autocomplete | 2 | U9 | +| R14. @-mention 上下文注入 | 2 | U10 | +| R15. @-mention 引用标签 | 2 | U9 | +| R16. 过渡动画 | 2 | U11 | +| R17. 操作反馈 | 2 | U12 | +| R18. 空状态设计 | 2 | U13 | +| R19. 截屏查看 | 3 | U14 | +| R20. 简单点击操作 | 3 | U14 | +| R21. Computer Use 面板 | 3 | U15 | +| R22. 并行工具执行 | 3 | 已实现 | +| R23. 异步会话写入 | 3 | 已实现 | +| R24. 分割线拖拽增强 | 3 | U16 | +| R25. 面板折叠缩略预览 | 3 | U17 | + +--- + +## Implementation Units + +### 迭代 1:对话体验质变 + +--- + +### U1. AgentLayout 布局重构 + +**Goal:** 将四象限等分布局重构为左对话+右双栏布局,对话面板占满左半屏。 + +**Requirements:** R1, R2, R4 + +**Dependencies:** None + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/AgentLayout.vue` — 重构 SplitPane 嵌套 +- `src/agentkit/server/frontend/src/router/index.ts` — 移除 terminal 路由,调整 quadrant 元数据 +- `src/agentkit/server/frontend/src/styles/responsive.css` — 调整断点 + +**Approach:** + +1. 移除左侧垂直 SplitPane,ChatView 直接作为水平 SplitPane 的 `#first` slot +2. 保留右侧垂直 SplitPane(右上:代码/工作流/知识库,右下:监控/技能/设置) +3. 水平 SplitPane 默认比例改为 0.55(55:45) +4. 移除 `agent-terminal` 路由定义 +5. 调整 responsive.css:≥1280px 完整展示,1024-1280px 右下面板默认折叠,<1024px 提示。**注意:** 当前 responsive.css 的选择器基于四象限布局结构(如 `.split-pane--horizontal > .split-pane__second .split-pane--vertical > .split-pane__second .quadrant-panel`),重构后这些选择器完全失效,必须根据新的两层 SplitPane 结构重写所有象限相关选择器 + +**Patterns to follow:** 现有 SplitPane 嵌套模式;QuadrantPanel 的 Tab 配置模式;localStorage 持久化 key 命名 `agent-*` + +**Test scenarios:** +- 布局渲染为左对话+右双栏,ChatView 占满左半屏高度 +- 左右分割线可拖拽,默认 55:45,范围 20%-80% +- 右侧上下分割线可拖拽,默认 60:40 +- 分割比例保存到 localStorage,刷新后恢复 +- 右上面板折叠后仅显示 Tab 栏(约 38px) +- 右下面板折叠后仅显示 Tab 栏 +- 两个面板可同时折叠 +- 折叠/展开有 200ms ease 过渡动画 +- 屏幕宽度 <1024px 显示提示 +- 屏幕宽度 1024-1280px 右下面板默认折叠 +- terminal 路由不再存在 + +**Verification:** 手动测试布局在不同屏幕宽度下的表现;折叠/展开动画流畅;localStorage 持久化正常。 + +--- + +### U2. 侧边导航精简为图标模式 + +**Goal:** 将侧边导航精简为 32px 宽图标导航栏,点击图标切换右侧面板 Tab 并展开。 + +**Requirements:** R3 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/TopNav.vue` — 添加侧边导航切换按钮 +- `src/agentkit/server/frontend/src/components/layout/IconNav.vue` — 新建 32px 图标导航组件 +- `src/agentkit/server/frontend/src/components/layout/AgentLayout.vue` — 集成 IconNav + +**Approach:** + +1. 新建 `IconNav.vue`:32px 宽图标导航栏,只显示图标(对话、工作流、知识库、技能、监控、设置)。注意:现有 `SideNav.vue` 是遗留的 AppLayout 组件(240px 宽暗色侧边栏),不在 AgentLayout 中使用,不需要修改。 +2. 点击图标:调用对应 QuadrantPanel 的 `setActiveTab()` 并展开面板 +3. 当前激活图标高亮(使用 `--color-primary` Token) +4. TopNav 添加折叠/展开 SideNav 的按钮 +5. SideNav 状态保存到 localStorage + +**Patterns to follow:** QuadrantPanel 的 `setActiveTab()` 暴露方法;现有 SideNav 的导航项定义模式 + +**Test scenarios:** +- SideNav 宽度为 32px,只显示图标 +- 点击对话图标,ChatView 获得焦点 +- 点击工作流图标,右上面板切换到 workflow Tab 并展开 +- 点击监控图标,右下面板切换到 monitor Tab 并展开 +- 当前激活图标高亮 +- TopNav 按钮可折叠/展开 SideNav +- 折叠状态保存到 localStorage + +**Verification:** 手动测试图标导航与面板联动;折叠/展开正常。 + +--- + +### U3. 首步骤即渲染 + portal.py ReActEngine 复用 + +**Goal:** 前端接收到首个流式步骤即开始渲染;后端 portal.py 复用 ReActEngine 实例。 + +**Requirements:** R7 + +**Dependencies:** None + +**Files:** +- `src/agentkit/server/frontend/src/stores/chat.ts` — 确认流式渲染逻辑正确处理首个步骤 +- `src/agentkit/server/frontend/src/components/chat/ChatMessage.vue` — 确认流式内容渲染无闪烁 +- `src/agentkit/server/routes/portal.py` — ReActEngine 复用(对齐 chat.py 模式,覆盖 SSE + WS 两个路径) + +**Approach:** + +1. 前端:当前 `handleWsMessage` 的 `step` 事件在 `event_type === 'final_answer'` 时逐块累加 content,确认首个步骤到达即渲染。注意:后端当前按"步骤"粒度推送(thinking/tool_call/tool_result/final_answer),不是逐 Token 推送。"首 Token 即渲染"在此架构下实际含义是"首步骤即渲染"——`final_answer` 事件的 `data.output` 是文本块,到达即显示。 +2. 后端:portal.py 有两处创建 ReActEngine(SSE 路径约第 342 行,WS 路径约第 661 行),均需改为复用 agent 上已绑定的 `_react_engine`(对齐 chat.py 第 197 行的 `getattr(agent, "_react_engine", None)` 模式)。复用时调用 `react_engine.reset()` 重置内部状态。 +3. 注意 `agent_pool.py` 的 `create_agent_from_skill()` 已在 agent 上绑定 `agent._react_engine`,portal.py 应优先使用该实例。 + +**Patterns to follow:** chat.py 的 `getattr(agent, "_react_engine", None)` 复用模式 + +**Test scenarios:** +- 发送简单问候,首 Token 在 1 秒内渲染 +- 流式输出逐字显示,无整体延迟 +- ReActEngine 在同一会话中复用,不创建新实例 +- 会话结束后 ReActEngine 正确重置 +- token 事件和 final_answer 事件均触发前端渲染更新 + +**Verification:** 手动测试对话首 Token 延迟;检查 portal.py 日志确认 ReActEngine 复用。 + +--- + +### U4. 代码块语法高亮 + +**Goal:** 消息中的代码块自动识别语言并语法高亮,支持复制按钮。 + +**Requirements:** R8 + +**Dependencies:** None + +**Files:** +- `src/agentkit/server/frontend/src/components/chat/ChatMessage.vue` — 添加 highlight.js 插件 + 扩展 DOMPurify 白名单 +- `src/agentkit/server/frontend/src/styles/` — 代码高亮主题样式 +- `src/agentkit/server/frontend/package.json` — 添加 `highlight.js` 依赖 + +**Approach:** + +1. 安装 `highlight.js` 和 `markdown-it-highlightjs`(或手动配置 MarkdownIt 的 highlight 选项) +2. 在 ChatMessage 的 MarkdownIt 实例中配置 highlight 函数使用 highlight.js +3. 代码高亮主题使用 Catppuccin Mocha(与 tokens.css 中的代码主题一致) +4. 添加代码块复制按钮(点击复制代码内容到剪贴板,显示 Toast 反馈) +5. 代码块语言标签显示在右上角 +6. **扩展 DOMPurify 白名单**:当前 `ALLOWED_TAGS` 不包含 `code`、`pre`、`span`(highlight.js 生成的标签),需添加这些标签及 `class`、`data-language` 属性 + +**Patterns to follow:** 现有 MarkdownIt 配置模式;tokens.css 中的代码主题色(`--color-code-*`) + +**Test scenarios:** +- Python 代码块正确高亮(关键字、字符串、注释、函数名) +- JavaScript 代码块正确高亮 +- 未指定语言的代码块使用自动检测 +- 复制按钮点击后内容复制到剪贴板,显示 Toast +- 代码块语言标签正确显示 +- 流式输出时代码块逐步高亮(不闪烁) + +**Verification:** 手动测试不同语言代码块的渲染效果。 + +--- + +### U5. 工具调用可视化 + +**Goal:** 工具调用显示为可折叠的步骤卡片,展示工具名称、参数摘要、执行状态、结果预览。 + +**Requirements:** R9 + +**Dependencies:** U3 + +**Files:** +- `src/agentkit/server/frontend/src/components/chat/ChatMessage.vue` — 添加工具调用渲染逻辑 + 扩展 DOMPurify 白名单 +- `src/agentkit/server/frontend/src/components/chat/ToolCallCard.vue` — 新建工具调用卡片组件 + +**Approach:** + +1. 创建 `ToolCallCard.vue` 组件:可折叠卡片,显示工具名称(图标+名称)、参数摘要(截断显示)、执行状态(pending/running/completed/error)、结果预览(折叠时显示前 2 行) +2. 在 ChatMessage 中,检测 `step` 事件中的 `tool_call` 和 `tool_result` 事件类型,将配对的工具调用渲染为 ToolCallCard +3. 利用 chat store 中 `streamingSteps` 的数据,匹配工具调用和结果 +4. 折叠/展开动画使用现有 `transitions.css` 的 `collapse` 类 +5. **扩展 DOMPurify 白名单**:添加 `div`、`button`、`data-tool-call`、`data-tool-result` 等标签和属性,确保 ToolCallCard 的 HTML 不被过滤 + +**Patterns to follow:** 现有 `streamingSteps` 数据结构;transitions.css 的 collapse 动画;QuadrantPanel 的折叠模式 + +**Test scenarios:** +- 工具调用显示为卡片,包含工具名称和参数摘要 +- 执行中状态显示 loading 指示器 +- 完成后显示结果预览(前 2 行) +- 点击卡片展开查看完整参数和结果 +- 多个工具调用按顺序显示 +- 折叠/展开有平滑过渡动画 +- 错误状态的工具调用显示错误信息 + +**Verification:** 手动测试触发工具调用的对话,验证卡片渲染和交互。 + +--- + +### U6. 图片和文件预览 + +**Goal:** 消息中的图片内联显示缩略图,文件显示为可下载卡片。 + +**Requirements:** R10 + +**Dependencies:** U4 + +**Files:** +- `src/agentkit/server/frontend/src/components/chat/ChatMessage.vue` — 添加图片/文件渲染逻辑 + 扩展 DOMPurify 白名单 +- `src/agentkit/server/frontend/src/components/chat/FilePreview.vue` — 新建文件预览卡片组件 + +**Approach:** + +1. 创建 `FilePreview.vue` 组件:文件名+大小+类型图标+下载按钮 +2. 在 ChatMessage 的 MarkdownIt 渲染中,自定义 `image` 渲染规则:内联缩略图,点击放大 +3. 检测消息中的文件链接(URL 以常见文件扩展名结尾),渲染为 FilePreview 卡片 +4. 图片缩略图使用 CSS `object-fit: contain`,最大高度 200px +5. **扩展 DOMPurify 白名单**:添加 `img` 标签及 `src`、`alt`、`loading` 属性 + +**Patterns to follow:** 现有 MarkdownIt 自定义渲染器模式;tokens.css 的间距和圆角 Token + +**Test scenarios:** +- 消息中的图片 URL 显示为内联缩略图 +- 点击缩略图放大查看 +- 文件链接显示为卡片(文件名+大小+类型图标) +- 下载按钮点击触发文件下载 +- 非图片/文件链接正常渲染为超链接 + +**Verification:** 手动测试包含图片和文件链接的消息渲染。 + +--- + +### 迭代 2:专业感 + 精准度 + +--- + +### U7. 暗色主题 Token 定义与切换 + +**Goal:** 在浅色 Token 基础上新增暗色主题 Token 变体,支持一键切换。 + +**Requirements:** R11 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/styles/tokens.css` — 添加 `[data-theme="dark"]` 块 +- `src/agentkit/server/frontend/src/stores/theme.ts` — 新建主题 store +- `src/agentkit/server/frontend/src/styles/theme.ts` — 改造 `readToken()` 为可重复调用的函数,支持主题切换时重新生成 `themeConfig` +- `src/agentkit/server/frontend/src/components/layout/TopNav.vue` — 添加主题切换按钮 +- `src/agentkit/server/frontend/src/App.vue` — 监听主题变化,更新 `data-theme` 属性和 ConfigProvider + +**Approach:** + +1. 在 tokens.css 末尾添加 `[data-theme="dark"]` 选择器块,覆盖所有颜色变量(背景、前景、边框、品牌色、语义色、代码主题色) +2. 暗色配色方案:深色背景 `#1a1a2e` 系列、荧光强调色、终端原生感 +3. 创建 `stores/theme.ts`:`currentTheme` ref('light'|'dark'),`toggleTheme()` 方法,localStorage 持久化 +4. **改造 `styles/theme.ts`**:当前 `readToken()` 在模块加载时一次性执行,生成静态 `themeConfig`。切换暗色主题后 CSS 变量值变了,但 `themeConfig` 不会重新计算。需将 `themeConfig` 改为响应式:导出 `getThemeConfig()` 函数,App.vue 监听 `currentTheme` 变化时重新调用生成新 config 并传给 ConfigProvider +5. App.vue 监听 `currentTheme` 变化,更新 `document.documentElement.dataset.theme` 和 ConfigProvider 的 `theme` prop +6. TopNav 添加太阳/月亮图标切换按钮 + +**Patterns to follow:** 现有 tokens.css 的变量命名模式;theme.ts 的 `readToken()` 运行时映射 + +**Test scenarios:** +- 点击切换按钮,界面从浅色切换到暗色 +- 所有组件在暗色主题下正常显示(文字可读、对比度足够) +- 代码块在暗色主题下使用 Catppuccin Mocha 配色 +- 主题偏好保存到 localStorage,刷新后恢复 +- 切换过渡平滑(CSS transition on color variables) + +**Verification:** 手动测试暗色主题下所有页面的显示效果。 + +--- + +### U8. 组件样式统一 + +**Goal:** 所有组件统一引用 Design Token,消除硬编码值。 + +**Requirements:** R12 + +**Dependencies:** U7 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/SideNav.vue` — 替换硬编码颜色 +- `src/agentkit/server/frontend/src/App.vue` — 替换 `!important` 全局覆盖为 Token 驱动 +- 各组件 scoped 样式中的硬编码值逐一替换 + +**Approach:** + +1. 全局搜索 `rgba(`、`#` 开头的硬编码颜色值(排除 tokens.css 本身) +2. 逐一替换为对应的 CSS 变量引用 +3. App.vue 中的 Ant Design 全局覆盖从 `!important` 改为通过 ConfigProvider token 注入 +4. 确保暗色主题下替换后的变量值正确 + +**Patterns to follow:** tokens.css 的变量命名;theme.ts 的 readToken() 映射 + +**Test scenarios:** +- 零硬编码颜色值(tokens.css 除外) +- 浅色和暗色主题下所有组件样式一致 +- Ant Design 组件通过 ConfigProvider token 驱动样式 +- 无 `!important` 覆盖(特殊情况除外) + +**Verification:** 代码搜索确认无硬编码颜色值;双主题视觉验证。 + +--- + +### U9. @-mention Autocomplete 前端 + +**Goal:** 对话输入框中输入 `@` 触发下拉选择器,支持四类引用,选中后显示为 ContextPill。 + +**Requirements:** R13, R15 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/chat/ChatInput.vue` — 添加 @-mention 触发和选择逻辑 +- `src/agentkit/server/frontend/src/components/chat/MentionDropdown.vue` — 新建下拉选择器组件 +- `src/agentkit/server/frontend/src/api/client.ts` — 添加 mention-suggest API 调用 +- `src/agentkit/server/frontend/src/api/types.ts` — 添加 MentionItem 类型定义 + 扩展 WsClientMessage 添加 `mentions` 字段 + +**Approach:** + +1. 定义 `MentionItem` 类型:`{type: 'file'|'skill'|'workflow'|'agent', id: string, label: string, icon?: string, description?: string}` +2. ChatInput 监听输入,检测 `@` 字符触发 MentionDropdown +3. MentionDropdown 调用 `/api/v1/portal/mention-suggest?q=keyword` 获取建议列表 +4. 选中后生成 ContextPill 添加到 `contextPills` 数组(复用现有 ContextPillData 接口,扩展 type/id 字段) +5. 发送消息时,将 mentions 数组附加到 WebSocket 消息 +6. **R15 覆盖**:ChatMessage 渲染时检测消息的 mentions 元数据,将 @引用渲染为可点击的标签/链接(点击跳转到对应面板或打开详情) + +**⚠ 前后端协议耦合**:U9 和 U10 必须在同一迭代内同步交付,否则 WebSocket 协议不兼容。 + +**Patterns to follow:** 现有 ContextPill 数据结构;Ant Design Vue 的 AutoComplete/Select 组件模式 + +**Test scenarios:** +- 输入 `@` 触发下拉选择器 +- 输入 `@文件名` 过滤显示匹配的知识库文档 +- 输入 `@技能名` 过滤显示匹配的技能 +- 输入 `@工作流名` 过滤显示匹配的工作流 +- 输入 `@Agent名` 过滤显示匹配的 Agent +- 选中引用项后显示为 ContextPill +- ContextPill 可点击删除 +- 发送消息时 mentions 数组正确附加 + +**Verification:** 手动测试四类 @-mention 的 autocomplete 和选择流程。 + +--- + +### U10. @-mention 后端上下文注入 + +**Goal:** 后端解析 @-mention 引用,将对应内容注入 Agent 推理上下文。 + +**Requirements:** R14 + +**Dependencies:** U9 + +**Files:** +- `src/agentkit/server/routes/portal.py` — 解析 mentions,注入上下文 +- `src/agentkit/server/routes/portal.py` — 新增 `/portal/mention-suggest` 端点 + +**Approach:** + +1. 新增 `GET /api/v1/portal/mention-suggest?q=keyword` 端点,聚合查询知识库文档、技能、工作流、Agent,返回 `MentionItem[]` +2. WebSocket 消息中解析 `mentions` 字段 +3. 根据 mention_type 和 id 查询对应内容: + - `file` → 从 KnowledgeBase 检索文档片段 + - `skill` → 从 SkillRegistry 获取技能描述和工具定义 + - `workflow` → 从 WorkflowStore 获取工作流定义 + - `agent` → 从 AgentPool 获取 Agent 配置 +4. 将引用内容作为结构化上下文注入 system_prompt 或 messages + +**Patterns to follow:** 现有 portal.py 的路由和 CostAwareRouter 模式;各 Registry 的查询 API + +**Test scenarios:** +- `/mention-suggest?q=test` 返回匹配的文件、技能、工作流、Agent +- @文件引用后,Agent 回复中引用了文档内容 +- @技能引用后,Agent 使用了指定技能 +- @工作流引用后,Agent 了解工作流定义 +- @Agent 引用后,Agent 了解目标 Agent 的能力 +- 多个 @-mention 同时使用,所有引用内容均注入 +- 无效引用(ID 不存在)优雅降级,不阻塞对话 + +**Verification:** 手动测试各类 @-mention 的上下文注入效果。 + +--- + +### U11. 过渡动画 + +**Goal:** 为所有交互添加过渡动画。 + +**Requirements:** R16 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/styles/transitions.css` — 确认/补充动画类 +- `src/agentkit/server/frontend/src/components/layout/QuadrantPanel.vue` — Tab 切换淡入淡出 +- `src/agentkit/server/frontend/src/components/layout/AgentLayout.vue` — 路由切换动画 +- 各列表渲染组件 — 交错渐入 + +**Approach:** + +1. 确认 transitions.css 中已有 fade、collapse、scale、stagger-list 类 +2. QuadrantPanel Tab 切换添加 `` 包裹 +3. AgentLayout 路由切换添加 `` +4. 列表项使用 `` +5. 所有时长引用 Design Token:`--transition-fast: 150ms`、`--transition-normal: 200ms` + +**Patterns to follow:** 现有 transitions.css 的动画类定义模式 + +**Test scenarios:** +- 面板折叠/展开有 200ms ease 过渡 +- Tab 切换有 150ms 淡入淡出 +- 列表项交错渐入(stagger 50ms) +- 路由切换有 200ms 淡入淡出 +- 动画不阻塞交互(使用 CSS transition 而非 JS 动画) + +**Verification:** 手动测试各交互动画效果。 + +--- + +### U12. 操作反馈 + +**Goal:** 为用户操作提供即时反馈。 + +**Requirements:** R17 + +**Dependencies:** U7 + +**Files:** +- `src/agentkit/server/frontend/src/components/common/ToastService.ts` — 新建 Toast 服务 +- `src/agentkit/server/frontend/src/components/chat/ChatInput.vue` — 按钮点击反馈 +- `src/agentkit/server/frontend/src/components/layout/TopNav.vue` — WebSocket 断连横幅 +- 各加载状态组件 — 骨架屏替代 a-spin + +**Approach:** + +1. 创建 ToastService:基于 Ant Design Vue 的 `message` 组件,封装 success/error/warning/info 方法 +2. 按钮点击添加 `:active` 缩放反馈(CSS `transform: scale(0.97)`) +3. 加载状态:关键区域使用骨架屏(复用 transitions.css 的 `skeleton-pulse` 动画) +4. WebSocket 断连:TopNav 下方显示红色横幅提示,重连后自动消失 + +**Patterns to follow:** Ant Design Vue message 组件;transitions.css 的 skeleton-pulse 动画 + +**Test scenarios:** +- 操作成功显示绿色 Toast +- 操作失败显示红色 Toast +- 按钮点击有缩放反馈 +- 加载状态显示骨架屏而非 Spin +- WebSocket 断连时顶部显示红色横幅 +- 重连后横幅自动消失 + +**Verification:** 手动测试各类操作反馈。 + +--- + +### U13. 空状态设计 + +**Goal:** 为所有空状态提供品牌化插图和引导文案。 + +**Requirements:** R18 + +**Dependencies:** U7 + +**Files:** +- `src/agentkit/server/frontend/src/components/common/EmptyState.vue` — 新建空状态组件 +- `src/agentkit/server/frontend/src/views/ChatView.vue` — 对话空状态 +- `src/agentkit/server/frontend/src/views/WorkflowView.vue` — 工作流空状态 +- `src/agentkit/server/frontend/src/views/EvolutionView.vue` — 监控空状态 +- `src/agentkit/server/frontend/src/views/KnowledgeBaseView.vue` — 知识库空状态 +- `src/agentkit/server/frontend/src/views/SkillsView.vue` — 技能空状态 + +**Approach:** + +1. 创建 EmptyState.vue 通用组件:接受 `title`、`description`、`icon`、`action` props +2. 各视图在数据为空时渲染 EmptyState,提供引导文案和操作按钮 +3. 图标使用 Ant Design Vue 的内置图标,配合品牌色 + +**Patterns to follow:** Ant Design Vue 的 `a-empty` 组件模式 + +**Test scenarios:** +- 对话空状态显示"开始你的第一次对话"引导 +- 工作流空状态显示"创建第一个工作流"引导 +- 监控空状态显示数据来源说明 +- 知识库空状态显示"上传文档或配置信息源"引导 +- 技能空状态显示"注册技能"引导 +- 空状态组件在暗色主题下正常显示 + +**Verification:** 手动测试各视图的空状态显示。 + +--- + +### 迭代 3:能力扩展 + +--- + +### U14. Computer Use MVP 后端(pyautogui + screencapture) + +**Goal:** 实现本地截屏和点击操作的后端闭环。 + +**Requirements:** R19, R20 + +**Dependencies:** None + +**Files:** +- `src/agentkit/tools/computer_use_session.py` — 新增 `LocalComputerUseSession` 类 +- `src/agentkit/tools/computer_use.py` — 确保工具注册和降级链正确 + +**Approach:** + +1. 创建 `LocalComputerUseSession` 类,实现 `start()`、`stop()`、`screenshot()`、`execute_action()` 方法 +2. `screenshot()` 实现:macOS 使用 `screencapture -x -t png ` 命令截屏,读取文件返回 base64;Linux 使用 `scrot` 或 `xdg-screenshot` +3. `execute_action()` 实现:使用 `pyautogui` 库执行点击(`pyautogui.click(x, y)`)、输入(`pyautogui.typewrite()`)、滚动等操作 +4. 注册到 `ComputerUseSessionManager`,作为默认会话类型(替代 Docker stub) +5. 确保降级链正确:Anthropic API → LocalComputerUseSession → Shell 替代建议 +6. 添加 `pyautogui` 到项目依赖(`pyproject.toml`) + +**Patterns to follow:** 现有 `InMemoryComputerUseSession` 的接口模式;ToolRegistry 注册模式 + +**Test scenarios:** +- OpenCLI 会话创建和销毁正常 +- 截屏返回有效的 base64 PNG 数据 +- 点击操作执行并返回结果 +- ComputerUseTool 的降级链正确工作 +- 会话管理器正确管理 OpenCLI 会话生命周期 + +**Verification:** 手动测试通过对话触发截屏和点击操作。 + +--- + +### U15. Computer Use 前端面板 + +**Goal:** 右上面板新增 Computer Use Tab,展示截屏画面和操作历史。 + +**Requirements:** R21 + +**Dependencies:** U14 + +**Files:** +- `src/agentkit/server/frontend/src/views/ComputerUseView.vue` — 替换占位页为实际界面 +- `src/agentkit/server/frontend/src/components/layout/AgentLayout.vue` — 右上面板添加 Computer Use Tab +- `src/agentkit/server/frontend/src/router/index.ts` — 添加 Computer Use 路由 + +**Approach:** + +1. 重写 ComputerUseView.vue:截屏画面显示区域(支持缩放和滚动)、操作历史列表、手动截屏按钮 +2. 截屏画面通过 WebSocket 接收 base64 图片数据,渲染为 `` 标签 +3. 操作历史显示时间戳、操作类型、坐标/参数、结果摘要 +4. 手动截屏按钮触发后端截屏命令 +5. 右上面板 QuadrantPanel 添加 Computer Use Tab + +**Patterns to follow:** 现有 QuadrantPanel Tab 配置模式;WebSocket 消息处理模式 + +**Test scenarios:** +- Computer Use Tab 在右上面板显示 +- 截屏画面正确渲染 +- 截屏画面支持缩放和滚动 +- 操作历史按时间倒序显示 +- 手动截屏按钮触发截屏 +- 暗色主题下正常显示 + +**Verification:** 手动测试 Computer Use 面板的截屏显示和操作历史。 + +--- + +### U16. 分割线拖拽增强 + +**Goal:** 拖拽分割线时高亮显示,显示当前比例百分比。 + +**Requirements:** R24 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/SplitPane.vue` — 添加拖拽高亮和比例显示 + +**Approach:** + +1. 拖拽时 handle 元素添加高亮样式(加宽 + 品牌色背景) +2. 拖拽时显示比例百分比标签(如 "55%"),定位在 handle 旁边 +3. 使用 CSS transition 确保高亮和标签的显示/隐藏平滑 + +**Patterns to follow:** 现有 SplitPane 的拖拽逻辑和 handle 样式 + +**Test scenarios:** +- 拖拽时分割线高亮 +- 拖拽时显示当前比例百分比 +- 百分比标签定位正确不遮挡内容 +- 拖拽结束后高亮和标签消失 + +**Verification:** 手动测试拖拽交互。 + +--- + +### U17. 面板折叠缩略预览 + +**Goal:** 面板折叠时显示缩略内容预览。 + +**Requirements:** R25 + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/server/frontend/src/components/layout/QuadrantPanel.vue` — 折叠时显示缩略预览 + +**Approach:** + +1. 折叠状态下,在 Tab 栏下方显示约 60px 高的缩略预览区域 +2. 预览内容根据当前活跃 Tab 类型显示:监控显示关键指标数字、技能显示技能数量、工作流显示节点缩略图 +3. 预览区域使用半透明背景,不占用过多空间 + +**Patterns to follow:** QuadrantPanel 的折叠模式;Design Token 的间距和圆角 + +**Test scenarios:** +- 右上面板折叠后显示缩略预览 +- 右下面板折叠后显示缩略预览 +- 预览内容根据活跃 Tab 更新 +- 预览区域不遮挡 Tab 栏 +- 暗色主题下预览区域正常显示 + +**Verification:** 手动测试折叠预览效果。 + +--- + +## Scope Boundaries + +**在范围内:** 见需求文档的 Scope Boundaries。 + +**延迟到后续迭代:** +- Cmd+K 内联编辑 +- Computer Use Docker 容器化隔离 +- 代码 Diff 查看器实现 +- 代码 Diff Accept/Reject 回滚 +- 响应式移动端适配 +- httpx 连接池配置优化(U5 已实现,无需额外工作) +- A/B 测试框架和性能基准 CI +- Ant Design Vue 按需引入(unplugin-vue-components) +- ECharts 按需引入 + +**不在本产品身份内:** +- 多用户协作/实时协同编辑 +- 插件市场 +- 代码编辑器 + +--- + +## Risks & Mitigations + +| Risk | Likelihood | Impact | Mitigation | +|------|-----------|--------|------------| +| @-mention 后端查询聚合性能差 | Medium | Medium — 慢速 autocomplete 影响体验 | mention-suggest 端点添加缓存(TTL 30s),结果集限制 20 条 | +| 本地截屏兼容性问题 | Medium | High — 不同 OS 环境截屏命令不同 | 检测 OS 类型选择对应命令,添加 fallback 到 InMemory 模式 | +| 暗色主题对比度不足 | Low | Medium — 部分组件在暗色下不可读 | 使用 WCAG AA 标准验证对比度,添加自动化对比度检查 | +| 消息格式增强破坏现有渲染 | Low | High — 已有消息显示异常 | MarkdownIt 插件添加 fallback,解析失败时回退到纯文本;DOMPurify 白名单扩展需谨慎测试 | +| 布局重构影响现有路由和状态 | Medium | Medium — localStorage 旧 key 导致异常 | 添加 key 版本化,旧 key 自动迁移或清理 | +| DOMPurify 白名单扩展引入 XSS | Low | High — 恶意内容可能注入 | 仅添加必要的标签和属性,不开放 `on*` 事件属性,`img` 的 `src` 限制为相对路径和已知域名 | +| Ant Design token 不跟随暗色切换 | Medium | Medium — 组件颜色不一致 | 改造 theme.ts 为响应式,切换时重新生成 themeConfig | +| 与 001 计划的 U-unit 重叠 | High | High — 并行执行产生合并冲突 | 003 吸收 001 的重叠 U-unit,001 标注为"由 003 覆盖",不并行执行 | + +--- + +## System-Wide Impact + +- **前端布局:** AgentLayout 从三层 SplitPane 改为两层,所有依赖象限位置的路由和状态需调整 +- **前端样式:** 暗色主题影响所有组件,需全面测试 +- **WebSocket 协议:** @-mention 扩展了 `WsClientMessage` 的 `mentions` 字段,需前后端同步升级 +- **后端路由:** 新增 `/portal/mention-suggest` 端点,portal.py 需解析 mentions +- **工具系统:** 新增 OpenCLIComputerUseSession,ComputerUseTool 降级链调整 +- **响应速度:** portal.py 的 ReActEngine 复用减少实例创建开销 + +--- + +## Outstanding Questions + +**Deferred to Implementation:** +- @-mention 后端解析的具体协议细节:mentions 字段在 WebSocket 消息中的 JSON 结构 +- 工具调用步骤卡片的折叠/展开交互细节:默认折叠还是展开 +- 骨架屏的具体形状和占位内容 +- 暗色主题的具体色值需要视觉调优 +- R22/R23 对 portal.py 路径无效的决策:portal.py 使用自己的 ConversationStore(内存 dict),不使用 SessionManager,异步写入和并行工具执行对 portal 路径无影响。是否需要迁移 portal.py 到 SessionManager? + +**Plan Relationship:** +- 本计划(003)吸收了 001 计划(GUI 产品化)的所有重叠 U-unit(布局重构、暗色主题、交互增强),001 计划应标注为"由 003 覆盖",避免并行执行产生合并冲突 + +--- + +## Sources & Research + +- 需求文档:`docs/brainstorms/2026-06-13-agentkit-platform-experience-upgrade-requirements.md` +- 响应速度优化计划(U1-U4 已实现):`docs/plans/2026-06-12-021-feat-chat-response-speed-optimization-plan.md` +- GUI 产品化计划(前一轮):`docs/plans/2026-06-13-001-feat-gui-productization-plan.md` +- 前端产品化计划:`docs/plans/2026-06-12-023-feat-frontend-productization-plan.md` +- 现有 Design Token 体系:`src/agentkit/server/frontend/src/styles/tokens.css` +- 现有 WebSocket 协议:`src/agentkit/server/frontend/src/api/types.ts` +- 现有 Computer Use 工具:`src/agentkit/tools/computer_use.py`、`src/agentkit/tools/computer_use_session.py` diff --git a/docs/plans/2026-06-14-001-feat-p0-production-hardening-plan.md b/docs/plans/2026-06-14-001-feat-p0-production-hardening-plan.md new file mode 100644 index 0000000..6039087 --- /dev/null +++ b/docs/plans/2026-06-14-001-feat-p0-production-hardening-plan.md @@ -0,0 +1,498 @@ +--- +title: "feat: P0 Production Hardening — LLM Cache, Semantic Routing, State Persistence" +status: active +created_at: 2026-06-14 +type: feat +origin: "行业调研与项目审视(2026-06-14)" +depth: deep +--- + +# P0 Production Hardening — LLM Cache, Semantic Routing, State Persistence + +## Summary + +Three P0 gaps identified from industry benchmarking and project audit: (1) LLM response caching to reduce 30-50% token cost, (2) embedding-based semantic routing to improve intent matching quality at zero LLM cost, (3) critical state persistence for UsageTracker, EvolutionStore, and CascadeDetector to survive restarts and enable multi-instance deployment. Each unit requires detailed architecture design and code reasoning before implementation — design-first, code-second. + +## Problem Frame + +AgentKit has strong differentiation in self-evolution, quality management, and multi-paradigm engines, but three production-critical gaps prevent enterprise deployment: + +1. **Every LLM request hits the provider** — no caching. Identical or similar requests waste tokens and money. Competitors like Dify have built-in caching. +2. **Routing relies on keyword matching and LLM classification** — no semantic understanding. Embedding-based routing is industry standard (Agentic RAG trend) and AgentKit already has embedding infrastructure but doesn't use it for routing. +3. **Critical state lives in memory** — UsageTracker, CascadeDetector, and EvolutionStore lose data on restart. Multi-instance deployment is impossible without shared state. + +These gaps are P0 because they directly impact cost (caching), quality (routing accuracy), and reliability (state persistence) — the three pillars of production readiness. + +--- + +## Requirements + +- R1. LLM cache must support exact-match (hash-based) and semantic-match (embedding-based) cache hits +- R2. LLM cache must integrate transparently into `LLMGateway.chat()` without changing the public API +- R3. LLM cache must record usage on cache hits (0 cost) to maintain usage tracking integrity +- R4. Semantic routing must insert between Layer 1 and Layer 2 in `CostAwareRouter` +- R5. Semantic routing must use existing `OpenAIEmbedder` and `compute_cosine_similarity()` infrastructure +- R6. Semantic routing must pre-compute skill embeddings at registration time, not at query time +- R7. UsageTracker must persist records to Redis with O(1) write and efficient aggregation +- R8. CascadeDetector must persist state to Redis using atomic INCR operations +- R9. EvolutionStore must support both PostgreSQL and SQLite backends with a unified interface +- R10. All three features must degrade gracefully when Redis/PG is unavailable (fallback to in-memory) +- R11. Each unit must have detailed architecture design and code reasoning documented before implementation begins + +--- + +## Key Technical Decisions + +- **KTD-1. Cache key design**: Use `SHA256(model + system_prompt_hash + messages_content_hash + temperature + tools_hash)` for exact match. For semantic match, embed the last user message and compare against cached embeddings using cosine similarity > threshold. Rationale: exact match is fast and deterministic; semantic match catches paraphrased requests. Both are needed because exact match alone misses too many hits, and semantic match alone is too slow for every request. + +- **KTD-2. Cache storage backend**: Implement `LLMCache` as a Protocol with `InMemoryLLMCache` and `RedisLLMCache` backends. In-memory uses `OrderedDict` with LRU eviction (following `EmbeddingCache` pattern). Redis uses `agentkit:llm_cache:{hash}` keys with TTL. Rationale: follows existing factory pattern (`create_message_bus`, `create_session_store`); in-memory for dev/single-instance, Redis for production. + +- **KTD-3. Semantic routing insertion point**: Insert as Layer 1.5 between `HeuristicClassifier` and `_classify_merged()`. When Layer 1 returns medium complexity (0.3-0.7), try semantic routing first. If similarity > 0.85, return skill match directly (skip LLM). If similarity 0.6-0.85, pass skill hint to Layer 2 LLM (reduces LLM classification tokens). If < 0.6, proceed to Layer 2 unchanged. Rationale: this placement maximizes cost savings by avoiding LLM calls when semantic match is confident, while preserving the existing fallback chain. + +- **KTD-4. Skill embedding source text**: Embed `f"{skill.description} | {' '.join(skill.intent.keywords)} | {' '.join(cap.tag for cap in skill.capabilities)}"` for each skill. Cache embeddings in a dict keyed by skill name, re-embed on skill registration/update. Rationale: combines all semantic signals; description alone misses keyword intent; keywords alone misses semantic meaning. + +- **KTD-5. UsageTracker persistence strategy**: Use Redis Hash for time-series data. Key pattern: `agentkit:usage:{date}` with fields `{agent}:{model}` → JSON `{tokens, cost, latency_ms, count}`. Write via `HINCRBYFLOAT` for atomic increment. Query via `HGETALL` + client-side aggregation. Rationale: O(1) write, acceptable query performance, natural TTL by date, follows Redis patterns in project. + +- **KTD-6. CascadeDetector persistence strategy**: Use Redis atomic operations. Key pattern: `agentkit:cascade:{session_id}:interactions` (INCR + TTL) and `agentkit:cascade:{session_id}:depth` (SET/GET + TTL). Rationale: INCR is atomic, no race conditions across instances; TTL prevents memory leaks; matches session lifecycle. + +- **KTD-7. EvolutionStore interface unification**: Extend the base `EvolutionStore` Protocol to include `skill_version` and `ab_test` methods. Make `PersistentEvolutionStore` (SQLite) implement the unified Protocol. Add a new `PostgreSQLEvolutionStore` that uses async SQLAlchemy like the existing `EvolutionStore` but with the full unified interface. Rationale: current split (sync SQLite vs async PG) creates maintenance burden; unified Protocol enables backend-agnostic usage. + +- **KTD-8. Graceful degradation pattern**: All three features use the same pattern — try preferred backend, catch connection error, log warning, fall back to in-memory. Controlled by `cache.backend`, `usage_store.backend`, `cascade_store.backend` config values (`"auto"` | `"redis"` | `"memory"`). `"auto"` tries Redis, falls back to memory. Rationale: production needs persistence, but dev/testing shouldn't require Redis. + +--- + +## High-Level Technical Design + +### LLM Cache Flow + +```mermaid +flowchart TB + A[LLMGateway.chat] --> B{Cache enabled?} + B -->|no| F[Call Provider] + B -->|yes| C[Generate exact key] + C --> D{Exact match?} + D -->|hit| E[Return cached response] + D -->|miss| G[Generate embedding of last user msg] + G --> H{Semantic match? similarity > 0.92} + H -->|hit| E + H -->|miss| F + F --> I[Write to cache] + I --> J[Record usage] + E --> K[Record usage with 0 cost] +``` + +### Semantic Routing Flow + +```mermaid +flowchart TB + A[CostAwareRouter.route] --> B[Layer 0: Regex rules] + B -->|matched| Z[Return DIRECT_CHAT] + B -->|unmatched| C[Layer 1: HeuristicClassifier] + C -->|low complexity| Z + C -->|medium-high| D[Layer 1.5: Semantic Router NEW] + D -->|sim > 0.85| E[Return SKILL_REACT with matched skill] + D -->|sim 0.6-0.85| F[Pass skill_hint to Layer 2] + D -->|sim < 0.6| G[Layer 2: LLM classification] + F --> G + G --> H[Return routing result] +``` + +### State Persistence Architecture + +```mermaid +flowchart TB + subgraph "Current (In-Memory)" + UT1[UsageTracker dict] + CD1[CascadeDetector dict] + ES1[EvolutionStore SQLite] + end + subgraph "Target (Persistent)" + UT2[UsageStore Protocol] + CD2[CascadeStateStore Protocol] + ES2[UnifiedEvolutionStore Protocol] + UT2 -->|redis| R1[Redis Hash agentkit:usage:date] + UT2 -->|memory| M1[InMemoryUsageStore] + CD2 -->|redis| R2[Redis INCR agentkit:cascade:session] + CD2 -->|memory| M2[InMemoryCascadeStore] + ES2 -->|postgresql| P1[PG EvolutionEventModel + SkillVersionModel] + ES2 -->|sqlite| S1[PersistentEvolutionStore] + ES2 -->|memory| M3[InMemoryEvolutionStore] + end +``` + +--- + +## Scope Boundaries + +### In Scope + +- LLM response caching (exact + semantic match, in-memory + Redis backends) +- Semantic routing as Layer 1.5 in CostAwareRouter +- UsageTracker Redis persistence +- CascadeDetector Redis persistence +- EvolutionStore interface unification +- Configuration for all three features +- Architecture design documents for each unit before coding + +### Deferred for Follow-Up + +- Semantic cache using pgvector (current semantic match uses in-memory embedding comparison) +- Cache warming / pre-population strategies +- Routing cache (caching routing results for similar queries) +- Usage analytics dashboard (visualization of usage data) +- Multi-tenant resource quotas +- Rate limiting and concurrency control (P2) +- Distributed tracing visualization (P2) + +--- + +## Implementation Units + +### U1. LLM Cache Core + +**Goal:** Implement the `LLMCache` Protocol, `InMemoryLLMCache`, and `RedisLLMCache` with exact-match and semantic-match capabilities. + +**Dependencies:** None + +**Files:** +- `src/agentkit/llm/cache.py` (new) — `LLMCache` Protocol, `InMemoryLLMCache`, `RedisLLMCache`, `CacheResult`, `CacheKey` generation +- `src/agentkit/llm/cache_key.py` (new) — `generate_cache_key()`, `generate_messages_hash()`, `generate_system_prompt_hash()` +- `tests/unit/llm/test_cache.py` (new) — unit tests for cache backends + +**Approach:** + +Architecture design before coding: + +1. **CacheKey design reasoning**: The key must capture all inputs that affect LLM output. `model` determines which model responds. `system_prompt` sets behavior. `messages` carry the conversation. `temperature` affects randomness (only cache temperature=0 deterministically). `tools` affect tool_call availability. Hash each component independently so partial changes don't invalidate the entire key. + +2. **Exact match implementation**: SHA-256 hash of concatenated component hashes. Store as `agentkit:llm_cache:{sha256_hex}` in Redis with TTL. In-memory uses OrderedDict keyed by hash string. + +3. **Semantic match implementation**: For cache misses on exact match, embed the last user message using `OpenAIEmbedder`. Compare against cached embeddings using `compute_cosine_similarity()`. Store embeddings alongside cached responses. In-memory: linear scan of all cached embeddings. Redis: store embeddings in a separate key `agentkit:llm_cache_emb:{sha256_hex}`. + +4. **Cache write policy**: Only cache responses where `temperature == 0` (deterministic). For temperature > 0, only exact-match cache applies (no semantic match, since outputs are non-deterministic). + +5. **Cache invalidation**: TTL-based (configurable, default 3600s for exact, 86400s for semantic). Manual invalidation via `invalidate(pattern=None)` for admin operations. + +**Patterns to follow:** +- `EmbeddingCache` in `src/agentkit/memory/embedder.py` — LRU + TTL pattern +- `create_session_store()` factory in `src/agentkit/session/store.py` — backend factory pattern +- `RedisSessionStore._get_redis()` — lazy Redis initialization + +**Test scenarios:** +- Exact match: same messages + model → cache hit, returns identical response +- Exact miss: different messages → cache miss, calls provider, writes to cache +- Semantic match: paraphrased question (similarity > 0.92) → cache hit +- Semantic miss: unrelated question (similarity < 0.6) → cache miss +- Temperature > 0: only exact match attempted, no semantic match +- TTL expiry: cached entry expires after TTL, next request is a miss +- Redis unavailable: falls back to in-memory cache with warning log +- Cache with tool_calls: response containing tool_calls is cached correctly +- Concurrent access: two concurrent requests for same key don't cause double-write issues + +**Verification:** Unit tests pass; cache hit rate metric is observable; no change to `LLMGateway` public API. + +--- + +### U2. LLM Cache Integration + +**Goal:** Integrate `LLMCache` into `LLMGateway.chat()` transparently, with usage tracking on cache hits. + +**Dependencies:** U1 + +**Files:** +- `src/agentkit/llm/gateway.py` (modify) — inject cache check before provider call, cache write after provider response +- `src/agentkit/llm/config.py` (modify) — add `CacheConfig` to `LLMConfig` +- `src/agentkit/server/app.py` (modify) — pass cache config to `LLMGateway` +- `tests/unit/llm/test_gateway_cache.py` (new) — integration tests for cached gateway + +**Approach:** + +Architecture design before coding: + +1. **Insertion point reasoning**: Cache check must happen AFTER `LLMRequest` construction (line ~79 in gateway.py) but BEFORE provider call (line ~87). This ensures all request normalization (alias resolution, model fallback list) has completed. Cache write happens AFTER response validation but BEFORE usage tracking. + +2. **Cache hit usage tracking**: On cache hit, call `_usage_tracker.record()` with the original `usage` data from the cached response but with `cost=0` and `latency_ms` from cache lookup time. This preserves usage query integrity — `get_usage()` still shows all requests, just with zero cost for cached ones. + +3. **Stream handling**: `chat_stream()` is NOT cached in this iteration. Streaming requires collecting all chunks before caching, which adds latency and complexity. Document this as a known limitation. + +4. **Configuration integration**: Add `CacheConfig` dataclass with `enabled: bool = False`, `backend: str = "auto"`, `exact_ttl: int = 3600`, `semantic_ttl: int = 86400`, `similarity_threshold: float = 0.92`, `max_entries: int = 10000`. Nest under `LLMConfig.cache`. + +**Patterns to follow:** +- `LLMConfig` dataclass + `from_dict()` pattern for config +- `LLMGateway.__init__()` dependency injection pattern + +**Test scenarios:** +- Cache disabled: requests pass through to provider normally +- Cache enabled, first request: cache miss, provider called, response cached +- Cache enabled, second identical request: cache hit, provider NOT called +- Cache hit usage tracking: usage record has 0 cost, correct token counts +- Cache miss + fallback: primary model fails, fallback model response cached under fallback model key +- Config from YAML: `LLMConfig.from_dict({"cache": {"enabled": true}})` works correctly + +**Verification:** Integration tests pass; `LLMGateway.chat()` returns same `LLMResponse` shape whether cached or not; usage tracking includes cache hits. + +--- + +### U3. Semantic Router + +**Goal:** Implement embedding-based semantic routing as Layer 1.5 in `CostAwareRouter`, using existing `OpenAIEmbedder` and `compute_cosine_similarity()`. + +**Dependencies:** None (independent of U1/U2, uses existing embedding infrastructure) + +**Files:** +- `src/agentkit/chat/semantic_router.py` (new) — `SemanticRouter` class, `SkillEmbeddingIndex` +- `src/agentkit/chat/skill_routing.py` (modify) — integrate Layer 1.5 into `CostAwareRouter.route()` +- `tests/unit/chat/test_semantic_router.py` (new) — unit tests for semantic router + +**Approach:** + +Architecture design before coding: + +1. **SkillEmbeddingIndex design reasoning**: Pre-compute embeddings for all registered skills at initialization. Source text: `f"{description} | {' '.join(keywords)} | {' '.join(capability_tags)}"`. Store as `dict[str, tuple[list[float], str]]` (skill_name → (embedding, source_text)). On skill registration/update, re-embed only the changed skill. This avoids O(n) embedding computation per query. + +2. **Query-time flow**: Embed user query → compute cosine similarity against all skill embeddings → return top match if above threshold. This is O(n) in number of skills, but with <100 skills and 1536-dim vectors, this takes <5ms on CPU. No need for approximate nearest neighbor (ANN) index at this scale. + +3. **Threshold design**: Three zones: + - `similarity > 0.85`: HIGH confidence → return skill match directly, skip Layer 2 LLM + - `0.6 <= similarity <= 0.85`: MEDIUM confidence → pass skill hint to Layer 2, reducing LLM classification tokens + - `similarity < 0.6`: LOW confidence → no semantic signal, Layer 2 runs unmodified + +4. **Integration into CostAwareRouter**: Modify `route()` method. After Layer 1 (`_classify_merged()`), if complexity is medium (0.3-0.7), call `semantic_router.route(query)`. Based on confidence zone, either return directly or enhance the Layer 2 prompt with skill hint. + +5. **Embedding provider**: Use `OpenAIEmbedder` by default. Support `MockEmbedder` for testing. Embedder is injected via constructor, not created internally. + +**Patterns to follow:** +- `OpenAIEmbedder` + `EmbeddingCache` pattern for embedding computation +- `compute_cosine_similarity()` in `src/agentkit/utils/vector_math.py` +- `CostAwareRouter` constructor injection pattern + +**Test scenarios:** +- Exact skill match: query "生成一篇关于AI的文章" matches `content_generator` skill (sim > 0.85) +- Partial skill match: query "优化内容" matches `geo_optimizer` skill (sim 0.6-0.85), skill hint passed to LLM +- No skill match: query "今天天气怎么样" has sim < 0.6 for all skills, Layer 2 runs normally +- Skill registration: new skill added → embedding computed and indexed +- Skill update: skill description changed → embedding re-computed +- Empty skill registry: semantic router returns None gracefully +- Embedder failure: OpenAIEmbedder throws error → semantic router logs warning, returns None, Layer 2 runs normally +- Chinese query: "帮我写一篇文章" matches content_generator skill correctly + +**Verification:** Semantic router returns correct skill matches; Layer 2 LLM calls reduced by >50% for medium-complexity queries; no regression in routing accuracy. + +--- + +### U4. UsageStore Persistence + +**Goal:** Persist UsageTracker records to Redis, with in-memory fallback and efficient aggregation queries. + +**Dependencies:** None + +**Files:** +- `src/agentkit/llm/usage_store.py` (new) — `UsageStore` Protocol, `InMemoryUsageStore`, `RedisUsageStore` +- `src/agentkit/llm/providers/tracker.py` (modify) — delegate to `UsageStore` backend +- `tests/unit/llm/test_usage_store.py` (new) — unit tests for usage store backends + +**Approach:** + +Architecture design before coding: + +1. **Redis data model reasoning**: Use Redis Hash per date for time-partitioned storage. Key: `agentkit:usage:{YYYY-MM-DD}`, field: `{agent_name}:{model}`, value: JSON `{prompt_tokens, completion_tokens, total_tokens, cost, latency_ms, count}`. Write via pipeline: `HINCRBYFLOAT` for numeric fields + `HINCRBY` for count. This is O(1) per write, atomic, and naturally partitions by date. + +2. **Aggregation query design**: For `get_usage(agent=None, start=None, end=None)`: scan date keys in range via `HGETALL`, filter by agent/model in application code, aggregate in memory. For single-agent queries, use field prefix matching. This is O(days × agents) which is acceptable for dashboard queries. + +3. **UsageStore Protocol**: Define `record(agent, model, usage: UsageRecord) -> None`, `query(agent=None, model=None, start=None, end=None) -> list[UsageRecord]`, `get_summary(agent=None, start=None, end=None) -> UsageSummary`. Both sync and async versions (sync for backward compat, async for Redis). + +4. **Migration from UsageTracker**: `UsageTracker` becomes a thin wrapper that delegates to `UsageStore`. Existing `record()` and `get_usage()` APIs preserved. Internal `_records` list replaced by store backend. + +5. **TTL management**: Each date key gets TTL of 90 days (configurable). This prevents unbounded Redis memory growth while preserving 3 months of usage data. + +**Patterns to follow:** +- `SessionStore` Protocol in `src/agentkit/session/store.py` — Protocol definition pattern +- `RedisSessionStore._get_redis()` — lazy Redis initialization +- `create_session_store()` — factory function pattern +- `agentkit:usage:` key namespace convention + +**Test scenarios:** +- Record and query: record usage → query returns matching records +- Date partitioning: records on different dates stored in different keys +- Aggregation: multiple records for same agent/model aggregated correctly +- Agent filter: query with agent filter returns only that agent's records +- Date range filter: query with start/end returns only records in range +- TTL: date keys have correct TTL set +- Redis unavailable: falls back to in-memory store with warning +- Concurrent writes: two concurrent records for same agent/model don't lose data +- Empty query: query with no matching records returns empty list + +**Verification:** Usage data survives process restart; `get_usage()` returns same shape as before; Redis memory usage bounded by TTL. + +--- + +### U5. CascadeStateStore Persistence + +**Goal:** Persist CascadeDetector state to Redis using atomic operations, enabling multi-instance cascade detection. + +**Dependencies:** None + +**Files:** +- `src/agentkit/quality/cascade_store.py` (new) — `CascadeStateStore` Protocol, `InMemoryCascadeStore`, `RedisCascadeStore` +- `src/agentkit/quality/cascade_detector.py` (modify) — delegate to `CascadeStateStore` backend +- `tests/unit/quality/test_cascade_store.py` (new) — unit tests for cascade store backends + +**Approach:** + +Architecture design before coding: + +1. **Redis data model reasoning**: Use simple string keys with INCR for atomic counting. Key: `agentkit:cascade:{session_id}:interactions` (INCR + TTL), `agentkit:cascade:{session_id}:depth` (GET/SET + TTL). TTL aligned with session TTL (default 86400s). INCR is atomic — no race conditions across instances. + +2. **Protocol design**: `CascadeStateStore` with `increment_interactions(session_id) -> int`, `get_interactions(session_id) -> int`, `set_depth(session_id, depth) -> None`, `get_depth(session_id) -> int`, `reset(session_id) -> None`, `get_stats(session_id) -> CascadeStats`. + +3. **Integration into CascadeDetector**: Replace internal `_interaction_counts` and `_loop_depths` dicts with `CascadeStateStore` backend. All methods delegate to store. `CascadeDetector` becomes stateless — all state lives in the store. + +4. **Session TTL alignment**: When `increment_interactions()` is called, refresh the key TTL to match session TTL. This ensures state is cleaned up when sessions expire. + +**Patterns to follow:** +- Same Protocol + factory + fallback pattern as U4 +- Redis INCR atomic operation pattern +- `agentkit:cascade:` key namespace + +**Test scenarios:** +- Increment and get: increment interactions → get returns correct count +- Set and get depth: set depth → get returns correct depth +- Reset: reset session → interactions and depth both cleared +- TTL: keys have TTL set, expire after session timeout +- Multi-instance: two instances incrementing same session see consistent count +- Redis unavailable: falls back to in-memory store +- Session isolation: different sessions have independent state + +**Verification:** Cascade detection state survives process restart; multi-instance deployment detects cascades correctly; no false positives from state loss. + +--- + +### U6. EvolutionStore Interface Unification + +**Goal:** Unify `EvolutionStore` and `PersistentEvolutionStore` interfaces, add PostgreSQL backend with full feature set. + +**Dependencies:** None + +**Files:** +- `src/agentkit/evolution/evolution_store.py` (modify) — define unified `EvolutionStoreProtocol`, refactor existing stores +- `src/agentkit/evolution/models.py` (modify) — add `SkillVersionModel` and `ABTestResultModel` to async PG models +- `src/agentkit/evolution/pg_store.py` (new) — `PostgreSQLEvolutionStore` implementing unified Protocol with async SQLAlchemy +- `tests/unit/evolution/test_unified_store.py` (new) — tests for unified interface + +**Approach:** + +Architecture design before coding: + +1. **Protocol design reasoning**: Current `EvolutionStore` (async PG) has `record()`, `rollback()`, `list_events()`. `PersistentEvolutionStore` (sync SQLite) adds `record_skill_version()`, `list_skill_versions()`, `record_ab_test_result()`, `get_ab_test_results()`. The unified Protocol must include ALL methods from both. Each backend implements what it can; unsupported methods raise `NotImplementedError` with clear message. + +2. **PostgreSQL model migration**: Add `SkillVersionModel` and `ABTestResultModel` to `src/agentkit/evolution/models.py` using async SQLAlchemy (matching `EpisodeModel` pattern in memory/models.py). These models already exist for SQLite; the PG versions use the same schema but with async engine. + +3. **PostgreSQLEvolutionStore**: New class using async SQLAlchemy session (injected via constructor, same pattern as existing `EvolutionStore`). Implements all Protocol methods. Uses `run_in_executor` for any sync ORM operations if needed. + +4. **Factory update**: `create_evolution_store(backend="memory"|"sqlite"|"postgresql", ...)` returns the appropriate backend. `"postgresql"` creates `PostgreSQLEvolutionStore` with async engine. + +5. **Backward compatibility**: Existing `EvolutionStore` class is not removed — it becomes an internal implementation detail. The Protocol is the public interface. Code using `EvolutionStore` directly continues to work. + +**Patterns to follow:** +- `EpisodeModel` in `src/agentkit/memory/models.py` — async PG model pattern +- `create_evolution_store()` factory — extend with new backend +- `PersistentEvolutionStore._run_sync()` — sync/async bridge pattern + +**Test scenarios:** +- Protocol compliance: all backends implement all Protocol methods +- PG store: record event → list events returns recorded event +- PG store: record skill version → list versions returns version history +- PG store: record AB test result → get results returns test data +- SQLite store: existing functionality preserved after refactor +- Memory store: existing functionality preserved after refactor +- Factory: `create_evolution_store(backend="postgresql")` returns correct type +- PG unavailable: falls back to SQLite with warning + +**Verification:** All backends pass unified Protocol compliance test; existing evolution tests pass; PG store supports skill_version and ab_test operations. + +--- + +### U7. Configuration Integration and End-to-End Verification + +**Goal:** Wire all three features into the application configuration, add `agentkit.yaml` schema support, and verify end-to-end behavior. + +**Dependencies:** U1, U2, U3, U4, U5, U6 + +**Files:** +- `src/agentkit/server/app.py` (modify) — initialize cache, usage store, cascade store with config +- `src/agentkit/cli/main.py` (modify) — pass config to gateway and router +- `agentkit.yaml` (modify) — add cache, semantic_routing, usage_store, cascade_store config sections +- `tests/integration/test_p0_hardening.py` (new) — end-to-end integration tests + +**Approach:** + +1. **Configuration schema**: Add to `agentkit.yaml`: +```yaml +llm: + cache: + enabled: true + backend: "auto" # auto | redis | memory + exact_ttl: 3600 + semantic_ttl: 86400 + similarity_threshold: 0.92 + max_entries: 10000 + +routing: + semantic: + enabled: true + similarity_high: 0.85 # direct match threshold + similarity_low: 0.6 # hint threshold + +usage_store: + backend: "auto" # auto | redis | memory + ttl_days: 90 + +cascade_store: + backend: "auto" # auto | redis | memory + session_ttl: 86400 + +evolution_store: + backend: "auto" # auto | postgresql | sqlite | memory +``` + +2. **Application wiring**: In `app.py` lifespan, initialize all stores and inject into gateway/router. Follow existing pattern of creating components from config. + +3. **End-to-end verification**: Integration test that exercises the full flow: user query → semantic routing → LLM cache → usage tracking → cascade detection → evolution logging. + +**Test scenarios:** +- Full flow with Redis: all features use Redis backend, data persists across simulated restart +- Full flow without Redis: all features fall back to in-memory, no errors +- Config from YAML: `agentkit.yaml` parsed correctly, all features configured +- Cache + routing interaction: cached response for semantically routed query works correctly +- Usage tracking with cache: cached requests show 0 cost in usage summary +- Cascade detection across instances: simulated multi-instance scenario detects cascade correctly + +**Verification:** All integration tests pass; application starts with new config; features degrade gracefully when backends unavailable. + +--- + +## Risks & Mitigations + +| Risk | Impact | Likelihood | Mitigation | +|------|--------|-----------|------------| +| Semantic cache returns stale/wrong response | High — user gets incorrect answer | Medium — embedding similarity doesn't guarantee semantic equivalence | Default to temperature=0 only for semantic cache; configurable threshold; TTL expiry; admin invalidation API | +| Redis single point of failure | High — all persistence lost | Low — Redis is typically HA | Auto-fallback to in-memory; health check in doctor command; alert on fallback activation | +| Embedding API latency adds to routing time | Medium — slower routing for first query | Medium — embedding API ~100ms | Pre-compute skill embeddings; cache query embeddings; async embedding with timeout | +| UsageStore Redis memory growth | Medium — Redis OOM | Low — TTL + date partitioning bounds growth | 90-day TTL default; monitoring on Redis memory; configurable TTL | +| EvolutionStore interface unification breaks existing code | High — evolution system stops working | Low — Protocol is backward compatible | Keep existing classes as internal implementations; comprehensive test coverage before refactor | + +--- + +## Open Questions + +- Should semantic cache also cache streaming responses (requires chunk collection)? Deferred — current plan only caches non-streaming `chat()`. +- Should UsageStore support real-time streaming of usage data (e.g., via Redis Pub/Sub)? Deferred — current plan only supports query-based access. +- What is the optimal embedding model for Chinese+English mixed text? `text-embedding-3-small` is adequate but not optimal. Consider `bge-m3` or `multilingual-e5` as alternatives. Deferred to implementation-time benchmarking. + +--- + +## Sources & Research + +- Industry benchmarking: LangChain, Dify, CrewAI, Letta, AutoGen feature comparison (2025-2026) +- Project audit: 12 core files analyzed across memory, evolution, routing, quality, and LLM subsystems +- Existing patterns: `EmbeddingCache`, `RedisSessionStore`, `create_evolution_store()`, `SessionStore` Protocol diff --git a/docs/plans/2026-06-14-002-u1-llm-cache-architecture.md b/docs/plans/2026-06-14-002-u1-llm-cache-architecture.md new file mode 100644 index 0000000..630cd3e --- /dev/null +++ b/docs/plans/2026-06-14-002-u1-llm-cache-architecture.md @@ -0,0 +1,616 @@ +# U1 Architecture Design: LLM Cache Core + +> Status: APPROVED — Design reviewed, embedding model set to bge-m3 for Chinese-first +> Date: 2026-06-14 +> Unit: U1 of P0 Production Hardening Plan + +--- + +## 1. Design Goals + +1. **Transparent caching**: `LLMGateway.chat()` callers cannot distinguish cached vs. uncached responses +2. **Dual-match strategy**: Exact-match (hash) for deterministic hits + Semantic-match (embedding) for paraphrased hits +3. **Backend pluggability**: `InMemoryLLMCache` for dev, `RedisLLMCache` for production, via factory +4. **Chinese-first embedding**: Default embedding model optimized for Chinese+English mixed text, with configurable fallback + +--- + +## 2. Component Architecture + +``` +┌──────────────────────────────────────────────────────┐ +│ LLMGateway.chat() │ +│ │ +│ 1. Build LLMRequest │ +│ 2. ┌─ Cache Check ─────────────────────────────┐ │ +│ │ generate_cache_key(req) │ │ +│ │ cache.get(key) ──→ CacheResult │ │ +│ │ ├─ HIT (exact) → return cached response │ │ +│ │ └─ MISS → semantic_search(query_emb) │ │ +│ │ ├─ HIT (semantic) → return response │ │ +│ │ └─ MISS → call provider │ │ +│ └─────────────────────────────────────────────┘ │ +│ 3. Call provider → LLMResponse │ +│ 4. cache.put(key, response, query_embedding) │ +│ 5. Record usage │ +└──────────────────────────────────────────────────────┘ +``` + +### File Structure + +``` +src/agentkit/llm/ +├── cache.py # NEW: LLMCache Protocol + InMemoryLLMCache + RedisLLMCache + CacheResult +├── cache_key.py # NEW: generate_cache_key(), hash helpers +├── gateway.py # MODIFIED in U2: inject cache check +├── config.py # MODIFIED in U2: add CacheConfig +└── ... +``` + +--- + +## 3. Data Model Design + +### 3.1 CacheKey + +**Reasoning**: The cache key must capture ALL inputs that deterministically affect LLM output. Missing any component leads to false cache hits (wrong response returned). + +| Component | Why Included | Hash Method | +|-----------|-------------|-------------| +| `model` | Different models produce different outputs | UTF-8 encode → SHA-256 | +| `system_prompt` | Changes behavior fundamentally | SHA-256 of full text | +| `messages` | Core conversation context | SHA-256 of JSON-serialized messages | +| `temperature` | Affects randomness; only 0.0 is deterministic | Float string representation | +| `tools` | Available tools affect tool_call generation | SHA-256 of JSON-serialized tools list | +| `tool_choice` | "auto" vs "none" changes behavior | UTF-8 encode → SHA-256 | + +**Key formula**: +```python +key = SHA256( + SHA256(model) + + SHA256(system_prompt) + + SHA256(json(messages, sort_keys=True)) + + SHA256(str(temperature)) + + SHA256(json(tools, sort_keys=True)) + + SHA256(tool_choice) +) +``` + +**Design Decision — Why not include `max_tokens`?** +`max_tokens` is a truncation limit, not a semantic input. A response cached with `max_tokens=2000` is still valid when requested with `max_tokens=4000` (the response was simply shorter). However, the reverse is unsafe — a response generated with `max_tokens=4000` might be longer than a `max_tokens=2000` request expects. **Decision**: Include `max_tokens` in the key to be safe. The cost of a few extra cache misses is negligible compared to returning a response that violates the caller's token limit. + +**Revised key formula**: +```python +key = SHA256( + SHA256(model) + + SHA256(system_prompt) + + SHA256(json(messages, sort_keys=True)) + + SHA256(f"{temperature:.2f}") + + SHA256(json(tools, sort_keys=True)) + + SHA256(tool_choice) + + SHA256(str(max_tokens)) +) +``` + +### 3.2 CacheEntry + +```python +@dataclass +class CacheEntry: + """A cached LLM response with metadata.""" + response: LLMResponse # The cached response + query_embedding: list[float] # Embedding of last user message (for semantic match) + created_at: float # time.monotonic() when cached + hit_count: int # Number of cache hits +``` + +### 3.3 CacheResult + +```python +@dataclass +class CacheResult: + """Result of a cache lookup.""" + hit: bool # Whether a cache hit occurred + response: LLMResponse | None # The cached response (None on miss) + match_type: str # "exact" | "semantic" | "" (miss) +``` + +--- + +## 4. Protocol Design + +### 4.1 LLMCache Protocol + +```python +class LLMCache(Protocol): + """LLM response cache interface.""" + + async def get(self, key: str) -> CacheResult: + """Look up a cached response by exact key, then semantic search.""" + ... + + async def put(self, key: str, response: LLMResponse, query_embedding: list[float] | None = None) -> None: + """Store a response in the cache.""" + ... + + async def invalidate(self, pattern: str | None = None) -> int: + """Invalidate cache entries. If pattern is None, invalidate all. Returns count of invalidated entries.""" + ... + + async def stats(self) -> dict[str, int]: + """Return cache statistics: {total_entries, total_hits, total_misses}.""" + ... +``` + +**Reasoning for async Protocol**: All methods are async because `RedisLLMCache` uses `redis.asyncio`. Making the Protocol async ensures both backends share the same interface without sync/async bridging. + +**Why `get()` does both exact + semantic?** The caller (LLMGateway) shouldn't need to know about the two-tier lookup. It calls `cache.get(key)` and gets a `CacheResult` with `match_type` indicating how the hit occurred. This encapsulation keeps the integration point simple. + +### 4.2 Semantic Search Design + +**Critical Question**: Should semantic search be inside `get()` or a separate method? + +**Analysis**: +- **Option A**: `get(key)` does exact match first, then semantic search on miss. Single call, simple integration. +- **Option B**: Separate `semantic_search(embedding)` method. More flexible, but requires caller to manage two calls. + +**Decision**: Option A. The semantic search needs the `query_embedding`, which must be computed before calling `get()`. But embedding computation is expensive (~100ms). We don't want to compute embeddings on every cache miss — only when semantic caching is enabled and temperature == 0. + +**Revised design**: + +```python +class LLMCache(Protocol): + async def get(self, key: str) -> CacheResult: + """Exact-match lookup only.""" + ... + + async def semantic_search(self, query_embedding: list[float], threshold: float = 0.92) -> CacheResult: + """Semantic similarity search across all cached entries.""" + ... + + async def put(self, key: str, response: LLMResponse, query_embedding: list[float] | None = None) -> None: + """Store response with optional embedding for semantic matching.""" + ... +``` + +**Integration flow in LLMGateway (U2)**: +```python +# 1. Exact match +result = await cache.get(key) +if result.hit: + return result.response + +# 2. Semantic match (only for temperature == 0) +if request.temperature == 0 and query_embedding is not None: + result = await cache.semantic_search(query_embedding) + if result.hit: + return result.response + +# 3. Call provider +response = await provider.chat(request) +await cache.put(key, response, query_embedding) +``` + +This gives the gateway explicit control over when to attempt semantic search, avoiding unnecessary embedding computation. + +--- + +## 5. InMemoryLLMCache Implementation Design + +### 5.1 Data Structure + +```python +class InMemoryLLMCache: + def __init__(self, max_entries: int = 10000, exact_ttl: int = 3600, semantic_ttl: int = 86400, similarity_threshold: float = 0.92): + self._max_entries = max_entries + self._exact_ttl = exact_ttl + self._semantic_ttl = semantic_ttl + self._similarity_threshold = similarity_threshold + + # Exact cache: key → CacheEntry + self._cache: OrderedDict[str, CacheEntry] = OrderedDict() + + # Semantic index: key → query_embedding (parallel to _cache) + self._embeddings: dict[str, list[float]] = {} + + # Stats + self._hits = 0 + self._misses = 0 +``` + +### 5.2 Key Operations + +**`get(key)`**: +1. Look up `key` in `_cache` +2. If found and not expired (check `created_at + exact_ttl > now`): increment `hit_count`, move to end (LRU), return `CacheResult(hit=True, match_type="exact")` +3. If expired: delete from `_cache` and `_embeddings` +4. Return `CacheResult(hit=False)` + +**`semantic_search(query_embedding, threshold)`**: +1. If `_embeddings` is empty: return miss +2. For each `(key, emb)` in `_embeddings`: + a. Check if entry is still valid (`created_at + semantic_ttl > now`) + b. If expired: skip (lazy cleanup) + c. Compute `cosine_similarity(query_embedding, emb)` + d. Track best match +3. If best similarity >= threshold: return `CacheResult(hit=True, match_type="semantic")` +4. Return miss + +**Performance**: O(n) scan over all embeddings. With <10000 entries and 1536-dim vectors, this takes <10ms using numpy. Acceptable for now. If scale becomes an issue, switch to FAISS or pgvector (deferred). + +**`put(key, response, query_embedding)`**: +1. Create `CacheEntry(response, query_embedding or [], now, 0)` +2. If key exists: update, move to end +3. If new and at capacity: evict LRU (popitem(last=False)) +4. Store embedding in `_embeddings[key]` if provided + +**`invalidate(pattern)`**: +1. If pattern is None: clear all +2. If pattern: iterate keys, match against pattern, delete matching entries + +### 5.3 LRU Eviction Strategy + +Follow `EmbeddingCache` pattern: `OrderedDict` with `move_to_end()` on access, `popitem(last=False)` on eviction. This is O(1) for both access and eviction. + +**Why not size-based eviction?** LLM responses vary widely in size (100 bytes to 10KB). Entry-count-based eviction is simpler and more predictable. With `max_entries=10000` and average response ~1KB, memory usage is ~10MB — acceptable. + +--- + +## 6. RedisLLMCache Implementation Design + +### 6.1 Key Schema + +``` +agentkit:llm_cache:{sha256_hex} → JSON(CacheEntry) with TTL +agentkit:llm_cache_emb:{sha256_hex} → JSON(list[float]) with TTL +``` + +**Why two keys instead of one?** +- Semantic search needs to iterate all embeddings without downloading full response bodies +- Embedding keys are small (~12KB for 1536-dim float list) vs. response keys (variable, potentially large with tool_calls) +- Different TTLs: exact cache may have shorter TTL than semantic cache + +**Alternative considered**: Single key with embedded embedding. Rejected because `KEYS agentkit:llm_cache:*` + `GET` for each key to extract embedding would download all response bodies for semantic search, which is wasteful. + +### 6.2 Key Operations + +**`get(key)`**: +1. `GET agentkit:llm_cache:{key}` → deserialize CacheEntry +2. If found: `INCR agentkit:llm_cache_hits:{key}` (optional, for stats), return hit +3. Return miss + +**`semantic_search(query_embedding, threshold)`**: +1. `KEYS agentkit:llm_cache_emb:*` → get all embedding keys +2. `MGET` all embedding keys → deserialize embeddings +3. Compute cosine similarity for each +4. If best >= threshold: `GET agentkit:llm_cache:{best_key}` → return hit +5. Return miss + +**Performance concern**: `KEYS` is O(N) and blocks Redis. For production with >1000 cached entries, this is unacceptable. + +**Mitigation**: Use `SCAN` instead of `KEYS` for iteration. Store a Redis Set `agentkit:llm_cache_index` containing all active cache keys. On `put()`, `SADD agentkit:llm_cache_index {key}`. On `invalidate()`, `SREM`. For semantic search, `SMEMBERS agentkit:llm_cache_index` → `MGET` embeddings. + +**Revised key schema**: +``` +agentkit:llm_cache:{sha256_hex} → JSON(CacheEntry) with TTL +agentkit:llm_cache_emb:{sha256_hex} → JSON(list[float]) with TTL +agentkit:llm_cache_index → SET of active cache keys (no TTL, managed manually) +``` + +**`put(key, response, query_embedding)`**: +1. Pipeline: `SET agentkit:llm_cache:{key} → JSON(CacheEntry) EX exact_ttl` +2. If embedding provided: `SET agentkit:llm_cache_emb:{key} → JSON(embedding) EX semantic_ttl` +3. `SADD agentkit:llm_cache_index {key}` + +**`invalidate(pattern)`**: +1. If pattern is None: `SMEMBERS agentkit:llm_cache_index` → pipeline DEL all keys → DEL index +2. If pattern: `SMEMBERS` → filter by pattern → pipeline DEL matching keys → SREM from index + +### 6.3 Lazy Redis Initialization + +Follow `RedisSessionStore._get_redis()` pattern: + +```python +class RedisLLMCache: + def __init__(self, redis_url: str = "redis://localhost:6379", ...): + self._redis_url = redis_url + self._redis: aioredis.Redis | None = None + + async def _get_redis(self) -> aioredis.Redis: + if self._redis is None: + import redis.asyncio as aioredis + self._redis = aioredis.from_url(self._redis_url, decode_responses=True) + return self._redis +``` + +### 6.4 Connection Error Handling + +```python +async def get(self, key: str) -> CacheResult: + try: + redis = await self._get_redis() + data = await redis.get(f"agentkit:llm_cache:{key}") + ... + except (redis.ConnectionError, redis.TimeoutError) as e: + logger.warning(f"Redis cache unavailable, returning miss: {e}") + return CacheResult(hit=False) +``` + +**Design Decision**: On Redis failure, return cache miss (not error). The cache is a performance optimization, not a correctness requirement. Failing open is the correct behavior. + +--- + +## 7. Factory Function + +```python +def create_llm_cache( + backend: str = "auto", + redis_url: str = "redis://localhost:6379", + max_entries: int = 10000, + exact_ttl: int = 3600, + semantic_ttl: int = 86400, + similarity_threshold: float = 0.92, +) -> LLMCache: + """Create an LLM cache backend. + + Args: + backend: "auto" (try Redis, fallback to memory), "redis", "memory" + ... + """ + if backend in ("auto", "redis"): + try: + import redis.asyncio as aioredis + return RedisLLMCache(redis_url=redis_url, ...) + except ImportError: + logger.warning("redis package not available, falling back to in-memory cache") + return InMemoryLLMCache(...) + return InMemoryLLMCache(...) +``` + +**Follows existing pattern**: `create_session_store()`, `create_evolution_store()`. + +--- + +## 8. CacheKey Generation Design + +### 8.1 Module: `cache_key.py` + +```python +import hashlib +import json + +def generate_cache_key( + model: str, + messages: list[dict[str, str]], + temperature: float, + tools: list[dict] | None = None, + tool_choice: str = "auto", + max_tokens: int = 2000, + system_prompt: str | None = None, +) -> str: + """Generate a deterministic SHA-256 cache key from LLM request parameters.""" + components = [ + _hash_str(model), + _hash_str(system_prompt or _extract_system_prompt(messages)), + _hash_json(messages), + _hash_str(f"{temperature:.2f}"), + _hash_json(tools), + _hash_str(tool_choice), + _hash_str(str(max_tokens)), + ] + combined = "".join(components) + return hashlib.sha256(combined.encode()).hexdigest() + +def _extract_system_prompt(messages: list[dict]) -> str: + """Extract system prompt from messages list.""" + for msg in messages: + if msg.get("role") == "system": + return msg.get("content", "") + return "" + +def _hash_str(s: str) -> str: + return hashlib.sha256(s.encode()).hexdigest() + +def _hash_json(obj) -> str: + if obj is None: + return hashlib.sha256(b"null").hexdigest() + return hashlib.sha256(json.dumps(obj, sort_keys=True, ensure_ascii=False).encode()).hexdigest() +``` + +### 8.2 Why Separate `system_prompt` Parameter? + +The `messages` list already contains the system prompt. But in AgentKit, the system prompt is injected separately from the user's messages (via `MemoryStore.build_system_prompt()`). The gateway receives `messages` that already include the system prompt. So `system_prompt` is extracted from `messages[0]` when `role == "system"`. + +**No separate parameter needed** — `_extract_system_prompt()` handles extraction. This avoids requiring callers to pass system_prompt separately. + +--- + +## 9. Semantic Match: Temperature Gate + +**Rule**: Semantic matching is ONLY attempted when `temperature == 0.0`. + +**Reasoning**: +- At `temperature > 0`, LLM outputs are non-deterministic. Two semantically similar requests may produce different outputs. +- Caching a `temperature=0.7` response and returning it for a semantically similar query is misleading — the user expects randomness. +- At `temperature=0.0`, outputs are deterministic (within provider guarantees), so semantic matching is safe. + +**Implementation**: The gateway checks `temperature` before calling `semantic_search()`. The cache itself does not enforce this — it's a policy decision made by the caller. + +--- + +## 10. Serialization Design + +### 10.1 LLMResponse Serialization + +`LLMResponse` contains `content: str`, `model: str`, `usage: TokenUsage`, `tool_calls: list[ToolCall]`. + +**For InMemoryLLMCache**: No serialization needed — store Python objects directly. + +**For RedisLLMCache**: Serialize to JSON. + +```python +def _serialize_response(response: LLMResponse) -> dict: + return { + "content": response.content, + "model": response.model, + "usage": { + "prompt_tokens": response.usage.prompt_tokens, + "completion_tokens": response.usage.completion_tokens, + }, + "tool_calls": [ + {"id": tc.id, "name": tc.name, "arguments": tc.arguments} + for tc in response.tool_calls + ], + "latency_ms": response.latency_ms, + } + +def _deserialize_response(data: dict) -> LLMResponse: + return LLMResponse( + content=data["content"], + model=data["model"], + usage=TokenUsage(**data["usage"]), + tool_calls=[ToolCall(**tc) for tc in data.get("tool_calls", [])], + latency_ms=data.get("latency_ms", 0.0), + ) +``` + +### 10.2 Embedding Serialization + +Embeddings are `list[float]` with 1536 dimensions. JSON serialization produces ~12KB per embedding. + +**Alternative**: Binary serialization (struct.pack) would reduce to ~6KB but adds complexity. JSON is sufficient for now. + +--- + +## 11. Edge Cases & Failure Modes + +| Edge Case | Behavior | Rationale | +|-----------|----------|-----------| +| Response with `tool_calls` | Cached normally | Tool call responses are deterministic at temperature=0 | +| Empty response (`content=""`) | Cached normally | Empty responses are valid (e.g., tool-only responses) | +| Very large response (>100KB) | Cached, but counted as single entry | Size-based eviction deferred; entry-count is sufficient | +| Concurrent `put()` for same key | Last write wins | No data corruption risk; both writes are valid responses | +| Redis `SET` fails | Log warning, cache miss on next read | Fail open, never block LLM calls | +| Embedding API fails during `put()` | Store response without embedding | Exact-match still works; semantic match degraded | +| Embedding API fails during `semantic_search()` | Return cache miss | Don't block on embedding failures | +| `invalidate()` while `get()` in progress | Possible stale read | Acceptable for cache; eventual consistency | + +--- + +## 12. Test Strategy + +### 12.1 Unit Tests (`tests/unit/llm/test_cache.py`) + +Using `pytest` + `pytest-asyncio`: + +1. **test_exact_match_hit**: Same key → cache hit, `match_type="exact"` +2. **test_exact_match_miss**: Different key → cache miss +3. **test_semantic_match_hit**: Paraphrased query with similarity > 0.92 → hit, `match_type="semantic"` +4. **test_semantic_match_miss**: Unrelated query with similarity < 0.6 → miss +5. **test_semantic_match_boundary**: Similarity exactly at threshold → hit +6. **test_ttl_expiry_exact**: Entry expires after exact_ttl → miss +7. **test_ttl_expiry_semantic**: Entry expires after semantic_ttl → miss +8. **test_lru_eviction**: Add max_entries + 1 → oldest evicted +9. **test_invalidate_all**: `invalidate()` clears all entries +10. **test_invalidate_pattern**: `invalidate("prefix:*")` clears matching entries +11. **test_cache_stats**: `stats()` returns correct counts +12. **test_tool_calls_cached**: Response with tool_calls cached and restored correctly +13. **test_concurrent_puts**: Two concurrent puts for same key → no error +14. **test_redis_fallback**: Redis import fails → InMemoryLLMCache returned +15. **test_cache_key_deterministic**: Same inputs → same key +16. **test_cache_key_different_model**: Different model → different key +17. **test_cache_key_different_temperature**: Different temperature → different key + +### 12.2 Mock Embedder for Testing + +Use `MockEmbedder` from `src/agentkit/memory/embedder.py`. Since `MockEmbedder` generates deterministic embeddings based on text hash, semantically similar text will produce similar embeddings (same hash prefix → similar vector). This is sufficient for testing the similarity threshold logic. + +**Limitation**: `MockEmbedder` doesn't produce truly semantically meaningful embeddings. For testing semantic matching behavior, we'll manually construct embeddings with known cosine similarities. + +```python +def _make_embedding(base: list[float], noise: float = 0.0) -> list[float]: + """Create a unit vector with optional noise for similarity testing.""" + vec = [x + noise for x in base] + magnitude = sum(x**2 for x in vec) ** 0.5 + return [x / magnitude for x in vec] if magnitude > 0 else vec +``` + +--- + +## 13. Dependency Analysis + +### 13.1 Internal Dependencies + +| Dependency | Usage | Risk | +|-----------|-------|------| +| `agentkit.llm.protocol.LLMResponse` | Cache entry data type | Stable, no change needed | +| `agentkit.llm.protocol.TokenUsage` | Part of LLMResponse | Stable | +| `agentkit.llm.protocol.ToolCall` | Part of LLMResponse | Stable | +| `agentkit.memory.embedder.Embedder` | Embedding computation for semantic match | Injected, not imported directly | +| `agentkit.utils.vector_math.compute_cosine_similarity` | Similarity computation | Stable utility | + +### 13.2 External Dependencies + +| Dependency | Usage | Required? | +|-----------|-------|-----------| +| `redis.asyncio` | RedisLLMCache backend | Optional (only for "redis" backend) | +| `numpy` | Fast cosine similarity | Optional (pure-python fallback exists) | + +--- + +## 14. Implementation Sequence + +Within U1, the implementation order is: + +1. **`cache_key.py`** — No dependencies, pure functions, easy to test +2. **`cache.py`** — `CacheResult`, `CacheEntry`, `LLMCache` Protocol, `InMemoryLLMCache` +3. **`cache.py`** — `RedisLLMCache`, `create_llm_cache()` factory +4. **`test_cache.py`** — All unit tests + +This order allows incremental testing: cache_key tests first, then InMemoryLLMCache tests, then RedisLLMCache tests. + +--- + +## 15. Open Design Questions + +1. **Should `semantic_search()` return the best match or all matches above threshold?** + - **Current decision**: Best match only. The gateway needs one response, not a ranked list. If we need ranked results later, we can add a `search()` method. + +2. **Should the cache store the original `messages` alongside the response?** + - **Current decision**: No. The key already deterministically represents the messages. Storing them again wastes memory. If we need message-level debugging, we can add it later. + +3. **Should `RedisLLMCache` use Redis Hash instead of individual keys?** + - **Current decision**: Individual keys with SET index. Hash would allow `HGETALL` for all entries, but makes TTL per-entry impossible (Redis Hash fields don't support individual TTLs). Individual keys with a SET index is the standard pattern. + +4. **What embedding model to use for semantic cache?** + - **Decision**: Default to `bge-m3` (BAAI/bge-m3 via Xinference or TEI endpoint) for Chinese+English mixed text. `bge-m3` supports: + - Multi-lingual (102 languages, strong Chinese) + - Multi-granularity (dense + sparse + ColBERT) + - Multi-function (retrieval + classification + similarity) + - 1024-dim dense vectors (vs. 1536 for OpenAI) + - Fallback to `text-embedding-3-small` when only OpenAI API is available. + - The embedder is injected via constructor, so the model choice is a configuration concern, not a code concern. + - **Config example**: + ```yaml + llm: + cache: + embedding: + provider: "xinference" # "xinference" | "openai" | "local" + model: "bge-m3" # model name at provider + base_url: "http://localhost:9997/v1" + ``` + +--- + +## 16. Argumentation Summary + +| Design Choice | Alternatives Considered | Why This Choice | +|--------------|------------------------|----------------| +| SHA-256 hash key | UUID, MD5, composite string key | SHA-256 is collision-resistant, deterministic, fixed-length; MD5 has known collisions; UUID is non-deterministic | +| OrderedDict LRU | heapq, custom doubly-linked-list | OrderedDict is Python-idiomatic, O(1) access+eviction, matches EmbeddingCache pattern | +| Separate `get()` + `semantic_search()` | Combined `get()` with auto-semantic | Explicit control avoids unnecessary embedding computation; caller decides when to attempt semantic match | +| Redis SET index for semantic search | KEYS pattern scan, Redis Hash | KEYS blocks Redis; Hash doesn't support per-field TTL; SET index is standard pattern | +| Fail-open on Redis error | Raise exception, return None | Cache is optimization, not correctness; failing open ensures LLM calls always work | +| Temperature gate for semantic match | Always attempt semantic match | temperature>0 outputs are non-deterministic; semantic match would return misleading cached responses | +| JSON serialization for Redis | MessagePack, Pickle, Protobuf | JSON is human-readable, debuggable, no extra dependencies; sufficient for <10KB entries | +| bge-m3 default embedding | text-embedding-3-small, multilingual-e5 | bge-m3 is SOTA for Chinese+English mixed text; 1024-dim saves 33% memory vs OpenAI 1536-dim; OpenAI-compatible API via Xinference/TEI | diff --git a/docs/plans/2026-06-14-003-u2-llm-cache-integration.md b/docs/plans/2026-06-14-003-u2-llm-cache-integration.md new file mode 100644 index 0000000..96a8aca --- /dev/null +++ b/docs/plans/2026-06-14-003-u2-llm-cache-integration.md @@ -0,0 +1,271 @@ +# U2 Architecture Design: LLM Cache Integration + +> Status: APPROVED — Design follows U1 architecture, minimal integration surface +> Date: 2026-06-14 +> Unit: U2 of P0 Production Hardening Plan + +--- + +## 1. Design Goals + +1. **Transparent injection**: Cache check happens inside `LLMGateway.chat()` without changing the public API +2. **Usage tracking on cache hits**: Cached requests record 0 cost to maintain usage query integrity +3. **Opt-in by default**: Cache disabled unless explicitly configured +4. **Stream exclusion**: `chat_stream()` is NOT cached in this iteration + +--- + +## 2. Integration Point Analysis + +### Current `LLMGateway.chat()` flow (gateway.py:34-121): + +``` +1. _resolve_model_alias(model) → resolved_model +2. Check providers exist +3. Start telemetry span +4. _get_models_to_try(resolved_model) → models_to_try +5. For each model: + a. _resolve_model(model_name) → (provider, actual_model) + b. Build LLMRequest + c. provider.chat(req) → response + d. Break on success +6. Calculate cost +7. Record usage +8. Record telemetry +9. Return response +``` + +### Cache insertion points: + +**Cache CHECK** (before step 5): After `LLMRequest` is constructed, before provider call. +- Reason: All request normalization (alias resolution, model fallback list) has completed. +- The `resolved_model` and `actual_model` are known, so the cache key is deterministic. + +**Cache WRITE** (after step 5d): After successful response, before usage tracking. +- Reason: Response is validated (no exception thrown). Usage tracking needs to happen regardless of cache hit/miss. + +**Cache HIT usage tracking** (step 6-7): On cache hit, record usage with cost=0. + +--- + +## 3. Modified Flow + +```python +async def chat(self, messages, model, agent_name="", task_type="", tools=None, tool_choice="auto", **kwargs): + resolved_model = self._resolve_model_alias(model) + + # ... provider check, telemetry span setup ... + + # ── Cache check (NEW) ── + cache_key = None + query_embedding = None + if self._cache is not None: + from agentkit.llm.cache_key import generate_cache_key + cache_key = generate_cache_key( + model=resolved_model, + messages=messages, + temperature=kwargs.get("temperature", 0.7), + tools=tools, + tool_choice=tool_choice, + max_tokens=kwargs.get("max_tokens", 2000), + ) + result = await self._cache.get(cache_key) + if result.hit: + # Record usage with 0 cost + latency_ms = (time.monotonic() - start) * 1000 + self._usage_tracker.record( + agent_name=agent_name, + model=result.response.model, + usage=result.response.usage, + cost=0.0, + latency_ms=latency_ms, + ) + return result.response + + # Semantic match (only for temperature == 0) + temperature = kwargs.get("temperature", 0.7) + if temperature == 0 and self._embedder is not None: + try: + last_user_msg = next( + (m["content"] for m in reversed(messages) if m.get("role") == "user"), + "", + ) + if last_user_msg: + query_embedding = await self._embedder.embed(last_user_msg) + result = await self._cache.semantic_search(query_embedding) + if result.hit: + latency_ms = (time.monotonic() - start) * 1000 + self._usage_tracker.record( + agent_name=agent_name, + model=result.response.model, + usage=result.response.usage, + cost=0.0, + latency_ms=latency_ms, + ) + return result.response + except Exception as e: + logger.warning(f"Semantic cache search failed: {e}") + + # ── Normal provider call ── + for model_name in models_to_try: + # ... existing fallback loop ... + + # ── Cache write (NEW) ── + if self._cache is not None and cache_key is not None: + try: + await self._cache.put(cache_key, response, query_embedding) + except Exception as e: + logger.warning(f"Cache write failed: {e}") + + # ... existing usage tracking, telemetry ... + return response +``` + +--- + +## 4. CacheConfig Design + +```python +@dataclass +class CacheConfig: + """LLM Cache configuration.""" + enabled: bool = False + backend: str = "auto" # "auto" | "redis" | "memory" + redis_url: str = "redis://localhost:6379" + exact_ttl: int = 3600 + semantic_ttl: int = 86400 + similarity_threshold: float = 0.92 + max_entries: int = 10000 + # Embedding config for semantic cache + embedding_provider: str = "openai" # "openai" | "xinference" | "local" + embedding_model: str = "bge-m3" # model name at provider + embedding_base_url: str | None = None + embedding_api_key: str | None = None +``` + +**Nesting**: `CacheConfig` is nested under `LLMConfig.cache`. + +```python +@dataclass +class LLMConfig: + providers: dict[str, ProviderConfig] = field(default_factory=dict) + model_aliases: dict[str, str] = field(default_factory=dict) + fallbacks: dict[str, list[str]] = field(default_factory=dict) + cache: CacheConfig | None = None # NEW +``` + +--- + +## 5. LLMGateway Constructor Change + +```python +class LLMGateway: + def __init__(self, config: LLMConfig | None = None): + self._providers: dict[str, LLMProvider] = {} + self._usage_tracker = UsageTracker() + self._config = config or LLMConfig() + + # Cache (NEW) + self._cache: LLMCache | None = None + self._embedder: Embedder | None = None + if self._config.cache and self._config.cache.enabled: + from agentkit.llm.cache import create_llm_cache + self._cache = create_llm_cache( + backend=self._config.cache.backend, + redis_url=self._config.cache.redis_url, + max_entries=self._config.cache.max_entries, + exact_ttl=self._config.cache.exact_ttl, + semantic_ttl=self._config.cache.semantic_ttl, + similarity_threshold=self._config.cache.similarity_threshold, + ) + # Embedder for semantic cache + self._embedder = self._create_embedder(self._config.cache) +``` + +**Design Decision**: Cache and embedder are created in `__init__`, not lazily. This ensures configuration errors are caught at startup, not at first request. + +--- + +## 6. Embedder Factory Method + +```python +def _create_embedder(self, cache_config: CacheConfig) -> Embedder | None: + """Create embedder for semantic cache based on config.""" + try: + if cache_config.embedding_provider == "openai": + from agentkit.memory.embedder import OpenAIEmbedder + return OpenAIEmbedder( + api_key=cache_config.embedding_api_key, + model=cache_config.embedding_model, + base_url=cache_config.embedding_base_url, + ) + elif cache_config.embedding_provider in ("xinference", "local"): + # Xinference/TEI uses OpenAI-compatible API + from agentkit.memory.embedder import OpenAIEmbedder + return OpenAIEmbedder( + api_key=cache_config.embedding_api_key or "not-needed", + model=cache_config.embedding_model, + base_url=cache_config.embedding_base_url or "http://localhost:9997/v1", + ) + except Exception as e: + logger.warning(f"Failed to create embedder for semantic cache: {e}") + return None +``` + +**Design Decision**: Use `OpenAIEmbedder` for all providers since Xinference and TEI expose OpenAI-compatible `/embeddings` endpoints. No need for a separate XinferenceEmbedder class. + +--- + +## 7. Stream Handling + +`chat_stream()` is NOT cached in this iteration. Document as known limitation. + +**Reasoning**: +- Streaming requires collecting all chunks before caching, adding latency +- Chunk collection adds complexity (error handling mid-stream, partial responses) +- Most cacheable requests (temperature=0, simple queries) don't need streaming +- Streaming is typically used for long-form generation where caching is less beneficial + +--- + +## 8. Edge Cases + +| Edge Case | Behavior | +|-----------|----------| +| Cache disabled (default) | No cache check, no performance impact | +| Cache enabled, first request | Cache miss, provider called, response cached | +| Cache hit with tool_calls | Return cached response including tool_calls | +| Embedder fails during semantic search | Log warning, return miss, proceed to provider | +| Cache write fails | Log warning, response still returned to caller | +| Fallback model used | Cache key uses `resolved_model`, not `actual_model` — same query hits cache regardless of which fallback responded | + +**Fallback model cache key issue**: When model A fails and fallback model B responds, the cache key is based on `resolved_model` (the alias), not `actual_model` (B). This means a subsequent request for the same alias will get a cache hit even if model A is back online. This is **correct behavior** — the user asked for the alias, not a specific model. + +However, if the user explicitly specifies model B (not an alias), the cache key will be different. This is also correct — different model = different cache entry. + +--- + +## 9. Test Strategy + +### Integration Tests (`tests/unit/test_gateway_cache.py`) + +1. **test_cache_disabled**: Requests pass through to provider normally +2. **test_cache_enabled_first_request**: Cache miss, provider called, response cached +3. **test_cache_enabled_second_request**: Cache hit, provider NOT called +4. **test_cache_hit_usage_tracking**: Usage record has 0 cost, correct token counts +5. **test_cache_miss_fallback**: Primary model fails, fallback response cached +6. **test_config_from_dict**: `LLMConfig.from_dict({"cache": {"enabled": True}})` works +7. **test_semantic_cache_hit**: temperature=0, semantically similar query hits cache +8. **test_semantic_cache_skipped_for_nonzero_temp**: temperature>0 skips semantic search + +--- + +## 10. Argumentation Summary + +| Design Choice | Alternatives Considered | Why This Choice | +|--------------|------------------------|----------------| +| Cache check after LLMRequest construction | Before construction | Request normalization must complete first; key depends on resolved model | +| Cache write before usage tracking | After usage tracking | Response must be cached before tracking so cache-hit tracking uses same response | +| OpenAIEmbedder for all providers | Separate XinferenceEmbedder | Xinference/TEI use OpenAI-compatible API; no need for separate class | +| No stream caching | Collect chunks then cache | Adds latency and complexity; most cacheable requests don't need streaming | +| Cache key uses resolved_model alias | Uses actual_model | User requests alias, not specific model; cache should be model-agnostic within alias | diff --git a/docs/plans/2026-06-14-004-u3-semantic-router.md b/docs/plans/2026-06-14-004-u3-semantic-router.md new file mode 100644 index 0000000..bfbf27c --- /dev/null +++ b/docs/plans/2026-06-14-004-u3-semantic-router.md @@ -0,0 +1,235 @@ +# U3 Architecture Design: Semantic Router + +> Status: APPROVED — Design follows existing CostAwareRouter layer pattern +> Date: 2026-06-14 +> Unit: U3 of P0 Production Hardening Plan + +--- + +## 1. Design Goals + +1. **Zero LLM cost for confident matches**: When semantic similarity > 0.85, skip Layer 2 LLM classification entirely +2. **Reduce LLM tokens for medium matches**: When similarity 0.6-0.85, pass skill hint to Layer 2, reducing classification tokens +3. **Chinese-first**: Embedding model must handle Chinese+English mixed text well +4. **Pre-computed skill embeddings**: Compute at skill registration time, not query time +5. **Graceful degradation**: If embedder fails, fall through to existing Layer 1/2 flow + +--- + +## 2. Insertion Point Analysis + +### Current `CostAwareRouter.route()` flow: + +``` +Layer 0: Rule-based (zero cost) + → explicit_skill / greeting / chat_mode / identity → return + +Layer 1: Complexity classification + → low (<0.3) → DIRECT_CHAT → return + → medium (0.3-0.7) → _classify_merged() or IntentRouter → return + → high (>0.7) → Layer 2 + +Layer 2: Capability matching / Auction + → return +``` + +### Semantic Router insertion: **Between Layer 1 complexity classification and the medium/high branching** + +``` +Layer 1: Complexity classification → complexity score + + → low (<0.3) → DIRECT_CHAT → return + + → medium (0.3-0.7): + ┌─ Layer 1.5: Semantic Router (NEW) ─────────────┐ + │ embed query → compare with skill embeddings │ + │ sim > 0.85 → SKILL_REACT with matched skill │ + │ sim 0.6-0.85 → pass skill_hint to _classify_merged │ + │ sim < 0.6 → proceed to _classify_merged normally │ + └──────────────────────────────────────────────────┘ + + → high (>0.7): + ┌─ Layer 1.5: Semantic Router (NEW) ─────────────┐ + │ sim > 0.85 → SKILL_REACT with matched skill │ + │ sim 0.6-0.85 → pass skill_hint to Layer 2 │ + │ sim < 0.6 → proceed to Layer 2 normally │ + └──────────────────────────────────────────────────┘ +``` + +**Why both medium AND high complexity?** The plan says "when Layer 1 returns medium complexity (0.3-0.7), try semantic routing first." But semantic routing is also valuable for high complexity — if we can confidently match a skill at zero cost, we should. The cost saving is even greater for high complexity (which would use more expensive Layer 2 LLM calls). + +--- + +## 3. Component Design + +### 3.1 SkillEmbeddingIndex + +```python +class SkillEmbeddingIndex: + """Pre-computed embedding index for registered skills.""" + + def __init__(self, embedder: Embedder): + self._embedder = embedder + self._index: dict[str, tuple[list[float], str]] = {} # skill_name → (embedding, source_text) + + async def build(self, skill_registry) -> None: + """Build index from all registered skills.""" + ... + + async def update_skill(self, skill_name: str, skill) -> None: + """Re-embed a single skill (on registration/update).""" + ... + + def remove_skill(self, skill_name: str) -> None: + """Remove a skill from the index.""" + ... + + async def search(self, query: str, top_k: int = 5) -> list[tuple[str, float]]: + """Search for skills matching the query. Returns [(skill_name, similarity)].""" + ... +``` + +### 3.2 SemanticRouter + +```python +class SemanticRouter: + """Embedding-based semantic routing as Layer 1.5.""" + + def __init__( + self, + embedder: Embedder, + similarity_high: float = 0.85, + similarity_low: float = 0.6, + ): + self._index = SkillEmbeddingIndex(embedder) + self._similarity_high = similarity_high + self._similarity_low = similarity_low + self._enabled = True + + async def route(self, query: str) -> SemanticRouteResult: + """Route a query using semantic similarity. + + Returns: + SemanticRouteResult with: + - confidence: "high" | "medium" | "low" + - skill_name: matched skill name (None if low confidence) + - similarity: cosine similarity score + """ + ... + +@dataclass +class SemanticRouteResult: + confidence: str # "high" | "medium" | "low" + skill_name: str | None + similarity: float +``` + +--- + +## 4. Skill Embedding Source Text + +**Design Decision**: What text to embed for each skill? + +```python +source_text = f"{skill.description} | {' '.join(skill.intent.keywords)} | {' '.join(cap.tag for cap in skill.capabilities)}" +``` + +**Why this combination?** +- `description`: Captures the semantic meaning of what the skill does +- `intent.keywords`: Captures the trigger phrases users might use +- `capability tags`: Captures the functional categories + +**Chinese consideration**: Skill descriptions and keywords are often in Chinese. The embedding model must handle this well. `bge-m3` is the default for this reason. + +--- + +## 5. Integration into CostAwareRouter + +### 5.1 Constructor Change + +```python +class CostAwareRouter: + def __init__(self, ..., semantic_router: SemanticRouter | None = None): + self._semantic_router = semantic_router + ... +``` + +### 5.2 Route Method Modification + +The key change is in `route()`, after Layer 1 complexity classification: + +```python +# After complexity is determined (medium or high) +if self._semantic_router is not None and complexity >= 0.3: + try: + semantic_result = await self._semantic_router.route(clean_content) + if semantic_result.confidence == "high": + # Direct skill match — skip Layer 2 + result = await resolve_skill_routing( + content=content, + skill_registry=skill_registry, + intent_router=intent_router, + ..., + force_skill=semantic_result.skill_name, # NEW parameter + ) + result.match_method = "semantic_high" + result.match_confidence = semantic_result.similarity + result.execution_mode = ExecutionMode.SKILL_REACT + return result + elif semantic_result.confidence == "medium": + # Pass skill hint to Layer 1.5 merged classify or Layer 2 + skill_hint = semantic_result.skill_name + except Exception as e: + logger.warning(f"Semantic routing failed, falling through: {e}") +``` + +### 5.3 Skill Hint Propagation + +For medium confidence matches, the skill hint is passed to `_classify_merged()` or `_route_layer2()` via a new `skill_hint` parameter. This reduces the LLM classification prompt by providing a strong signal. + +**Implementation**: Add `skill_hint: str | None = None` parameter to `_classify_merged()` and `_route_layer2()`. When provided, include it in the LLM prompt: "Based on semantic analysis, the query may relate to skill '{skill_hint}'. Please confirm or override." + +--- + +## 6. Embedding Caching + +Skill embeddings are pre-computed and cached in `SkillEmbeddingIndex`. Query embeddings are computed per-request but can be cached using the existing `EmbeddingCache` from `agentkit.memory.embedder`. + +**Design**: The `SemanticRouter` uses an `OpenAIEmbedder` with `EmbeddingCache` for query embeddings. Skill embeddings are stored in `SkillEmbeddingIndex` and only re-computed on skill registration/update. + +--- + +## 7. Edge Cases + +| Edge Case | Behavior | +|-----------|----------| +| No skills registered | `SkillEmbeddingIndex` is empty, `route()` returns low confidence | +| Embedder API fails | Catch exception, return low confidence, fall through to existing flow | +| Skill has no description | Use `skill.name` as fallback source text | +| Chinese query, English skill description | `bge-m3` handles cross-lingual matching | +| Multiple skills with similar embeddings | Return top match; if top_k > 1, could return alternatives (deferred) | +| Semantic router disabled (None) | Existing flow unchanged, zero overhead | + +--- + +## 8. Test Strategy + +1. **test_semantic_high_confidence**: Query matches skill with sim > 0.85 → SKILL_REACT returned +2. **test_semantic_medium_confidence**: Query matches skill with sim 0.6-0.85 → skill_hint passed +3. **test_semantic_low_confidence**: Query has sim < 0.6 → normal routing proceeds +4. **test_semantic_router_disabled**: No semantic_router → existing flow unchanged +5. **test_embedder_failure**: Embedder throws error → falls through gracefully +6. **test_skill_registration_updates_index**: New skill added → embedding computed +7. **test_chinese_query**: Chinese query matches Chinese skill description + +--- + +## 9. Argumentation Summary + +| Design Choice | Alternatives Considered | Why This Choice | +|--------------|------------------------|----------------| +| Layer 1.5 for both medium AND high | Only medium | High complexity benefits even more from zero-cost skill match | +| Pre-computed skill embeddings | Compute per query | O(n) embedding per query is ~100ms × n_skills; pre-compute is O(1) per query | +| bge-m3 default | text-embedding-3-small | Chinese+English mixed text; bge-m3 is SOTA for multilingual | +| Skill hint for medium confidence | Direct match for medium | Medium confidence isn't reliable enough for direct match; hint reduces LLM tokens without risking wrong routing | +| Separate SemanticRouter class | Inline in CostAwareRouter | Separation of concerns; testable independently; can be disabled without touching router | diff --git a/ocr b/ocr new file mode 100644 index 0000000..77ff738 Binary files /dev/null and b/ocr differ diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 0000000..c6cdfc6 --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "skills": { + "find-skills": { + "source": "vercel-labs/skills", + "sourceType": "github", + "skillPath": "skills/find-skills/SKILL.md", + "computedHash": "9e1c8b3103f92fa8092568a44fe64858de7c5c9dc65ce4bea8f168080e889cfd" + }, + "open-code-review": { + "source": "alibaba/open-code-review", + "sourceType": "github", + "skillPath": "skills/open-code-review/SKILL.md", + "computedHash": "f8ba911346cfbe7ec70c98fc41bbc9163f37606b879cf7dc2468ad4541653bae" + } + } +} diff --git a/src/agentkit/llm/providers/usage_store.py b/src/agentkit/llm/providers/usage_store.py index 822b649..97916c8 100644 --- a/src/agentkit/llm/providers/usage_store.py +++ b/src/agentkit/llm/providers/usage_store.py @@ -205,7 +205,7 @@ class RedisUsageStore: await self._redis.aclose() self._redis = None if self._sync_redis is not None: - self._sync_redis.aclose() + self._sync_redis.close() self._sync_redis = None def _degrade_to_fallback(self) -> None: diff --git a/src/agentkit/quality/cascade_state_store.py b/src/agentkit/quality/cascade_state_store.py index b4a2e70..9adde99 100644 --- a/src/agentkit/quality/cascade_state_store.py +++ b/src/agentkit/quality/cascade_state_store.py @@ -143,7 +143,7 @@ class RedisCascadeStateStore: if not self._degraded: self._degraded = True if self._fallback is None: - self._fallback = InMemoryCascadeStateStore() + self._fallback = InMemoryCascadeStateStore(session_ttl=self._session_ttl) logger.warning("Redis cascade store unreachable, degraded to in-memory") def increment_interaction(self, session_id: str) -> int: @@ -223,6 +223,12 @@ class RedisCascadeStateStore: if self._fallback is not None: self._fallback.reset(session_id) + def close(self) -> None: + """Close the Redis connection pool.""" + if self._sync_redis is not None: + self._sync_redis.close() + self._sync_redis = None + # --------------------------------------------------------------------------- # Factory @@ -241,5 +247,4 @@ def create_cascade_state_store( return RedisCascadeStateStore(redis_url=redis_url, session_ttl=session_ttl) except ImportError: logger.warning("redis package not available, falling back to in-memory cascade store") - return InMemoryCascadeStateStore() - return InMemoryCascadeStateStore() + return InMemoryCascadeStateStore(session_ttl=session_ttl) diff --git a/src/agentkit/server/frontend/components.d.ts b/src/agentkit/server/frontend/components.d.ts new file mode 100644 index 0000000..95afcf5 --- /dev/null +++ b/src/agentkit/server/frontend/components.d.ts @@ -0,0 +1,93 @@ +/* eslint-disable */ +// @ts-nocheck +// biome-ignore lint: disable +// oxlint-disable +// ------ +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 + +export {} + +/* prettier-ignore */ +declare module 'vue' { + export interface GlobalComponents { + AAlert: typeof import('ant-design-vue/es')['Alert'] + ABadge: typeof import('ant-design-vue/es')['Badge'] + AButton: typeof import('ant-design-vue/es')['Button'] + ACard: typeof import('ant-design-vue/es')['Card'] + ACol: typeof import('ant-design-vue/es')['Col'] + ACollapse: typeof import('ant-design-vue/es')['Collapse'] + ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel'] + ADescriptions: typeof import('ant-design-vue/es')['Descriptions'] + ADescriptionsItem: typeof import('ant-design-vue/es')['DescriptionsItem'] + ADivider: typeof import('ant-design-vue/es')['Divider'] + ADrawer: typeof import('ant-design-vue/es')['Drawer'] + AEmpty: typeof import('ant-design-vue/es')['Empty'] + AForm: typeof import('ant-design-vue/es')['Form'] + AFormItem: typeof import('ant-design-vue/es')['FormItem'] + AgentLayout: typeof import('./src/components/layout/AgentLayout.vue')['default'] + AInput: typeof import('ant-design-vue/es')['Input'] + AInputNumber: typeof import('ant-design-vue/es')['InputNumber'] + AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] + AInputSearch: typeof import('ant-design-vue/es')['InputSearch'] + AModal: typeof import('ant-design-vue/es')['Modal'] + APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] + AppLayout: typeof import('./src/components/layout/AppLayout.vue')['default'] + ApprovalNode: typeof import('./src/components/workflow/ApprovalNode.vue')['default'] + ARadioButton: typeof import('ant-design-vue/es')['RadioButton'] + ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup'] + ARow: typeof import('ant-design-vue/es')['Row'] + ASelect: typeof import('ant-design-vue/es')['Select'] + ASelectOption: typeof import('ant-design-vue/es')['SelectOption'] + ASpace: typeof import('ant-design-vue/es')['Space'] + ASpin: typeof import('ant-design-vue/es')['Spin'] + ASwitch: typeof import('ant-design-vue/es')['Switch'] + ATable: typeof import('ant-design-vue/es')['Table'] + ATabPane: typeof import('ant-design-vue/es')['TabPane'] + ATabs: typeof import('ant-design-vue/es')['Tabs'] + ATag: typeof import('ant-design-vue/es')['Tag'] + ATextarea: typeof import('ant-design-vue/es')['Textarea'] + AUploadDragger: typeof import('ant-design-vue/es')['UploadDragger'] + ChatInput: typeof import('./src/components/chat/ChatInput.vue')['default'] + ChatMessage: typeof import('./src/components/chat/ChatMessage.vue')['default'] + ChatSidebar: typeof import('./src/components/chat/ChatSidebar.vue')['default'] + CodeDiffViewer: typeof import('./src/components/code/CodeDiffViewer.vue')['default'] + CommandHistory: typeof import('./src/components/terminal/CommandHistory.vue')['default'] + ConditionNode: typeof import('./src/components/workflow/ConditionNode.vue')['default'] + ContextPill: typeof import('./src/components/chat/ContextPill.vue')['default'] + DashboardOverview: typeof import('./src/components/evolution/DashboardOverview.vue')['default'] + DocumentUpload: typeof import('./src/components/kb/DocumentUpload.vue')['default'] + ExperiencePanel: typeof import('./src/components/evolution/ExperiencePanel.vue')['default'] + ExperienceTimeline: typeof import('./src/components/evolution/ExperienceTimeline.vue')['default'] + FilePreview: typeof import('./src/components/chat/FilePreview.vue')['default'] + FileTree: typeof import('./src/components/code/FileTree.vue')['default'] + FlowCanvas: typeof import('./src/components/workflow/FlowCanvas.vue')['default'] + IconNav: typeof import('./src/components/layout/IconNav.vue')['default'] + MetricsChart: typeof import('./src/components/evolution/MetricsChart.vue')['default'] + MetricsPanel: typeof import('./src/components/evolution/MetricsPanel.vue')['default'] + NodePalette: typeof import('./src/components/workflow/NodePalette.vue')['default'] + OptimizationPanel: typeof import('./src/components/evolution/OptimizationPanel.vue')['default'] + ParallelNode: typeof import('./src/components/workflow/ParallelNode.vue')['default'] + PathOptimizerPanel: typeof import('./src/components/evolution/PathOptimizerPanel.vue')['default'] + PitfallPanel: typeof import('./src/components/evolution/PitfallPanel.vue')['default'] + PitfallRoutePanel: typeof import('./src/components/evolution/PitfallRoutePanel.vue')['default'] + PropertyPanel: typeof import('./src/components/workflow/PropertyPanel.vue')['default'] + QuadrantPanel: typeof import('./src/components/layout/QuadrantPanel.vue')['default'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] + SearchTest: typeof import('./src/components/kb/SearchTest.vue')['default'] + SideNav: typeof import('./src/components/layout/SideNav.vue')['default'] + SkillCard: typeof import('./src/components/skills/SkillCard.vue')['default'] + SkillDetail: typeof import('./src/components/skills/SkillDetail.vue')['default'] + SkillNode: typeof import('./src/components/workflow/SkillNode.vue')['default'] + SourceConfig: typeof import('./src/components/kb/SourceConfig.vue')['default'] + SplashScreen: typeof import('./src/components/layout/SplashScreen.vue')['default'] + SplitPane: typeof import('./src/components/layout/SplitPane.vue')['default'] + TerminalEmulator: typeof import('./src/components/terminal/TerminalEmulator.vue')['default'] + TitleBar: typeof import('./src/components/layout/TitleBar.vue')['default'] + ToolCallCard: typeof import('./src/components/chat/ToolCallCard.vue')['default'] + ToolCallIndicator: typeof import('./src/components/chat/ToolCallIndicator.vue')['default'] + TopNav: typeof import('./src/components/layout/TopNav.vue')['default'] + UsagePanel: typeof import('./src/components/evolution/UsagePanel.vue')['default'] + } +} diff --git a/src/agentkit/server/frontend/src/App.vue b/src/agentkit/server/frontend/src/App.vue index c5ca2c2..9dd1659 100644 --- a/src/agentkit/server/frontend/src/App.vue +++ b/src/agentkit/server/frontend/src/App.vue @@ -1,5 +1,5 @@ - + - +

最近经验

- 查看全部 + 查看全部
@@ -55,6 +55,7 @@ v-for="exp in recentExperiences" :key="exp.id" class="experience-item" + @click="openDrawer('experience-detail', exp)" >
@@ -71,7 +72,7 @@

避坑预警

- 查看全部 + 查看全部
@@ -81,6 +82,7 @@ v-for="(warning, index) in store.pitfalls.slice(0, 5)" :key="index" class="pitfall-item" + @click="openDrawer('pitfall-detail', warning)" > {{ riskLabel(warning.risk_level) }} @@ -91,13 +93,167 @@
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/src/agentkit/server/frontend/src/components/layout/QuadrantPanel.vue b/src/agentkit/server/frontend/src/components/layout/QuadrantPanel.vue index d95dcd6..8f2ba38 100644 --- a/src/agentkit/server/frontend/src/components/layout/QuadrantPanel.vue +++ b/src/agentkit/server/frontend/src/components/layout/QuadrantPanel.vue @@ -114,8 +114,13 @@ defineExpose({ setActiveTab }) height: 100%; overflow: hidden; background: var(--bg-primary); - border: 1px solid var(--border-color); border-radius: var(--radius-lg); + border: 1px solid var(--border-color-split); + transition: border-color var(--transition-normal); +} + +.quadrant-panel:hover { + border-color: var(--border-color); } .quadrant-panel--collapsed { @@ -126,16 +131,16 @@ defineExpose({ setActiveTab }) display: flex; align-items: center; justify-content: space-between; - height: 36px; - padding: 0 var(--space-2); - border-bottom: 1px solid var(--border-color); + height: 38px; + padding: 0 var(--space-3); + border-bottom: 1px solid var(--border-color-split); background: var(--bg-secondary); flex-shrink: 0; } .quadrant-panel__tabs { display: flex; - gap: var(--space-1); + gap: 2px; overflow-x: auto; scrollbar-width: none; } @@ -148,15 +153,16 @@ defineExpose({ setActiveTab }) display: flex; align-items: center; gap: var(--space-1); - padding: var(--space-1) var(--space-2); + padding: var(--space-1) var(--space-3); border: none; background: transparent; color: var(--text-tertiary); font-size: var(--font-xs); cursor: pointer; - border-radius: var(--radius-sm); + border-radius: var(--radius-md); white-space: nowrap; transition: all var(--transition-fast); + position: relative; } .quadrant-panel__tab:hover { @@ -178,13 +184,13 @@ defineExpose({ setActiveTab }) display: flex; align-items: center; justify-content: center; - width: 24px; - height: 24px; + width: 26px; + height: 26px; border: none; background: transparent; - color: var(--text-tertiary); + color: var(--text-placeholder); cursor: pointer; - border-radius: var(--radius-sm); + border-radius: var(--radius-md); flex-shrink: 0; transition: all var(--transition-fast); } diff --git a/src/agentkit/server/frontend/src/components/layout/SplitPane.vue b/src/agentkit/server/frontend/src/components/layout/SplitPane.vue index 6cdf79b..e29b201 100644 --- a/src/agentkit/server/frontend/src/components/layout/SplitPane.vue +++ b/src/agentkit/server/frontend/src/components/layout/SplitPane.vue @@ -190,20 +190,20 @@ function onHandleKeydown(e: KeyboardEvent) { } .split-pane--horizontal > .split-pane__handle { - width: 6px; + width: 8px; cursor: col-resize; flex-direction: column; } .split-pane--vertical > .split-pane__handle { - height: 6px; + height: 8px; cursor: row-resize; flex-direction: row; } .split-pane__handle:hover, .split-pane--dragging .split-pane__handle { - background-color: var(--color-primary); + background-color: var(--color-primary-light); } .split-pane__handle-line { @@ -214,17 +214,17 @@ function onHandleKeydown(e: KeyboardEvent) { .split-pane--horizontal > .split-pane__handle > .split-pane__handle-line { width: 2px; - height: 24px; + height: 28px; } .split-pane--vertical > .split-pane__handle > .split-pane__handle-line { height: 2px; - width: 24px; + width: 28px; } .split-pane__handle:hover .split-pane__handle-line, .split-pane--dragging .split-pane__handle-line { - background-color: transparent; + background-color: var(--color-primary); } .split-pane--dragging { diff --git a/src/agentkit/server/frontend/src/components/layout/TopNav.vue b/src/agentkit/server/frontend/src/components/layout/TopNav.vue index 61a5a99..a0a5bbf 100644 --- a/src/agentkit/server/frontend/src/components/layout/TopNav.vue +++ b/src/agentkit/server/frontend/src/components/layout/TopNav.vue @@ -1,6 +1,10 @@