修改了nanobot,往Hermes agent的风格走,进度1/3

This commit is contained in:
2026-04-20 18:11:14 +08:00
parent cdfc222c9f
commit 36882a7d7b
261 changed files with 12659 additions and 604 deletions

View File

@ -0,0 +1,63 @@
"""Agent Team swarms adapter package."""
from __future__ import annotations
from importlib import import_module
from typing import Any
__all__ = [
"AgentTeamOrchestrator",
"BridgeAttempt",
"BridgeResult",
"ExecutionMode",
"NanobotAgentAdapter",
"ProcedureMemory",
"ProcedureRecord",
"ResolvedTeamPlan",
"RunMemory",
"RunRecord",
"SwarmsBridge",
"SwarmsPolicy",
"SwarmsRunPlanner",
"SwarmsRunResult",
"SwarmsRunSpec",
]
def __getattr__(name: str) -> Any:
if name == "AgentTeamOrchestrator":
from nanobot.agent_team.orchestrator import AgentTeamOrchestrator
return AgentTeamOrchestrator
if name == "NanobotAgentAdapter":
from nanobot.agent_team.swarms_adapter import NanobotAgentAdapter
return NanobotAgentAdapter
if name == "SwarmsBridge":
from nanobot.agent_team.swarms_bridge import SwarmsBridge
return SwarmsBridge
if name == "SwarmsPolicy":
from nanobot.agent_team.swarms_policy import SwarmsPolicy
return SwarmsPolicy
if name == "SwarmsRunPlanner":
from nanobot.agent_team.swarms_planner import SwarmsRunPlanner
return SwarmsRunPlanner
if name in {"ProcedureMemory", "RunMemory"}:
memory = import_module("nanobot.agent_team.memory")
return getattr(memory, name)
if name in {
"BridgeAttempt",
"BridgeResult",
"ExecutionMode",
"ProcedureRecord",
"ResolvedTeamPlan",
"RunRecord",
"SwarmsRunResult",
"SwarmsRunSpec",
}:
types = import_module("nanobot.agent_team.types")
return getattr(types, name)
raise AttributeError(name)