pyproject.toml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. [build-system]
  2. requires = ["hatchling"]
  3. build-backend = "hatchling.build"
  4. [tool.hatch.build.hooks.custom]
  5. path = "hatch_build.py"
  6. [project]
  7. name = "agency-swarm"
  8. version = "1.9.9"
  9. description = "Agency Swarm framework"
  10. readme = "README.md"
  11. requires-python = ">=3.12"
  12. license = "MIT"
  13. authors = [{ name = "Vrsen AI Solutions", email = "me@vrsen.ai" }]
  14. dependencies = [
  15. "openai>=2.2,<3",
  16. "openai-agents==0.14.8",
  17. "datamodel-code-generator>=0.56.0,<0.57.0",
  18. "docstring-parser>=0.16,<1.0.0",
  19. "fastmcp>=3.2.0",
  20. "jsonref>=1.1.0,<2.0.0",
  21. "mcp>=1.23.0,<2.0.0",
  22. "pydantic>=2.11,<3",
  23. "python-dotenv>=1.1.1,<2.0.0",
  24. "requests>=2.0,<3",
  25. "rich>=13.9.4,<14.0.0",
  26. "prompt-toolkit>=3.0.0,<4.0.0",
  27. "termcolor>=2.3.0,<3.0.0",
  28. "types-requests>=2.0,<3",
  29. "typing-extensions>=4.13,<5",
  30. "watchfiles>=1.0.0,<2.0.0",
  31. "fastapi>=0.115.0",
  32. "uvicorn[standard]>=0.35.0",
  33. "ag-ui-protocol>=0.1.18",
  34. "aiofiles>=23.2.1",
  35. "filetype>=1.2.0",
  36. "httpx>=0.28.0",
  37. "griffe>=1.15.0,<2",
  38. ]
  39. classifiers = [
  40. "Typing :: Typed",
  41. "Intended Audience :: Developers",
  42. "Programming Language :: Python :: 3",
  43. "Programming Language :: Python :: 3.12",
  44. "Programming Language :: Python :: 3.13",
  45. "Programming Language :: Python :: 3.14",
  46. "Intended Audience :: Developers",
  47. "Operating System :: OS Independent",
  48. "Topic :: Software Development :: Libraries :: Python Modules",
  49. "License :: OSI Approved :: MIT License",
  50. ]
  51. [project.urls]
  52. Homepage = "https://github.com/VRSEN/agency-swarm"
  53. Repository = "https://github.com/VRSEN/agency-swarm"
  54. [project.scripts]
  55. agency-swarm = "agency_swarm.cli.main:main"
  56. [project.optional-dependencies]
  57. voice = ["numpy>=2.2.0, <3; python_version>='3.10'", "websockets>=15.0, <16"]
  58. viz = ["graphviz>=0.17"]
  59. litellm = ["litellm>=1.83.0, <2"]
  60. jupyter = ["ipykernel>=6.29.0,<7.0.0", "jupyter_client>=8.0.0,<9.0.0", "nest_asyncio>=1.6.0,<2.0.0"]
  61. fastapi = [
  62. "fastapi>=0.115.0",
  63. "uvicorn[standard]>=0.35.0",
  64. "ag-ui-protocol>=0.1.18",
  65. "aiofiles>=23.2.1",
  66. "filetype>=1.2.0",
  67. "httpx>=0.28.0",
  68. ]
  69. [dependency-groups]
  70. dev = [
  71. "coverage>=7.8.2",
  72. "mypy>=1.16.0",
  73. "pre-commit>=4.2.0",
  74. "pytest>=8.4.0",
  75. "pytest-asyncio>=1.0.0",
  76. "pytest-mock>=3.14.1",
  77. "ruff>=0.11.12",
  78. "langchain-core>=0.1.0",
  79. "langchain-experimental>=0.0.50",
  80. "langchain-community>=0.0.20",
  81. "fastapi>=0.115.0",
  82. "uvicorn[standard]>=0.35.0",
  83. "ag-ui-protocol>=0.1.18",
  84. "aiofiles>=23.2.1",
  85. "filetype>=1.2.0",
  86. "httpx>=0.28.0",
  87. "ipykernel>=6.29.0,<7.0.0",
  88. "jupyter_client>=8.0.0,<9.0.0",
  89. ]
  90. [tool.hatch.build.targets.wheel]
  91. packages = ["src/agency_swarm"]
  92. exclude = ["**/node_modules/**", "**/.next/**"]
  93. artifacts = [
  94. # Copilot frontend files
  95. "ui/demos/copilot/**/*.ts",
  96. "ui/demos/copilot/**/*.tsx",
  97. "ui/demos/copilot/**/*.css",
  98. "ui/demos/copilot/**/*.json",
  99. "ui/demos/copilot/**/*.mjs",
  100. "ui/demos/copilot/**/*.ico",
  101. "ui/demos/copilot/**/*.svg",
  102. # Pricing data file
  103. "data/model_prices_and_context_window.json",
  104. ]
  105. [tool.hatch.build.targets.wheel.force-include]
  106. "src/agency_swarm/cli/utils/generate-agent-from-settings.ts" = "agency_swarm/cli/utils/generate-agent-from-settings.ts"
  107. [tool.hatch.build.targets.sdist]
  108. include = [
  109. "src/agency_swarm/**/*.py",
  110. "src/agency_swarm/**/*.ts",
  111. "src/agency_swarm/ui/templates/**",
  112. "src/agency_swarm/ui/demos/copilot/**",
  113. "src/agency_swarm/data/model_prices_and_context_window.json",
  114. ]
  115. exclude = ["**/node_modules/**", "**/.next/**"]
  116. [tool.ruff]
  117. line-length = 120
  118. target-version = "py313"
  119. exclude = [
  120. "docs/**",
  121. ]
  122. [tool.ruff.lint]
  123. select = [
  124. "E",
  125. "W",
  126. "F",
  127. "I",
  128. "B",
  129. "C4",
  130. "UP",
  131. ]
  132. isort = { combine-as-imports = true, known-first-party = ["agency_swarm"] }
  133. [tool.ruff.lint.pydocstyle]
  134. convention = "google"
  135. [tool.ruff.lint.per-file-ignores]
  136. "examples/**/*.py" = ["E501"]
  137. [tool.mypy]
  138. # Relax strictness to get CI green without functional changes.
  139. strict = false
  140. ignore_missing_imports = true
  141. disallow_incomplete_defs = false
  142. disallow_untyped_defs = false
  143. disallow_untyped_calls = false
  144. warn_no_return = true
  145. warn_redundant_casts = true
  146. warn_unused_configs = true
  147. [[tool.mypy.overrides]]
  148. module = "sounddevice.*"
  149. ignore_missing_imports = true
  150. [[tool.mypy.overrides]]
  151. module = [
  152. "ag_ui.*",
  153. "filetype",
  154. "jsonref",
  155. "aiofiles",
  156. "langchain_community.*",
  157. "fastmcp.*",
  158. ]
  159. ignore_missing_imports = true
  160. [tool.coverage.run]
  161. source = ["tests", "src/agency_swarm"]
  162. [tool.coverage.report]
  163. show_missing = true
  164. sort = "-Cover"
  165. exclude_also = [
  166. "if TYPE_CHECKING:",
  167. "@abc.abstractmethod",
  168. "raise NotImplementedError",
  169. "logger.debug",
  170. ]
  171. [tool.pytest.ini_options]
  172. markers = [
  173. "asyncio: mark test as asyncio",
  174. "allow_call_model_methods: mark test as allowing calls to real model implementations",
  175. "fastapi: mark test as requiring FastAPI dependencies",
  176. ]
  177. asyncio_mode = "auto"
  178. asyncio_default_fixture_loop_scope = "session"
  179. filterwarnings = [
  180. "ignore:coroutine 'test_async_input_filter_fails.<locals>.invalid_input_filter' was never awaited:RuntimeWarning",
  181. ]
  182. testpaths = ["tests"]
  183. [tool.inline-snapshot]
  184. format-command = "ruff format --stdin-filename {filename}"