[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.hooks.custom] path = "hatch_build.py" [project] name = "agency-swarm" version = "1.9.9" description = "Agency Swarm framework" readme = "README.md" requires-python = ">=3.12" license = "MIT" authors = [{ name = "Vrsen AI Solutions", email = "me@vrsen.ai" }] dependencies = [ "openai>=2.2,<3", "openai-agents==0.14.8", "datamodel-code-generator>=0.56.0,<0.57.0", "docstring-parser>=0.16,<1.0.0", "fastmcp>=3.2.0", "jsonref>=1.1.0,<2.0.0", "mcp>=1.23.0,<2.0.0", "pydantic>=2.11,<3", "python-dotenv>=1.1.1,<2.0.0", "requests>=2.0,<3", "rich>=13.9.4,<14.0.0", "prompt-toolkit>=3.0.0,<4.0.0", "termcolor>=2.3.0,<3.0.0", "types-requests>=2.0,<3", "typing-extensions>=4.13,<5", "watchfiles>=1.0.0,<2.0.0", "fastapi>=0.115.0", "uvicorn[standard]>=0.35.0", "ag-ui-protocol>=0.1.18", "aiofiles>=23.2.1", "filetype>=1.2.0", "httpx>=0.28.0", "griffe>=1.15.0,<2", ] classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Intended Audience :: Developers", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", "License :: OSI Approved :: MIT License", ] [project.urls] Homepage = "https://github.com/VRSEN/agency-swarm" Repository = "https://github.com/VRSEN/agency-swarm" [project.scripts] agency-swarm = "agency_swarm.cli.main:main" [project.optional-dependencies] voice = ["numpy>=2.2.0, <3; python_version>='3.10'", "websockets>=15.0, <16"] viz = ["graphviz>=0.17"] litellm = ["litellm>=1.83.0, <2"] jupyter = ["ipykernel>=6.29.0,<7.0.0", "jupyter_client>=8.0.0,<9.0.0", "nest_asyncio>=1.6.0,<2.0.0"] fastapi = [ "fastapi>=0.115.0", "uvicorn[standard]>=0.35.0", "ag-ui-protocol>=0.1.18", "aiofiles>=23.2.1", "filetype>=1.2.0", "httpx>=0.28.0", ] [dependency-groups] dev = [ "coverage>=7.8.2", "mypy>=1.16.0", "pre-commit>=4.2.0", "pytest>=8.4.0", "pytest-asyncio>=1.0.0", "pytest-mock>=3.14.1", "ruff>=0.11.12", "langchain-core>=0.1.0", "langchain-experimental>=0.0.50", "langchain-community>=0.0.20", "fastapi>=0.115.0", "uvicorn[standard]>=0.35.0", "ag-ui-protocol>=0.1.18", "aiofiles>=23.2.1", "filetype>=1.2.0", "httpx>=0.28.0", "ipykernel>=6.29.0,<7.0.0", "jupyter_client>=8.0.0,<9.0.0", ] [tool.hatch.build.targets.wheel] packages = ["src/agency_swarm"] exclude = ["**/node_modules/**", "**/.next/**"] artifacts = [ # Copilot frontend files "ui/demos/copilot/**/*.ts", "ui/demos/copilot/**/*.tsx", "ui/demos/copilot/**/*.css", "ui/demos/copilot/**/*.json", "ui/demos/copilot/**/*.mjs", "ui/demos/copilot/**/*.ico", "ui/demos/copilot/**/*.svg", # Pricing data file "data/model_prices_and_context_window.json", ] [tool.hatch.build.targets.wheel.force-include] "src/agency_swarm/cli/utils/generate-agent-from-settings.ts" = "agency_swarm/cli/utils/generate-agent-from-settings.ts" [tool.hatch.build.targets.sdist] include = [ "src/agency_swarm/**/*.py", "src/agency_swarm/**/*.ts", "src/agency_swarm/ui/templates/**", "src/agency_swarm/ui/demos/copilot/**", "src/agency_swarm/data/model_prices_and_context_window.json", ] exclude = ["**/node_modules/**", "**/.next/**"] [tool.ruff] line-length = 120 target-version = "py313" exclude = [ "docs/**", ] [tool.ruff.lint] select = [ "E", "W", "F", "I", "B", "C4", "UP", ] isort = { combine-as-imports = true, known-first-party = ["agency_swarm"] } [tool.ruff.lint.pydocstyle] convention = "google" [tool.ruff.lint.per-file-ignores] "examples/**/*.py" = ["E501"] [tool.mypy] # Relax strictness to get CI green without functional changes. strict = false ignore_missing_imports = true disallow_incomplete_defs = false disallow_untyped_defs = false disallow_untyped_calls = false warn_no_return = true warn_redundant_casts = true warn_unused_configs = true [[tool.mypy.overrides]] module = "sounddevice.*" ignore_missing_imports = true [[tool.mypy.overrides]] module = [ "ag_ui.*", "filetype", "jsonref", "aiofiles", "langchain_community.*", "fastmcp.*", ] ignore_missing_imports = true [tool.coverage.run] source = ["tests", "src/agency_swarm"] [tool.coverage.report] show_missing = true sort = "-Cover" exclude_also = [ "if TYPE_CHECKING:", "@abc.abstractmethod", "raise NotImplementedError", "logger.debug", ] [tool.pytest.ini_options] markers = [ "asyncio: mark test as asyncio", "allow_call_model_methods: mark test as allowing calls to real model implementations", "fastapi: mark test as requiring FastAPI dependencies", ] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "session" filterwarnings = [ "ignore:coroutine 'test_async_input_filter_fails..invalid_input_filter' was never awaited:RuntimeWarning", ] testpaths = ["tests"] [tool.inline-snapshot] format-command = "ruff format --stdin-filename {filename}"