Files
X-Agents/core/agents/tools/__init__.py
DESKTOP-72TV0V4\caoxiaozhu 249e7e577a feat: 新增 core/agents 模块和 nanobot
- 新增 agents 模块,包含 agent、api、skills 等子模块
- 新增 nanobot 项目,支持多渠道集成
- 添加启动脚本 start-all.bat 和 start-all.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 21:29:12 +08:00

52 lines
1.1 KiB
Python

"""Tools module for X-Agents.
This module provides tool infrastructure for the agent system.
It wraps and extends the nanobot tool implementation.
"""
from nanobot.agent.tools.base import Tool
from nanobot.agent.tools.registry import ToolRegistry
from agents.tools.builtin import (
get_builtin_tools,
ReadFileTool,
WriteFileTool,
ListDirectoryTool,
SearchTool,
WebSearchTool,
CalculatorTool,
GetTimeTool,
BashTool,
)
from agents.tools.manager import ToolManager
def create_default_registry() -> ToolRegistry:
"""Create a tool registry with default tools.
Returns:
Tool registry with built-in tools
"""
registry = ToolRegistry()
# Register built-in tools
for tool in get_builtin_tools():
registry.register(tool)
return registry
__all__ = [
"Tool",
"ToolRegistry",
"ToolManager",
"create_default_registry",
"get_builtin_tools",
"ReadFileTool",
"WriteFileTool",
"ListDirectoryTool",
"SearchTool",
"WebSearchTool",
"CalculatorTool",
"GetTimeTool",
"BashTool",
]