2026-05-01 11:31:48 +08:00
|
|
|
|
"""
|
|
|
|
|
|
Agent Runtime — 自主 AI Agent 核心运行时。
|
|
|
|
|
|
|
|
|
|
|
|
提供 ReAct 循环驱动的自主 Agent,支持:
|
|
|
|
|
|
- 工具调用(复用已有 ToolRegistry)
|
|
|
|
|
|
- 分层记忆(工作记忆 + 长期记忆)
|
|
|
|
|
|
- 多模型(OpenAI / DeepSeek)
|
2026-05-01 19:32:59 +08:00
|
|
|
|
- 多 Agent 编排(路由/顺序/辩论)
|
2026-05-01 11:31:48 +08:00
|
|
|
|
- 可嵌入工作流节点或独立运行
|
|
|
|
|
|
"""
|
|
|
|
|
|
from app.agent_runtime.core import AgentRuntime
|
|
|
|
|
|
from app.agent_runtime.schemas import (
|
|
|
|
|
|
AgentConfig,
|
|
|
|
|
|
AgentResult,
|
|
|
|
|
|
AgentLLMConfig,
|
|
|
|
|
|
AgentToolConfig,
|
|
|
|
|
|
AgentMemoryConfig,
|
2026-05-01 22:30:46 +08:00
|
|
|
|
AgentBudgetConfig,
|
2026-05-01 19:32:59 +08:00
|
|
|
|
AgentStep,
|
2026-05-01 11:31:48 +08:00
|
|
|
|
)
|
|
|
|
|
|
from app.agent_runtime.context import AgentContext
|
|
|
|
|
|
from app.agent_runtime.memory import AgentMemory
|
|
|
|
|
|
from app.agent_runtime.tool_manager import AgentToolManager
|
2026-05-01 19:32:59 +08:00
|
|
|
|
from app.agent_runtime.orchestrator import (
|
|
|
|
|
|
AgentOrchestrator,
|
|
|
|
|
|
OrchestratorAgentConfig,
|
|
|
|
|
|
OrchestratorResult,
|
|
|
|
|
|
OrchestratorStep,
|
|
|
|
|
|
)
|
2026-05-01 11:31:48 +08:00
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
|
"AgentRuntime",
|
|
|
|
|
|
"AgentConfig",
|
|
|
|
|
|
"AgentResult",
|
|
|
|
|
|
"AgentLLMConfig",
|
|
|
|
|
|
"AgentToolConfig",
|
|
|
|
|
|
"AgentMemoryConfig",
|
2026-05-01 22:30:46 +08:00
|
|
|
|
"AgentBudgetConfig",
|
2026-05-01 11:31:48 +08:00
|
|
|
|
"AgentContext",
|
|
|
|
|
|
"AgentMemory",
|
|
|
|
|
|
"AgentToolManager",
|
2026-05-01 19:32:59 +08:00
|
|
|
|
"AgentStep",
|
|
|
|
|
|
"AgentOrchestrator",
|
|
|
|
|
|
"OrchestratorAgentConfig",
|
|
|
|
|
|
"OrchestratorResult",
|
|
|
|
|
|
"OrchestratorStep",
|
2026-05-01 11:31:48 +08:00
|
|
|
|
]
|