__init__.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. """
  2. Reson Agent - 模块化、可扩展的 Agent 框架
  3. 核心导出:
  4. - AgentRunner: Agent 执行引擎
  5. - RunConfig: 运行配置
  6. - Trace, Message, Goal: 执行追踪
  7. - Skill: 技能模型
  8. - tool: 工具装饰器
  9. - TraceStore: 存储接口
  10. """
  11. # 核心引擎
  12. from agent.core.runner import AgentRunner, CallResult, RunConfig
  13. from agent.core.presets import AgentPreset, AGENT_PRESETS, get_preset
  14. # 执行追踪
  15. from agent.trace.models import Trace, Message, Step, StepType, StepStatus, ChatMessage, Messages, MessageContent
  16. from agent.trace.goal_models import Goal, GoalTree, GoalStatus
  17. from agent.trace.protocols import TraceStore
  18. from agent.trace.store import FileSystemTraceStore
  19. # 技能系统
  20. from agent.skill.models import Skill
  21. # 工具系统
  22. from agent.tools import tool, ToolRegistry, get_tool_registry
  23. from agent.tools.models import ToolResult, ToolContext
  24. # 显式任务执行与独立验证
  25. from agent.orchestration import (
  26. CompletionPolicy,
  27. AgentRole,
  28. TaskStatus,
  29. ValidationVerdict,
  30. TaskCoordinator,
  31. TaskStore,
  32. FileSystemTaskStore,
  33. ArtifactStore,
  34. FileSystemArtifactStore,
  35. OrchestrationConfig,
  36. )
  37. from agent.orchestration.wiring import wire_orchestration
  38. # SDK 公开入口:统一调用 remote / 本地 Agent
  39. from agent.client import invoke_agent
  40. __version__ = "0.4.0"
  41. __all__ = [
  42. # Core
  43. "AgentRunner",
  44. "CallResult",
  45. "RunConfig",
  46. "AgentPreset",
  47. "AGENT_PRESETS",
  48. "get_preset",
  49. # Trace
  50. "Trace",
  51. "Message",
  52. "ChatMessage",
  53. "Messages",
  54. "MessageContent",
  55. "Step",
  56. "StepType",
  57. "StepStatus",
  58. "Goal",
  59. "GoalTree",
  60. "GoalStatus",
  61. "TraceStore",
  62. "FileSystemTraceStore",
  63. # Skill
  64. "Skill",
  65. # Tools
  66. "tool",
  67. "ToolRegistry",
  68. "get_tool_registry",
  69. "ToolResult",
  70. "ToolContext",
  71. # Orchestration
  72. "CompletionPolicy",
  73. "AgentRole",
  74. "TaskStatus",
  75. "ValidationVerdict",
  76. "TaskCoordinator",
  77. "TaskStore",
  78. "FileSystemTaskStore",
  79. "ArtifactStore",
  80. "FileSystemArtifactStore",
  81. "OrchestrationConfig",
  82. "wire_orchestration",
  83. # SDK
  84. "invoke_agent",
  85. ]