git: e944a43db590 - main - misc/py-ag2: New port: Programming framework for agentic AI

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 12 Jul 2026 16:54:34 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e944a43db590b989be921b7f7fcd4af70a741807

commit e944a43db590b989be921b7f7fcd4af70a741807
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-12 01:35:20 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-12 16:54:25 +0000

    misc/py-ag2: New port: Programming framework for agentic AI
---
 misc/Makefile         |  1 +
 misc/py-ag2/Makefile  | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++
 misc/py-ag2/distinfo  |  3 +++
 misc/py-ag2/pkg-descr |  4 +++
 4 files changed, 76 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 816eed989fe9..d4818a725432 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -452,6 +452,7 @@
     SUBDIR += py-SimpleSoapy
     SUBDIR += py-SoapySDR
     SUBDIR += py-accelerate
+    SUBDIR += py-ag2
     SUBDIR += py-aistudio-sdk
     SUBDIR += py-alive-progress
     SUBDIR += py-analysis-framework-base
diff --git a/misc/py-ag2/Makefile b/misc/py-ag2/Makefile
new file mode 100644
index 000000000000..c23036497ac6
--- /dev/null
+++ b/misc/py-ag2/Makefile
@@ -0,0 +1,68 @@
+PORTNAME=	ag2
+DISTVERSION=	0.14.0
+CATEGORIES=	misc python # machine-learning
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Programming framework for agentic AI
+WWW=		https://ag2.ai/ \
+		https://docs.ag2.ai \
+		https://github.com/ag2ai/ag2
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}anyio>=4.0.0:devel/py-anyio@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}fast-depends>=3.0.8:devel/py-fast-depends@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}httpx>=0.28.1:www/py-httpx@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pydantic2>=2.6.1:devel/py-pydantic2@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-dotenv>0:www/py-python-dotenv@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyyaml>=6.0.2:devel/py-pyyaml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}termcolor>0:devel/py-termcolor@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tiktoken>0:textproc/py-tiktoken@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dirty-equals>=0.11:devel/py-dirty-equals@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}freezegun>=1.5.5:devel/py-freezegun@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=1.4.0:devel/py-pytest-asyncio@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-timeout>=2.4.0:devel/py-pytest-timeout@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}respx>=0.23.0:www/py-respx@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}websockets>=14.0:devel/py-websockets@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517 pytest
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	ag2ai
+GH_PROJECT=	ag2
+GH_TAGNAME=	v${DISTVERSION}
+
+NO_ARCH=	yes
+
+# The upstream test suite requires many optional providers and network access.
+# Run only the core tests for now that pass without optional extras.
+TEST_ARGS=	--ignore=test/mcp \
+		--ignore=test/beta/tools/sandbox/adapter/test_code_adapter.py \
+		--ignore=test/beta/tools/skills/test_toolkit.py \
+		test/test_import_utils.py \
+		test/test_json_utils.py \
+		test/test_llm_config.py \
+		test/test_import.py \
+		test/test_graph_utils.py \
+		test/test_logger_redaction.py \
+		test/test_token_count.py \
+		test/test_browser_utils.py \
+		test/test_conftest.py \
+		test/io \
+		test/fast_depends \
+		test/messages/test_base_message.py \
+		test/messages/test_client_messages.py \
+		test/messages/test_print_message.py \
+		test/a2a \
+		test/ag_ui \
+		test/beta \
+		test/logger
+
+# tests as of 0.14.0: 3300 passed, 424 skipped, 2 xfailed, 15 warnings in 29.66s
+
+.include <bsd.port.mk>
diff --git a/misc/py-ag2/distinfo b/misc/py-ag2/distinfo
new file mode 100644
index 000000000000..cd428d576169
--- /dev/null
+++ b/misc/py-ag2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1783811966
+SHA256 (ag2ai-ag2-0.14.0-v0.14.0_GH0.tar.gz) = e2e04ce6a30cd283c98cf48292a83b1ec5ada6813df2b25af0a76f52caf322d0
+SIZE (ag2ai-ag2-0.14.0-v0.14.0_GH0.tar.gz) = 5948015
diff --git a/misc/py-ag2/pkg-descr b/misc/py-ag2/pkg-descr
new file mode 100644
index 000000000000..381e216b7c54
--- /dev/null
+++ b/misc/py-ag2/pkg-descr
@@ -0,0 +1,4 @@
+AG2 is an open-source programming framework for building AI agents and
+facilitating cooperation among multiple agents to solve tasks. It provides
+a generic multi-agent conversation framework that supports agents that can
+converse with each other to accomplish tasks.