- 新增 embedding_service(语义检索)、knowledge_service(RAG)、text_chunker、document_parser - 新增 tool_registry(自定义工具注册表)并完善工具市场 API(CRUD + code/http 执行) - 新增 agent_vector_memory / knowledge_base 模型及对应数据库表 - 实现 SSE 流式响应与 Agent 预算控制 - AgentChat.vue 集成 MainLayout 导航布局 - 完善测试体系:7 个新测试文件共 110 个测试覆盖 - 修复 conftest.py SQLite 内存数据库连接隔离问题 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.2 KiB
Python
48 lines
1.2 KiB
Python
"""
|
||
Agent Runtime — 自主 AI Agent 核心运行时。
|
||
|
||
提供 ReAct 循环驱动的自主 Agent,支持:
|
||
- 工具调用(复用已有 ToolRegistry)
|
||
- 分层记忆(工作记忆 + 长期记忆)
|
||
- 多模型(OpenAI / DeepSeek)
|
||
- 多 Agent 编排(路由/顺序/辩论)
|
||
- 可嵌入工作流节点或独立运行
|
||
"""
|
||
from app.agent_runtime.core import AgentRuntime
|
||
from app.agent_runtime.schemas import (
|
||
AgentConfig,
|
||
AgentResult,
|
||
AgentLLMConfig,
|
||
AgentToolConfig,
|
||
AgentMemoryConfig,
|
||
AgentBudgetConfig,
|
||
AgentStep,
|
||
)
|
||
from app.agent_runtime.context import AgentContext
|
||
from app.agent_runtime.memory import AgentMemory
|
||
from app.agent_runtime.tool_manager import AgentToolManager
|
||
from app.agent_runtime.orchestrator import (
|
||
AgentOrchestrator,
|
||
OrchestratorAgentConfig,
|
||
OrchestratorResult,
|
||
OrchestratorStep,
|
||
)
|
||
|
||
__all__ = [
|
||
"AgentRuntime",
|
||
"AgentConfig",
|
||
"AgentResult",
|
||
"AgentLLMConfig",
|
||
"AgentToolConfig",
|
||
"AgentMemoryConfig",
|
||
"AgentBudgetConfig",
|
||
"AgentContext",
|
||
"AgentMemory",
|
||
"AgentToolManager",
|
||
"AgentStep",
|
||
"AgentOrchestrator",
|
||
"OrchestratorAgentConfig",
|
||
"OrchestratorResult",
|
||
"OrchestratorStep",
|
||
]
|