Files
lintsinghua f05c0073e1 feat(agent): implement comprehensive agent architecture with knowledge base and persistence layer
- Add database migrations for agent checkpoints and tree node tracking
- Implement core agent execution framework with executor, state management, and message handling
- Create knowledge base system with framework-specific modules (Django, FastAPI, Flask, Express, React, Supabase)
- Add vulnerability knowledge modules covering authentication, cryptography, injection, XSS, XXE, SSRF, path traversal, deserialization, and race conditions
- Introduce new agent tools: thinking tool, reporting tool, and agent-specific utilities
- Implement LLM memory compression and prompt caching for improved performance
- Add agent registry and persistence layer for checkpoint management
- Refactor agent implementations (analysis, recon, verification, orchestrator) with enhanced capabilities
- Remove legacy agent implementations (analysis_v2, react_agent)
- Update API endpoints for agent task creation and project management
- Add frontend components for agent task creation and enhanced audit UI
- Consolidate agent service architecture with improved separation of concerns
- This refactoring provides a scalable foundation for multi-agent collaboration with knowledge-driven decision making and state persistence
2025-12-12 15:27:12 +08:00

60 lines
1.3 KiB
Python

"""
知识模块系统 - 基于RAG的安全知识检索
提供专业的安全知识检索能力,支持:
- 漏洞类型知识(SQL注入、XSS、命令注入等)
- 框架安全知识(FastAPI、Django、Flask、Express等)
- 安全最佳实践
- 修复建议
- 代码模式识别
知识库采用模块化组织:
- vulnerabilities/: 漏洞类型知识
- frameworks/: 框架安全知识
"""
# 基础定义
from .base import KnowledgeDocument, KnowledgeCategory
# 知识加载器
from .loader import (
KnowledgeLoader,
knowledge_loader,
get_available_modules,
get_module_content,
)
# RAG知识检索
from .rag_knowledge import (
SecurityKnowledgeRAG,
security_knowledge_rag,
)
# 知识查询工具
from .tools import (
SecurityKnowledgeQueryTool,
GetVulnerabilityKnowledgeTool,
ListKnowledgeModulesTool,
)
__all__ = [
# 基础定义
"KnowledgeDocument",
"KnowledgeCategory",
# 知识加载器
"KnowledgeLoader",
"knowledge_loader",
"get_available_modules",
"get_module_content",
# RAG知识检索
"SecurityKnowledgeRAG",
"security_knowledge_rag",
# 知识查询工具
"SecurityKnowledgeQueryTool",
"GetVulnerabilityKnowledgeTool",
"ListKnowledgeModulesTool",
]