__init__.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. """Agentic Supply —— Agentic 架构基础设施供给层
  2. 层次结构(由内到外):
  3. ┌─────────────────┐
  4. │ supply.config │ 配置管理
  5. ├─────────────────┤
  6. │ supply.infra │ 基础设施(DB / HTTP / 日志 / 工具)
  7. ├─────────────────┤
  8. │ supply.core │ 框架内核(Agent / Tool / Memory / Orchestrator)
  9. ├─────────────────┤
  10. │ supply.server │ 应用服务(Quart / XXL)
  11. └─────────────────┘
  12. 快速开始:
  13. from supply import (
  14. Agent, Tool, ToolRegistry, # 领域层
  15. DatabaseManager, LogService, # 设施层
  16. create_app, # 服务层
  17. )
  18. """
  19. # 配置
  20. from supply.config import (
  21. GlobalConfig,
  22. DatabaseConfig,
  23. AliyunLogConfig,
  24. AliyunOssConfig,
  25. PgConfig,
  26. MilvusConfig,
  27. RedisConfig,
  28. )
  29. # 基础设施
  30. from supply.infra import (
  31. DatabaseManager,
  32. create_backend,
  33. MySQLBackend,
  34. LogService,
  35. LogRecord,
  36. LogLevel,
  37. LogCategory,
  38. LogStatus,
  39. AsyncHttpClient,
  40. )
  41. # 领域
  42. from supply.core import (
  43. Agent,
  44. AgentContext,
  45. AgentResult,
  46. AgentStatus,
  47. AgentOrchestrator,
  48. ChainOrchestrator,
  49. ParallelOrchestrator,
  50. Tool,
  51. ToolResult,
  52. ToolRegistry,
  53. Memory,
  54. ConversationMemory,
  55. VectorMemory,
  56. )
  57. # 服务
  58. from supply.server import create_app
  59. __all__ = [
  60. # Config
  61. "GlobalConfig",
  62. "DatabaseConfig",
  63. "AliyunLogConfig",
  64. "AliyunOssConfig",
  65. "PgConfig",
  66. "MilvusConfig",
  67. "RedisConfig",
  68. # Infra
  69. "DatabaseManager",
  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. # Server
  93. "create_app",
  94. ]