__init__.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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", "AliyunLogConfig", "AliyunOssConfig",
  63. "PgConfig", "MilvusConfig", "RedisConfig",
  64. # Infra
  65. "DatabaseManager", "create_backend", "MySQLBackend",
  66. "LogService", "LogRecord", "LogLevel", "LogCategory", "LogStatus",
  67. "AsyncHttpClient",
  68. # Core - Agent
  69. "Agent", "AgentContext", "AgentResult", "AgentStatus",
  70. "AgentOrchestrator", "ChainOrchestrator", "ParallelOrchestrator",
  71. "Tool", "ToolResult", "ToolRegistry",
  72. "Memory", "ConversationMemory", "VectorMemory",
  73. # Server
  74. "create_app",
  75. ]