__init__.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. """Agentic Supply —— Agentic 架构基础设施供给层
  2. 层次结构(由内到外):
  3. ┌─────────────────┐
  4. │ src.config │ 配置管理
  5. ├─────────────────┤
  6. │ src.infra │ 基础设施(DB / HTTP / 日志 / 工具)
  7. ├─────────────────┤
  8. │ src.core │ 框架内核(Agent / Tool / Memory / Orchestrator)
  9. ├─────────────────┤
  10. │ src.server │ 应用服务(Quart / XXL)
  11. └─────────────────┘
  12. 快速开始:
  13. from src import (
  14. Agent, Tool, ToolRegistry, # 领域层
  15. DatabaseManager, LogService, # 设施层
  16. create_app, # 服务层
  17. )
  18. """
  19. # 配置
  20. from src.config import (
  21. GlobalConfig,
  22. )
  23. # 基础设施
  24. from src.infra import (
  25. DatabaseManager,
  26. MysqlManager,
  27. create_backend,
  28. MySQLBackend,
  29. LogService,
  30. LogRecord,
  31. LogLevel,
  32. LogCategory,
  33. LogStatus,
  34. AsyncHttpClient,
  35. )
  36. # 领域
  37. from src.core import (
  38. Agent,
  39. AgentContext,
  40. AgentResult,
  41. AgentStatus,
  42. AgentOrchestrator,
  43. ChainOrchestrator,
  44. ParallelOrchestrator,
  45. Tool,
  46. ToolResult,
  47. ToolRegistry,
  48. Memory,
  49. ConversationMemory,
  50. VectorMemory,
  51. )
  52. # 业务领域
  53. from src.domains import (
  54. FetchDemands,
  55. EnqueueDemands,
  56. DemandQueueMapper,
  57. DemandSearchArticle,
  58. ArticleFetchDetail,
  59. AccountFetch,
  60. AccountArticleFetch,
  61. )
  62. # 服务
  63. from src.server import create_app
  64. __all__ = [
  65. # Config
  66. "GlobalConfig",
  67. # Infra
  68. "DatabaseManager",
  69. "MysqlManager",
  70. "create_backend",
  71. "MySQLBackend",
  72. "LogService",
  73. "LogRecord",
  74. "LogLevel",
  75. "LogCategory",
  76. "LogStatus",
  77. "AsyncHttpClient",
  78. # Core - Agent
  79. "Agent",
  80. "AgentContext",
  81. "AgentResult",
  82. "AgentStatus",
  83. "AgentOrchestrator",
  84. "ChainOrchestrator",
  85. "ParallelOrchestrator",
  86. "Tool",
  87. "ToolResult",
  88. "ToolRegistry",
  89. "Memory",
  90. "ConversationMemory",
  91. "VectorMemory",
  92. # Domains
  93. "FetchDemands",
  94. "EnqueueDemands",
  95. "DemandQueueMapper",
  96. "DemandSearchArticle",
  97. "ArticleFetchDetail",
  98. "AccountFetch",
  99. "AccountArticleFetch",
  100. # Server
  101. "create_app",
  102. ]