-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathsetup.py
More file actions
347 lines (341 loc) · 12.5 KB
/
Copy pathsetup.py
File metadata and controls
347 lines (341 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# Copyright(C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
import re
from setuptools import setup
with open("src/gaia/version.py", encoding="utf-8") as fp:
version_content = fp.read()
version_match = re.search(r'__version__\s*=\s*["\']([^"\']+)["\']', version_content)
if not version_match:
raise ValueError("Unable to find version string in version.py")
gaia_version = version_match.group(1)
tkml_version = "5.0.4"
# Standalone AMD production agent wheels (issues #1102, #1179). Each ships as
# a separate 'gaia-agent-<id>' PyPI package depending on this framework
# wheel. Deliberately NOT an extras_require entry: this list is read
# statically by util/list_agent_packages.py (single source of truth for
# .github/workflows/publish_agents.yml's build/publish matrix and
# tests/unit/test_agent_pypi_publish.py) without ever being handed to pip's
# resolver. An extras_require entry naming these packages made 'pip install
# "amd-gaia[agents]"' unsatisfiable while the wheels are unpublished
# (publish_agents.yml's publish job is paused), which made the resolver
# silently downgrade amd-gaia itself to the newest release that didn't
# declare the extra (#2240) -- see setup.py history / PR fixing #2240 for
# the incident. Do not move this back into extras_require until the wheels
# are live on PyPI.
AGENT_WHEEL_PACKAGES = [
"gaia-agent-summarize",
"gaia-agent-sd",
"gaia-agent-fileio",
"gaia-agent-docker",
"gaia-agent-jira",
"gaia-agent-blender",
"gaia-agent-emr",
"gaia-agent-code",
"gaia-agent-connectors-demo",
"gaia-agent-analyst",
"gaia-agent-browser",
"gaia-agent-docqa",
"gaia-agent-routing",
"gaia-agent-email",
"gaia-agent-chat",
]
setup(
name="amd-gaia",
version=gaia_version,
description="GAIA is a lightweight agent framework designed for the edge and AI PCs.",
author="AMD",
url="https://github.com/amd/gaia",
license="MIT",
package_dir={"": "src"},
packages=[
"gaia",
"gaia.llm",
"gaia.llm.providers",
"gaia.audio",
"gaia.chat",
"gaia.schedule",
"gaia.daemon",
"gaia.daemon.custody",
"gaia.daemon.scheduler",
"gaia.daemon.sidecars",
"gaia.ui",
"gaia.ui.routers",
"gaia.ui.email_sidecar",
"gaia.database",
"gaia.talk",
"gaia.testing",
"gaia.utils",
"gaia.apps",
"gaia.apps.docker",
"gaia.apps.jira",
"gaia.apps.llm",
"gaia.apps.summarize",
"gaia.apps.summarize.templates",
"gaia.eval",
"gaia.installer",
"gaia.hub",
"gaia.rag",
"gaia.mcp",
"gaia.mcp.client",
"gaia.mcp.client.transports",
"gaia.mcp.servers",
"gaia.agents",
"gaia.agents.base",
"gaia.agents.tools",
"gaia.agents.builder",
"gaia.agents.code_index",
"gaia.agents.code_index.tools",
"gaia.governance",
"gaia.sd",
"gaia.vlm",
"gaia.api",
"gaia.filesystem",
"gaia.scratchpad",
"gaia.web",
"gaia.code_index",
"gaia.apps.webui",
"gaia.connectors",
"gaia.connectors.catalog",
"gaia.connectors.providers",
"gaia.skills",
],
package_data={
"gaia.eval": [
"webapp/*.json",
"webapp/*.js",
"webapp/*.md",
"webapp/public/*.html",
"webapp/public/*.css",
"webapp/public/*.js",
],
# Browser-mode Agent UI bundle. Recursive globs in package_data are
# unreliable across setuptools versions, so we list shallow patterns
# here and back them up with `recursive-include` in MANIFEST.in. The
# CI verifier (util/verify_wheel_dist.py) enforces that the wheel
# actually contains these entries before publish.
"gaia.apps.webui": [
"dist/index.html",
"dist/*.svg",
"dist/*.png",
"dist/*.ico",
"dist/*.webmanifest",
"dist/*.json",
"dist/*.txt",
"dist/assets/*",
],
},
install_requires=[
"openai",
"pydantic>=2.9.2",
"transformers",
"accelerate",
"python-dotenv",
"aiohttp",
"rich",
"requests",
"beautifulsoup4",
"watchdog>=2.1.0",
"pillow>=9.0.0",
# Cron-based scheduler (issue #892): apscheduler drives the daemon;
# tomli/tomli-w read+write ~/.gaia/schedules.toml (tomllib is stdlib on 3.11+).
"apscheduler>=3.10.0",
"tomli-w>=1.0.0",
"tomli>=2.0.0; python_version < '3.11'",
# Required by the `gaia-mcp` bridge (base console_script), which parses
# multipart uploads via python_multipart at import time. Base — not an
# extra — so a plain `pip install amd-gaia` ships a working gaia-mcp.
"python-multipart>=0.0.9",
# gaia connectors is a base CLI command; keyring is its OS credential store (OAuth tokens #915). #1621
"keyring>=24.0.0,<26.0.0",
"tavily-python>=0.5.0",
# gaia.daemon locks the sidecar launch-secret file down with an
# owner-only NTFS DACL (#2250) — chmod 0600 is inert on Windows. Core,
# not an extra: without win32security the daemon cannot spawn ANY
# sidecar. Distinct from keyring's pywin32-ctypes, which has no
# win32security module.
'pywin32; sys_platform == "win32"',
],
extras_require={
"image": [
"term-image>=0.7.0,<0.8",
],
"api": [
"fastapi>=0.115.0",
"uvicorn>=0.32.0",
"python-multipart>=0.0.9",
# Async client for the /v1/<agent>/* daemon relay (#2178): the API
# server streams SSE from the daemon unbuffered via httpx. This is
# the sole path to agent surfaces now — no agent is mounted
# in-process (#2176), so [api] carries no per-agent deps (keyring is
# already a core install_requires dep for `gaia connectors`, #1621).
"httpx>=0.27.0",
],
"ui": [
"fastapi>=0.115.0",
"uvicorn>=0.32.0",
"python-multipart>=0.0.9",
"httpx>=0.27.0",
"psutil>=5.9.0",
# OAuth connections (issue #915): keyring stores refresh tokens in
# the OS credential store (macOS Keychain, Windows DPAPI, Linux
# SecretService). Pinned upper bound per supply-chain advisory.
"keyring>=24.0.0,<26.0.0",
# RAG runtime deps — gaia.rag.sdk uses faiss/pypdf/pymupdf/numpy and
# embeds via Lemonade (NOT sentence-transformers). See #845.
# Version specifiers match the standalone "rag" extra.
"faiss-cpu>=1.7.0",
"numpy>=1.24.0",
"pymupdf>=1.24.0",
"pypdf",
"python-pptx>=0.6.21",
"python-docx>=1.1.0",
# Memory cross-encoder reranker (gaia.agents.base.memory) — optional
# at runtime (graceful degradation) but bundled with "ui" so the
# full chat experience gets reranking out of the box. NOT a RAG dep.
"sentence-transformers",
"safetensors",
# torch is pinned lower-bound only. The "audio" extra caps
# torch<2.4 because torchvision<0.19 / torchaudio require it,
# but "ui" ships neither — capping here would force resolver
# downgrades for users with torch 2.5+ already installed.
"torch>=2.0.0",
],
"audio": [
"torch>=2.0.0,<2.14",
"torchvision<0.29.0",
"torchaudio",
],
"blender": [
"bpy",
],
"mcp": [
# Capped below 2.0: mcp 2.0.0 (released 2026-07-28) breaks
# MCPClient.connect() — the custom-agent harness went red with no
# code change. Lift the cap in a change that ports the client.
"mcp>=1.1.0,<3.0",
"starlette",
"uvicorn",
],
"telegram": [
"python-telegram-bot>=20.3",
],
"litellm": [
"litellm>=1.35.0,<2.0",
],
"dev": [
"pytest",
"pytest-cov",
"pytest-benchmark",
"pytest-mock",
"pytest-asyncio",
"pytest-xdist",
"pytest-rerunfailures",
"pyfakefs",
"memory_profiler",
"matplotlib",
"adjustText",
"plotly",
"black",
"pylint",
"isort",
"flake8",
"autoflake",
"mypy",
"bandit",
# CVSS 4.0 scoring for the security-audit workflow (util/cvss4.py,
# util/findings_to_sarif.py). Pinned: its 4.0 scores match the FIRST
# v4 calculator, which the audit's scores must agree with.
"cvss>=3.6,<4.0",
"responses",
"requests",
# gaia.connectors runtime deps surfaced in [dev] so that
# `pip install -e ".[dev]"` is sufficient to run the unit suite
# without pulling in the much heavier [ui] extra (faiss, torch).
"httpx>=0.27.0,<0.29.0",
"respx>=0.21.0,<0.24.0",
"keyring>=24.0.0,<26.0.0",
# Tokenizer proxy for the tool-prompt cost harness (#1448,
# gaia.eval.tool_cost) so the budget test can count tokens.
"tiktoken>=0.7.0,<1.0.0",
# OpenAPI response-body validation against the committed spec
# (tests/test_email_openapi_conformance.py, #1897).
"jsonschema>=4.0.0,<5.0.0",
],
"eval": [
"anthropic",
"bs4",
"scikit-learn>=1.5.0",
"numpy>=2.0,<2.3.0",
"pypdf",
"reportlab",
# Tool-prompt cost measurement (#1448): tiktoken cl100k_base proxy.
"tiktoken>=0.7.0,<1.0.0",
],
"talk": [
"sounddevice",
"openai-whisper",
"kokoro>=0.3.1",
"soundfile",
"psutil",
"pip", # Required: spacy model download needs pip in venv (uv omits it)
],
"youtube": [
"llama-index-readers-youtube-transcript",
],
"rag": [
# RAG embeds via Lemonade, not sentence-transformers — do NOT add it
# here. It is only needed for the optional memory reranker (see "ui").
"faiss-cpu>=1.7.0",
"numpy>=1.24.0",
"pymupdf>=1.24.0",
"pypdf",
"python-pptx>=0.6.21",
"python-docx>=1.1.0",
],
"lint": [
"black",
"pylint",
"isort",
"flake8",
"autoflake",
"mypy",
"bandit",
],
# Agent Hub packaging/publishing toolchain (issues #1093, #1179):
# 'gaia agent pack' shells out to 'python -m build', 'gaia agent publish'
# to 'twine upload'. Kept out of [dev] so the unit suite stays lean.
# install with 'pip install "amd-gaia[publish]"' to package an agent.
"publish": [
"build>=1.0.0",
"twine>=5.0.0",
],
# NOTE: no 'agent-<id>' / 'agents' extras here -- see
# AGENT_WHEEL_PACKAGES above for why (#2240) and where that list
# actually lives now. Install an agent from source until the wheels
# are published:
# uv pip install "gaia-agent-<id> @ git+https://github.com/amd/gaia.git#subdirectory=hub/agents/<id>/python"
# (see gaia.agents.install_hints.source_install_command).
},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
entry_points={
"console_scripts": [
"gaia = gaia.cli:main",
"gaia-cli = gaia.cli:main",
"gaia-mcp = gaia.mcp.mcp_bridge:main",
]
},
python_requires=">=3.10",
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
include_package_data=True,
)